You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build process fails when an exercise use a NodeJS module #182
A nice way to add dependencies to some exercises would be to add those to the package.json file.
If a new dependency is added, and an individual exercise uses that dependency in the specs file (i.e.: tests need to use an external library), running tests inside the exercise folder works. But the build process (make command) fails.
Find a way to use package.json dependencies in specs files when running the make command.
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.
Is there any specific case that we would need specific packages for an exercise? I understand that students should have an easy way to test their solutions, but we solved a similar problem on exercism/xjavascript by using a global installation of Jasmine.
Since Exercism is supposed to teach a programming language and not libraries, platforms and/or tools, why not use a simpler approach?
I tried that with the old system (gulp-cli, babel and the like). I don't remember exactly what was the problem. It probably was too slow to run all the tests, because of npm install on each one.
Or, during the build process with make, the working directory is not the same as the working dir when one works on a single exercise. I think I didn't dig deep in the build process with make.
Probably now, with Jest as the test runner, there is no need for a transpilation step, and adding dependencies to package.json will work. But that has a drawback, a single dependency for just one exercise will be spread among all exercises.
Maybe, this is an interesting issue to work. Any ideas?
@rchavarria I'm thinking a smarter makefile is the solution for this, but I also think this is somewhat dependent on #235 .
If we want to get rid of per-exercise package.json files, then we lose that functionality.
Since npm install is the de facto way to install JavaScript dependencies, I would feel better about closing #235 as "will not fix" and implementing this instead, rather than, for example, changing the makefile somehow to install modules where needed. It would be better to stick to an approach that is likely to serve the users IRL.
Yep. I agree we should make user's live as easy as possible.
I know it's a bit tedious to run npm install on each exercise. But having independent exercises is a key point of exercism. So, I'll close #235 with won't fix and we can have some ideas about how to make Makefile smarter.
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.
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.
Activity
stale commentedon Apr 29, 2017
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.
matthewmorgan commentedon Apr 29, 2017
I think we could address this by adding the dependency to the main
package.jsonfile and runningnpm installas part of the makefile.joeljuca commentedon May 7, 2017
Is there any specific case that we would need specific packages for an exercise? I understand that students should have an easy way to test their solutions, but we solved a similar problem onexercism/xjavascriptby using a global installation of Jasmine.Since Exercism is supposed to teach a programming language and not libraries, platforms and/or tools, why not use a simpler approach?Sorry, I just commented in the wrong issue 😕
rchavarria commentedon May 10, 2017
I tried that with the old system (
gulp-cli,babeland the like). I don't remember exactly what was the problem. It probably was too slow to run all the tests, because ofnpm installon each one.Or, during the build process with
make, the working directory is not the same as the working dir when one works on a single exercise. I think I didn't dig deep in the build process withmake.Probably now, with Jest as the test runner, there is no need for a transpilation step, and adding dependencies to
package.jsonwill work. But that has a drawback, a single dependency for just one exercise will be spread among all exercises.Maybe, this is an interesting issue to work. Any ideas?
matthewmorgan commentedon May 10, 2017
@rchavarria I'm thinking a smarter makefile is the solution for this, but I also think this is somewhat dependent on #235 .
If we want to get rid of per-exercise
package.jsonfiles, then we lose that functionality.Since
npm installis the de facto way to install JavaScript dependencies, I would feel better about closing #235 as "will not fix" and implementing this instead, rather than, for example, changing the makefile somehow to install modules where needed. It would be better to stick to an approach that is likely to serve the users IRL.Thoughts?
rchavarria commentedon May 21, 2017
Yep. I agree we should make user's live as easy as possible.
I know it's a bit tedious to run
npm installon each exercise. But having independent exercises is a key point of exercism. So, I'll close #235 with won't fix and we can have some ideas about how to makeMakefilesmarter.stale commentedon Jul 20, 2017
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.
joeljuca commentedon Jul 21, 2017
Shaw we really consider this issue wontfix?
rchavarria commentedon Jul 22, 2017
Or even close it. It's very old.
In fact, something improved when running tests with Jest. If we feel something need to be fixed, we can create a new issue and fix it then.
stale commentedon Sep 20, 2017
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.