-
Notifications
You must be signed in to change notification settings - Fork 26
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
fix(builder): Fix output clash on var steps #1218
Conversation
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit b847354. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
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 think this one definitely needs a test to verify this edge case doesn't reappear.
packages/builder/src/definition.ts
Outdated
@@ -104,7 +104,7 @@ export class ChainDefinition { | |||
|
|||
for (const output of actionOutputs) { | |||
debug(`deps: ${fullActionName} provides ${output}`); | |||
if (!this.dependencyFor.has(output)) { | |||
if (!this.dependencyFor.has(output) || action == 'setting' || action == 'var') { |
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.
use triple equals ===
. surprised the linter didnt pick this one up.
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.
also still think we would benefit from specific, purpose built test, not in e2e, that verifies this capability on the definition.ts
file.
@@ -104,7 +104,7 @@ export class ChainDefinition { | |||
|
|||
for (const output of actionOutputs) { | |||
debug(`deps: ${fullActionName} provides ${output}`); | |||
if (!this.dependencyFor.has(output)) { | |||
if (!this.dependencyFor.has(output) || action === 'setting' || action === 'var') { |
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.
This wouldn't work weird when having a var
that uses another var
? Meaning that it wont be able to find correctly the dependency?
fixes https://linear.app/usecannon/issue/CAN-406/fix-output-clash-on-var-steps-with-description
https://uploads.linear.app/32382608-9e74-479c-9c61-9974bca22746/8e9b49db-3d3d-4314-bd3f-09ce0505e41b/afcd3a3d-42c3-4574-946e-2922444d20d7