How to get problems solved
Hi all,
I would like to know where is the best place to ask for help (and get answers) for someone who wants to move stuff from node to deno?
Is it here in this channel or should I better try in one of the project-channels?
Denos approach is super cool, but it is so hard to transfer simple things from node to deno.
For me it does not feel like flying with the feet above the ground, more as having concrete shoes. Sorry.
I have two open posts here in the help channel without any answer, even not a question to add some details (that may be missing).
So how could I get these blockers solved?
2 Replies
Denos approach is super cool, but it is so hard to transfer simple things from node to deno.First, a disclaimer - I'm not completely certain what DTO's are, or even Reflection in this context, just a hunch. But anyway: Looking at your two open posts, they don't look particularly simple transfers though. Reflection and GYP related things seem to me like pretty involved stuff that are heavily linked with node internals. Deno's node compatibility is great as long as you are dealing with relatively straightforward javascript libraries. But when you (or the libraries or frameworks you use) start fiddling with native code, reflection, custom module loaders and other stuff meddling with node internals like that you are bound to run into problems. I don't even comment on the added complexity or potential for interoperability bugs typescript brings to the table. Many NPM modules do really weird node-specific stuff, and it could be asked, if one actually need that stuff, maybe one should the real thing (node) then. Because there are limits how far Deno can, or maybe even should take the node compatibility. It's like, people seem to have a lot of problems with Deno and Vite - and Vite to me seem like exactly the type of system that does a lot of unorthodox things under the hood, or assumes a lot of things are implemented in a particular way to make the magic happen. This makes 100% compatibility a very much non-trivial thing to accomplish. Sorry if this is not much help! Just an observation! The types of questions you asked, I'm not that surprised no one has been able to give easy answers, is all. Not sure if there are any better channels to ask. Folks tend to be pretty helpful here at least when the questions can be answered with relatively little effort or the solutions are "common knowledge"!
Thanks @raunioroo for your quick response.
First, a disclaimer - I'm not completely certain what DTO's are, or even Reflection in this context, just a hunch. But anyway:Maybe these two help to understand the background a bit: https://medium.com/@yelinliu/dto-explained-in-nestjs-3a296498d77b https://stackoverflow.com/questions/59397687/what-is-the-purpose-of-a-data-transfer-object-in-nestjs
Looking at your two open posts, they don't look particularly simple transfers though. Reflection and GYP related things seem to me like pretty involved stuff that are heavily linked with node internals.I did not plan to use heavily linked internals. 😉 In the DTO case I import some common used libs import { validate } from "npm:class-validator@0.14.1"; import { plainToClass } from "npm:class-transformer@0.5.1"; class-validator and class-transformer have around 3M downloads per week, that are not niche modules. I’m not involved in deeper node or deno stuff, so how should I (or others that want to change) know that this or that module does heavy stuff under the hood where deno is not yet prepared for? For the other case where I need to use the npm:xsd-validator. I could imagine that it is more complicated, because it forces to install the libxmljs deno install --allow-scripts=npm:libxmljs@1.0.11 I would also be glad if there would be a deno xsd-validator (mabe on deno.land or jsr) . I found https://deno.land/x/schema_validator@v0.0.3 4 years old and the documentation is „Free software,hell ya.“ There was an other post where I wanted to use globSync as descibed here https://docs.deno.com/api/node/fs/~/globSync It’s just not there. https://github.com/denoland/deno/issues/26927 Got no feedback here in the help channel and decided to take an other aproach by using deno Walk https://docs.deno.com/examples/walking_directories/ and deleted the post. Still feeling concrete shoes - but back to possible solutions. I guess (hope) some people (with a lot of experience) had a look on the posts here. It would be nice if they could write just a scentence if something goes deep and has no easy answer. Maybe it is then a better way to open a ticket on https://github.com/denoland
Sorry if this is not much help! Just an observation!Totaly fine. I’m glad that I get some feedback 😉