-
Notifications
You must be signed in to change notification settings - Fork 211
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
One InputTracker
per build
#3881
base: master
Are you sure you want to change the base?
Conversation
PR HealthChangelog Entry ❗
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with |
b692c7f
to
47238b1
Compare
class InputTracker { | ||
final assetsRead = HashSet<AssetId>(); | ||
final _inputs = HashMap<AssetId, HashSet<AssetId>>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is safe to do this way, if I understand it correctly. The keys in this map would need to be the output ids, instead of the primary input id.
The reason being that an asset can be a primary input to any number of different actions.
I would try adding a test where there are two builders with the same input extension, but which read different additional files during the build, and make sure they don't pick up each other's dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
That was my suspicion too ... I'll look at adding test coverage as you suggest.
It might make sense to just number the build actions incrementally :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are numbered phases, and each phase only applies a single builder, so this would be safe if they were per phase and not per entire build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another consideration here is this will retain these sets much longer in memory (for an entire build), instead of releasing them as soon as a build step completes.
Doing this per phase will have the same problem because phases don't actually execute sequentially.
For #3811, review and merge #3876 first.
Unify test and non-test input tracking by having one input tracker per build, using the current primary input ID as a key.