Skip to content

Fix: excluding files from unneededGoFiles was not working#120

Merged
mjeffryes merged 6 commits intopulumi:masterfrom
shamil:uneeded_go_files_fix
Dec 12, 2023
Merged

Fix: excluding files from unneededGoFiles was not working#120
mjeffryes merged 6 commits intopulumi:masterfrom
shamil:uneeded_go_files_fix

Conversation

@shamil
Copy link
Contributor

@shamil shamil commented Nov 9, 2023

Bug

files in unneededGoFiles were not excluded.

Bug Description

unneededGoFiles string set contain files which are relative to the import path (kubernetes/*), while the paths of generated files are relative to pkg.Name (crds/*). This PR makes sure to use a proper path when comparing files in unneededGoFiles.

@shamil
Copy link
Contributor Author

shamil commented Nov 9, 2023

Seems similar to #77 with a bit different approach to preserve current directory structure

@shamil
Copy link
Contributor Author

shamil commented Dec 12, 2023

@mjeffryes can you also look at this PR?

Copy link
Contributor

@mjeffryes mjeffryes left a comment

Choose a reason for hiding this comment

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

Thanks @shamil! This change looks good, but could you please add a test that checks the unneededGoFiles are removed so we can catch if it regresses?

@shamil
Copy link
Contributor Author

shamil commented Dec 12, 2023

@mjeffryes I added the requested test in fcd5520

One caveat, since in this project the tests are separated from the actual code, I had to export the UnneededGoFiles variable in order to be able to use it in the test.

Let me know if anything else needed.
Thanks

Copy link
Contributor

@mjeffryes mjeffryes left a comment

Choose a reason for hiding this comment

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

Thanks that looks great!

@mjeffryes mjeffryes merged commit d89eeaf into pulumi:master Dec 12, 2023
@shamil shamil deleted the uneeded_go_files_fix branch December 12, 2023 18:56
@shamil
Copy link
Contributor Author

shamil commented Dec 12, 2023

@mjeffryes thanks a lot for quick review. When should we expect a new release?

@mjeffryes
Copy link
Contributor

I've just kicked off a release build here: https://github.com/pulumi/crd2pulumi/actions/runs/7186377517

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