Skip to content

Conversation

@HoshinoTented
Copy link
Contributor

@HoshinoTented HoshinoTented commented Dec 16, 2025

This PR slightly refactors CompiledModule and ResolveInfo, by serializing/deserializing the ResolveInfo.thisModule.export directly instead of serializing/deserializing the context-related commands (such as Command.Import).

Q: Why don't serialize context-related commands?
A: Commands are imperative, thus the order is important, furthermore, some definitions act like a command, such as inductive, which introduces a sub-module, and it is very stupid to store the order information...

Although serializing ModuleExport directly may increase the size of ,ayac, especially prelude.aya.

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 83.44371% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.38%. Comparing base (b43c5ea) to head (090c8c0).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...src/main/java/org/aya/compiler/CompiledModule.java 83.33% 14 Missing and 6 partials ⚠️
...x/src/main/java/org/aya/syntax/ref/ModulePath.java 60.00% 0 Missing and 2 partials ⚠️
.../java/org/aya/resolve/context/NoExportContext.java 50.00% 1 Missing ⚠️
syntax/src/main/java/org/aya/syntax/ref/QName.java 0.00% 1 Missing ⚠️
syntax/src/main/java/org/aya/syntax/ref/QPath.java 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1449      +/-   ##
============================================
- Coverage     82.43%   82.38%   -0.05%     
  Complexity     4549     4549              
============================================
  Files           393      393              
  Lines         13553    13597      +44     
  Branches       1684     1679       -5     
============================================
+ Hits          11172    11202      +30     
- Misses         1509     1526      +17     
+ Partials        872      869       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@HoshinoTented HoshinoTented force-pushed the submodule-reexport-plan-b branch from 3dc1b25 to 90b9d1f Compare December 18, 2025 06:27
@ice1000 ice1000 added this to the v0.41 milestone Dec 23, 2025
Copy link
Member

@ice1000 ice1000 left a comment

Choose a reason for hiding this comment

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

very nice!

@ice1000 ice1000 marked this pull request as ready for review December 24, 2025 04:56
@ice1000 ice1000 merged commit 2f109a5 into main Dec 25, 2025
7 checks passed
@ice1000 ice1000 deleted the submodule-reexport-plan-b branch December 25, 2025 15:21
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