nimble icon indicating copy to clipboard operation
nimble copied to clipboard

Cannot compile with nim 1.6

Open arnetheduck opened this issue 2 years ago • 7 comments

/nimble/src/nimblepkg/sha1hashes.nim(6, 42) Error: cannot open file: ../../dist/checksums/src/checksums/sha1

412af022a44157dd17118432fba825da9f204125

arnetheduck avatar Aug 03 '23 15:08 arnetheduck

That's really weird. That means that nimble can't download the checksums package. I thought Nimble must not depend on outside packages, but for some reason it attempts to clone a package over here for some reason. I think this should be moved in-house into Nimble, shouldn't it?

xTrayambak avatar Sep 07 '23 06:09 xTrayambak

@ringabout What should be done about this? Should I copy the portion of checksums that Nimble uses to the source tree? That also poses the additional problem of security as we'll have to manually update the file per-security/feature update.

xTrayambak avatar Sep 07 '23 06:09 xTrayambak

Nevermind, std/sha1 exists. Why does Nimble still use the external package if the hashing algorithm is already implemented in the stdlib?

xTrayambak avatar Sep 07 '23 06:09 xTrayambak

You can use condition to support 1.6.x

like

when (NimMajor, NimMinor) >= (2, 0):
  import ...
else:
  import ...

ringabout avatar Sep 07 '23 07:09 ringabout

Yeah, but what about we remove the foreign dependency altogether? Is there any good reason to keep it considering there's a 1:1 alternative in the standard library?

xTrayambak avatar Sep 07 '23 10:09 xTrayambak

std/sha1 is deprecated. It's not supposed to be used in official projects.

ringabout avatar Sep 07 '23 11:09 ringabout

Ah. I see. I never realized that, sorry!

xTrayambak avatar Sep 07 '23 14:09 xTrayambak

no longer relevant - as long as nimble builds with any nim version it's fine.

arnetheduck avatar Jun 17 '24 07:06 arnetheduck