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

chore(deploy-script-support): Improve coreProposalBehavior.js #8528

Merged
merged 10 commits into from
Dec 3, 2023

Conversation

gibson042
Copy link
Member

Description

Clearing out some local changes for the hackathon.

Comment on lines 123 to 138
// Get the manifest and its metadata.
console.error('execute', {
exportedGetManifest,
behaviors: Object.keys(manifestNS),
exportedGetManifest: manifestGetterName,
behaviors: Object.keys(behaviors),
});
Copy link
Member Author

Choose a reason for hiding this comment

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

Questions for anyone who can answer: how important are the property names in console output, and why does this call use console.error rather than console.info or the log argument?

Copy link
Member

Choose a reason for hiding this comment

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

Debugging cruft that was supposed to be removed a long time ago, but which has been proven useful. I'd be happy for you to clean it up in whatever way you deem appropriate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, updated.

Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

It's a definite improvement! I have some minor notes that may help give some actionable context.

const {
manifest,
options: rawOptions,
installations: rawInstallations,
} = await manifestNS[exportedGetManifest](
} = await behaviors[manifestGetterName](
Copy link
Member

Choose a reason for hiding this comment

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

I'm not keen on the name behaviors for the namespace of the manifest because behaviors[exportedGetManifest] is not itself a "behavior". I'm not sure if this is easy to clarify in the code, or worth the time, though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the background. I've renamed to installationNS, in alignment with similar use of evaluateBundleCap and importBundle elsewhere.

@gibson042 gibson042 requested a review from michaelfig November 23, 2023 16:30
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

I realize now that the overloading of the term "behavior" without qualifying its intent is confusing. There are two levels at which a "behavior" function is one that accepts permit-limited powers as a first argument:

  • manifestBehavior (moduleBehavior?), which is specified by the manifest getter.
  • coreProposalBehavior, which drives the execution of a set of manifestBehaviors.

@gibson042
Copy link
Member Author

@michaelfig Thanks for the suggestions; they all make sense to me. Back to you for probably the last round.

@gibson042 gibson042 requested a review from michaelfig November 29, 2023 17:30
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for seeing this through.

@gibson042 gibson042 force-pushed the gibson-2023-11-cleanup-coreproposalbehavior branch from ac3daa9 to a3a54f9 Compare December 3, 2023 16:27
@gibson042 gibson042 added the automerge:rebase Automatically rebase updates, then merge label Dec 3, 2023
@mergify mergify bot merged commit 8406d71 into master Dec 3, 2023
@mergify mergify bot deleted the gibson-2023-11-cleanup-coreproposalbehavior branch December 3, 2023 16:59
mhofman pushed a commit that referenced this pull request Jan 13, 2024
…salbehavior

chore(deploy-script-support): Improve coreProposalBehavior.js
mhofman pushed a commit that referenced this pull request Jan 15, 2024
…salbehavior

chore(deploy-script-support): Improve coreProposalBehavior.js
mhofman pushed a commit that referenced this pull request Jan 15, 2024
…salbehavior

chore(deploy-script-support): Improve coreProposalBehavior.js
mhofman pushed a commit that referenced this pull request Jan 15, 2024
…salbehavior

chore(deploy-script-support): Improve coreProposalBehavior.js
mhofman pushed a commit that referenced this pull request Jan 19, 2024
…salbehavior

chore(deploy-script-support): Improve coreProposalBehavior.js
mhofman pushed a commit that referenced this pull request Jan 19, 2024
…salbehavior

chore(deploy-script-support): Improve coreProposalBehavior.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants