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

build: allow bazel build ... #22168

Closed
wants to merge 1 commit into from

Conversation

alexeagle
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?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[ ] No

Other information

@alexeagle alexeagle added target: patch This PR is targeted for the next patch release area: bazel Issues related to the published `@angular/bazel` build rules labels Feb 12, 2018
@alexeagle
Copy link
Contributor Author

Note, the reason this PR removes firebase-tools is:

  1. firebase-tools has an optional dependency on https://www.npmjs.com/package/@google-cloud/functions-emulator
  2. yarn's --ignore-optional doesn't work for transitive deps, so there's no way to yarn install without getting that functions-emulator package
  3. functions-emulator has a transitive dep on grpc
  4. the version of grpc we get has BUILD files and no WORKSPACE file so it always breaks bazel build ...

It could be solved by any of:

  1. remove firebase-tools - this is what I did
  2. fix yarn so you can omit optional deps of a transitive dep
  3. make functions-emulator depend transitively on a more recent grpc version
  4. patch grpc after install by doing an rm command in our postinstall or something

@gkalpak
Copy link
Member

gkalpak commented Feb 12, 2018

Maybe one could use resolutions to pin grpc to a new version (as long as it is compatible with functions-emulator - or maybe we don't care 😁)

@alexeagle
Copy link
Contributor Author

Thanks @gkalpak I'll try that if Igor doesn't like this approach

Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

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

the rest looks great. thanks

package.json Outdated
@@ -63,7 +63,6 @@
"cors": "2.8.4",
"domino": "1.0.29",
"entities": "1.1.1",
"firebase-tools": "3.12.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

this change has nothing to do with the bazel build ... commit. Please move to a separate commit, or remove in favor of #22186

Copy link
Contributor Author

Choose a reason for hiding this comment

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

like I explained above, this is required for bazel build ... - it's the main thing that was in the way

Copy link
Contributor Author

Choose a reason for hiding this comment

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

copied the explanation to the commit message

@IgorMinar IgorMinar added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Feb 13, 2018
@ngbot
Copy link

ngbot bot commented Feb 13, 2018

Hi @alexeagle! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

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

please amend the commit message with explanation about the protobuffjs

@alexeagle alexeagle force-pushed the build_dotdotdot branch 3 times, most recently from 379b673 to 0de84cd Compare February 14, 2018 03:07
@alexeagle alexeagle 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 Feb 14, 2018
@alexeagle alexeagle force-pushed the build_dotdotdot branch 2 times, most recently from 977ff36 to 0de84cd Compare February 14, 2018 15:36
matsko pushed a commit that referenced this pull request Feb 14, 2018
Note, the reason this commit removes `firebase-tools` is:

1) firebase-tools has an optional dependency on
https://www.npmjs.com/package/@google-cloud/functions-emulator
2) yarn's `--ignore-optional` doesn't work for transitive deps, so
there's no way to yarn install without getting that functions-emulator
package
3) functions-emulator has a transitive dep on `grpc`
4) the version of `grpc` we get has `BUILD` files and no `WORKSPACE`
file so it always breaks `bazel build ...`

It could be solved by any of:
1) remove firebase-tools - this is what I did
2) fix yarn so you can omit optional deps of a transitive dep
3) make functions-emulator depend transitively on a more recent `grpc`
version
4) patch `grpc` after install by doing an `rm` command in our
postinstall or something

In its place we must install protobufjs. This is needed by the
ngc-wrapped test, which needs jasmine as well as bazel's worker mode
dependencies, and therefore cannot simply rely on
node_modules =
"@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules"

PR Close #22168
@matsko matsko closed this in 265ac8a Feb 14, 2018
@vicb vicb reopened this Feb 15, 2018
@vicb vicb closed this Feb 15, 2018
matsko added a commit that referenced this pull request Feb 15, 2018
matsko added a commit that referenced this pull request Feb 15, 2018
@vicb vicb reopened this Feb 15, 2018
smdunn pushed a commit to smdunn/angular that referenced this pull request Feb 28, 2018
@alexeagle alexeagle closed this Mar 20, 2018
@alexeagle alexeagle reopened this Mar 20, 2018
@alexeagle alexeagle added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: blocked labels Mar 20, 2018
@alexeagle alexeagle force-pushed the build_dotdotdot branch 2 times, most recently from 2441c3e to 970128b Compare March 20, 2018 20:58
@ngbot
Copy link

ngbot bot commented Mar 20, 2018

Hi @alexeagle! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@alexeagle alexeagle force-pushed the build_dotdotdot branch 2 times, most recently from 34cc777 to a0f9f05 Compare March 21, 2018 00:04
@alexeagle alexeagle added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 22, 2018
@alexeagle alexeagle requested review from IgorMinar and removed request for IgorMinar March 22, 2018 17:31
@matsko
Copy link
Contributor

matsko commented Mar 22, 2018

@alexeagle please rebase onto master.

Also switch our CircleCI commands to just
bazel build //...
bazel test //...
as this is easier to understand.

Note, the reason this commit removes `firebase-tools` is:

1) firebase-tools has an optional dependency on
https://www.npmjs.com/package/@google-cloud/functions-emulator
2) yarn's `--ignore-optional` doesn't work for transitive deps, so
there's no way to yarn install without getting that functions-emulator
package
3) functions-emulator has a transitive dep on `grpc`
4) the version of `grpc` we get has `BUILD` files and no `WORKSPACE`
file so it always breaks `bazel build ...`

It could be solved by any of:
1) remove firebase-tools - this is what I did
2) fix yarn so you can omit optional deps of a transitive dep
3) make functions-emulator depend transitively on a more recent `grpc`
version
4) patch `grpc` after install by doing an `rm` command in our
postinstall or something

In its place we must install protobufjs. This is needed by the
ngc-wrapped test, which needs jasmine as well as bazel's worker mode
dependencies, and therefore cannot simply rely on
node_modules =
"@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules"
@alexeagle
Copy link
Contributor Author

Rebased

@mhevery mhevery added target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release labels Mar 23, 2018
@mhevery mhevery closed this in 4f0cae0 Mar 23, 2018
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
Note, the reason this commit removes `firebase-tools` is:

1) firebase-tools has an optional dependency on
https://www.npmjs.com/package/@google-cloud/functions-emulator
2) yarn's `--ignore-optional` doesn't work for transitive deps, so
there's no way to yarn install without getting that functions-emulator
package
3) functions-emulator has a transitive dep on `grpc`
4) the version of `grpc` we get has `BUILD` files and no `WORKSPACE`
file so it always breaks `bazel build ...`

It could be solved by any of:
1) remove firebase-tools - this is what I did
2) fix yarn so you can omit optional deps of a transitive dep
3) make functions-emulator depend transitively on a more recent `grpc`
version
4) patch `grpc` after install by doing an `rm` command in our
postinstall or something

In its place we must install protobufjs. This is needed by the
ngc-wrapped test, which needs jasmine as well as bazel's worker mode
dependencies, and therefore cannot simply rely on
node_modules =
"@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules"

PR Close angular#22168
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
leo6104 pushed a commit to leo6104/angular that referenced this pull request Mar 25, 2018
Also switch our CircleCI commands to just
bazel build //...
bazel test //...
as this is easier to understand.

Note, the reason this commit removes `firebase-tools` is:

1) firebase-tools has an optional dependency on
https://www.npmjs.com/package/@google-cloud/functions-emulator
2) yarn's `--ignore-optional` doesn't work for transitive deps, so
there's no way to yarn install without getting that functions-emulator
package
3) functions-emulator has a transitive dep on `grpc`
4) the version of `grpc` we get has `BUILD` files and no `WORKSPACE`
file so it always breaks `bazel build ...`

It could be solved by any of:
1) remove firebase-tools - this is what I did
2) fix yarn so you can omit optional deps of a transitive dep
3) make functions-emulator depend transitively on a more recent `grpc`
version
4) patch `grpc` after install by doing an `rm` command in our
postinstall or something

In its place we must install protobufjs. This is needed by the
ngc-wrapped test, which needs jasmine as well as bazel's worker mode
dependencies, and therefore cannot simply rely on
node_modules =
"@build_bazel_rules_typescript_tsc_wrapped_deps//:node_modules"

PR Close angular#22168
@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 Sep 13, 2019
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 area: bazel Issues related to the published `@angular/bazel` build rules cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants