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

Project dependencies #230

Closed
fuocor opened this issue Jun 15, 2017 · 3 comments
Closed

Project dependencies #230

fuocor opened this issue Jun 15, 2017 · 3 comments

Comments

@fuocor
Copy link

fuocor commented Jun 15, 2017

It's not at all clear how to get project dependencies to work.

If I create ProjextA and ProjectB (dependency of A) at the same time how do I get B linked to A?
Adding B to the project.json of A result in "rush generate" failing and "cyclicDependencyProjects" in rush.json does not seem to have any effect.

thanks,
rich

@qz2017
Copy link
Contributor

qz2017 commented Jun 15, 2017

You can use a lower/published version of B in project.json of A. Then A is built with a slightly older version of B. One project has to be built first with all available dependencies.

@nickpape
Copy link
Contributor

nickpape commented Jun 15, 2017

Hi @fuocor,

To be clear, you are attempting to simply link 2 projects together? You should simply be able to add both projects to your rush.json, add a dependency to ProjectB in the package.json of ProjectA, then run "rush install". As long as the version specifier used in the package.json of ProjectA is compatible with the version specified in ProjectB's package.json everything should link correctly.

For example:

ProjectA's package.json

{
  "name": "project-a",
  "version": "1.1.1"
}

ProjectB's package.json

{
  "name": "project-b",
  "version": "1.0.0",
  "dependencies": {
    "project-a": ">=1.0.0 <2.0.0"
  }
}

Note that in Rush3, you only need to run rush generate if rush install tells you it is necessary.

@fuocor
Copy link
Author

fuocor commented Jun 16, 2017

I thought I did that ( a few times ...) to have the rush generate fail
I tried again ...and... I guess doing on a Friday morning at 5:30 fixed the problem ;).
Yesterday must have been a really bad karma day for me

thanks.

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

No branches or pull requests

3 participants