question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix Makefile "test-package-files" task

See original GitHub issue

We made a well-intentioned change to our Makefile that tests to see if each exercise has a package.json file that matches the global xecmascript/package.json file, and fails the build if not.

However, there is no easy way for a contributor to update all the package.json files when there is a change. It is critical that these files are all updated, and we want this to happen before PRs are submitted, so the build fails if it is not done.

Two possible solutions:

  1. Have the Makefile check its environment. If Travis=true then we’re in CI and should always SKIP copying the package.json files from global to each exercise.
  2. Add a task to the Makefile that would let contributors copy the package.json file to all exercises, EG make copy-package-to-exercises.

Either approach probably warrants a small update to the contributor docs.

Success Criteria:

  • Builds fail on Travis if package.json files are not the same in each exercise as the global.
  • Contributors have a simple way to make sure their PRs are ready for CI testing.
  • Documentation is updated.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
rchavarriacommented, Jun 7, 2017

I prefer taking the second way, adding the new copy-package-to-exercises task.

I’m wondering if we need a new task to be able to build the project, to run tests independently of copying package.json or checking them.

Let’s say we have these tasks:

  • make test: it should just run tests, no package.json checking, no package.json copying
  • make copy-package-to-exercises: easy to understand
  • make build: it could check package.json equality and run tests.
0reactions
stale[bot]commented, Oct 10, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Makefile "test-package-files" task · Issue #303 - GitHub
Two possible solutions: Have the Makefile check its environment. If Travis=true then we're in CI and should always SKIP copying the package.json ...
Read more >
How do you force a makefile to rebuild a target? - Stack Overflow
The correct answer, is, not to declare your targets to be phony, but rather, declare an additional phony target, and then, depend the...
Read more >
Makefile Tutorial By Example
The commands are a series of steps typically used to make the target(s). These need to start with a tab character, not spaces....
Read more >
How to Fix Error Makefile: *** missing separator. Stop - YouTube
How to fix make error: Makefile : *** missing separator. Stop. How to replace spaces with tabulation in Visual Studio Code (vscode).
Read more >
Makefiles, but in English - YouTube
Makefiles, but in English. 17K views 2 years ago. 801Labs. 801Labs. 323 subscribers. Subscribe. 357. I like this. I dislike this.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found