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

x/tools/go/ssa: BuilderMode methods do not handle BareInits option #42614

Closed
mlevesquedion opened this issue Nov 15, 2020 · 2 comments
Closed
Labels
FrozenDueToAge Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@mlevesquedion
Copy link

The documentation for ssa.BuilderMode states:

const BuilderModeDoc = `Options controlling the SSA builder.
The value is a sequence of zero or more of these letters:
...
I	build bare [I]nit functions: no init guards or calls to dependent inits.
`

In fact, the I option is not handled by the String and Set methods on BuilderMode. In practice, this means that using the BareInits option is inaccessible through e.g. ssadump:

$ ssadump -build=I main.go
invalid value "I" for flag -build: unknown BuilderMode option: 'I'
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Nov 15, 2020
@gopherbot gopherbot added this to the Unreleased milestone Nov 15, 2020
@gopherbot
Copy link

Change https://golang.org/cl/270177 mentions this issue: Handle BareInits option in ssa.BuilderMode

@findleyr
Copy link
Contributor

CC @alandonovan

I accepted this fix, but probably should have confirmed that this was an accidental omission in https://golang.org/cl/5172. If not, please let me know and I'll revert.

@golang golang locked and limited conversation to collaborators Nov 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants