Skip to content

Conversation

@timotheecour
Copy link
Member

@timotheecour timotheecour commented Apr 22, 2021

example 1

nim r --processing:filenames --filenames:canonical --hint:msgorigin:off --eval:'import times'
Hint: system.nim [Processing]
Hint: system/widestrs.nim [Processing]
Hint: system/io.nim [Processing]
Hint: cmdfile.nim [Processing]
Hint: std/times [Processing]
Hint: std/strutils [Processing]
Hint: std/parseutils [Processing]
Hint: std/math [Processing]
Hint: std/bitops [Processing]
Hint: std/macros [Processing]
Hint: std/fenv [Processing]
Hint: std/algorithm [Processing]
Hint: std/enumutils.nim [Processing]
Hint: std/typetraits [Processing]
Hint: std/unicode [Processing]
Hint: std/private/strimpl.nim [Processing]
Hint: std/options [Processing]
Hint: std/posix [Processing]
cmdfile.nim(1, 8) Warning: imported and not used: 'times' [UnusedImport]

example 2

nim r --processing:dots --filenames:canonical --hint:msgorigin:off --eval:'import times'
..................
cmdfile.nim(1, 8) Warning: imported and not used: 'times' [UnusedImport]

example 3

nim r --processing:filenames --filenames:abs --hint:msgorigin:off --eval:'import times'
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/system.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/system/widestrs.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/system/io.nim [Processing]
Hint: cmdfile.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/pure/times.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/pure/strutils.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/pure/parseutils.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/pure/math.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/pure/bitops.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/core/macros.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/pure/fenv.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/pure/algorithm.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/std/enumutils.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/pure/typetraits.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/pure/unicode.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/std/private/strimpl.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/pure/options.nim [Processing]
Hint: /Users/timothee/git_clone/nim/Nim_prs/lib/posix/posix.nim [Processing]
cmdfile.nim(1, 8) Warning: imported and not used: 'times' [UnusedImport]

future work

  • also report include files, either as default or as an option eg --processing:filenames,includes

@timotheecour timotheecour changed the title add --processing:dots|filenames|off to customize hintProcessing add --processing:dots|filenames|off to customize hintProcessing Apr 22, 2021
@timotheecour timotheecour marked this pull request as draft April 22, 2021 08:28
@timotheecour timotheecour force-pushed the pr_hintProcessing_fullpath branch from 9bb1ce6 to a692349 Compare April 22, 2021 22:49
@timotheecour timotheecour force-pushed the pr_hintProcessing_fullpath branch from a692349 to e8927a7 Compare April 22, 2021 22:56
inp.writeLine("quit")
inp.flush()
try:
inp.writeLine("quit")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if child already died, these could raise an IOError os OSError with EPIPE (or, before #17752, raise signal SIGPIPE), so it seems correct to protect this with try/except;

this diff is not needed for this PR but it helped during debugging and fixing tests as raise EPIPE would hide the error

@timotheecour timotheecour marked this pull request as ready for review April 22, 2021 23:24
@timotheecour timotheecour added the Ready For Review (please take another look): ready for next review round label Apr 22, 2021
@Araq Araq merged commit e4a3fee into nim-lang:devel Apr 23, 2021
@timotheecour timotheecour removed the Ready For Review (please take another look): ready for next review round label Apr 23, 2021
@timotheecour timotheecour deleted the pr_hintProcessing_fullpath branch April 23, 2021 06:22
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hintProcessingVerbose

2 participants