Skip to content

docs: update contribution docs for serving a local library/project#47421

Closed
fabioemoutinho wants to merge 1 commit intoangular:mainfrom
fabioemoutinho:docs-serving-local-library-project
Closed

docs: update contribution docs for serving a local library/project#47421
fabioemoutinho wants to merge 1 commit intoangular:mainfrom
fabioemoutinho:docs-serving-local-library-project

Conversation

@fabioemoutinho
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

#46771
when trying to build Angular packages locally for the first time, there's a knowledge barrier that is difficult to overcome. It is not explicit anywhere that you should disable the Angular CLI cache in your app, which causes serving an app to use cached builds of the local Angular packages, and also there's no explicit information other than in issue #46771 that explains how to run ng serve. This PR is an attempt to add that information to the documentation.

Issue Number: #46771

What is the new behavior?

Added information to DEVELOPER.md

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Please review or contribute and I'll gladly update the PR, this is my first PR.

@pullapprove pullapprove bot requested a review from josephperrott September 13, 2022 20:16
@ngbot ngbot bot added this to the Backlog milestone Sep 13, 2022
@fabioemoutinho
Copy link
Contributor Author

@alan-agius4 thank you for the information in #46771. Here's the PR to update docs. :)

Copy link
Member

@josephperrott josephperrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fabioemoutinho
Copy link
Contributor Author

fabioemoutinho commented Sep 13, 2022

LGTM

@josephperrott thanks for reviewing so quickly! Is there anything I need to do on my end? There are some failing tests but I think they are not related to this PR's changes

Comment on lines 112 to 116
Copy link
Contributor

@alan-agius4 alan-agius4 Sep 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Possible commands are:
- `node --preserve-symlinks node_modules/.bin/ng s`
- `set BAZEL_TARGET="1" && node --preserve-symlinks "node_modules/.bin/ng" s`
- `set BAZEL_TARGET="1" && node --preserve-symlinks node_modules/@angular/cli/lib/init.js s`

Windows

set BAZEL_TARGET="1" && node --preserve-symlinks node_modules/@angular/cli/lib/init.js serve

Unix Systems

BAZEL_TARGET="1" node --preserve-symlinks "node_modules/.bin/ng serve

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't have to use BAZEL_TARGET="1" on my machine, is there a specific scenario where it is needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you need packages to be NGCC'd. Nowadays however this should rarely be the case. Maybe we can just omit this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or add an explanation below:
"If packages do not need to go through NGCC (link with more context about ngcc?) there is no need to set BAZEL_TARGET."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alan-agius4 just waiting your input on this 😬

Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I couple of minor suggestions to make it clear.

@alan-agius4 alan-agius4 added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews target: patch This PR is targeted for the next patch release labels Sep 14, 2022
@fabioemoutinho
Copy link
Contributor Author

Thanks for this. I couple of minor suggestions to make it clear.

@alan-agius4 Requested changes addressed. There's only one thing I'd still like to be clear though: #47421 (comment)
when and why is BAZEL_TARGET="1" needed? It works without setting BAZEL_TARGET for me.

Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for this.

CI is failing because the last commit has double fixup! can you please address that?

@fabioemoutinho
Copy link
Contributor Author

LGTM, thanks for this.

CI is failing because the last commit has double fixup! can you please address that?

Absolutely. Is it fine if I rebase and force push a new ref with one commit?

@alan-agius4
Copy link
Contributor

alan-agius4 commented Sep 15, 2022

Absolutely. Is it fine if I rebase and force push a new ref with one commit?

Yes

@fabioemoutinho fabioemoutinho force-pushed the docs-serving-local-library-project branch from 4b31604 to e1f1cf7 Compare September 16, 2022 18:27
@angular-robot angular-robot bot requested a review from alan-agius4 September 16, 2022 18:28
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Sep 16, 2022
Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution.

@pkozlowski-opensource
Copy link
Member

This PR was merged into the repository by commit 8654e5c.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error building project using artifacts created from angular source code build

4 participants