feat: include runtime from current directory instead of lib#2884
feat: include runtime from current directory instead of lib#2884CountBleck merged 3 commits intoAssemblyScript:mainfrom
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. |
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 fromlibinsteadthe 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.