-
-
Notifications
You must be signed in to change notification settings - Fork 351
Dynamically get platform entrypoints #8352
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
Open
rtfeldman
wants to merge
108
commits into
main
Choose a base branch
from
improve-platform-modules
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
da304ef to
5f5a64d
Compare
7fa5616 to
c1b7650
Compare
81ae2f6 to
9443c69
Compare
c6994bb to
0cf9ed0
Compare
809cb71 to
b85b05c
Compare
2245560 to
f880f64
Compare
…orm propagation - Set root_is_platform from package kind at PackageEnv creation instead of during module canonicalization - Fix TupleAccessor.getElement to return null pointer for zero-sized elements - Fix RecordAccessor and TupleAccessor assertions to allow null pointers for zero-sized types - Fix copyToPtr to check size before checking for null pointer - Fix evaluateExpression to use null pointer for zero-sized argument tuples - Replace ZeroSizedType error with TypeMismatch in field access code These fixes improve zero-sized type support but fx_platform_test still fails with TypeMismatch during evaluation.
The host was passing a bare unit value, but Roc functions always expect arguments wrapped in a tuple, even for single parameters. Updated fx platform host to pass arguments as a struct matching tuple layout. Still debugging TypeMismatch in interpreter evaluation.
- Changed main! lambda from |_| to || to match () => {} signature
- Exposed Stdout, Stderr, Host from platform so they get built with building_platform_modules=true
- Updated host to pass zero-sized empty tuple for zero-parameter function
Still failing with TypeMismatch - requires deeper investigation into hosted function dispatch.
Removed implementations from Stdout and Stderr, making them annotation-only
like the int/str platforms. Still investigating TypeMismatch - appears to be
a fundamental issue with how the platform accesses required app functions or
how the interpreter evaluates effectful entry points.
Findings:
- int/str platforms work fine with interpreter
- fx platform fails even with simplest app that just returns {}
- Issue occurs before any hosted function calls
- May be related to platform's main_for_host! accessing app's main! through requires clause
- Type Module transformation may not be the root cause
48bea70 to
1c78bc0
Compare
3a055c7 to
cafc129
Compare
cafc129 to
aeeaa6e
Compare
59a4df2 to
a3f414a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.