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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Participation in the new version of the system #78

Open
Hookyns opened this issue Oct 22, 2022 · 53 comments
Open

Participation in the new version of the system #78

Hookyns opened this issue Oct 22, 2022 · 53 comments
Labels
help wanted Extra attention is needed

Comments

@Hookyns
Copy link
Owner

Hookyns commented Oct 22, 2022

Sign here who wants to participate in the alpha of the new major version. I will invite you to the private project when it is ready. 馃帀

@Hookyns Hookyns added the help wanted Extra attention is needed label Oct 22, 2022
@hra4h03
Copy link

hra4h03 commented Oct 25, 2022

I am excited to see the new version of this library. I am willing to participate in the alpha of the new major version.

@Hookyns Hookyns pinned this issue Oct 25, 2022
@Hookyns Hookyns changed the title Participation in Alpha Participation in v1.0.0 Alpha Oct 31, 2022
@lsarrazi
Copy link

lsarrazi commented Nov 5, 2022

Hi, I want to investigate the potential of this library and would be happy to participate

@jsternadel
Copy link

Sign me up. I've been testing doing recursive model hydration with data from the Jira API. So far it looks very promising with the exclusion of one bug with getCtor but that looks like its been flagged as fixed in v1. I'd be happy to run the alpha through my use case.

@nduc
Copy link

nduc commented Nov 22, 2022

Looking to see if I can leverage this for my Remix project. There's an issue with transmitting the class from backend to the front end via the useLoaderData(). I'm hoping to leverage this to send the meta data along so when it gets to the other side the class/object can be reconstructed.

@aj-bartocci
Copy link

I would like to be able to help with the alpha version. I was looking to use this package for generic classes which does not seem to be possible in the current version but will be in the new version (#30). My use case being to help create documentation from the actual source code to produce 'live' docs rather than manually documenting things.

@soya-miruku
Copy link

i would to be able to use alpha on this

@Hookyns
Copy link
Owner Author

Hookyns commented Jan 2, 2023

Hi guys, TY for your interest! 馃帀

I'm late with the alpha, working hard on it. 馃彮
I've invented new and better callsites (new way how to pass generic type arguments through project) so I'm rewriting some base stuff which results in not working project. I expect it to be ready by the end of next week.

I've already prepared website and documentation (first basic version).

Project will remain private for a while, I'll invite you into the organization and send you link to discord server, so you can get proper support and I can get some feedback I hope. 馃檪

@caass
Copy link

caass commented Jan 5, 2023

Hi! I'd love to participate in the alpha :)

@Hookyns
Copy link
Owner Author

Hookyns commented Jan 16, 2023

Late (again), but it will be this week. 馃帀

I'm stucked on one strange issue caused by strange conditions. I'm finally able to reproduce it. Now I have to fix it.

@nduc
Copy link

nduc commented Jan 17, 2023

I was just looking at another repo for something else and it has a link to moddle. It might be of use to this project or someone else looking to reconstruct JSON to object. In my case I needed a way to convert an object to JSON and send it across the wire. Then reconstruct the object once it arrives on the client side.
BTW, I appreciate the hard work you're putting into your project!

@Pandapip1
Copy link

I'm willing to participate

@Hookyns
Copy link
Owner Author

Hookyns commented Jan 23, 2023

I've granted you access to the organization and mentioned you in an issue.

@paluchi
Copy link

paluchi commented Jan 28, 2023

@Hookyns Please add me to the alpha!

@DSoko2
Copy link

DSoko2 commented Feb 1, 2023

Great project, thanks for your work @Hookyns! I'd love to join the alpha, too! :)

@gssplm
Copy link

gssplm commented Feb 3, 2023

First of all thx for your awesome work! You saved me hours of work! I would like to join the alpha too!

@cesaric
Copy link

cesaric commented Feb 14, 2023

Hi, I'd love to participate in the alpha!

@cedrikaagaard
Copy link

Hey! I'd also like to join the alpha :)

@chaddgrimm
Copy link

Count me in!

@nmnsnv
Copy link

nmnsnv commented Apr 7, 2023

Hi!
I would love to join and check the alpha!

@tutok
Copy link

tutok commented May 12, 2023

Hi, I really like what you are doing, looking for a similar solution for a long time, may I join too?

@jackhegarty
Copy link

Hi, I'm interested in participating as well if it's not too late!

@ppoulard
Copy link

ppoulard commented Jul 3, 2023

I was just looking at another repo for something else and it has a link to moddle. It might be of use to this project or someone else looking to reconstruct JSON to object. In my case I needed a way to convert an object to JSON and send it across the wire. Then reconstruct the object once it arrives on the client side. BTW, I appreciate the hard work you're putting into your project!

@nduc For that purpose, you may be interested in @badcafe/jsonizer : https://badcafe.github.io/jsonizer/#/README but you will have to call JSON.stringify() and JSON.parse() yourself.

I'm also working on its companion library @badcafe/asynchronizer but it is not yet released (planned for september 2023), which is an RPC lib that will let you call functions without worrying how to serialize parameters (and return values) in one side and how to deserialize them on the other side. Works with various channels : HTTP, WebSocket, Workers, nodejs clusters, etc with broadcast and multicast features, support for binary and streaming, and with nice binding to REST for the HTTP channel.

@ppoulard
Copy link

ppoulard commented Jul 3, 2023

Hi, I'm interested in participating too if possible !

@mindplay-dk
Copy link

Is this project still happening? If so, I'm also interested.

I have extensive experience with reflection in PHP and C#, if that matters - I've written DI containers in both languages, and I also wrote one of the earliest annotation libraries for PHP. Where I'm stuck with TypeScript is there seems to be no good approach to dependency injection containers without reflection - I've spent years on-and-off trying to solve this with types, I've looked at every DI container with types, and it just doesn't seem feasible. I started tinkering with deepkit.io and I don't find their reflection approach at all useful.

So yeah, quite interested in testing this. :-)

@Hookyns
Copy link
Owner Author

Hookyns commented Jul 6, 2023

Is this project still happening? If so, I'm also interested.

I have extensive experience with reflection in PHP and C#, if that matters - I've written DI containers in both languages, and I also wrote one of the earliest annotation libraries for PHP. Where I'm stuck with TypeScript is there seems to be no good approach to dependency injection containers without reflection - I've spent years on-and-off trying to solve this with types, I've looked at every DI container with types, and it just doesn't seem feasible. I started tinkering with deepkit.io and I don't find their reflection approach at all useful.

So yeah, quite interested in testing this. :-)

Sure! 馃檪

DI was the main reason why I started to work on this.
Here is my implementation of DI based on this project; quite outdated, it's just prototype, because this become the main project I want to finish first to build a lot of other things that need reflection.

@mindplay-dk
Copy link

Yeah, a DI container is the main reason I want reflection too. My ideas about a DI container is quite different from the "main stream" - quite a lot of non-features. I wrote at least 5 DI containers before settling on this. 馃槄

@Hookyns Hookyns changed the title Participation in v1.0.0 Alpha Participation in in version of the system Jul 22, 2023
@Hookyns Hookyns changed the title Participation in in version of the system Participation in the new version of the system Jul 22, 2023
@progrium
Copy link

Sign me up

@Hookyns
Copy link
Owner Author

Hookyns commented Aug 8, 2023

First prototype version of the new Typegen is out. 馃帀
It works with SWC, esbuild and tsc without any transformations as expected. 馃檪

Information for participants is in the private repository.

@mindplay-dk
Copy link

It works with SWC, esbuild and tsc without any transformations as expected. 馃檪

馃ぉ

how did you pull that off?? will be testing today. 馃榿

@vjpr
Copy link

vjpr commented Aug 8, 2023

Sign me up please!

@Lemonify
Copy link

Lemonify commented Aug 8, 2023

I am also very interested 馃憖

@Hookyns
Copy link
Owner Author

Hookyns commented Aug 8, 2023

how did you pull that off??

As we discussed earlier, Typegen is completely standalone tool which just take .ts files as input and generate static metadata library (I call it a typelib) as output; it's not part of the build process.

It's based on alpha's transformer. I just had to create the tool and rewrite some parts, it took just about 4 weeks of work and I'm a week behind with the prototype against expectations. 馃し

It's rly just a prototype. It only generate the typelib which you can use statically (Metadata.getTypes() and Metadata.getModules()). It's not possible to use the getType<SomeType>() yet. To allow usage of getType it will require a transformer as part of the build process, but it will be super simple transformer and it can be written for every build tool (esbuild, swc, tsc); it does not require TypeChecker (well TypeChecker will give you better results for inferred types so for SWC and esbuild there is not going to be full support of inferrence).

I need at least another month to get it into alpha phase.

@mindplay-dk
Copy link

well TypeChecker will give you better results for inferred types so for SWC and esbuild there is not going to be full support of inferrence

oh, okay, I thought you were trying to say you had come up with a solution.

so it's still going to be a limited version for SWC and ESBuild.

I'm still not sure if I think this is a good idea. I mean, imagine you ship something like a DI container or router that depends on this runtime, and you're showing cool examples like router.get("/path", (req, res) => ...) and it just doesn't work with popular bundlers. It's going to be weird. Every library will need caveats in the README to explain why the examples don't actually work with the popular bundlers - hardly anyone uses tsc.

and I understand why it's the best we can do.

but I still wonder if maybe it would be possible to integrate the official TS compiler into something like Vite... I guess if all of these tools are designed to work file-by-file, it's just not going to be possible? man, that's so frustrating. 馃様

@Hookyns
Copy link
Owner Author

Hookyns commented Aug 8, 2023

but I still wonder if maybe it would be possible to integrate the official TS compiler into something like Vite..

I think I have a possible solution for this too but I don't know what the performance will be. It may be even worse than switching to plain old tsc. But it's not a priority for me. I think that the planned supported features (for swc and esbuild) will be sufficient for about 50 % of use-cases which is still infinitely more than what's possible now. 馃檪 And you can still say that users have to enable strict mode (noImplicitAny to be specific), then it will work without any issues.

But it will have a solution in the future thanks to Donny's STC.

EDIT:
And I still don't see any issues with the DI. I always have to specify type to tell the system what type I want.

class SomeService {
    constructor(logger: ILogger, router: Router, somethingElse: SomethingElse) {}
    orMethodInjection(something: ISomething) {}
}

with registration like (super simple & naive implementation):

import { Metadata } from "./metadata.typelib";

class ServiceCollection {
    addSingleton(serviceType: Type, serviceImplementation: Type): void {}
    addTransient(serviceType: Type, serviceImplementation: Type): void {}
}

const sc = new ServiceCollection();
const serviceImplementations = Metadata.getTypes().filter(t => t.isClass() && !t.isAbstract() && t.name.endsWith("Service"));

for (let implementation of serviceImplementations) {
    sc.addTransient(implementation.implements.find(i => i.name.endsWith("Service")) , implementation);
}

There is no need to infer anything.

@Hookyns
Copy link
Owner Author

Hookyns commented Sep 4, 2023

Here is a preview with esbuild, using the new Typegen and esbuild plugin.

Typegen is still a prototype (pre-alpha version) and the esbuild plugin is just a proof of concept, but I progress quickly.

@ruizmarc
Copy link

ruizmarc commented Oct 2, 2023

Hi! Amazing job! I would love to give a try to the alpha version :)

@samchon
Copy link

samchon commented Oct 16, 2023

Hello, I'm developer of typia, and wanna see how tst-reflect supports SWC/EsBuild

@alexzhang1030
Copy link

Great work 馃檶 I also want to join the alpha channel馃憖

@surtr-isaz
Copy link

I'd like to participate =)

@sasa-djuric
Copy link

Hi, I'm interested in participating.

@theoludwig
Copy link

Please, I would like to test. 馃槃

@NedStar72
Copy link

Please, I want it too

@VasiliyIsaichkin
Copy link

Hi, I too have a very burning interest in such a thing

@NickSeagull
Copy link

Hey, thanks a lot for this project!

Sign me up for the alpha too please, if you need contributors I'm willing to contribute too 馃槃

@M-jerez
Copy link

M-jerez commented Feb 2, 2024

Hi @Hookyns I would be interested to participate and contribute.
Besides seems like you have a few group of brains interested some very good can come up if we all collaborate.

I'm the author of https://mion.io/

Good Job 馃殌猸愶笍

@Hookyns
Copy link
Owner Author

Hookyns commented Feb 3, 2024

Hello guys,

I'll make the repo public soon.
Packages are on npm so you can test it. Keep in mind that it's still alpha version. It still doesn't support everything. I'm still working on Rust implementation of simple semantic analyser so functionality of getType<T>() is still limited.

You can visit rttist.org and docs.
It is still work-in-progress, but base instructions (and esbuild plugin) should work.

Post your feedback.

Here is the latest demo.

PS: I will greatly appreciate a PR to improve the docs!

@dsdavis4
Copy link

dsdavis4 commented Feb 8, 2024

Can I try out the alpha version?

@only-cliches
Copy link

Sign me up!

@VaughnVernon
Copy link

Would you please include me? Thanks!

@andreacioni
Copy link

Hi, can you please invite me?

@seo-rii
Copy link

seo-rii commented May 6, 2024

Can I also join in? Thank you!

@moodmosaic
Copy link

@Hookyns, count me in please馃憤

@tyler-mitchell
Copy link

Looking forward to checking out the new version 馃敟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests