platypii / sbt-typescript

An sbt plugin for compiling typescript
Apache License 2.0
11 stars 1 forks source link

Support of sbt-web 1.5.x and Play 2.9.x+ #6

Closed PromanSEW closed 9 months ago

PromanSEW commented 9 months ago

Fixes #5

PromanSEW commented 9 months ago

Breaking change that fixes this PR: https://github.com/sbt/sbt-js-engine/pull/66

platypii commented 9 months ago

I checked out this PR, did sbt publishLocal and then tried upgrading one of my Play projects to 2.9.0. Unfortunately it then hangs when generating my typescript assets with sbt assets. I'm investigating why, but it's not giving me very useful logging information. I appreciate the PR, I will continue digging.

PromanSEW commented 9 months ago

In my project it compiles successfully, so I don't know where is the problem :thinking:

PromanSEW commented 9 months ago

I use sbt run and open localhost:9000 Then it compiles automatically

platypii commented 9 months ago

It works for the example/ project in this repo, so I agree that it seems like these changes basically work. But my other Play project is more complicated. I would like to make sure that works before I publish a new version of this library. Actively debugging now.

PromanSEW commented 9 months ago

I checked my active production project, not example, but good luck in debugging anyway 👍 🤞 It would be very good if this PR will be merged. But, I don't know how to keep backward compat, maybe for pre-2.9.0 just use old release? (4.6.4) If so, should be noted in README

platypii commented 9 months ago

Update: it appears to be working but EXTREMELY slowly. I have a project with 151 typescript files, and it's taken over 17 minutes to generate the assets, whereas before this update it took 8 seconds. Continuing to investigate

Screenshot 2023-11-21 at 09 50 30
platypii commented 9 months ago

I opened a discussion here about the removal of parallelism from sbt-js-engine. Unless there is a set of options which allows for calling node ONCE with all source files, I'm going to say that we need to revert back to the fork of SbtJsTask in this repo.

mkurz commented 9 months ago

@PromanSEW You should also upgrade sbt in all scripted tests: https://github.com/platypii/sbt-typescript/blob/master/src/sbt-test/sbt-typescript/testassets/project/build.properties

And also remove all resolvers for all scripted tests as well: https://github.com/platypii/sbt-typescript/blob/master/src/sbt-test/sbt-typescript/testassets/project/plugins.sbt