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

Use projects in transcripts #5078

Merged
merged 44 commits into from
Jun 27, 2024
Merged

Use projects in transcripts #5078

merged 44 commits into from
Jun 27, 2024

Conversation

ChrisPenner
Copy link
Contributor

@ChrisPenner ChrisPenner commented Jun 12, 2024

Overview

Converts most transcripts to use projects rather than .> in loose code.
The plan is to merge the project-centric transcripts to trunk so if I break things with the conversion to project roots (which removes loose code support) I can safely compare apples-to-apples rather than converting the tests and code in the same step.

Apologies, the diff view in github might seize up a bit 😓

I believe every transcript is converted except the following:

These transcripts I'm waiting for Mitchell to have a crack at first since they depend on merge.old:

  • diff-namespace.md
  • name-selection.md
  • update-on-conflict.md
  • delete.md

The following transcripts are only partially translated, they'll need changes from the project-roots branch to be fully translated:

  • move-namespace.md
  • propagate.md
  • tab-completion.md
  • reflog.md

These I haven't even attempted to translate since they'll require additional features based on the project root branch.

  • names.md
  • namespace-dependencies.md
  • view.md
  • transcripts-round-trip/main.md

Implementation notes

The vast majority of changes are just swapping .> with scratch/main>; but there are many transcripts which required other mechanical changes, specifically where subnamespaces were used. Most of these were replaced with either using project branches, or commands which work within a specific subnamespace instead.

More significant changes are commented.

Test coverage

Yup it sure is.

Loose ends

Mentioned above; will be addressed in the project-roots branch.

Base automatically changed from cp/transcript-auto-create to trunk June 12, 2024 13:28
@ChrisPenner ChrisPenner force-pushed the cp/use-projects-in-transcripts branch from f86e36e to 20b5e93 Compare June 26, 2024 23:06
@ChrisPenner ChrisPenner marked this pull request as ready for review June 26, 2024 23:25
"tag": "Paragraph"
}
"hash": "#sg60bvjo91fsoo7pkh9gejbn0qgc95vra87ap6l5d35ri0lkaudl7bs12d71sf3fh6p23teemuor7mk1i9n567m50ibakcghjec5ajg",
"readme": null
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch! Forgot to update the api call to the projects endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed this and all the other api-* ones 👍🏼

@@ -12,6 +12,9 @@ GET /api/projects
},
{
"projectName": "project-two"
},
{
"projectName": "scratch"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This project is implictly created now.


foo/main> branch bar/topic
bar/main> branch foo/main topic2
bar/main> branch foo/main /topic3
.> branch foo/main bar/topic4

.some.loose.code> branch foo/topic13
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These tests I just removed since we'll be removing loose code support very soon.

.> find-in somewhere bar
scratch/main> find bar
-- Shows UUIDs
-- scratch/main> find.global bar
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This shows project UUIDs unfortunately, I'm hoping I can revive this behaviour correctly in the project-roots branch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved a few transcripts from transcripts-using-base into transcripts if they didn't actually depend on base because the extra history and global definitions on loose-code from the base transcript was complicating the output.


type A a b c d
= B b
= A a
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not positive what determines the uuids used for determining constructor order tbh 🤷🏼‍♂️

@@ -1,9 +1,47 @@
# Tests for `move.namespace`


## Moving the Root
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved the global root stuff to the top of this transcript, leaving it at the bottom meant it would have a bunch of non-deterministic .__projects.* junk in it.

I'll end up rewriting this part in the project-roots branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the dependency on the base transcript for this one, since mixing the base transcript with projects stuff was causing UUIDs in the output.

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.

Whew! 😅
Nice work.

My eyes admittedly glazed over and didn't look super close at the multi-branch, "interesting" transcripts, but I flagged a couple of deletions that you've now fixed, thanks.

@aryairani
Copy link
Contributor

Apologies, the diff view in github might seize up a bit 😓

I switched from Chrome to Safari mid-review and that helped

@ChrisPenner ChrisPenner force-pushed the cp/use-projects-in-transcripts branch from 2b99f42 to 4b7cf99 Compare June 27, 2024 18:08
@ChrisPenner ChrisPenner added the ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved label Jun 27, 2024
@mergify mergify bot merged commit c206059 into trunk Jun 27, 2024
35 checks passed
@mergify mergify bot removed the ready-to-merge Apply this to a PR and it will get merged automatically once CI passes and 1 reviewer has approved label Jun 27, 2024
@mergify mergify bot deleted the cp/use-projects-in-transcripts branch June 27, 2024 18:38
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.

2 participants