-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Build all tasks, regardless of target #55346
Build all tasks, regardless of target #55346
Conversation
In a dirty tree, different architectures require different tasks. For example, ``` ./build.sh --os iossimulator -c Release ./build.sh --os android -c Release ``` the second step will complain that the AndroidAppBuilder task does not exist, because the build-semaphore.txt was created during the first build which built the AppleAppBuilder, but not the AndroidAppBuilder.
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsIn a dirty tree, different architectures require different tasks. For example,
the second step will complain that the AndroidAppBuilder task does not exist,
|
@akoeplinger I tried adding |
Does this actually work? I'm surprised msbuild node reuse is not holding a reference to the installer.tasks dll in the second build. That's why we added the semaphore in the first place.
|
I haven't used this PR extensively yet, but I'm not getting the sort of failures that I've come to associate with msbuild node reuse bugs. (But I'm also on OSX, not Windows, so maybe the locking is a more aggressive problem over there)
Maybe we should just build all the tasks and not try to filter by target? |
I think that makes more sense, building an extra project shouldn't hurt. |
Simplifies building for different targets from the same dirty tree. All the tasks are always built once and then remain unchanges as long as their sources don't change.
I don't understand why we build all tasks by default now regardless of the OS. Why do I need to build all these tasks upfront? This is slowing down the build because a) tasks that aren't used are built and b) dependencies of such tasks (i.e. for mobile workloads) need to be restored. Can we please revert this change? On a higher level, I don't think that upfront building these tasks is the right approach. I would expect that components which require certain tasks would build these incrementally.
|
@ViktorHofer Building all tasks is a workaround for incorrect dependency tracking between the tasks and the platforms that require them. The incorrect dependency tracking is by design due to that build sempahore file. |
When the build semaphore was added, mobile tasks didn't exist and at that point it made sense. The semaphore didn't need to be TargetOS aware. I don't think building all tasks upfront makes sense anymore. I wouldn't expect any Wasm* tasks to be built when targeting desktop configurations. Also these repo tasks were never intended to be shipping and I believe some do now as part of workloads? I think it makes more sense to just build them when they are required and not anytime upfront. |
In a dirty tree, different architectures require different tasks.
For example,
the second step will complain that the AndroidAppBuilder task does not exist,
because the build-semaphore.txt was created during the first build which built
the AppleAppBuilder, but not the AndroidAppBuilder.