Whats the rough state of javascript/typescript/tsx...
# general
s
Whats the rough state of javascript/typescript/tsx in
2.23.0rc0
? I'm giving it a shot to see if we'll upgrade, and I'm unable to get simple things working • Dependency inference doesn't seem to be working • Tests/packaging don't seem to be working • I found a number of disconnects between docs and reality
Ah now I see the notes:
Currently supported:
• file-based imports
Thats my issue. I'll look into contributing module inference!
h
Thanks! The JS backend could always use some love, but cc @worried-painter-31382 who did most of the heavy lifting there
s
🐌 I can't figure out why
typescript_test
targets aren't testable...
Copy code
11:04:27.56 [WARN] No applicable files or targets matched. The `test` goal works with these target types:

  * javascript_test
  * jsx_test
  * python_test

However, you only specified file arguments with these target types:

  * typescript_test
And my confusion arises from the fact that
jsx
doesn't export any test rules either, nor does
javascript
backend on
jsx's
behalf. But
jsx
is indeed testable
And I'm sure the question has been asked before... but does js/jsx/ts/tsx vary enough to demand different targets/backends?
h
That is a great question and I do not know the answer because I’m not a JS person, but if you forced me to guess I would have said not different backends but maybe different targets? Or maybe not even that since file suffixes are a thing.
I think we fell into a “lots of small backends” pattern that is with hindsight probably ill-advised
w
I think ts backend is underdeveloped, js and jsx targets (and the js backend) I have evidence for working :)
Nobody has shouldered the complexities involved, so I'm not surprised TS might be rough. I'm OK to chat but won't be coding unfortunately.
Noticed that I was asked to review. If it is w.r.t to the typescript module resolution algorithm, I'm going to require pointers to what part of it is implemented (or you'll have to wait for me to absorb the spec again, but I'm swamped) I'm also going to require test coverage for said parts. If that's too tall an order, I'd like someone else assigned, hope that's OK @happy-kitchen-89482
h
Thanks @worried-painter-31382! I can review the nitty gritty details if you can chime on on whether this makes sense directionally, and if the implementation makes sense to you at least high-level. And yes, test coverage either way…
But from the issue above it sounds like @steep-eve-20716 is trying to write tests and maybe hitting an issue
(the issue with
test
goal not applying to
typescript_test
targets, does that ring any bells?) @steep-eve-20716 I assume you have registered the typescript backend?
w
I suspect field inheritance
👀 1
The test goal uses a base source field, maybe ts got a separate base
s
Thanks for the reviews Tobias! I'll address the feedback this week