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

Add support for nim version 2.0.4 #68

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nph.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bin = @["nph"]
# TODO https://github.com/nim-lang/nimble/issues/1166
# Using exact version here and adding path manually :facepalm:
# run `nimble setup -l` to hopefully make it work
requires "nim >= 2.0.0 & <= 2.0.2",
requires "nim >= 2.0.0 & <= 2.0.4",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps this could be updated to support any 2.0.X patch version without having to make a code change?

Copy link
Owner

Choose a reason for hiding this comment

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

I guess we can yolo this, hoping that no parser updates will be included in patch versions..

this needs a proper solution at some point before 1.0 though, where we can compare the formatted code against arbitrary nim versions

Copy link
Owner

Choose a reason for hiding this comment

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

aka let's make it accept any patch version but document that the parser used by the formatter and the parser used by the verifier might disagree, with a TODO noting that nph should learn how to check formatting with any nim version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, sounds good. I've updated my changes as suggested.

"compiler"

proc build() =
Expand Down
2 changes: 1 addition & 1 deletion src/nph.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import "$nim"/compiler/idents
import std/[parseopt, strutils, os, sequtils]

static:
doAssert (NimMajor, NimMinor, NimPatch) in [(2, 0, 0), (2, 0, 2)],
doAssert (NimMajor, NimMinor, NimPatch) in [(2, 0, 0), (2, 0, 4)],
"nph needs a specific version of Nim"

const
Expand Down