SpinalHDL / SpinalCrypto

SpinalHDL - Cryptography libraries
MIT License
50 stars 19 forks source link

build.sbt: Add root project definition #15

Closed dnltz closed 2 years ago

dnltz commented 2 years ago

I'm not sure if this is correct or I'm doing something wrong with sbt, but this is required to include this project via dependsOn(...).

Dolu1990 commented 2 years ago

I'm not sure to understand, what is the initial issue ?

I cloned SBT, and can run sbt commands for the crypto module via

sbt
...
crypto/compile             <- for instance
dnltz commented 2 years ago

Tried to include it in another project via dependsOn, as you mentioned in the issue, and it does not work. It tries to download the maven project by the variable name spinalCrypto:

    ).dependsOn(spinalCrypto)

lazy val spinalCrypto = RootProject(file("../SpinalCrypto/"))
dnltz commented 2 years ago

Side note: I tried to include it the same way I include VexRiscv.

Dolu1990 commented 2 years ago

Ahhh i see the issue VexRiscv main folder is the the module. While SpinalCrypto is a sbt project with a inner module (crypto). So it is a bit different. :/

To be honnest it is a bit weird. i don't know why it was setup as this

I think your PR try to workaround the issue, but maybe the best would be to keep your root project def, but delete all the lazy val crypto = (project in file("crypto")) related stuff ?

dnltz commented 2 years ago

@Dolu1990 Do you mean like this?

Dolu1990 commented 2 years ago

Yes :D

Dolu1990 commented 2 years ago

@Snoopy87 Would it make sense for you ? Or we missed on reason ?