-
-
Notifications
You must be signed in to change notification settings - Fork 431
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta issue: Plan of action #296
Comments
@johnnyreilly I've added you as an owner on npm so you can publish now. You're the man for picking up this torch yourself. I do have a major improvement to the unit tests that I worked on like 6 months ago that I can try to get at some point which greatly improves the stability of them (hopefully no more random failures) |
Awesome thanks for that! 👍 Any help you can provide will always be gratefully received - particularly on the unit tests. In the meantime I'll feel my way forwards and see if we can get something out. Well done on all the work you've done on ts-loader so far. I use it every day and it rocks! |
For the unit tests, can we simplify it and have a "generate" step and a separate test step? Basically then we're just comparing snapshots, makes life a ton easier and validating would just be visual. That way when something does break, it'll be a quick step to re-generate them, compare the git diff and commit. It's what I've been doing on a lot of other projects like this anyway 😄 For the separate versions, perhaps having multiple test run in the context of |
I think that's already in place. See https://github.com/TypeStrong/ts-loader/blob/master/CONTRIBUTING.md#regenerating-test-data It works exactly like you said, you just compare the changes in git and commit. |
Thanks. I noticed looking through the other PRs from @johnnyreilly - you can tell I was avoiding it now 😄 I did spend a day refactoring the code at one point, but aborted because of the tests (it was probably more than just regenerating then). Does it also handle multiple TypeScript releases to regenerate fixtures? |
I think this is already handled by this. |
Yeah I think this is already in place; unless you meant something I didn't get? The tricky thing is that node rolls over and dies during the regeneration at the moment. (Something to do with garbage collection but not sure what) I actually considering generating the files in batches initially just to get up and running.. |
Not that I've spotted... Just uses current dependency. So if you want to regenerate for all versions then you have manually tweak the installed version of TypeScript until you have all the versions you care about. Icky. |
I can confirm it does not. A PITA. You have to |
Okay - here's where we are:
If you look at the latest build you'll see that with TypeScript 2 the integration test runner rolls over and dies for the self same garbage collection issues when running the tests. Does anyone have any insights on what might cause this / how I could work around this? It seems to be a node problem (well maybe) - related issues: ts-loader seems to work just fine - tempted to publish a new version regardless of integration tests once I've done some independent testing on a couple of my own projects. |
@basarat - have you seen this node weirdness at all? I've been trying out various workarounds for the garbage collection issue but nothing's working. It feels like I'm spitting in the wind... Casting around for anyone who might have suggestions. It looks like the TypeScript compiler is doing a lot more as of ts 2.0 but I'm not too sure where to begin here. Have you seen any oddness as you've been working on alm tool? Forgive the question but I'm kinda out of inspiration... |
No I have not had memory issues with TypeScript @ next. That said: Next is a bit crashy too, e.g. alm-tools/alm#208 and alm-tools/alm#211 ALM is now equipped to deal with ts crashing. In both cases ts-loader crashes too and takes down webpack with it :) Also not sure if its my bug or TypeScript but I am also now getting this : microsoft/TypeScript#11377 I have always been on next and haven't looked back at 2.0 so not much help there. Thanks for including me still 🌹 |
Thanks for that @basarat - if anyone was worth asking it was definitely you 😄 I'll raise an issue with the TypeScript team in case there's anything they can suggest. Given other projects are experiencing similar issues I kind of suspect it's not actually their issue; probably the compiler is just doing more than it used to and revealing an already existing issue either in node or WebPack. I don't really know. |
Okay - I was able to workaround the GC issue by kicking off each test in it's own child process. I've also got the tests passing as of: 8d64847 Flaky tests have been marked as just that and are no longer failing the build. 😄 The reasons they're failing the build seem to be insignificant. I've also done independent testing on 2 projects and ts-loader seems to be a going concern. Long story short: I think I'm ready to get a release out. Watch this space.... |
0.9.0 has shipped! |
Did some work on the test pack to ignore what seem to be spurious differences in output*.txt files, namely:
Only 2 tests are now considered flaky as a result |
I know I said:
So it turns out I lied: #305 |
So there are now 2 test packs; the comparison test pack (of long standing) and the execution test pack (brand new). The execution test pack executes karma tests using ts-loader and phantomjs (any browser would do). The advantage of the new test pack is it doesn't rely on maintaining expected outputs. Theoretically you can just use any version of TypeScript and give the test pack a whirl. I've updated the contributing.md file to cover both test packs. |
Oh and ts-loader is now running against ts versions 1.6 to 2.0 as well as TypeScript@next. The comparison test pack only runs against 2.0. I plan to add many more tests than the present 4 to the execution test pack. I think I can use comparison tests as a basis for many of these; I've ported 2 across already. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing as stale. Please reopen if you'd like to work on this further. |
Things to do:
CONTRIBUTING.md
to cover both comparison test pack and execution test pack; making clear the differences, usage and how to authorwould like to add
test demonstrating moduleResolution "node" (already covered by nodeResolution?)test demonstrating allowSyntheticDefaultImportsOkay here's the deal; I've been using ts-loader for a long time but my contributions up until now have mostly been documentation. Fixing of tests etc. As the commit history shows this is @jbrantly's baby and kudos to him.
He's not been able to contribute much of late and since he's the main person who's worked on ts-loader not much has happened for a while; the code is a bit stale. As I'm a member of TypeStrong I'm going to have a go at improving the state of the project. I'm going to do this as carefully as I can. This issue is intended as a meta issue to make it visible what I'm plannning to do / doing.
My immediate goal is to get a newer version of ts-loader built and shipped. Essentially all the bug fixes / tweaks since the last release should ship. This includes:
What needs to happen to get us to this point:
The integration tests are completely failing.
I need to regenerate the test data for TypeScript v2.0. This in itself may be problematic.
The integration test pack. It's super brittle. As I understand it, it's essentially comparing a known state of success regarding files generated by webpack with the files generated from running right now. As each dependency is updated it invariably "breaks" a test. Which doesn't necessarily represent a breakage in ts-loader. Those changed files don't necessarily mean that the newly generated code isn't working. It is generally working but different. But the test fails all the same. This leads to false negatives (many) and doesn't incentivise people to contribute to ts-loader.
In addition, when following the instructions to run tests / regenerate test data I've started to notice the test pack failing midway with garbage collection errors. I'm no Node expert and so that's a tricky one.
Long story short; I'd rather the integration test pack was a very different beast; significantly simpler and probably not based on file comparisons. But I don't have the time to create a new one so I'm going to do my best with what's in place now.
Cut down the test matrix to a manageable size
Because maintaining multiple versions of the integration tests has not been happening (and I'm not proposing to do it myself) I'm intending to reduce the test matrix from this:
to this:
i.e Only have tests for the current version of the TypeScript. That's more maintainable. I won't delete the existing test data (apart from the never to be TypeScript 1.9) in case anyone wants to pick up the baton later. I bet they don't.
How to publish?
I don't have npm publish rights for ts-loader. Fortunately both @jbrantly and @blakeembrey do - and hopefully one of them will either be able to help out with a publish or let me have the requisite rights to do it.
I can't promise this is all going to work; I've got a limited amount of spare time I'm afraid. Whatever happens it's going to take me a little while. But I'm going to see where I can take this. Best foot forward! Please bear with me...
The text was updated successfully, but these errors were encountered: