Skip to content
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

Inject typescript version from package.json during build through env! (deno -v) #997

Closed
wants to merge 2 commits into from

Conversation

kevinkassimo
Copy link
Contributor

@kevinkassimo kevinkassimo commented Oct 15, 2018

Closes #993

Instead of adding new bindings to v8 or change msg.Start formats (which requires us to run isolate.execute("deno_main.js", "denoMain();")), we should be able to inject the version during compilation from package.json

env!() macro expands at compile time.

(Other python file changes are caused by ./tools/format.py)

@kevinkassimo
Copy link
Contributor Author

kevinkassimo commented Oct 15, 2018

Interesting, for some reason Windows build is complaining that TypeError: environment can only contain strings . Does not have a windows machine and could not directly debug myself...

Okay, its unicode issue...

@kevinkassimo kevinkassimo force-pushed the inject/ts-version branch 2 times, most recently from 93b343e to f69d5ca Compare October 16, 2018 00:10
@@ -18,6 +19,10 @@
sys.exit(1)
ninja_args = ["-C", build_path()] + ninja_args

package_json_env = {
"TYPESCRIPT_VERSION": package_json.get_typescript_version()
}
Copy link
Member

Choose a reason for hiding this comment

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

I don’t like that this depends on special behavior in build.py.
Ideally people would be able to build deno using gn and ninja - build.py is just to make things more ergonomic.
The way I was imagining this done was to print the versions from JS. The V8 version and Deno version can be passed in the Start message.

@ry
Copy link
Member

ry commented Oct 16, 2018

closed in favor of #995 - but thanks !

@ry ry closed this Oct 16, 2018
@kevinkassimo kevinkassimo deleted the inject/ts-version branch December 27, 2019 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants