-
Notifications
You must be signed in to change notification settings - Fork 28
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 Cargo (Rust) #42
Conversation
@@ -37,6 +37,7 @@ trait BuildTool { | |||
|
|||
baseDirectory.mkdir() | |||
val out = baseDirectory.toPath().resolve(name) | |||
Files.createDirectories(out.getParent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is necessary, so that the possibly deeply nested structure of directories is created before trying creating a new file.
👋 I'm pretty excited to get it merged, but could you add some tests? You could copy the |
We're green 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's super cool, thanks for making it 🚀 I'd like to use this one in my next projects honestly.
But I have a minor comment about the cargoReleaseProfile
, what about making it configurable?
Could I also ask you to add a line into the CHANGELOG.md?
object BuildTool { | ||
lazy val buildTools: Map[String, BuildTool] = Map( | ||
CMake.name.toLowerCase -> CMake, | ||
Cargo.release.name.toLowerCase -> Cargo.release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, what do you about making the releaseFlag configurable? i.e. having a cargoReleaseProfile
setting? It can still be useful for debugging purposes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is!
nativeBuildTool := Cargo.make(false)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sideeffffect 💯 niice!
.dependsOn(native % Runtime) | ||
|
||
lazy val native = project | ||
.settings(nativeCompile / sourceDirectory := baseDirectory.value) // `baseDirectory`, not `sourceDirectory` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha, what a trick, indeed, that's due to the Cargo project structure (a comment for myself):
├── Cargo.lock
├── Cargo.toml
├── src/
│ ├── lib.rs
I'll add it into docs later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 🚀 I'll merge it and will start working on a fresh release routine. I think I'm just going to release it as the 1.5.0 release and since this release we'll be following the semver.
Btw, instead of maintaining a Changelog manually, we could use Release Drafter. Have a look here for inspiration: |
@sideeffffect a very nice idea 👍. I'd still like to keep the CHANGELOG.md file though (I find it very useful to search through all changes placed in a single file); but mb we can use drafter + some other github action to preserve the file as well. |
So shall we make a release? :) |
@sideeffffect you mean drafter? or just the release? I think ETA for release is today evening / tomorrow morning (EDT) - I'd like to add more words about Cargo into the README (you can help it btw! haha); We also changed the groupid so I'm thinking about packages renaming (#49), it can be pretty confusing for users to see the groupid But I'd like to hear your opinon on that as well. |
good idea 👍 |
No description provided.