Skip to content

Reusing workDir to store nogo facts and export data#2648

Merged
jayconrod merged 1 commit intobazel-contrib:masterfrom
linzhp:work_dir
Sep 10, 2020
Merged

Reusing workDir to store nogo facts and export data#2648
jayconrod merged 1 commit intobazel-contrib:masterfrom
linzhp:work_dir

Conversation

@linzhp
Copy link
Copy Markdown
Contributor

@linzhp linzhp commented Sep 9, 2020

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?
The current way to create xTempDir uses relative paths. They are too long for Windows. At the same time, workDir in compilePkg is a temp dir. We don't need to create another temp dir to store nogo facts and export data

Which issues(s) does this PR fix?

Fixes #2641

Other notes for review

Copy link
Copy Markdown
Collaborator

@jayconrod jayconrod left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for fixing this.

@jayconrod jayconrod merged commit 35e8393 into bazel-contrib:master Sep 10, 2020
@linzhp linzhp deleted the work_dir branch September 10, 2020 14:58
yushan26 pushed a commit to yushan26/rules_go that referenced this pull request Jun 16, 2025
…ust (bazel-contrib#2871)

Summary:
- Make the requirement line the same as the one that is used in whls. It
  only contains extras and the version if it is present.
- Add debug log statements if we fail to get the version from a direct
  URL reference.
- Move some tests from `parse_requirements_tests` to
  `index_sources_tests` to improve test
  maintenance.
- Replace the URL encoded `+` to a regular `+` in the filename.
- Correctly handle the case when the `=sha256:` is used in the URL.

Once this is merged I plan to tackle bazel-contrib#2648 by changing the
`parse_requirements` code to de-duplicate entries returned
by the `parse_requirements` function.

I cannot think of anything else that we can do for this as of now, so
will mark the associated issue as resolved.

Fixes bazel-contrib#2363
Work towards bazel-contrib#2648
yushan26 pushed a commit to yushan26/rules_go that referenced this pull request Jun 16, 2025
…2931)

The modeling of the data structures returned by the `parse_requirements`
function was not optimal and this was because historically there was
more logic in the `extension.bzl` and more things were decided there.

With the recent refactors it is possible to have a harder to misuse data
structure from the `parse_requirements`. For each `package` we will
return a struct which will have a `srcs` field that will contain easy to
consume values.

With this in place we can do the fix that is outlined in the referenced
issue.

Work towards bazel-contrib#2648
yushan26 pushed a commit to yushan26/rules_go that referenced this pull request Jun 16, 2025
…2932)

This implements the actual fix where we are aggregating the whls and
sdists
correctly from multiple different requirements lines.

Fixes bazel-contrib#2648.
Closes bazel-contrib#2658.
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.

go_library: compilepkg failed: mkdir The filename or extension is too long on Windows

3 participants