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

fix: don't generate transitively imported files for mapped imports #854

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

marcushultman
Copy link
Contributor

@marcushultman marcushultman commented Jun 23, 2023

Closes #853.

@marcushultman
Copy link
Contributor Author

@stephenh I took a stab at fixing #853, if the expectation in that issues is indeed correct.

Copy link
Owner

@stephenh stephenh left a comment

Choose a reason for hiding this comment

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

Hi @marcushultman , thanks for the PR! A few small stylistic asks + one question, but otherwise this lgtm!

src/plugin.ts Show resolved Hide resolved
src/plugin.ts Outdated Show resolved Hide resolved
src/plugin.ts Outdated Show resolved Hide resolved
@marcushultman marcushultman force-pushed the ignore-transitive-import branch from 75957a2 to c49e666 Compare June 23, 2023 17:19
@marcushultman marcushultman marked this pull request as ready for review June 23, 2023 17:19
@marcushultman
Copy link
Contributor Author

@stephenh Addressed your comments. I added back the alias filtering to the emitImportedFiles=false case - but I would probably consider this a bug (it doesn't make sense to import map a file explicitly passed to protoc IMO).

@stephenh
Copy link
Owner

it doesn't make sense to import map a file explicitly passed to protoc IMO

Yeah, that's true...that said doesn't hurt to keep backwards compatibility I guess. Thanks for the change!

@stephenh stephenh merged commit edd9044 into stephenh:main Jun 23, 2023
stephenh pushed a commit that referenced this pull request Jun 23, 2023
## [1.150.1](v1.150.0...v1.150.1) (2023-06-23)

### Bug Fixes

* don't generate transitively imported files for mapped imports ([#854](#854)) ([edd9044](edd9044))
@stephenh
Copy link
Owner

🎉 This PR is included in version 1.150.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@marcushultman marcushultman deleted the ignore-transitive-import branch June 23, 2023 20:32
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.

Nested importMapping files are generated (but unused)
2 participants