Skip to content
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

VS Code build tasks #82

Merged
merged 2 commits into from
Feb 27, 2020
Merged

VS Code build tasks #82

merged 2 commits into from
Feb 27, 2020

Conversation

rubberduck203
Copy link
Contributor

@rubberduck203 rubberduck203 commented Feb 8, 2020

Adds the following build tasks for VS Code:

  • clean
  • --release
  • --examples
  • --examples --release

It should be noted that --examples won't build successfully, because in general, you can't run cargo build --examples on projects generated from the quickstart.
It does trigger the correct behavior and I have tested these tasks on projects where it does build cleanly.

https://github.com/rubberduck203/stm32f3-discovery/blob/4933a160eee6ca53cc94c50d0470ea6e8ab03928/.vscode/tasks.json

@rust-highfive
Copy link

r? @ithinuel

(rust_highfive has picked a reviewer for you, use r? to override)

@pigrew
Copy link

pigrew commented Feb 8, 2020

Thanks for making this PR.

Can we also make a "Release (OpenOCD)" launch? That was the (unstated) intent of issue #80.

@rubberduck203
Copy link
Contributor Author

Well, we can, but debugging in release won’t behave as expected for most people @pigrew.

@pigrew
Copy link

pigrew commented Feb 8, 2020

Good point, I agree that the experience would not be as many would expect. I defer to you judgement.

I use the launch as a way to conveniently flash the release build onto the MCU, and occasionally use semihosting, but not for stepping through code.

@rubberduck203
Copy link
Contributor Author

Hmm. That’s fair. What if we created some tasks that just did that?

@pigrew
Copy link

pigrew commented Feb 8, 2020

@rubberduck203

Fine by me, can one task depend on another (so it would call the build task, and then flash)?

It seems simpler to add the launch, versus another task? To me, using a task has more implementation complexity in order to prevent the user from having an easy way to debug release builds. It also means the user most look one place (launches) to run a debug build, but another to run a release build.

@rubberduck203
Copy link
Contributor Author

You make a good point. I think I’d like someone from the QuickStart team to weigh in.

@rubberduck203
Copy link
Contributor Author

rubberduck203 commented Feb 23, 2020

@ithinuel have you had a chance to look at this?
Despite the conversation here which means this does not address the original issue (#80), I believe these changes are still good to go.

Copy link
Member

@adamgreig adamgreig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 27, 2020

Configuration problem

bors.toml: not found

@adamgreig adamgreig merged commit cda24a6 into rust-embedded:master Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants