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

Add a version number to the Monaco runtime #2948

Closed
2 tasks done
orta opened this issue Feb 7, 2022 · 5 comments
Closed
2 tasks done

Add a version number to the Monaco runtime #2948

orta opened this issue Feb 7, 2022 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality

Comments

@orta
Copy link
Contributor

orta commented Feb 7, 2022

Context

  • This issue is not a bug report. (please use a different template for reporting a bug)
  • This issue is not a duplicate of an existing issue. (please use the search to find existing issues)

Description

I think the crux of this is an upstream issue, as I think it revolves around monaco-editor-core realistically, but there's an issue with the TS playground microsoft/TypeScript-Website#2247 where we need to be able to provide different API shapes to the inlay provider API in Monaco.

I can bake the version number into our deploy process in ts/make-monaco-builds but it feels like something which is just generically useful everywhere.

@orta orta added the feature-request Request for new features or functionality label Feb 7, 2022
@hediet
Copy link
Member

hediet commented Feb 7, 2022

Nice to see you still active here ;)

I don't fully understand the issue though. Why is the static version number of the installed monaco-editor package not enough? Cannot you do something ala require('monaco-editor/package.json').version?
Aren't these kind of conflicts a matter of the package manager? (Especially if also the d.ts files change and you don't want to install multiple versions of monaco-editor at the same time)

Tbh, currently every release of the monaco editor is a breaking change according to the semver versions we use. We might want to relax that.

@orta
Copy link
Contributor Author

orta commented Feb 7, 2022

👋🏻 - I can bundle the version in myself with everything that's in the package.json today (the nightly TS process binds the latest version of Monaco with the latest version of Monaco to aim for best compat) but the playground can be running any version of Monaco which can change at runtime when you change the version of TS - at that point we don't have access to a package.json (and thus the version) inside the UMD builds of monaco.

Yeah, this has been the first time we've needed to handle two separate API shapes in Monaco, so really the first time I've had to think about it - I can totally see that Monaco may never hit 1.x given it is essentially internals exposed to the public, a runtime accessible version would allow folks to handle that

@hediet hediet self-assigned this Feb 7, 2022
@hediet
Copy link
Member

hediet commented Feb 7, 2022

Cannot you have the same typescript monaco contribution for all versions of TypeScript?

Then you don't need to chose a different monaco version when changing the typescript version.

@orta
Copy link
Contributor Author

orta commented Feb 8, 2022

We could yep, and that's basically what we're doing now by locking to a Monaco commit in the build process - but letting the Monaco version fall behind also has its own tradeoffs

@hediet
Copy link
Member

hediet commented Feb 10, 2023

Closing this as there is a workaround and this problem seems to be very specific.

@hediet hediet closed this as completed Feb 10, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants