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

feat(pass-style): Extract passStyleOf and friends from marshal into the new pass-style package #1439

Merged
merged 2 commits into from
Jan 14, 2023

Conversation

erights
Copy link
Contributor

@erights erights commented Jan 13, 2023

Staged on #1438
Fixes: #1441
Fixes: #1442
Fixes: #1443.

To test #1438 , I moved the passStyleOf level of abstraction from marshal into this new pass-style scaffold. But I did it as a separate PR so we can keep #1438 as a record of what the scaffold looks like.

This test has so far revealed a linting problem, but otherwise seems to work. As #1438 is fixed, I'll continually rebase this PR on it to test the newer candidates.

I started out planning to only do a little of the passStyleOf migration, just to test #1438 . But once I started I couldn't stop. Seems to be close to complete.

@erights erights self-assigned this Jan 13, 2023
@erights erights changed the title Markm extract pass style feat(pass-style): Extract passStyleOf and friends from marshal into the new pass-style package Jan 13, 2023
@kriskowal kriskowal force-pushed the kris-scaffold-pass-style branch 2 times, most recently from bc0f2e5 to 2fcf1e7 Compare January 13, 2023 20:04
@kriskowal kriskowal mentioned this pull request Jan 13, 2023
4 tasks
@@ -112,6 +113,9 @@ const makeNoIndenter = () => {
};

const identPattern = /^[a-zA-Z]\w*$/;
harden(identPattern);
const AtAtPrefixPattern = /^@@(.*)$/;
Copy link
Member

Choose a reason for hiding this comment

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

^@@(.*)$ is my favorite rendering of

image

citation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's leave this conversation unresolved, so that anyone visiting this PR sees this ;)

packages/marshal/test/prepare-test-env-ava.js Show resolved Hide resolved
packages/pass-style/test/prepare-test-env-ava.js Outdated Show resolved Hide resolved
packages/far/src/index.js Show resolved Hide resolved
packages/marshal/index.js Show resolved Hide resolved
packages/marshal/test/prepare-test-env-ava.js Show resolved Hide resolved
packages/pass-style/src/error.js Show resolved Hide resolved
Base automatically changed from kris-scaffold-pass-style to master January 14, 2023 00:07
@erights
Copy link
Contributor Author

erights commented Jan 14, 2023

After @kriskowal merged #1438 , I got this PR working in all ways except for lint errors, as represented by the first commit.

Of course I want to be green under CI before merging. But for many of the type errors reported by lint, I could not figure them out, so I silenced them instead, as shown in the second commit 1046a4e . Advice? Do you mind if I merge this to unblock @kriskowal, while filing an issue to undo the damage of that second commit?

@turadg @kriskowal , I hit the "Re-request review" button on both of you because of this question. Thanks.

@erights
Copy link
Contributor Author

erights commented Jan 14, 2023

Oh damn. We are indeed using Remotable as both a type name in some places and as a function name in other places. For some reason we happened to be getting away with this before, which is kinda terrible. After extraction, for some equally mysterious reason we are no longer getting away with this. But fixing either presents compat dangers we'd need to think about. After all the fixes of the second commit, captp now fails to check due to this collision.

The same suppression strategy seems to work, so I added it to the new second commit at bf9fa86

Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

I hit the "Re-request review" button on both of you because of this question.

The type suppressions seem appropriate given the scope of this PR. The comments leave a good trail for investigation. It's not totally surprising that changing the dependency graph would yield different resolution of the ambient types.

I would like to see the import/order suppressions removed or justified with a comment.

For that reason and because I'm not fully acquainted with this code or the PR motivation I'll make this just a Comment and not Approve.

packages/marshal/test/test-dot-membrane.js Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants