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

bugs with config override logic #58

Open
4 tasks
timotheecour opened this issue Mar 10, 2020 · 3 comments
Open
4 tasks

bugs with config override logic #58

timotheecour opened this issue Mar 10, 2020 · 3 comments

Comments

@timotheecour
Copy link
Owner

timotheecour commented Mar 10, 2020

bugs as of devel 70bd41d
some are pre-existing bugs, other are recent regressions

  • regression: --listcmd --hint:link:on --hint:cc:off should show "just the (verbose) link command, but instead it also shows the (verbose) compilation commands
    note: hintLink was recently "broken" in Only print the link command when listCmd is active and fix the docs nim-lang/Nim#13603 and we agreed on proposal 1 to fix it (see Only print the link command when listCmd is active and fix the docs nim-lang/Nim#13603 (comment)); this should work but doesn't yet:

  • --verbosity:0 --hint:FOO:on --hint:BAR:of works with every FOO,BAR except for --hint:cc:on

  • --hints:off --hint:successx:on does not honor --hint:successx:on but it should because it comes AFTER
    more generally for other hints (eg --hint:conf:on).
    The point of overriding like this is it makes it easy to test 1 thing at a time (whether inside a test where we just want to check 1 aspect, or when you want to debug a specific issue etc)
    It should behave like --verbosity:0 which CAN be overridden (except for --hint:cc:off bug specific to cc)

  • --verbosity:0 should imply --hint:processing:off but does not

not sure about these

--verbosity:0 --hint:exec:on works as intended (enables hintExec) but --hint:exec:on --verbosity:0 also enables hintExec even though --verbosity:0 comes after

@timotheecour timotheecour changed the title --hints:off --hint:successx:on does not honor --hint:successx:on bugs with config override logic Mar 11, 2020
@Clyybber
Copy link

Clyybber commented Mar 11, 2020

not sure about these

This is intended, and changing it would make the code really messy.

@timotheecour
Copy link
Owner Author

after ad6d559 from nim-lang#13606

  • --hints:off --hint:cc:on doesn't honor --hint:cc:on
    nim c -r -f --skipusercfg --skipparentcfg --hints:off --hint:cc:on $timn_D/src/timn/examples/thello.nim hello world
    (but pre-existing bug)

@timotheecour
Copy link
Owner Author

proposal for --hints:on/off (after discussion w @Clyybber)

  • current logic is that --hints:on/off acts like a global AND gate on all hints
    this is self-consistant but not very useful, eg it doesn't allow one to override it by simply turning on or off a single hint, or all hints, or all except 1 etc

  • proposed logic:
    no separate logic gate, instead it's processed like a command in and processed in regular order:
    --hints:on turns on all hints
    --hints:off turns off all hints
    --hints:off --hint:successx:onends up with onlyhint:successx being on --hints:on --hint:cc:off ends up with all hints on except hint:cc which is off
    --hints:on --hint:cc:off --hints:off` : the obvious thing, all hints are off

  • ditto with --warnings:on/off

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

No branches or pull requests

2 participants