From 8c1c3dbf02be0e50ab7363e6510e64b006909dc2 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 8 Feb 2024 09:25:01 +0000 Subject: [PATCH] fixes #110; make it compatible with Nim 2.0.0 --- src/depgraphs.nim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/depgraphs.nim b/src/depgraphs.nim index c99a465..681462a 100644 --- a/src/depgraphs.nim +++ b/src/depgraphs.nim @@ -184,7 +184,12 @@ proc traverseRelease(c: var AtlasContext; nc: NimbleContext; g: var DepGraph; id if found != 1: pv.req = UnknownReqs else: - let nimbleContents = readFile(nimbleFile) + when (NimMajor, NimMinor, NimPatch) == (2, 0, 0): + # bug #110; make it compatible with Nim 2.0.0 + # ensureMove requires mutable places when version < 2.0.2 + var nimbleContents = readFile(nimbleFile) + else: + let nimbleContents = readFile(nimbleFile) if lastNimbleContents == nimbleContents: pv.req = g.nodes[idx].versions[^1].req else: