# Tools Release Notes (Old)

## Tools 2.3

### Fixed errors and malfunctions

- Totally rewritten the interface for WebCover. Can now compile both .erl and .beam files and export/import cover data.
  (Own Id: OTP-4706)

- Cover does no longer report coverage on lines which are not executed.
  (Own Id: OTP-4734)

- Fixed so that the generation of new function clauses works also for guarded functions in the erlang mode.
  (Own Id: OTP-3697)

- Fixed so that you do not get the error message "unbalanced parenthesis" when indenting correct code including bit syntax in the erlang mode.
  (Own Id: OTP-4526)

- The guard, function, is now colored by the emacs mode.
  (Own Id: OTP-4533)

- Indentation of macros is handled correctly in all cases by the erlang mode..
  (Own Id: OTP-4561, OTP-4687)

- is_* guards are now colored by the erlang mode.
  (Own Id: OTP-4562)

- The erlang mode now handles the fact that a function argument may be a guard expression. (That is useful when writing test case code.)
  (Own Id: OTP-4579)

- Keywords andalso and orelse are now colored by the erlang mode.
  (Own Id: OTP-4580)

- Fixed bug in the erlang mode function that calculates the arity of an Erlang function.
  (Own Id: OTP-4581)

### Improvements and new features

- Added functions `cover:start(Nodes)` and `cover:stop(Nodes)`. Cover compiled modules will be loaded on all nodes added with `cover:start(Nodes)`. `cover:stop(Nodes)` will collect coverage data from the stopped nodes and merge it with data collected on the main (controller) node.
  `cover:analyse/1,2,3` and `cover:analyse_to_file/1,2,3` will also collect data from all nodes before analysing.
  (Own Id: OTP-4177)

- The module attribute tag `deprecated` is used by Xref to find calls to deprecated functions. The `m/1`, `d/1`, and `analyze/2,3` functions have been updated to return calls to deprecated functions. See also xref(3) for more details.
  (Own Id: OTP-4695)

- Added functions `cover:compile_beam/1` and `cover:compile_beam_directory/0,1`. These functions use abstract code from existing beam files when cover compiling.
  Added option 'html' to `cover:analyse_to_file/1,2,3`. Instead of plain text, a HTML file is generated with all uncovered lines colored red.
  Added functions `cover:export/1,2` and `cover:import/1`. These functions can be used to export current coverage data to a file, and then import the data in a later session. Data can be exported for one single module or for all currently cover compiled modules.
  (Own Id: OTP-4702)

- Added function erlang-align-arrows to the erlang mode.
  (Own Id: OTP-4737)

- The module interface for the `instrument` module has been slightely changed. Also some new functionallity has been added. See the `instrument(3)` man page for more information.
  (*** POTENTIAL INCOMPATIBILITY ***)
  (Own Id: OTP-4761)
  (Aux Id: OTP-4534)

## Tools 2.2

### Improvements and new features

- The make options 'par' is removed
  Emakefiles can now contain compiler options
  (Own Id: OTP-4572)

## Tools 2.1

### Fixed errors and malfunctions

- An error could occur when stopping cover, and thus unloading all cover-compiled modules, if any of these modules was used by the code server itself.
  (Own Id: OTP-4269)

- Some bug fixes in `fprof` regarding complicated call stack scenarios that caused it to crash.
  (Own Id: OTP-4506)

### Improvements and new features

- More memory block types (most of the existing ones) are now identified by the instrumented emulator.
  (Own Id: OTP-4313)
  (Aux Id: OTP-4267, OTP-4312, OTP-4314)

- There is a new tool `cprof`, a call count profiler. It is something inbetween `cover` and `fprof`, and can be used to get a picture of which functions are most frequently called. See `tools` user's guide and reference manual.
  (Own Id: OTP-4507)

## Tools 2.0

### Fixed errors and malfunctions

- xref bug fix: variables LM and AM were not always disjoint.
  (Own Id: OTP-3921)

### Improvements and new features

- Coast was much too slow and ineffiecient, especially for large modules. Also, it was discovered that Coast in some cases returned erroneous values.

  Consequently, Coast has been discontinued and is replaced with a new tool Cover with similar interface and functionality. Refer to the Tools User's Guide and Reference Manual for more information about Cover.

  (*** POTENTIAL INCOMPATIBILITY ***)
  (Own Id: OTP-3622)

- The functions `xref:m/1` and `xref:d/1` return a list of undefined functions in case the BEAM files do not contain debug information.
  (Own Id: OTP-3879)

- `xref` represents unresolved calls with calls where the module, the function or the number of arguments are atoms and integers that are unlikely to occur in an Erlang system. Calls to `erlang:apply/2` and the like are included among the external calls. This is in contrast to R7 where calls to `apply` and `spawn` were used for representing unresolved calls.
  (*** POTENTIAL INCOMPATIBILITY ***)
  (Own Id: OTP-3948)

- The default value of the Xref option `verbose` has been changed from `true` to `false`. The function `xm/1`, which cross reference checks a module by calling `xref:m/1`, has been added to the `c` module.
  (Own Id: OTP-4101)

- Added a web based user interface to Cover.
  (Own Id: OTP-4105)
  (Aux Id: OTP-4104)

- The old cross reference tool `exref` has now been removed, use the new tool `xref` instead.
  (Own Id: OTP-4140)

## Tools 1.6.3

### Improvements and new features

- A preliminary version of the new Fprof tool has been added.
  (Own Id: OTP-4010)

## Tools 1.6.2

### Improvements and new features

- The functions `xref:m/1` and `xref:d/1` return a list of undefined functions in case the BEAM files do not contain debug information.
  Own Id: OTP-3879

## Tools 1.6.1

### Known Problems

See Tools 1.6.

### Improvements and New Features

- The following changes has been made to Xref:
  - `xref:m/1` has been changed to accept a filename.
  - bug fix: the predefined analysis `locals_not_called` and `xref:m/1` could sometimes miss unused local functions.
  - bug fix: the bit syntax is now recognized...
  - bug fix: setting the library path to `code_path` did not force the setting up of data.
  - # has lower precedence now.
  - only atoms are allowed as release and application names.
  - invalid symbolic links are ignored unless the extension is recognized (`.beam` typically).
  - calls where the module is fixed but the function is not are no longer unresolved; instead the "function" `'$F_EXPR'` is "called".
  - `xref_compiler:format_error/1` has been improved.
  - bug fix: calls to `'MNEMOSYNE RULE'` et al removed.
  - `m/1` and `d/1` return a list that always contains two elements.
  - `xref_parser:t2s/1` adds quotes to atoms that need them.
  - the documentation is less incomplete and buggy.
  - the strict operator has been documented (it was present in the code before).
  Own Id: OTP-3681

## Tools 1.6

### Known Problems

- Externally defined macros are not handled correctly in Coast.
  Own Id: OTP-3273
  Aux Id: seq3910

### Fixed Errors and Malfunctions

- `make:all()` no longer unnecessarily recompiles modules located in other directories than the current working directory.
  Own Id: OTP-3336
  Aux Id: Seq 4055
- When waiting for a reply from the Coast server process, the user interface functions did a `receive` that accepted any term. The `receive` has now been restricted to accept only the correct replies and not accidently a message from some other process.
  Own Id: OTP-3394
  Aux Id: Seq 4209
- `coast:compile_all/1,2` now returns the correct return value `{error,Reason}` if the directory given as argument does not exist or cannot be read.
  Own Id: OTP-3500
  Aux Id: Seq 4394
- The function `instrument:memory_data/0` returned invalid information if an address or size exceeded 2^27. `instrument:store_memory_data` did not have that problem.
  Own Id: OTP-3635

### Improvements and new features

- `make:all()` now recompiles modules where an include file has been modified.
  Own Id: OTP-3088
  Aux Id: seq1645, seq4228
- The eprof module has been optimised to minimise the measuring overhead. Typically, the measured program runs at about 50% of its ordinary speed.
  Own Id: OTP-3163
- xref is a new cross reference tool.
  Own Id: OTP-3639

## Tools 1.5.2

### Fixed Errors and Malfunctions

- Eprof was corrected because the `trace` BIF and format of trace messages were changed.
  Own Id: OTP-3369

## Tools 1.5.1

### Improvements and New Features

- The memory information obtained with the `instrument` module now contains an additional field, which represents the process which allocated a block.
  Own Id: OTP-3142

### Fixed Errors and Malfunctions

- Due to a bug in Coast, a module could be initialized repeatedly. However, it is only necessary to initiate a module once and this is now fixed.
  Own Id: OTP-3225

## Tools 1.4.3

### Incompatibilities With Tools 1.4

The module dbg is moved to the Runtime tools application

### Known Problems

- In `cover` two or more processes, running the same code, may in rare situations give rise to race conditions when updating the ETS table used.
  Own Id: OTP-2625
- `cover` counts the number of executed statements, instead of the number of function calls. (This problem is solved by using `coast` instead!)
  Own Id: OTP-1247
- `cover` doesn't store the accumulated data persistently.
  Own Id: OTP-1318

## Tools 1.4.1

### Fixed Errors and Malfunctions

- In Coast, recursive function calls containing other function calls as arguments are now recognised as being recursive.
  Own Id: OTP-1981
- In Coast there can no longer be a race condition if two (or more) processes, running the same code, tries to update the ETS tables used.
  Own Id: OTP-2625

### Incompatibilities With Tools 1.4

- The `run` function call will, if the call to the Coast-compiled module fails, return an exit signal instead of the tuple {'EXIT', Reason}.
- The internal representation of data has been changed, meaning that all previously Coast-compiled modules have to be recompiled.

### Known Problems

- In `cover` two or more processes, running the same code, may in rare situations give rise to race conditions when updating the ETS table used.
  Own Id: OTP-2625
- `cover` counts the number of executed statements, instead of the number of function calls. (This problem is solved by using `coast` instead!)
  Own Id: OTP-1247
- `cover` doesn't store the accumulated data persistently.
  Own Id: OTP-1318

## Tools 1.4

There is a new document module creating Emacs TAGS files, `tags`.

### Fixed Errors and Malfunctions

- `exref:delete_module/1` now works properly.
  Own Id: OTP-1115
- `exref` no longer have problems with guards (such as `record` and `atom`) in list comprehension (LC) expressions.
  Own Id: OTP-1291
- `exref` no longer mixes up modules.
  Own Id: OTP-1220
- `exref` no longer changes the working directory.
- `exref` now handles internal functions correctly under certain conditions.
- When using the `auto` option, exref no longer enters an infinite loop.

### Incompatibilities With Tools 1.2.1

- `exref:module` no longer accepts modules specified as strings, so the implementation now agrees with the documentation.

### Known Problems

- In Coast a recursive function call containing another function call as argument is currently not recognised as being recursive, unless the function call used as argument is made to a module not having been coast-compiled.
  Own Id: OTP-1981
- `cover` counts the number of executed statements, instead of the number of function calls. (This problem is solved by using `coast` instead!)
  Own Id: OTP-1247
- `cover` doesn't store the accumulated data persistently.
  Own Id: OTP-1318
- In Emacs occurances of `$` confuses indentation mechanism.
  Own Id: OTP-1203, OTP-1674, OTP-1675

## Tools 1.2.1

### Fixed Errors and Malfunctions

- The function `make:all` now works withoout a `Emakefile`.
  Own Id: OTP-1340
- `exref` now know about the language construct `query`.
  Own Id: OTP-1368

### Known Problems

- The function `exref:delete_module/1` does not work properly, so subesquent calls to `exref:analyse` will give incorrect results.
  Own Id: OTP-1115

## Tools 1.2

### Fixed Errors and Malfunctions

- Deadlock situation with COVER compile solved.
  Own Id: OTP-1072
  Aux Id: HA34612
- Cover does now work with include files.
  OwnId: OTP-1074
  Aux Id: HA34302
- Changed cover to used `filename:find_src/1` instead of the obsolete `file_util` module.

### Known Problems

- Not cleaning up when module removed.

## Tools 1.1

### Fixed Errors and Malfunctions

- Cover did not use `Options` in `file/2` in a correct way (OTP-1074).
- Cover tried to load the "tools" application dynamically which could cause deadlock in the startup if cover-compiled modules are involved at this stage. The attempt to load the application is now removed (must be specified in the start script).