wide-midnight-78598
05/12/2022, 8:51 PMnodejs
- which is a runtime, not a language. https://github.com/sureshjoshi/pants-plugins/tree/main/pants-plugins/experimental/nodejs
I see that for JVM runtimes, we have separate Scala, Java, and Kotlin packages - so I could do javascript and typescript, but that feels boilerplatey - since one is basically a superset of the other.
For C, we have the cc
package to represent both C and C++, which both compile down to machine code, but use different(ish) compilers and have different language specifications.
I chose nodejs
only because I pull that down to handle installing and running deps, so it made sense to me - but might not make sense in the larger ecosystem? https://github.com/sureshjoshi/pants-plugins/blob/main/pants-plugins/experimental/nodejs/subsystem.py
Finally, if there is general indifference at the moment, and since this will be experimental - I can use nodejs
- because that requires the least effort to get something up and runninghappy-kitchen-89482
05/12/2022, 8:53 PMjavascript
? I think typescript still counts as part of that ecosystem, and probably doesn't need a separate pluginhundreds-father-404
05/12/2022, 8:55 PMjs_sources
and ts_sources
(or verbose if necessary), rather than combining themwide-midnight-78598
05/12/2022, 8:58 PMts_sources
would need to have tsc
run over them to compile down to JS at some point.
I hadn't gotten to compilation yet, so my generic node_sources
was enough.
What about the top-level packaging?
pants.backend.experimental.???.lint.prettier
wide-midnight-78598
05/12/2022, 8:59 PMhundreds-father-404
05/12/2022, 9:00 PMwide-midnight-78598
05/12/2022, 9:02 PMhundreds-father-404
05/12/2022, 9:02 PMwide-midnight-78598
05/12/2022, 9:03 PM./pants check
plugin makes sense. Runs though, compiles, etc....
Or at least, however else we handle/plan to handle compilers (on interpreted languages)happy-kitchen-89482
05/12/2022, 10:17 PMwide-midnight-78598
05/13/2022, 3:40 AMcurved-television-6568
05/13/2022, 6:08 AMwide-midnight-78598
05/13/2022, 11:57 AMpants.backend.javascript
AND
pants.backend.typescript
?curved-television-6568
05/13/2022, 11:58 AMpants.backend.javascript
you’d then look for pants.backend.typescript
or suspect it isn’t supported, rather than baked into the javascript backend.curved-television-6568
05/13/2022, 12:00 PMregister.py
file. So it will be presented to users as a separate backend, but doesn’t have to be implemented as such.wide-midnight-78598
05/13/2022, 12:00 PMcurved-television-6568
05/13/2022, 12:01 PMcurved-television-6568
05/13/2022, 12:01 PMwide-midnight-78598
05/13/2022, 12:03 PMcurved-television-6568
05/13/2022, 12:05 PMcurved-television-6568
05/13/2022, 12:06 PMcurved-television-6568
05/13/2022, 12:06 PMcurved-television-6568
05/13/2022, 12:06 PMhundreds-father-404
05/13/2022, 1:07 PMpants.backend.javascript
. I think it will be fairly obvious to TS users that it's ~superset of JS, so makes sense to have to activate a JS tool
My two cents is that a pure JS dev should have zero noise from TS