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

Question: Code generation results differ/Upgrade go imports #404

Open
b509 opened this issue May 18, 2024 · 1 comment
Open

Question: Code generation results differ/Upgrade go imports #404

b509 opened this issue May 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@b509
Copy link

b509 commented May 18, 2024

What happened?

Upjet generates different results for me than for another maintainer or the official pipeline
https://github.com/crossplane-contrib/provider-keycloak/blob/main/.github/workflows/ci.yml

Differences seem to be in quotes (mine: one double quote, pipeline: two single quotes), linebreaks and empty lines. You can see some examples here
denniskniep/provider-keycloak@ca7b2f2
denniskniep/provider-keycloak@16990cb

How can we reproduce it?

My assumption is that I had installed the newest go version (1.22) but the pipeline is using v1.21 and I had probably installed the imports using v1.22. Can anyone support in why this is happening?

@b509 b509 added the bug Something isn't working label May 18, 2024
@mbbush
Copy link
Contributor

mbbush commented Jul 3, 2024

I ran into this issue a while back in provider-upjet-aws, where depending on the golang version, upjet would sometimes transform double `` into a "smart quote" like in your example. I don't remember whether it's the new version or the old one that's doing the transformation. I tried tracking it down, and the closest I got was a recent change in some go documentation tool handling the parsing of quotation marks inside comments. It didn't seem like it was obviously applicable to what I was seeing, but it was the only semi-related thing I could find.

Ultimately, the double `` in the terraform-provider-aws docs, which was causing the diff based on go version, was a bug, so I just posted a PR to remove it upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants