-
Notifications
You must be signed in to change notification settings - Fork 74
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
feat(env-options): env-options conveniences for common cases #1710
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Aug 2, 2023
erights
force-pushed
the
markm-options-harmony
branch
from
August 8, 2023 02:29
dae87da
to
f6190e7
Compare
erights
force-pushed
the
markm-options-harmony
branch
3 times, most recently
from
August 21, 2023 23:23
b0abc60
to
11e8047
Compare
erights
force-pushed
the
markm-options-harmony
branch
3 times, most recently
from
August 29, 2023 05:05
c8cbe6f
to
e28ac45
Compare
See also nodejs/node#48890 |
erights
force-pushed
the
markm-options-harmony
branch
2 times, most recently
from
August 30, 2023 01:21
8515a62
to
d692fac
Compare
erights
force-pushed
the
markm-options-harmony
branch
2 times, most recently
from
September 16, 2023 02:45
2ce5dd0
to
a7664ac
Compare
erights
force-pushed
the
markm-options-harmony
branch
2 times, most recently
from
September 26, 2023 03:13
695c347
to
7799061
Compare
erights
force-pushed
the
markm-options-harmony
branch
from
October 3, 2023 20:26
7799061
to
77aea46
Compare
erights
force-pushed
the
markm-options-harmony
branch
from
October 13, 2023 22:33
77aea46
to
7577a77
Compare
erights
force-pushed
the
markm-options-harmony
branch
from
October 24, 2023 23:33
7577a77
to
1a0dd3e
Compare
erights
force-pushed
the
markm-options-harmony
branch
2 times, most recently
from
November 7, 2023 19:21
7383ed9
to
e1199d3
Compare
erights
force-pushed
the
markm-options-harmony
branch
from
November 12, 2023 04:44
e1199d3
to
30bd756
Compare
erights
force-pushed
the
markm-options-harmony
branch
from
December 21, 2023 03:21
30bd756
to
59b523f
Compare
erights
force-pushed
the
markm-options-harmony
branch
3 times, most recently
from
December 31, 2023 23:51
43ed48f
to
19b3465
Compare
erights
changed the title
WIP fix(env-options)!: env-options harmony
feat(env-options): env-options conveniences for common cases
Dec 31, 2023
erights
force-pushed
the
markm-options-harmony
branch
from
January 1, 2024 00:10
19b3465
to
c15595d
Compare
erights
force-pushed
the
markm-options-harmony
branch
from
January 1, 2024 00:13
c15595d
to
2f05b1a
Compare
This was referenced Jan 1, 2024
erights
force-pushed
the
markm-options-harmony
branch
from
January 5, 2024 04:19
2f05b1a
to
a8e1407
Compare
erights
force-pushed
the
markm-options-harmony
branch
2 times, most recently
from
January 8, 2024 21:46
6926eb8
to
a802aa5
Compare
erights
force-pushed
the
markm-options-harmony
branch
3 times, most recently
from
January 10, 2024 00:42
e130e8c
to
ac480ad
Compare
michaelfig
approved these changes
Jan 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
gibson042
approved these changes
Jan 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after minor fixes.
erights
force-pushed
the
markm-options-harmony
branch
from
January 10, 2024 21:12
ac480ad
to
c2dad51
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refs: Agoric/agoric-sdk#8136
refs: Agoric/agoric-sdk#8096
refs: https://github.com/Agoric/agoric-sdk/blob/master/docs/env.md#DEBUG
refs: #1922
The indirection of
getEnvironmentCaptor
is only needed to supportgetCapturedEnvironmentOptionNames
getCapturedEnvironmentOptionNames
is not currently used in eitherendo
oragoric-sdk
. Thus, we have enhanced@endo/env/options
to also directly export non-capturing forms of the other functions, likegetEnvironmentOption
, that are made and returned bygetEnvironmentCaptor
.The value of an option is often supposed to be a list of strings separated by commas (
','
). HoweverAgoric/agoric-sdk#8096 explains that sometimes our code (both in endo and in agoric-sdk) accidentally split on colon (
':'
) instead due to confusion about what the convention was supposed to be.So that this PR would only be a compat
feat
PR, this PR does not fix any of those legacy manual uses that got the convention wrong. (Though it does add a TODO that links to Agoric/agoric-sdk#8096.) Rather,this PR does provide additional conveniences,
getEnvironmentOptionsList
andenvironmentOptionsListHas
based on the correct comma option.Later PRs (#1922) that do take the compat hit of switching to comma should also switch to using these new conveniences.