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

Extract out ICollaborativeDrive to @jupyter/collaborative-drive #353

Merged

Conversation

davidbrochart
Copy link
Collaborator

@davidbrochart davidbrochart marked this pull request as draft September 16, 2024 20:25
Copy link
Contributor

Binder 👈 Launch a Binder on branch davidbrochart/jupyter_collaboration/extract-icollaborativedrive

@davidbrochart davidbrochart force-pushed the extract-icollaborativedrive branch 3 times, most recently from cf02af4 to de0c62e Compare September 17, 2024 07:46
@davidbrochart davidbrochart marked this pull request as ready for review September 17, 2024 07:46
@davidbrochart
Copy link
Collaborator Author

Should there be a new projects/jupyter-collaborativedrive?

@davidbrochart davidbrochart force-pushed the extract-icollaborativedrive branch 6 times, most recently from eb1976f to b0f2621 Compare September 18, 2024 09:19
@davidbrochart
Copy link
Collaborator Author

I'm wondering if this failure:

Error: src/yprovider.ts(6,35): error TS2307: Cannot find module '@jupyter/collaborativedrive' or its corresponding type declarations.
Error: src/ydrive.ts(16,8): error TS2307: Cannot find module '@jupyter/collaborativedrive' or its corresponding type declarations.

is caused by the fact that @jupyter/collaborativedrive is not yet published to NPM?
I cannot reproduce it, it works locally.

@davidbrochart davidbrochart force-pushed the extract-icollaborativedrive branch 3 times, most recently from 484d489 to 95c62d1 Compare September 18, 2024 13:51
@davidbrochart
Copy link
Collaborator Author

@krassowski What do you think about getting this in before releasing v3?
We would need to publish @jupyter/collaborativedrive to NPM.

@davidbrochart
Copy link
Collaborator Author

@jtpio do you have the rights to publish @jupyter/collaborativedrive to NPM?

@@ -0,0 +1,55 @@
{
"name": "@jupyter/collaborativedrive",
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should rename the package to the following, so it reads better, before publishing it?

Suggested change
"name": "@jupyter/collaborativedrive",
"name": "@jupyter/collaborative-drive",

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fine with me 👍

@davidbrochart
Copy link
Collaborator Author

@krassowski @jtpio ok to merge and publish @jupyter/collaborative-drive?

@davidbrochart
Copy link
Collaborator Author

I'm planning to merge today.

@jtpio
Copy link
Member

jtpio commented Oct 9, 2024

Thanks @davidbrochart. I'll try to have another look today.

@@ -71,6 +71,7 @@ jobs:
pip install "jupyterlab>=4.0.0,<5"
pip install -e .
jlpm
jlpm build
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need it here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't remember the reason, I'll remove it to see what happens.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See here:

    src/yprovider.ts:6:35 - error TS2307: Cannot find module '@jupyter/collaborative-drive' or its corresponding type declarations.
    6 import { IDocumentProvider } from '@jupyter/collaborative-drive';
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe it will be fine once @jupyter/collaborative-drive is published?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, maybe I can help publish a placeholder version to see if it helps.

Copy link
Member

Choose a reason for hiding this comment

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

It looks like a version with the previous name was also published earlier: https://www.npmjs.com/package/@jupyter/collaborativedrive

Maybe it can be removed from npm so it's less confusing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now I'm confused, who published that? Do we use it somewhere?

Copy link
Member

Choose a reason for hiding this comment

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

Now I'm confused, who published that? Do we use it somewhere?

Looks like you did?

image

Copy link
Member

Choose a reason for hiding this comment

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

I guess you published it to see if that would help fix the CI?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe, I don't remember.

@jtpio jtpio changed the title Extract out ICollaborativeDrive to @jupyter/collaborativedrive Extract out ICollaborativeDrive to @jupyter/collaborative-drive Oct 9, 2024
Copy link
Member

Choose a reason for hiding this comment

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

Let's rename the folder from:

packages/collaborativedrive

To

packages/collaborative-drive

So it's consistent with the package name?

@davidbrochart
Copy link
Collaborator Author

Same error:

    src/yprovider.ts:6:35 - error TS2307: Cannot find module '@jupyter/collaborative-drive' or its corresponding type declarations.
    6 import { IDocumentProvider } from '@jupyter/collaborative-drive';
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I guess the published package is useless without code. I'll add jlpm build back.

@jtpio
Copy link
Member

jtpio commented Oct 10, 2024

I guess the published package is useless without code.

What do you mean by "without code"? The package was published from this branch directly.

@davidbrochart
Copy link
Collaborator Author

Oh my bad, yes the code is there. Then I don't know what is wrong.

@jtpio
Copy link
Member

jtpio commented Oct 10, 2024

Having to add jlpm run build makes it look like something is wrong in the setup of the new package, since it was not needed before.

@@ -2122,10 +2123,22 @@ __metadata:
languageName: unknown
linkType: soft

"@jupyter/collaborative-drive@^3.0.0-beta.6, @jupyter/collaborative-drive@workspace:packages/collaborative-drive":
Copy link
Member

Choose a reason for hiding this comment

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

This line looks different than for the other packages.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, let's try to make it similar.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So it's Yarn that adds @jupyter/collaborative-drive@^3.0.0-beta.6.

@davidbrochart
Copy link
Collaborator Author

davidbrochart commented Oct 11, 2024

I guess the published package is useless without code.

What do you mean by "without code"? The package was published from this branch directly.

Actually yes, there is no code here.

@davidbrochart
Copy link
Collaborator Author

I published @jupyter/collaborative-drive v3.0.0-beta.7, and there is no IDocumentProvider in lib/tokens.js here. It is in lib/tokens.d.ts but it's not enough, right?

@davidbrochart
Copy link
Collaborator Author

In the end, I just think that jlpm build is needed because the test in docprovider now needs @jupyter/collaborative-drive through yprovider.ts, so it has to be compiled.

@davidbrochart
Copy link
Collaborator Author

I'll take the risk to merge this PR and release jupyter-collaboration v3.0.0beta7. We can still revert the changes and release v3.0.0beta8 if it doesn't work.

@davidbrochart davidbrochart merged commit 60e55ea into jupyterlab:main Oct 11, 2024
18 of 20 checks passed
@davidbrochart davidbrochart deleted the extract-icollaborativedrive branch October 11, 2024 14:08
@jtpio
Copy link
Member

jtpio commented Oct 11, 2024

Arf, I wanted to help you more on this yesterday but didn't have time.

At the very least it would have been great to leave a TODO, or open an issue...

Maybe check the tsconfig.json to see if it needs a references?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants