-
Notifications
You must be signed in to change notification settings - Fork 11
Fix failed to load package #46
base: master
Are you sure you want to change the base?
Conversation
Not actually sure why the CI is failing on this patch, EDIT: |
@smhxx I cant actually replicate the test failures using |
Well, that's strange. Now that you mention it, I think you may be on to
something with the default test runner thing. I remember there being some
sort of issue with it, although it does strike me as odd that it would work
when run from within Atom but not when run from the command line... I'll
have to acquaint myself with the internals of the Jasmine test runner and
see where the issue stems from.
(For personal reference: https://github.com/atom/atom/blob/fc53b2185716174dc700a963e8fb73e68a921449/spec/jasmine-test-runner.coffee)
|
Looking back at smhxx/atom-ts-transpiler#8, I'm now realizing that the issue I was thinking of was with the Jasmine test runner not running tests written in TypeScript. So not really the same thing we're seeing here, where the tests are JS but the code is TS. EDIT: Just to jump in and clarify the situation for posterity's sake, the only reason the Jasmine runner doesn't run tests written in TypeScript is the file extension; the transpilation isn't actually an issue. Atom will invoke the transpiler just fine when requiring your spec files, but the test runner is also responsible for indicating which files to treat as part of the test suite, and it doesn't currently look for files with a |
+1 What can I do to help to fix this? Have we determined it's the transpiler? |
Actually, I'm pretty sure it can't be the transpiler... not least of all because the only file that's actually required by the test suite is written in CoffeeScript, which Atom understands natively. I'm not fully convinced the CI failure is even due to the changes in the PR, to be honest. It could simply be that Atom's CI script (or Atom itself) was changed somehow since the last time anyone pushed to master, and the tests error out regardless of jbazin30's changes... |
Regardless of the CI not working correctly, I am not able to use the plugin in its current form and I'm receiving the same error. I would love the ability to pretty quickly revert line by line changes again. |
The code in this PR does work, I've tested it personally and it does restore the normal functionality of the package. If you're looking to enable npm install --only=production
apm link or simply clone it directly into your |
Strangely, I just cloned both forks to see whether the test failures were actually related to the changes in the PR, and I'm no longer able to repro the error that I was previously getting from |
Huh, interesting. Seems to still be failing on Travis, but now I'm unable to replicate the failure locally (even though I was able to before.) Very strange. |
Sorry I haven't been able to help out on this one. I am not actively developing these plugins at the moment. I'm glad you all like the functionality of this one. If you feel it is working properly, I can merge it for you and publish a patch release later today if I get a chance :) |
Understandable. My personal intrigue mainly stems from the fact that I'm the creator of |
{ | ||
"glob": "{!(node_modules)/**/,}*.js", | ||
"transpiler": "atom-babel6-transpiler" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, now I feel dumb. Took me about 30 seconds to realize what's going on after actually taking a serious look at the changes. Atom's tripping up because you have atom-babel6-transpiler
listed as a transpilation handler, but it's not in the package's dependencies, so trying to register the transpiler fails (meaning apm test
exits with code 1 before ever trying to run the specs.)
In fact, I would just remove this entry altogether, since having a custom transpiler for .js files isn't actually necessary here, and the glob doesn't match any files, anyway. I might also point out that this section is using 4-space indentation whereas the rest of the file is using 2-space indentation, although that's less of a serious issue and more of a style thing.
This patch adds atom-ts-transpiler and TypeScript as dependenies, circumventing the issues that have been occuring in recent versions of Atom where TypeScript source files would fail to be loaded. Closes jakesankey#45, jakesankey#46.
This patch adds atom-ts-transpiler and TypeScript as dependenies, circumventing the issues that have been occuring in recent versions of Atom where TypeScript source files would fail to be loaded. Closes jakesankey#45, jakesankey#46.
From this issue : #45
Based on this comment : atom/atom#15909 (comment)
This is my first pull request for an Atom package, so I could not test but when I tried it on package in Atom, it's work fine.