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

no more code duplication bw liMessage and rawMessage + several bug fixes #14415

Merged
merged 8 commits into from
May 22, 2020

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented May 21, 2020

address leftover TODO from #14317

  • no more code duplication bw liMessage and rawMessage (duplication since e254741 in 2009); these functions have accumulated odd unintentional (IMO) differences over the years and make patches harder to write and read; this merge should fix several bugs (or at least fragile bug-prone logic), eg
    • hintProcessing was treated differently for these (so rawMessage(graph.config, hintProcessing, s.name.s) was not rendering as dots); this didnt' seem intentional
    • hintMsgOrigin wasn't honored
    • warningAsError was treated suspiciously in rawMessage, and might've simply ignored warningAsError (eg with warnCannotOpenFile)
  • fix what seems like a bug in msgWrite that would unconditionally reset lastMsgWasDot even if errorOutputs was empty (eg gagging during compiles())
  • --hint:msgorigin should now work with all compiler generated messages
  • internalAssert now formats instantiationInfo correctly
  • removed assertNotNil (used once) + other code simplifications, resulting in negative diff stats

after PR

  • I encountered other bugs while fixing this but best to keep this one as mostly refactoring, next one will fix bugs I've encountered (at least they'll only need to be fixed in 1 place)

@timotheecour timotheecour changed the title WIP no more code duplication bw liMessage and rawMessage + several bug fixes May 22, 2020
@timotheecour timotheecour marked this pull request as ready for review May 22, 2020 09:13
@timotheecour timotheecour requested a review from Araq May 22, 2020 09:13
@Araq Araq merged commit 0d0ea3a into nim-lang:devel May 22, 2020
@timotheecour timotheecour deleted the pr_fix_hintMsgOrigin branch May 22, 2020 10:20
EchoPouet pushed a commit to EchoPouet/Nim that referenced this pull request Jun 13, 2020
…xes (nim-lang#14415)

* no more code duplication bw rawMessage and liMessage; fixes some bugs in rawMessage
* all compiler messages work with hint:msgorigin
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