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

chore(concatjs_devserver): Updated io_bazel_rules_go dependency #2360

Conversation

KrauseStefan
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Using the old version

Issue Number: N/A

What is the new behavior?

Using the new version without the path

Does this PR introduce a breaking change?

  • Yes
  • No - Hope not

Other information

White debugging some other issue I updated this dependency thinking that might solve the problem, turns out it did not but instead of throwing the code away I will would ask if you where interested in this update

References
bazelbuild/bazel#12744
bazel-contrib/rules_go#2076

CC @alexeagle

@google-cla
Copy link

google-cla bot commented Dec 22, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Dec 22, 2020
"strings"

"github.com/bazelbuild/rules_go/go/tools/bazel"
)

// Runfile returns the base directory to the bazel runfiles
func Runfile(_base string, manifestPath string) (string, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh wow! I've been struggling to remove our rules_go patch on their runfiles library for a year. This is great!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might need a little more testing, but lets see if I get to test it over the holydays

@KrauseStefan KrauseStefan force-pushed the concatjs_devserver--Updated-io_bazel_rules_go-dependency branch from 4ea4691 to 449f823 Compare December 22, 2020 15:17
@google-cla google-cla bot added cla: yes and removed cla: no labels Dec 22, 2020
// It seems like any npm dependency is referenced like 'cloud/../npm/node_modules/@angular/core/bundles/core.umd.js' and 'cloud/../npm/@bazel/typescript/third_party/npm/requirejs/require.js'
// This is true for both script dependencies and scriptsManifest
// If they are corrected to 'node_modules/@angular/core/bundles/core.umd.js' and '@bazel/typescript/third_party/npm/requirejs/require.js' the following if condition can be removed
if i := strings.Index(manifestPath, "/../npm"); i > 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is right in general, users can name this workspace whatever they like. "npm" is just the most common name

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe you need to use ListRunfiles like Jay suggested back here: bazel-contrib/rules_go#2076 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If using ListRunfiles I can also make it case insensitive. I don't believe web urls should not be case sensitive.

patches = [
# Patch out a breaking change to runfiles support library
# See discussion on https://github.com/bazelbuild/rules_go/pull/2076
"@build_bazel_rules_typescript//:revert_rules_go_commit_4442d82a001f378d0605cbbca3fb529979a1c3a6.patch",
Copy link
Collaborator

Choose a reason for hiding this comment

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

please delete the patch files as well since they should no longer be referenced

@alexeagle
Copy link
Collaborator

I think we need to update rules_go in order to fix the errors with bazel 4.0 upgrade in
#2249
so we'll probably be forced to prioritize this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants