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

Bigger refactors #5858

Closed
5 of 6 tasks
ry opened this issue May 25, 2020 · 12 comments
Closed
5 of 6 tasks

Bigger refactors #5858

ry opened this issue May 25, 2020 · 12 comments

Comments

@ry
Copy link
Member

ry commented May 25, 2020

@nnajiabraham
Copy link

Hi Ryan, would love to contribute to Deno and looking at converting cli/js to JavaScript...
Will love a better explanation on what the expectation is here and how I can go about that? @ry

@nayeemrmn
Copy link
Collaborator

nayeemrmn commented May 25, 2020

@nnajiabraham Follow discussion and links here: #4750. Not a good first issue, though.

@ry ry pinned this issue May 25, 2020
@ry
Copy link
Member Author

ry commented May 26, 2020

@nnajiabraham Thanks for the offer - any help is much appreciated. As @nayeemrmn said, this issue is for really involved long term projects. Have a look instead at the issues marked good-first-issue

@nnajiabraham
Copy link

Sure thing @ry will take a look at those

@yordis
Copy link

yordis commented Jun 2, 2020

I hope you find a way to keep TypeScript.

It is really welcoming experience to open any file and figure out what the objects are without having to debug and relying on a strong understanding of all these objects in order to contribute (maybe add JSDoc everywhere?).

It is always a given and takes with typed languages but even languages like Erlang/Elixir require you to add types everywhere if you truly would like a broader range of people to contribute. Otherwise, only a few people will be able to; the rest will open issues and rely on those few people because we lack the understanding, and tools to even feel "confident" that we can give it a try (speaking from inside out).

😞

@CyriacBr
Copy link

CyriacBr commented Jun 9, 2020

I'm more worried about the message Deno is sending to the JS/TS community by removing TS from its internal.
Imagine building a runtime with TS first class support being one of the main selling point, then NOT actually using it in its internals. Kind of a do as i say not as i do story.

I hope @ry you realize how much influence you have on the JS community. The usage of TS internally should probably be reconsidered, or either properly addressed in a demystified official blog post of some sort.
Pretty sure people that supported Deno from the get go just for its TS features and for, indirectly pushing for TS usage more widely, are hella confused right now.

@Soremwar
Copy link
Contributor

Soremwar commented Jun 9, 2020

@CyriacBr

Imagine building a runtime with TS first class support being one of the main selling point, then NOT actually using it in its internals.

Well, most of the runtime isn't written in TypeScript either but that doesn't make it less useful for TS developers.

Typescript is a really nice tool for understanding what JavaScript is really doing behind curtains, but that convenience comes at a cost, and as discussed in the document, perhaps the advantages it might bring aren't worth the price in this case, and that's perfectly ok. And in your case and everyone else's that same question must be done at the moment of choosing the tool for building your application, everything comes at a cost.

I don't think replacing TypeScript in the internals will discourage the people of using it in the first place, and having a separate file with types as siggested in the document should keep dev experience on a similar level.

Not all tools are fit for all jobs, and building a runtime/compiler has more considerations than most applications, but don't let that stop you from using the great tool TypeScript is, specially after all the hard work that has been put into making Deno the great runtime it is now.

@ry
Copy link
Member Author

ry commented Jun 9, 2020

@yordis @CyriacBr @Soremwar I saw that this design doc was being discussed more widely. Most people don't have the context to understand this narrow technical document - it is only applicable to a very particular, very technical situation in the internals of Deno. This is not at all a reflection on the usefulness of TypeScript in general. It's not a discussion about any publicly visible interface in Deno. Deno, of course, will support TypeScript forever. A website or server written in TypeScript is a very very different type of program than Deno - maybe much more so than novice programmers can appreciate - very little of Deno is written in TypeScript. The target audience is the 5 to 10 people who work on this particular internal system. Please don't draw any broader conclusions.

@teleclimber
Copy link

op crates @ry

Hey @ry, am I correct in assuming that refactor is to separate the Deno.* userland API handling from the cli project? If so 👍. I was just noticing that the CLI project includes all the rust and TS code that provides that API, which makes it harder to make a Deno-compatible runtime separate from CLI.

Thanks.

@getspooky
Copy link
Contributor

hey @ry
I am working on the url module implementation, this module require a constants for example in order to Find first and last non-whitespace characters for trimming. A lot of constants that i need actually exists on std/path, I suggest to add _shared folder to glob all shared files across the deno std.
Thanks.

@tooolbox
Copy link

Deno, of course, will support TypeScript forever. A website or server written in TypeScript is a very very different type of program than Deno - maybe much more so than novice programmers can appreciate - very little of Deno is written in TypeScript.

This makes sense and I respect your judgement on this @ry

I noticed this in the design doc:

i considered stripping the types at build-time and using a unit test for the type check. unfortunately we don't have a good way to strip the types without spinning up TSC
also it doesn't solve the problem that TypeScript is getting in the way of producing the bundle we need, which is the main thing

I see swc is mentioned; wanted to comment that esbuild strips types and bundles, if that's of any interest.

Either way, good luck and thank you to the Deno team!

@ry
Copy link
Member Author

ry commented Aug 26, 2020

Closing this issue because it's mostly complete.

op crates is still WIP - but I think it's time for a new roadmap.

@ry ry closed this as completed Aug 26, 2020
@ry ry unpinned this issue Aug 26, 2020
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

No branches or pull requests

9 participants