Skip to content

Commit

Permalink
Add support for nim version 2.0.4 (#68)
Browse files Browse the repository at this point in the history
* Add support for nim version 2.0.4

* Updates based on PR feedback.
  • Loading branch information
web3-developer committed May 12, 2024
1 parent 86fc4cd commit 085c3c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions nph.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ 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",
"compiler"
# Note that the parser used by the formatter and the parser used by the verifier
# might disagree if syntax changes are included in a Nim patch version.
# TODO: nph should learn how to check formatting with any nim version
requires "nim >= 2.0.0 & < 2.1", "compiler"

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

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

const
Version = gorge("git describe --long --dirty --always --tags")
Expand Down

0 comments on commit 085c3c6

Please sign in to comment.