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

Use Asynchronous Code for Loading Modules #1471

Merged
merged 28 commits into from
Sep 7, 2023
Merged

Conversation

leeyi45
Copy link
Contributor

@leeyi45 leeyi45 commented Aug 22, 2023

This PR is mainly aimed at addressing #1348 . I have only been able to write an async implementation for the transpiler and stepper. Both the interpreter and ec-evaluator will need further work and discussion for such implementations.

This PR also incorporates the changes from #1470 .

@coveralls
Copy link

coveralls commented Aug 22, 2023

Pull Request Test Coverage Report for Build 5936042370

  • 215 of 269 (79.93%) changed or added relevant lines in 23 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 83.014%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/modules/moduleLoader.ts 3 5 60.0%
src/transpiler/transpiler.ts 42 44 95.45%
src/runner/sourceRunner.ts 8 11 72.73%
src/interpreter/interpreter.ts 2 6 33.33%
src/utils/arrayMap.ts 17 21 80.95%
src/utils/assert.ts 4 9 44.44%
src/modules/errors.ts 8 16 50.0%
src/modules/moduleLoaderAsync.ts 43 52 82.69%
src/stepper/stepper.ts 11 28 39.29%
Files with Coverage Reduction New Missed Lines %
src/interpreter/interpreter.ts 1 89.9%
Totals Coverage Status
Change from base Build 5838197500: 0.1%
Covered Lines: 10838
Relevant Lines: 12635

💛 - Coveralls

@martin-henz
Copy link
Member

martin-henz commented Sep 3, 2023

This PR is mainly aimed at addressing #1348 . I have only been able to write an async implementation for the transpiler and stepper. Both the interpreter and ec-evaluator will need further work and discussion for such implementations.

This PR also incorporates the changes from #1470 .

I think the interpreter in src/interpreter/interpreter.ts is no longer in use, see #1348

So what would remain to be refactored is the module loading of ec-evaluator.

Note that src/interpreter/interpreter-non-det.ts does not handle modules. So that would be a nice CP3108 project.

Copy link

@Yongbeom-Kim Yongbeom-Kim left a comment

Choose a reason for hiding this comment

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

LGTM... but I'm not sure if I'm familiar enough with the js-slang repo that I didn't miss anything

@leeyi45
Copy link
Contributor Author

leeyi45 commented Sep 7, 2023

I'll do another once over myself, but if all's good I'll do the merge

@leeyi45 leeyi45 merged commit ae195ec into master Sep 7, 2023
1 check passed
@leeyi45 leeyi45 deleted the module-loader-async branch September 7, 2023 08:11
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.

5 participants