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

testament: remove deadcode related to realtimeGC, testC, callCCompiler #18087

Merged

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented May 25, 2021

I keep running into testament bugs, so simplifying the code is worthwhile (will also simplify other PRs including upcoming custom megatests PR timotheecour#726)

while writing #18086, i noticed that callCCompiler is actually deadcode; this hasn't been run in a while, and there is no need to revive it as there would be better/simpler ways to do it nowadays if ever needed (e.g. running c code from a nim file, etc).

the only place where this is called is:
testC r, makeTest("tests/realtimeGC/cmain", cOptions, cat), actionRun
which isn't run unless you call:
XDG_CONFIG_HOME= nim r --lib:lib --stacktrace:on testament/testament.nim r longgc

and this fails since at least nim 1.0 with:

  testament/testament.nim(851) testament
  testament/testament.nim(822) main
  testament/categories.nim(713) processCategory
  testament/categories.nim(189) longGCTests
  testament/testament.nim(644) makeTest
  testament/specs.nim(251) parseSpec
  testament/specs.nim(184) extractSpec
  lib/system/io.nim(861) readFile
  Error: unhandled exception: cannot open: tests/realtimeGC/cmain.nim [IOError]

Also there were other issues with that code eg:

but the main reason for removal is that it doesn't need to be revived, there are better ways if such need arises.

note

see also changes to specialCategories

@timotheecour timotheecour added the Ready For Review (please take another look): ready for next review round label May 25, 2021
@Araq
Copy link
Member

Araq commented May 26, 2021

Ready to go once the conflict has been resolved.

@timotheecour timotheecour force-pushed the pr_testament_remove_callCCompiler_etc branch from 810d8ad to f8cae3f Compare May 26, 2021 08:05
@timotheecour timotheecour merged commit 1e01651 into nim-lang:devel May 26, 2021
@timotheecour timotheecour deleted the pr_testament_remove_callCCompiler_etc branch May 26, 2021 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review (please take another look): ready for next review round
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants