-
Notifications
You must be signed in to change notification settings - Fork 4
Fix clash with new esp generate template #37
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
Conversation
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining
|
|
MegaLinter has automatically applied linters fixes on this PR. |
Co-authored-by: petekubiak <37507920+petekubiak@users.noreply.github.com>
template/init.rhai
Outdated
| print("*** To add the commitment issues crate to your project, run:"); | ||
| print(); | ||
| print("cargo add --git https://github.com/dysonltd/commitment-issues"); | ||
| print("cargo add --build --git https://github.com/dysonltd/commitment-issues") |
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 we need an extra ; here maybe
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.
When running this:
➜ cargo generate -g https://github.com/dysonltd/commitment-issues.git -b bugfix/esp-generate-linker-clash
Error: ⛔ Failed executing script: init.rhai
Caused by:
Syntax error: Expecting ';' to terminate this statement (line 27, position 2)
~
|
@petekubiak when i ran this line:
|
|
Running the following handcoded example i get the following: Cargo.toml [package]
name = "pete-test"
version = "0.1.0"
edition = "2021"
authors = ["Scott Gibb <scott.gibb@arm.com>"]
[dependencies]
commitment-issues = { git = "https://github.com/dysonltd/commitment-issues", branch = "bugfix/esp-generate-linker-clash"}
[build-dependencies]
commitment-issues = { git = "https://github.com/dysonltd/commitment-issues", branch = "bugfix/esp-generate-linker-clash"}
Output: Running `target/debug/pete-test`
Hello, world!
Here is the binary's metadata:
Schema version: 1
Compile time: 2026-01-05T10:58:12Z
Commit hash: 9ea305fa7b
Is dirty build: true
Tag description:
Last author: Scott Gibb
pete-test on main [?] is 📦 v0.1.0 via 🦀 v1.91.1 took 18s
➜ git tag v1.0
pete-test on main [?] is 📦 v0.1.0 via 🦀 v1.91.1
➜ cargo run
Compiling pete-test v0.1.0 (/Users/scogib01/pete-test)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.54s
Running `target/debug/pete-test`
Hello, world!
Here is the binary's metadata:
Schema version: 1
Compile time: 2026-01-05T10:58:32Z
Commit hash: 9ea305fa7b
Is dirty build: true
Tag description: v1.0
Last author: Scott Gibb
|
|
Thanks for catching that @ScottGibb ! |
| use commitment_issues::include_metadata; | ||
|
|
||
| include_metadata!(); | ||
| commitment_issues::include_metadata!(); |
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.
Should the template generated by cargo generate use this oneline version too? i.e. template/src/main.rs
| As such, you will also need to add the crate as a build dependency with: | ||
|
|
||
| ```sh | ||
| cargo add --build --git https://github.com/dysonltd/commitment-issues |
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.
Update the template to have this too
|
@petekubiak can confirm it works on mac xD |

Description
.rodatasection (or equivalent on Mac)Fixes #34
Fixes #35
Fixes #36
Type of change
Please Tick the options that are relevant.
How Has This Been Tested?
cargo generateChecklist