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

Add support for GOEXPERIMENT #262

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

peterebden
Copy link
Contributor

It'd be cool to be able to use this to play around with rangefunc and similar things.

Copy link
Contributor

@chrisnovakovic chrisnovakovic left a comment

Choose a reason for hiding this comment

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

Was just about to write this myself, thanks!

@@ -168,5 +168,9 @@ Repeatable = true
Optional = true
Help = Build tags to pass to the Go compiler

[PluginConfig "experiment"]
Copy link
Contributor

@chrisnovakovic chrisnovakovic Jun 10, 2024

Choose a reason for hiding this comment

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

Would it be more "Please-like" for the enabled experiments to be a list (i.e. a repeatable config entry) which is then concatenated into a string with commas in _goexperiment_env?


def _goexperiment_env():
"""Returns the GOEXPERIMENT env var, or None if there isn't one."""
return {"GOEXPERIMENT": CONFIG.GO.EXPERIMENT} if CONFIG.GO.EXPERIMENT else None
Copy link
Contributor

Choose a reason for hiding this comment

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

If this were to return {} rather than None, the return value could unconditionally be concatenated with all instances of env parameters modified in this PR.

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.

3 participants