Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler source paths in output are now relative #1227

Merged
merged 4 commits into from
Jun 11, 2016

Conversation

ferd
Copy link
Collaborator

@ferd ferd commented Jun 9, 2016

Supercedes #1174 with the fixes on config name.

Garrett Smith and others added 4 commits May 2, 2016 16:03
By default rebar3 displays compiler sources as absolute paths in their
original location, which is under the build dir.

This change introduces an option 'compiler_source_format' to format
sources in two alternative ways:

    relative
    absolute

When either 'relative' or 'absolute' are specified, the file is
resolved to its original location when it is a link. When 'relative'
is specified, the path is displayed relative to the current working
directory. When 'absolute' is specified, the path is absolute.

The default value is 'unchaged' which leaves the compiler source
unchanged.

This is arguably too flexible as I suspect most people would opt for
'relative' all the time - it's the most compact representation of the
file and is sufficient to find the source given cwd. The change
however is meant to introduce the change gradually, preserving
existing behavior and giving users a choice for formats.

In time perhaps the default can be changed to 'relative' - but still
allowing users to revert to the other two options ('absolutel' and
'unchanged') as needed.
This will allow us to eventually change the default type without it
looking ridiculous.
This required moving the reporting functions to rebar_base_compiler but
since this was already done for error_tuple, this seems to make sense.

Paths are also reformatted for warnings in erlc files.
@ferd ferd changed the title Compiler source format Compiler source paths in output is now relative Jun 10, 2016
@ferd ferd changed the title Compiler source paths in output is now relative Compiler source paths in output are now relative Jun 10, 2016
@ferd ferd merged commit dabf566 into erlang:master Jun 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant