Allow building (native) and linting of none bin / example targets #629
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
Support building and linting packages that do not contain a binary or example target.
Solution
This was not possible because, in all cases, we were looking for a
BinTarget
(a binary or example target). This makes sense for running (and to some extent building) for the web. For native or linting, this has unintentional side effects.Testing
Install the current branch:
Use the test repo:
[email protected]:TimJentzsch/bevy_complex_repo.git
default-run
nativedefault-run
webLint specific package (this did not work before)
Lint no specific package selected
Build native no package specified
Build web no package specified
Build Default members native, no package arg
Build Default members web, no package arg
Run Default members native
Run Default members Web
Build all examples (this did not work before)
Follow up
I wanted to implement #622 and got nerdsniped by: #622 (comment) so this sets the foundation for this issue.
I would also like to be able to do the same for the web (maybe behind a
--compile-only
flag that only runs thecargo build
command)