-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
do not commit generated files to VCS #2615
Comments
Isn't this necessary in any case so that when Mocha is self-testing it's testing the latest Mocha code? |
We've had multiple PRs recently that only updated the generated bundle. I seem to recall there was an issue or PR where we had more details on what it will take to make the change happen, but I'm not finding a more recent one than this; anybody remember which issue or PR it was? |
@ScottFreeCode idk. The only solution I have in mind right now is a script in CI that checks whether |
I think #2267 may have been the previous discussion I was thinking of, but it turns out there isn't much there that isn't already here. |
let's not go the angular route. npm is fine; unpkg is fine; bower users should stop using bower. |
I remember that @Munter mentioned about making "test" or whatever build "mocha.temp.js" instead of "mocha.js". He highlighted that one of the problems is that we overwrite the "build file" for testing, when the "build file" should only be modified when we actually want to "rebuild the published binary". |
Yeah, we've got |
Yeah. We should be in a place where contributors are able to make local changes and run the tests without creating publication build artefacts. Of course this is no guarantee that they won't run the build step to create those artefacts manually and check in the changes. We should still have a bot to highlight that error and block merging. But at least that case shouldn't happen a lot in recent times |
OK, so this is what's gonna happen:
UPDATE Actually, if we remove |
this is done |
When we added Bower support long ago (#584), it was implemented by committing the bundle (the root
mocha.js
) to VCS.This, of course, is bad practice.
I have no numbers anywhere on how many people install Bower via Mocha, but it's probably enough to cause pain if we stop supporting it.
Instead, we can create a script that dumps the dist file(s) into another repository, a la AngularJS. The dist file(s) would still be published to npm.
Practically speaking, whenever anybody runs the browser-based tests via Karma, we generate a new bundle so that
karma-mocha
uses Mocha to test itself. That's inconvenient for contributors and causes confusion.An alternative or supporting solution is to consume unpkg in some way. I'm a little hesitant to depend on this service. It's open-source, so we could run our own server, but $.
The text was updated successfully, but these errors were encountered: