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

[superseded] --listFullPaths:off now shows paths relative to cwd #13058

Closed

Conversation

timotheecour
Copy link
Member

the previous behavior never made sense to me as it showed a relative path that wasn't relative to current dir (so couldn't be easily opened)
now you can easily open either via clicking on it (if your terminal supports it) or via open somerelativepath etc

likewise, this is especially true if nim command was run programmatically, in which case user has even less context as to how to turn project path to an actual path

@timotheecour timotheecour force-pushed the pr_fix_listFullPaths_off branch from 03bedd1 to 08937a2 Compare January 7, 2020 08:19
@Araq
Copy link
Member

Araq commented Jan 7, 2020

Looks fine to me once the tests are green.

@timotheecour
Copy link
Member Author

timotheecour commented Jan 7, 2020

yikes, 110 tests failed, and maybe for a good reason (ie project makes sense for testing purposes but not for cmdline usage); how about this:

new flag:
--msgpaths:{full,relative,project,basename}

with default to --msgpaths:full (ie same semantics as current default)
testament shall use: --msgpaths:project (ie same semantics as currently used in testament)

  • if --listFullPaths, --listFullPaths:on is passed => implies --msgpaths:full
  • if --listFullPaths:off is passed => implies --msgpaths:relative (change of behavior; alternatively we can keep old behavior, ie implies --msgpaths:project)
  • and we un-document --listFullPaths

@Araq
Copy link
Member

Araq commented Jan 7, 2020

There is already tests/config.nims with these options:

switch("path", "$nim/testament/lib") # so we can `import stdtest/foo` in this dir

## prevent common user config settings to interfere with testament expectations
## Indifidual tests can override this if needed to test for these options.
switch("colors", "off")
switch("listFullPaths", "off")
switch("excessiveStackTrace", "off")

I don't know if that helps, I'm tired...

@timotheecour timotheecour changed the title [easy] --listFullPaths:off now shows paths relative to cwd --listFullPaths:off now shows paths relative to cwd Jan 21, 2020
@stale
Copy link

stale bot commented Jan 20, 2021

This pull request has been automatically marked as stale because it has not had recent activity. If you think it is still a valid PR, please rebase it on the latest devel; otherwise it will be closed. Thank you for your contributions.

@stale stale bot added the stale Staled PR/issues; remove the label after fixing them label Jan 20, 2021
@timotheecour timotheecour marked this pull request as draft January 20, 2021 03:11
@stale stale bot removed the stale Staled PR/issues; remove the label after fixing them label Jan 20, 2021
@Araq Araq closed this in #17746 Apr 21, 2021
@timotheecour timotheecour deleted the pr_fix_listFullPaths_off branch April 21, 2021 18:22
@timotheecour timotheecour changed the title --listFullPaths:off now shows paths relative to cwd [superseded] --listFullPaths:off now shows paths relative to cwd Apr 21, 2021
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.

2 participants