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

Inconsistent simulation builds #687

Open
spacey-sooty opened this issue Nov 24, 2023 · 4 comments
Open

Inconsistent simulation builds #687

spacey-sooty opened this issue Nov 24, 2023 · 4 comments

Comments

@spacey-sooty
Copy link
Contributor

Describe the bug
When running ./gradlew simulateNativeDebug I get inconsistent results with the same code.

To Reproduce
Steps to reproduce the behavior:

  1. run git clone https://github.com/spacey-sooty/2024-Crescendo.git
  2. run cd 2024-Crescendo
  3. run ./gradlew simulateNativeDebug
  4. See this error message
> Task :wombat:simulateNativeDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':wombat:simulateNativeDebug'.
> Must have 1 and only 1 binary

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 16s
3 actionable tasks: 3 executed
  1. run ./gradlew build (succeeds)
  2. run ./gradlew simulateNative
  3. See this error message
> Task :wombat:simulateNativeRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':wombat:simulateNativeRelease'.
> Must have 1 and only 1 binary

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 12s
6 actionable tasks: 2 executed, 4 up-to-date
  1. repeat steps 7 and 8 once.
  2. run ./gradlew simulateNativeDebug
  3. Success

Expected behavior
I expect when I simulate my project with no changes to it the result is the same.

Desktop (please complete the following information):

  • OS: Linux Mint 21.2
  • Project Information:
    Screenshot from 2023-11-24 11-58-37
@ThadHouse ThadHouse transferred this issue from wpilibsuite/allwpilib Nov 24, 2023
@ThadHouse
Copy link
Member

ThadHouse commented Nov 24, 2023

The main issue with this is we don't support gradlerio being loaded in multiple projects at the same time. What is happening is the sim tasks are being created for the Wombat subproject, but because its not an executable it doesn't get configured right.

I'll have to look to see if I can find a way to solve this, but due to how close it is to the season, and it being an unsupported scenario I'm not sure we'll get to it for 2024. And any fix for this would likely be a project breaking change.

@ThadHouse
Copy link
Member

As a workaround, you can explicitly run the root tasks :simulateNativeRelease and :simulateNativeDebug and you won't see this.

@spacey-sooty
Copy link
Contributor Author

Ok thank you for the temporary work around.

@spacey-sooty
Copy link
Contributor Author

The main issue with this is we don't support gradlerio being loaded in multiple projects at the same time. What is happening is the sim tasks are being created for the Wombat subproject, but because its not an executable it doesn't get configured right.

I'll have to look to see if I can find a way to solve this, but due to how close it is to the season, and it being an unsupported scenario I'm not sure we'll get to it for 2024. And any fix for this would likely be a project breaking change.

I'll also take a look see if I can find a way to resolve this, preferably without huge changes

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 a pull request may close this issue.

2 participants