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 ability to hide ucm commands until we're ready to release them. #2997

Merged
merged 1 commit into from Mar 29, 2022

Conversation

ChrisPenner
Copy link
Contributor

@ChrisPenner ChrisPenner commented Mar 24, 2022

Overview

As the UCM team works on the new Share server we'll want to keep merging into trunk to avoid long-lived branches and encourage continuous integration, but it's likely a lot of these commands won't be 100% ready to ship even though they're merged, since some commands might be complete in UCM, but are waiting for a feature on the server, or perhaps we want to dogfood them for a longer period than usual.

I'll be using this so I can merge the auth.login command.

This change allows us to merge new commands into UCM, and for us to test them, etc; but hides them from any help output, command lists, and autocomplete so that users don't stumble into them and get confused.

Implementation notes

Adds a "visibility" parameter to Inputs, inputs which are marked has hidden won't show up in help or autocomplete.
Hidden commands can still be executed if you know the name, and you can request help for it if you know the name.

@@ -1550,7 +1610,7 @@ help =
intercalateMap
"\n\n"
showPatternHelp
(sortOn I.patternName validInputs)
visibleInputs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The inputs are sorted in the original list, which means they'll appear in the expected order everywhere, and also means GHC will only sort the list the first time.

Copy link
Contributor

@aryairani aryairani left a comment

Choose a reason for hiding this comment

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

Cool

@ChrisPenner ChrisPenner merged commit 12731aa into trunk Mar 29, 2022
@ChrisPenner ChrisPenner deleted the cp/hidden-inputs branch March 29, 2022 19:29
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.

None yet

2 participants