-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
feat: include runtime from current directory instead of lib #2884
Conversation
Question: if you're basing your runtime off of the standard library, wouldn't you end up copying/vendoring those files into your project? If so, wouldn't you be able to modify those imports manually? |
Yes, that's exactly what I did, but it took me quite some time to figure out why my changes had no effect. |
Okay, could you merge/rebase the latest changes pushed to main? |
I cannot reproduce this issue, could you explain more about it? or give a reproduce repo link. Thanks! |
Copy First you notice that you need to fix imports to parent directory ( However, imports like import "rt/tlsf";
import "rt/itcms"; actually import from the runtime built into the compiler which makes it ignore any changes you make in your local copy, which is very confusing. And even if you don't use a custom runtime, I think you should always import relative files with |
ahhh, it is real confused to mix library and compiler builtin library. it needs more test cases if we want to use this things in wider scenario. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. thanks!
Yeah, it looks weird to an outside reader, and it's probably not good style either... |
Changes proposed in this pull request:
The runtime entry points (
index-*.ts
) all include their child modules fromlib
insteadthe current directory.
This causes problems in particular when you try to base your custom runtime on the standard runtime, since it will ignore any code and just include from the standard library embedded in the compiler instead.