-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
--filenames:abs|canonical|legacyRelProj
for filenames in compiler msgs (replaces --listfullpaths:on|off
)
#17746
Merged
Araq
merged 5 commits into
nim-lang:devel
from
timotheecour:pr_filename_magicSauce_improve
Apr 21, 2021
Merged
--filenames:abs|canonical|legacyRelProj
for filenames in compiler msgs (replaces --listfullpaths:on|off
)
#17746
Araq
merged 5 commits into
nim-lang:devel
from
timotheecour:pr_filename_magicSauce_improve
Apr 21, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timotheecour
added
the
TODO: followup needed
remove tag once fixed or tracked elsewhere
label
Apr 17, 2021
timotheecour
force-pushed
the
pr_filename_magicSauce_improve
branch
from
April 19, 2021 22:23
541c699
to
44b1018
Compare
timotheecour
changed the title
use canonical module name in error messages (replaces
Apr 20, 2021
foMagicSauce
logic)--filenames:abs|canonical|magic
for filenames in compiler msgs (replaces --listfullpaths:on|off
)
timotheecour
force-pushed
the
pr_filename_magicSauce_improve
branch
from
April 20, 2021 02:37
28f5933
to
1a1ea72
Compare
timotheecour
changed the title
Apr 20, 2021
--filenames:abs|canonical|magic
for filenames in compiler msgs (replaces --listfullpaths:on|off
)--filenames:abs|canonical|legacyRelProj
for filenames in compiler msgs (replaces --listfullpaths:on|off
)
timotheecour
force-pushed
the
pr_filename_magicSauce_improve
branch
from
April 20, 2021 20:32
1a1ea72
to
3c5490b
Compare
This was referenced Apr 21, 2021
timotheecour
added a commit
to timotheecour/Nim
that referenced
this pull request
Apr 27, 2021
timotheecour
added a commit
that referenced
this pull request
Apr 27, 2021
PMunch
pushed a commit
to PMunch/Nim
that referenced
this pull request
Mar 28, 2022
…sgs (replaces `--listfullpaths:on|off`) (nim-lang#17746) * use canonicalImport for filename_magicSauce * --filenames:abs|canonical|magic * rename: magic => legacyRelProj
PMunch
pushed a commit
to PMunch/Nim
that referenced
this pull request
Mar 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
introduces
--filenames:abs|canonical|legacyRelProj
for filenames in compiler msgs (replaces--listfullpaths:on|off
which is kept for backward compatibility)--filenames:abs is same as the old --listfullpaths:on
--filenames:legacyRelProj is the same as the old --listfullpaths:off
--filenames:canonical reuses the code from fix #16973 ; nim doc now shows correct, canonical import name in title #16999
--listfullpaths:off is now mapped to
--filenames:canonical
(but i could change it to--filenames:legacyRelProj
if needed)supersedes and closes [superseded] --listFullPaths:off now shows paths relative to cwd #13058, it'll be very easy to add
--filenames:relative
after this PR if needed--filenames:canonical
is more context-independent, stable (independent of where nimble packages are installed) and less surprising than--filenames:legacyRelProj
which was sometimes showing relative paths wrt main project name, sometimes show../
in path, and sometimes show absolute pathsexample 1
--filenames:canonical
--filenames:legacyRelProj
=> as you can see the relative vs absolute paths with
--filenames:legacyRelProj
(old--listfullpaths:off
)are non-intuitiveexample 2
with a nimble package
nim r --filenames:canonical /pathto/tests/nim/all/t12177.nim
note
future work
declaredlocs
has a minor bug: static (and typedesc and ...?) should be skipped:required type for s: static[string] [static declared in regex(290, 5)]
=>
required type for s: static[string] [string declared in system(34, 3)]
EDIT => PR
--declaredlocs
now shows location forT
instead ofstatic
inproc fn(a: static T)
#17795(pre-existing issue) honor
conf.filenameOption
for--hint:msgorigin
(right now hardcoded to absolute paths because oftoFileLineCol(InstantiationInfo)
) (see also MsgOrigin doesn't honor listfullpaths:off timotheecour/Nim#463)maybe prefix nimble packages (other than one from main project file) with
pkg/
for clarity