Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Build package cleanups and minor improvements #1098

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

Merged
merged 3 commits into from
Dec 28, 2021

Conversation

nevkontakte
Copy link
Member

This PR contains several relatively minor refactoring within the build package, which set the foundation for bigger improvements I'm working on. It includes the following:

  • golint warning fixes in the package.
  • Removal of an unused BuildDir function. I did a search across GitHub and it doesn't seem to be used anywhere outside of our repo either.
  • Moved tweaks to files included into stdlib packages inside the simpleContext type. This puts pre- and post-load tweaks in the same logical place and fixes a bug where such tweaks weren't applied in some code paths.
  • Update loaded package's import lists to exclude dependencies from the excluded files. This doesn't fix any bugs per se, but it makes the API slightly less error-prone.

Since these changes are relatively self-contained and the next change is becoming pretty involved, I decided to split them into a separate pull request for review convenience :)

  - Add exported symbol comments golint complains about.
  - Remove Session.BuildDir, which appears to be unused.
This ensures that all code paths only see adjusted package sources for
packages like `os` or `runtime`. This fixes a bug when `gopherjs build
runtime` was trying to build the whole runtime package and causing a
failure.
This ensures that callers only see imports that actually remain in the
sources after we excluded irrelevant parts of the upstream package
sources.
@nevkontakte nevkontakte merged commit be29229 into gopherjs:master Dec 28, 2021
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

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.