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

Follow-up of moc.js API update (Serokell) #113

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

GoPavel
Copy link

@GoPavel GoPavel commented Mar 4, 2025

Update IDE API of the moc compiler for the: dfinity/motoko#4931

Problem: In the compiler, we changed the `parseMotokoTyped` function for
the LSP that allows caching for better performance. This needs to be
exposed by node-motoko. Moreover, `parseMotokoWithDeps` was added which
parses the file and returns immediate dependencies.

Solution: Regenerate based on a local compiler build. Change `file.ts`
and `index.ts` to account for these functions.
Problem: We should test our changes related to caching, to ensure
everything is working as intended.

Solution: Write a couple of tests related to checking caches for changed
and unchanged files.
@GoPavel GoPavel requested a review from a team as a code owner March 4, 2025 13:37
@github-actions github-actions bot closed this Mar 4, 2025
@GoPavel GoPavel changed the title Draft: follow-up of moc.js API update (Serokell) Follow-up of moc.js API update (Serokell) Mar 4, 2025
@rvanasa rvanasa reopened this Mar 4, 2025
@dfinity dfinity deleted a comment from github-actions bot Mar 4, 2025
@rvanasa
Copy link
Contributor

rvanasa commented Mar 4, 2025

Thank you for the PR! I'm thinking that we get dfinity/motoko#4931 merged first and then revisit this once we release the caching logic.

Problem: We need to pass the filename to the import resolver, which
requires passing the filename to `parseMotokoWithDeps`.

Solution: Regenerate compiler and use the updated compiler API. Add some
tests to be sure it's working.
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