Skip to content

Make monaco workspace disposable - #330

Merged
kaisalmen merged 3 commits into
masterfrom
make-workspace-disposable
Apr 8, 2022
Merged

Make monaco workspace disposable#330
kaisalmen merged 3 commits into
masterfrom
make-workspace-disposable

Conversation

@CGNonofr

Copy link
Copy Markdown
Collaborator

This include a breaking change: Monaco.install now return a Disposable instead of the services

@CGNonofr

Copy link
Copy Markdown
Collaborator Author

@mofux @kaisalmen currently, there no way to uninstall the services

it means we can't change the rootUri without reloading the page

@kaisalmen

Copy link
Copy Markdown
Collaborator

Do you mind adjusting the example? Couldn't we demonstrate the functionality via a reset button: Dispose and re-init, even if no new url is used. WDYT?

@CGNonofr

Copy link
Copy Markdown
Collaborator Author

Do you think it will be relevant? Nothing will happen in the interface, and we can already achieve the reset button without this feature (we don't need to uninstall the services)

@kaisalmen

Copy link
Copy Markdown
Collaborator

The "simple" example is likely not the best place for this. The return value of install is just ignored there, but putting it artificially to use may not help. So, nevermind. A more advanced example or unit test could handle this, but that's not relevant here, right now.

@kaisalmen kaisalmen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Code does not compile without adding new imports, otherwise this is fine. Thanks.

Comment thread client/src/monaco-services.ts

@kaisalmen kaisalmen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@CGNonofr

Copy link
Copy Markdown
Collaborator Author

It's still not clear what is the new process here? am I supposed to merge it? Who is responsible for making a new release?

@kaisalmen

Copy link
Copy Markdown
Collaborator

We should not automatically list all for review, here. I need see how to limit this it to at least one person. You and me can anyway merge with admin privileges. So, if you are ok with one one person reviewing, then go ahead and merge.

As this is a breaking change we should release a 0.19.0. How urgent is this for you? I am working on upgrading build and dependencies right now, but this won't be finished today.

@CGNonofr

Copy link
Copy Markdown
Collaborator Author

This is not really urgent, I just wanted to get rid of a workaround

Btw: What about adopting semantic release here?

@kaisalmen

kaisalmen commented Mar 18, 2022

Copy link
Copy Markdown
Collaborator

Btw: What about adopting semantic release here?

👍 enforced or relaxed via humans? What do you have in mind?

@CGNonofr

Copy link
Copy Markdown
Collaborator Author

The more it is automatic the better I think

The most important part is using the commit message convention allowing to detect if the next version should be a patch/minor/major version

@kaisalmen

Copy link
Copy Markdown
Collaborator

Ok from my side. Shall I merge now? It is a breaking change and should not be release before 0.19.0. I would like it to include this and at least build/dep. update. Are you ok with waiting until next release until all is done? A 0.18.x bug-fix release could still be done from a separate branch if it really becomes necessary.

@CGNonofr

CGNonofr commented Mar 21, 2022

Copy link
Copy Markdown
Collaborator Author

Ok from my side. Shall I merge now? It is a breaking change and should not be release before 0.19.0. I would like it to include this and at least build/dep. update. Are you ok with waiting until next release until all is done? A 0.18.x bug-fix release could still be done from a separate branch if it really becomes necessary.

What if I split this one into 2 PRs: one with the workspace being disposable and one with the MonacoServices.install returning a disposable (which is the breaking change)? (to be able to merge the first one - the one I want)

@CGNonofr

Copy link
Copy Markdown
Collaborator Author

Forget about it, it can wait

@kaisalmen

Copy link
Copy Markdown
Collaborator

We can merge it now and deal with bugfix releases if needed. No worries. The other stuff should not take weeks.

@kaisalmen

Copy link
Copy Markdown
Collaborator

I will rebase this branch due to #340 and then we can merge it as well.

@kaisalmen
kaisalmen force-pushed the make-workspace-disposable branch from d53522e to 2ce376e Compare April 8, 2022 11:36
@kaisalmen
kaisalmen merged commit de52c2a into master Apr 8, 2022
@CGNonofr

CGNonofr commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator Author

Will there be a 0.19.0 soon?

btw, shouldn't it be a 1.0.0?

@kaisalmen

Copy link
Copy Markdown
Collaborator

Will there be a 0.19.0 soon?

btw, shouldn't it be a 1.0.0?

Yes, soon, but maybe after Easter weekend. I already released a 0.19.0-next.0 and I want to release a 0.19.0-next.1 may be later today.
We should have a bigger version jump once eslint and semantic versions is in? Until then we could have further next releases. I already locally played around with some improvements that allow to compile the lib to es modules + we could ship bundles together in the npm package.

Btw, I just enabled https://github.com/TypeFox/monaco-languageclient/discussions We can use this to discuss things that have a broader scope than a single issue.

@CGNonofr

CGNonofr commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator Author

ok! I'm just not a big fan of not being able to release a fix at any time if we need to

@kaisalmen

Copy link
Copy Markdown
Collaborator

Yes, I understand that. We can do it earlier and integrate further updates/improvements later. Did you test the new build and tried the examples yourself?

@CGNonofr

CGNonofr commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator Author

Ok I will, that's not that easy. Didn't you claim the code was unchanged? ^^

@kaisalmen

kaisalmen commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator

Yes 🙂 But almost the whole example explanation/start-up changed 😅

@CGNonofr

CGNonofr commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator Author

I noticed an issue, I'll make a PR

Btw, isn't it the moment to switch to the main branch instead of master?

@CGNonofr

CGNonofr commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator Author

Regarding the examples: that's a shame we have to build it before starting it, can't we use ts-node instead?

@kaisalmen

Copy link
Copy Markdown
Collaborator

Both clients examples are served by vite and don't require a build, but the node example requires one.

@CGNonofr

CGNonofr commented Apr 8, 2022

Copy link
Copy Markdown
Collaborator Author

So what do you think about using ts-node? We just need to replace node lib/server.js by node -r tsconfig-paths/register -r ts-node/register src/server.ts

@kaisalmen

Copy link
Copy Markdown
Collaborator

So what do you think about using ts-node? We just need to replace node lib/server.js by node -r tsconfig-paths/register -r ts-node/register src/server.ts

Yes, go-ahead make a PR 👍

@kaisalmen

Copy link
Copy Markdown
Collaborator

please check if README requires adjustments

@kaisalmen

Copy link
Copy Markdown
Collaborator

We should move this discussion to #315 or #343

@kaisalmen
kaisalmen deleted the make-workspace-disposable branch July 10, 2026 10:42
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