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

Make monaco workspace disposable #330

Merged
merged 3 commits into from
Apr 8, 2022
Merged

Conversation

CGNonofr
Copy link
Collaborator

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

@CGNonofr
Copy link
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
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
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
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.

Copy link
Collaborator

@kaisalmen kaisalmen left a comment

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.

client/src/monaco-services.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@kaisalmen kaisalmen left a comment

Choose a reason for hiding this comment

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

LGTM

@CGNonofr
Copy link
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
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
Collaborator Author

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

Btw: What about adopting semantic release here?

@kaisalmen
Copy link
Collaborator

kaisalmen commented Mar 18, 2022

Btw: What about adopting semantic release here?

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

@CGNonofr
Copy link
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
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
Copy link
Collaborator Author

CGNonofr commented Mar 21, 2022

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
Collaborator Author

Forget about it, it can wait

@kaisalmen
Copy link
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
Collaborator

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

@kaisalmen kaisalmen merged commit de52c2a into master Apr 8, 2022
@CGNonofr
Copy link
Collaborator Author

CGNonofr commented Apr 8, 2022

Will there be a 0.19.0 soon?

btw, shouldn't it be a 1.0.0?

@kaisalmen
Copy link
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
Copy link
Collaborator Author

CGNonofr commented Apr 8, 2022

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
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
Copy link
Collaborator Author

CGNonofr commented Apr 8, 2022

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

@kaisalmen
Copy link
Collaborator

kaisalmen commented Apr 8, 2022

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

@CGNonofr
Copy link
Collaborator Author

CGNonofr commented Apr 8, 2022

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
Copy link
Collaborator Author

CGNonofr commented Apr 8, 2022

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
Collaborator

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

@CGNonofr
Copy link
Collaborator Author

CGNonofr commented Apr 8, 2022

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
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
Collaborator

please check if README requires adjustments

@kaisalmen
Copy link
Collaborator

We should move this discussion to #315 or #343

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.

None yet

2 participants