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

sfdx force:source:push doesn't seem to be calculating dependency order properly #223

Closed
joeferraro opened this issue Jul 15, 2019 · 8 comments
Labels
feature Issue or pull request for a new feature

Comments

@joeferraro
Copy link

Summary

I have an sfdx project with two packages: Package A with some common lib code and Package B with my core application. Both packages are listed in sfdx-project.json with Package B listed second in the order and specifying Package A as a dependency.

When I sfdx force:source:push, Package B seems to be installed first which sets off a cascading series of errors because references to elements in Package A don't exist.

I could be missing something obvious, but I think this is what's happening because if I push Package A explicitly (by itself) first, THEN push Package B, everything compiles.

Thanks

Steps To Reproduce:

  1. Create a project with two packages, one relying on the other
  2. sfdx force:source:push

Expected result

Package A is installed first, followed by Package B

Actual result

Package B seems to be installed first.

Additional information

This seems to be an intermittent issue: I was able to build my project against a different fresh scratch org yesterday, today it isn't working.

SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
sfdx-cli/7.13.0-27dbcb37d3 darwin-x64 node-v10.15.3

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core):

@oclif/plugin-commands 1.2.2 (core)
@oclif/plugin-help 2.2.0 (core)
@oclif/plugin-not-found 1.2.2 (core)
@oclif/plugin-plugins 1.7.8 (core)
@oclif/plugin-update 1.3.9 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.0.5 (core)
analytics 1.1.2 (core)
generator 1.1.0 (core)
salesforcedx 46.3.0 (core)
├─ force-language-services 46.8.0 (core)
└─ salesforce-alm 46.7.0 (core)

OS and version:
macOS 10.14.2

@joeferraro
Copy link
Author

joeferraro commented Jul 15, 2019

K, so I updated the cli to sfdx-cli/7.14.0-bd96f098e0 darwin-x64 and the same project, with the same metadata revealed a different set of errors on push related to LWCs referencing Custom Labels ... labels that are definitely there. I'm not sure where to go from here ...

Invalid reference c.Some_Label_Name of type label in file someLWC.js (0:0)

It's worth noting both of my packages have CustomLabels.labels-meta.xml entries.

sfdx force:source:status shows Local Add CustomLabels for CustomLabels.labels-meta.xml for both packages as expected.

@smallbellows
Copy link

Yes, I'm also getting this issue, even within just a single package. We have a custom label referred to in an lwc's js file and pushing to a new scratch org is consistently failing.

sfdx-cli/7.19.0-c5be43915c darwin-x64 node-v10.15.3

@clairebianchi clairebianchi transferred this issue from forcedotcom/sfdx-core Nov 1, 2019
@clairebianchi clairebianchi added the feature Issue or pull request for a new feature label Nov 1, 2019
@clairebianchi
Copy link
Collaborator

@joeferraro, We currently do not support multiple packages with dependencies in the CLI. We are currently spiking on this and will hopefully add enhancements to the CLI to cover this use case in the next couple of months.

@ghost
Copy link

ghost commented Apr 20, 2020

@clairebianchi Any updates on this feature? Is it rolled out?

@clairebianchi
Copy link
Collaborator

@azlamsalam we are actively working on this and plan to have an announcement in Github this Thursday with details on how to test out our changes.

@calvinle1
Copy link

Hi @clairebianchi, very interested in this also, is there an update? Thanks

@amphro
Copy link
Contributor

amphro commented Apr 24, 2020

See #379 for instructions on how to try it out.

@mshanemc
Copy link
Contributor

mshanemc commented Jul 9, 2021

Closing. Packages go in the order listed in the file.

@mshanemc mshanemc closed this as completed Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue or pull request for a new feature
Projects
None yet
Development

No branches or pull requests

6 participants