-
Notifications
You must be signed in to change notification settings - Fork 287
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
build: Add deno typescript support to repository #2553
Conversation
What is the purpose of this change? Adding stuff just because it's "cool" is counterproductive, there's lots of "cool" stuff on the internet, you can't add everything. New code should serve some immediate purpose, be it build, CI or tooling, otherwise it justs sit around and silently rots and wait for its turn the next time someone does a #2213 |
its primary usage is to soft-deprecate outdated python why using python for new scripts may not be suitable for maintaining
What could deno provide that python cannot do
in conclusion, usage of deno for toolings allows us to make type safe, portable and easy to maintain program. for immediate usages, #2544 could be an example. i extracted only the config because i was planning to add some more tooling PRs written in deno besides #2544, and i didn't want to make these PRs all rely on #2544. |
Ok, I can get the desire behind replacing python with typescript. I don't necessarily agree with it: having the majority of the tooling in python is much better than having most of it in python and some parts in typescript. From googling around it seems that typescript is a bit behind python in popularity, but pure JS is way ahead, so we can expect contributors to know typescript to some extent same as we would with python. But having to know 1 language if you want to work with any tooling script is better than having to know 2. Given the benefits and how outdated some python scripts are, I wouldn't be opposed if most or all our relevant scripts were to be switched to typescript (even if I would have to learn the language). Don't know what the other devs and contributors think though, or whether it impacts them.
It should've been added in that PR then, along with documentation that explains what it is and how to use it. Config file for tooling that does not exist serves no purpose. |
i see. next time i will put all the related changes into single PR. |
@olanti-p: Python is VERY popular (heck, we use it at my day job for a large Django website) BUT the lack of typing IS indeed often getting in the way. JS is more popular than TS by a looong shot (it's pretty much THE language to use if you do ANY webdev at all). But it has the same problem as Python, with no types. Hence the bigger and more complex projects readily move to typescript. |
@Zireael07 yeah fully safe type python can be written using type hints but our scripts aren't written using any of these type hints. |
That's a pretty strong argument, I guess. Still, it would be good to limit the number of languages as much as possible, to make setup easier. Would you be willing to write a doc on it? What's the expected role of TS in the project? Just used for some parsing or general usage? Is it supposed to replace Python or be used alongside? |
To run the scriptsOnly one executable, deno (or deno.exe) (installation) is needed to setup the system. No additional step is required to set up formatter, tester, linter, benchmark tool, etc as deno has all of them bundled. Also, no Make it with the build system- uses: denoland/setup-deno@v1 it only takes one line to enable CI to use deno. https://github.com/denoland/setup-deno works with linux, windows and mac.
Of course. it could take multiple PRs, however.
With some help (and some 3 hours of screensharing) @Kenan2000 could understand the scripts. I've also provided lots of guides and templates so beginners could edit the values and use.
General usages. Can be used for any jobs that is not done by the game engine.
The plan is to completely replace them. I've only rewritten |
Summary
SUMMARY: Infrastructure "Add deno typescript support to repository"
Purpose of change
deno is a cross-platform runtime for running typescript in local environment. some of its benefits:
also, packages are imported from URL, making deno script very portable.
some examples of deno's benefits in #2544:
deno.jsonc
)Describe the solution
cherry-picked config from #2544