-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support esp-idf source tree not being Git repository #80
base: master
Are you sure you want to change the base?
Conversation
b8a0250
to
6cfcbef
Compare
Oh! I see where those git repo methods are being called after all - in I prepared some changes for esp-idf-sys to update according to this change: esp-rs/esp-idf-sys@master...haileys:esp-idf-sys:esp-idf-no-git-repo It's unfortunate that we'll need to make both of these changes in lockstep, but I can't think of a better way. esp-idf-sys is unfortunately currently coupled to Git repo support - but only really when using a managed repo, otherwise it only calls If this change looks good, let me know and I'll open up a PR to esp-idf-sys with my linked changes. |
@N3xed would you have time to review and provide guidance? |
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 for the improvements.
Just some small things and then it's good to go.
Note also that CI is failing on cargo fmt.
Thank you for the review @N3xed! I have made all the requested changes! |
@haileys Changes look good! Just |
f59fcf1
to
2aaa8c0
Compare
cargo fmt applied! |
There's one clippy error that needs fixing too. |
@haileys I'm preparing a new release of |
Whoops sorry for the delay, fixed that up now. |
@haileys Are you looking at the CI pipeline when you are pushing (not sure - I'm genuinely asking, as I don't remember if the CI pipeline is visible for first-time committers to the project)? Anyway - you need to run |
@haileys Are you still interested in pushing this to completion? We are missing a |
embuild currently expects the esp-idf source tree (set by
EMBUILD_ESP_IDF_PATH
) to be a Git repository. It errors out if this path is not a Git repository.This has the unfortunate side effect of preventing esp-idf from being a Git submodule of another repository - this is how I'd like to configure my project, so I can manage esp-idf versions directly and have an easily accessible checkout.
This pull request does two things:
Add a new
SourceTree
enum with a single variant,Repository
. There is aSourceTree::path
method that delegates togit::Repository::worktree
. It appears that this is the only method embuild currently calls ongit::Repository
Adds a second
SourceTree::Plain
variant which holds aPathBuf
directly. This variant is constructed if we fail to open a git repository at the esp-idf path.I wonder if we could just remove the use of
git::Repository
entirely here, but I figure maybe there might be future uses planned, which is why I've opted for the enum variant approach in this PR. My hope is that this change makes embuild more flexible for different project configurations.