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

Make tools/ a cargo workspace. #3341

Merged
merged 2 commits into from
Dec 5, 2022
Merged

Make tools/ a cargo workspace. #3341

merged 2 commits into from
Dec 5, 2022

Conversation

jrvanwhy
Copy link
Contributor

@jrvanwhy jrvanwhy commented Dec 1, 2022

Pull Request Overview

The root cargo workspace was created in PR #1714. #1714's description asked the question "Should tools/ also be part of the workspace? Have their own workspace?", which doesn't appear to have been answered.

This PR makes tools/ its own cargo workspace.

Testing Strategy

Ran cargo check --workspace --exclude litex-ci-runner in tools/ (I excluded litex-ci-runner as it requires a dependency I don't have installed).
Ran cargo check in the root of the repository.
Ran make prepush.

Open Questions

Do we want to make tools/ part of the root workspace rather than making it its own workspace? I made it a separate workspace because the compilation profiles in the root workspace are intended for embedded code, whereas tools/ is host-side code, but I'm open to making it all one workspace. Building host-side tools with embedded profiles will make things a bit slower but shouldn't break anything (unless something relies on panic unwinding).

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

The root cargo workspace was created in PR tock#1714. tock#1714's description asked the question "Should `tools/` also be part of the workspace? Have their own workspace?", which doesn't appear to have been answered. The PR ultimately excluded `tools/` from the root workspace.

I think `tools/` would benefit from being in a cargo workspace. Because the root workspace specifies compilation profiles that are tuned for embedded code, I decided to make a second workspace for `tools/`. I am open to making `tools/` part of the root workspace if that's what you would prefer.
hudson-ayers
hudson-ayers previously approved these changes Dec 1, 2022
Copy link
Contributor

@hudson-ayers hudson-ayers left a comment

Choose a reason for hiding this comment

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

+1 for tools being their own workspace

…ols.sh`.

`tools/list_tools.sh` incorrectly indicates that `tools/` itself is a Cargo package, which resulted in CI errors. This removes the manual iteration and instead uses `cargo` to find the tools.
@hudson-ayers
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 5, 2022

@bors bors bot merged commit 38ece1c into tock:master Dec 5, 2022
@jrvanwhy jrvanwhy deleted the tools-workspace branch May 9, 2023 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants