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

move assertions out of system: alternative way #19602

Closed
wants to merge 41 commits into from

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Mar 10, 2022

image

@ringabout
Copy link
Member Author

ringabout commented Mar 11, 2022

Hello @Araq

Is something below fine or any advice?

  • compiler/ uses import std/assserts direct
  • lib/ uses since (1, 7): import std/assserts for --useVersion:1.6
  • tests/ uses import std/assserts direct
  • patch nimble and c2nim using --useVersion:1.6
  • important packages use --useVersion:1.6
  • runnableExamples uses import std/assserts direct
  • patch docs and code-blocks

ref #19599 (comment)

@Araq
Copy link
Member

Araq commented Mar 11, 2022

Solid solution. I worry a bit about point

runnableExamples or code-examples uses import std/assserts direct

But I have no better solution either, so it's probably fine.

@ringabout
Copy link
Member Author

I see, thanks

@ringabout
Copy link
Member Author

ringabout commented Mar 15, 2022

It seems to need to patch nimble and c2nim using --useVersion:1.6 in this PR.

@ringabout
Copy link
Member Author

This pr will focus on simply addition of import std/assertions. Other changes will move into separate PRs.

@ringabout
Copy link
Member Author

ringabout commented Mar 16, 2022

  • make --useVersion:1.6 work for .nimble file of important packages or something

some nimble files of important packages contain assert/doAssert

@ringabout
Copy link
Member Author

ringabout commented Mar 16, 2022

  • it breaks the runnableExamples of important packages

I'm considering importing std/assertions automatically for runnableExamples for this PR transiently.

  • it breaks the building of important packages

@ringabout
Copy link
Member Author

import std/assertions

gives D:\a\1\s\lib\pure\collections\sequtils.nim(585, 12) Error: undeclared identifier: 'std' strangely.

@ringabout
Copy link
Member Author

ringabout commented Mar 18, 2022

The tests seem fines (CI failures are unrelated). After the final cleanup, I will split the key changes into separate PRs.

@ringabout ringabout closed this Apr 12, 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.

2 participants