I have attempted to convert an internal plugin wit...
# development
f
I have attempted to convert an internal plugin with TypeScript support to a standard Pants backend, please see https://github.com/pantsbuild/pants/pull/20208. It "works" but requires some adjustments, would really appreciate some help @ancient-vegetable-10556 @worried-painter-31382
👀 1
👖 1
a
I'll see how I can help out when I find some free time!
1
So I guess the next big thing is adding
tsconfig.json
targets and using that to augment dependency inference?
f
yes, this would be very much required. In my internal plugin I know exactly what file to pick, but to make it generic, we'll probably need to do a path globs search to find all the matches and merge them, I reckon
a
Probably we'll want a
tsconfig.json
target of some sort, but the globs search makes sense
w
I'm doing a quick review on the pr because I cant help myself, but I do not have spare time really
❤️ 1
a
That's appreciated, Tobias. Review, but you don't need to contribute code
f
oh yes, we do have
tailor_py_typed_targets
flag for tailor to create a
resource
target for those
for Python code
py.typed
files; perhaps we could have the same for
tsconfig.*.json
too
a
It's not really a
resource
in the grand scheme of things though -- it won't get packaged up in the same way a
py.typed
file needs to be.
It's really a source file that gets discarded (or transformed) after compilation
f
right
a
I'll see if I can find a bit of time to work on some of that: let me know if you're planning on tackling anything in the next few days, and I'll let you know if I pick up on something
f
I'll definitely not have time to work on this this week! So just ping me when you have anything for me to look at and integrate/test locally a bit
a
sure!
f
I was also thinking, shall I submit the first patch with the
typescript_source
,
typescript_tests
targets so we could get it merged with small chunks to ease reviewing and also to limit the scope of each effort given the time constraints of everyone?
a
I was thinking similarly
1
f
and then after this, add things in small bites
after Tobias comments I saw the iceberg in full 😄 there's a lot that needs to be done on the dep inference side of things, will likely be unbearable for a single PR
ok, cool, I am pushing the PR with target definitions tomorrow
a
Realisticically, if you can do anything at all with the plugin, it's of experimental value.
f
yes, the frontend folks have started experimenting with the plugin internally and it's a lot easier to tweak it since I don't have to make it work for everyone; I only need to make it work for them 😉
a
Right 🙃
f
ok, I have started submitting PRs with minimal changes to get it going https://github.com/pantsbuild/pants/pull/20226
@worried-painter-31382, I tag you as a reviewer, but only to keep you in the loop, only do any reviews if you have enough time!
✔️ 1