Comments (7)
Works like a charm! Thank you for working on this. I love to develop outside of greyhack as it's much more convenient and greybel is an insane improvement on that.
Closing this issue now. Fixed and better than before. 👍🏼
from greybel-js.
After some investigation and debugging there is a finding.
The transpiler does not forward the options to the parser.
https://github.com/ayecue/greybel-transpiler/blob/master/src/transpiler.ts#L86
Fixed it by replacing
const targetParseResult: TargetParseResult = await target.parse({
disableLiteralsOptimization: me.disableLiteralsOptimization,
disableNamespacesOptimization: me.disableNamespacesOptimization
});
with
const targetParseResult: TargetParseResult = await target.parse(me);
Prepared an PR: ayecue/greybel-transpiler@master...stevenklar:greybel-transpiler:patch-1
If you can confirm that i'm not missing something here, this can be closed and fixed in the transpiler itself. :-)
from greybel-js.
You are right. Looks like I've missed that.
Your patch looks alright at first glance. I'll have deeper look tomorrow.
from greybel-js.
Awesome thanks, looking forward to the fix. :-)
from greybel-js.
Okay the issue should be fixed with e47e653.
Turns out that the envars map wasn't just passed to the target class incorrectly but also to the parser instance from greybel-core
. To prevent future mistakes I've also added a test case for it.
Thanks for reporting. :)
I'll keep the issue open for now until you have also checked it on your side.
from greybel-js.
Hey ayecue, checked out the new version and it works!
There is one more thing I noticed.
I don't know if we could fix that within this issue or should create a new one for it.
Right now I got the ENV implementation in my actual entry src file. Which works now.
Example:
cmd.src (which is build target)
Framework.ENV.Mode = #envar MODE; // local or remote
When I put that in any file which will be merged ob build time. Meaning #include env;
Having the same line in there produces
Framework.ENV.Mode = null;
Any idea if that could be an easy fix or does that need more brain being able to make that recursive.
I don't think it's really a deal breaker with that feature. But having all env related stuff injected in another file would be nice. :-)
from greybel-js.
Nice good to hear.
Thanks for reporting. I thought I've added support for it at some point. Seems like I didn't. The passing of the environment variables map right now is a little bit dirty in the transpiler. Something I have to clean up in the future when there is time.
Anyway I've did a few changes to the code in the transpiler. (5d21257) Greybel should now support #envar somevar;
in includes and imports. I've also added a test case to make sure this works in the future as well.
Please give it a try if it works for you as well.
I'll keep the issue open until you've checked it on your side as well.
from greybel-js.
Related Issues (20)
- Save Ingame Information (greybel-proxy obfuscated) HOT 3
- Issue if line is longer than maxChars allowed in installer HOT 1
- Can import_code have an absolute path? HOT 2
- Enhance installer with auto compile HOT 6
- Overridden globals have no effect HOT 6
- Support MiniScript files (.ms) HOT 1
- save/build request HOT 4
- Message-Hook sync sometimes open unusable Terminal window HOT 1
- Message-Hook does not sync installer and auto compile HOT 1
- Add CLI option to customize name of outputted build folder [Feature Request] HOT 1
- Change where this tool outputs build results (i.e. resulting files) to [Feature Request] HOT 7
- Folders (containing source code files) that are imported into Grey Hack are not deleted after auto compilation process has been completed [Potential Bug] HOT 15
- Add CLI option to specify the name of the outputted executable file HOT 5
- [Issue] Executable file is not outputted after auto compilation process is completed when the ``--auto-compile-name`` option is specified HOT 4
- Misbehavior in the built-in range function HOT 2
- List can be different even if the same HOT 2
- gitbash win10 tty issue HOT 1
- TextMesh Pro feature not showing color HOT 4
- Import assertions is used even though not supported by 16.13 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from greybel-js.