-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
lib/codemirror.js is gone from version 5.20.0 #4328
Comments
Yes, that's what the release announcement said. This is by design. If your problem is with bower, I suggest you set up some bower-based mirror, or move to a more 2016-proof package manager. |
I can't move to something different than bower as is part of a big project and we can easily swap package manager. |
+1 |
I'm not going to go out of my way to support bower. I'm not sure what the usual solution is for using bower with a project that has a build step, but I suggest you look into that and set something up outside of this repository. |
+1 here too; I understand (and sympathise with) the awkwardness of supporting bower with a build step, but it was a bit of a shock. I read the release announcement, but it wasn't clear to me that this broke bower installs! |
I think I'll be stuck to 5.19.0 for a while |
So it seems a lot of people have a hardcoded link to this repository in their bower files. On the one hand, I sympathize, since having your build break is no fun. On the other hand, this here is a source repository, not a package distribution mechanism, and I don't feel responsible for the fact that Bower confuses the two. As a stopgap solution, you can lock your version to 5.19.0. The real solution is probably for someone to set up a mirror that includes the build artifacts in the repository, and for bower uses to link to that. This can be automated, and shouldn't be hard. (Or stop using bower. Long-term, you really want to do that.) |
It is really that hard to put back that js file? I understand your point, but at the same time you can't force people that use a specific technology, and like my case that we cannot change it to anything more modern easily, just because you believe is the right thing to do. |
It is not hardcoded, |
For people who'd like to take this opportunity to get rid of bower, here are some explanation ;-) |
No, it isn't. But that would mean continuing to keep it in there, which I don't want to do -- a repository is for actual sources, not build artifacts. |
That's good to hear. But I assume bower does implement some kind of package ownership. I'm not the one who's published codemirror there, so I doubt I am able to change what it points to. |
Maybe you should create a major version (v6) since this is a breaking change. |
I've set up a kludge to make this problem less severe -- a fork of CodeMirror without the last release tag here, and a change to the Bower registry pointing the name 'codemirror' at that repo (which I apparently was allowed to, even though I didn't initially publish it there). This means that installs that refer to codemirror by name should work again, but will get 5.19.0, and will continue to do so until someone takes responsibility for maintaining a bower-installable mirror. (I will help update the bower repository to point at this, once it exists.) |
I second @roparz comment. I understand your point in removing a bundled file from the repo but this is breaking change for a lot of us. |
(Going to leave this open for a while in the hope that people will stop creating new issues for the same problem.) |
Add |
For an immediate workaround/solution, I am using Drush, which is a Drupal specific build tool, to download the single missing file from https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/codemirror.js and placing it in the already downloaded 'codemirror/lib' directory. |
Why not update http://codemirror.net/doc/manual.html? People like my get confused, that codemirror.js from lib folder is removed. |
What change would you suggest? Nowhere does the manual suggest you clone a git repository to install the library. |
Sorry but in the docs you write that you have to use the files in the
|
It absolutely still applies. You just have to do so in a properly built version of the code. I.e. download the zip from the website, install with npm, or run the build process yourself. |
Please remove .gitignore from the properly built version. When I extract the library to my source tree lib/codemirror.js has to be added manually because of the .gitignore file. I use CodeMirror in an ASP.NET project and I don't have npm or node.js in my project. Building codemirror.js as a part of my project would require me to add new tools which I don't really need in my project. |
Done (from the zip) |
@marijnh I set up https://github.com/components/codemirror, which is where lots of bower packages that require build steps live, if you'd like to point to that. It's a mirror that grabs the npm package. |
@minrk That's perfect! I've updated the bower registry. Thank you for taking responsibility on this. |
bower install now failing with below error: ➜ datacollector-ui git:(master) bower install Additional error details: |
Yes, that repository is gone, since @mrink opened a new one that's actually being maintained. I updated the bower registry to point at that repository. From the output you pasted, it looks like bower is dumb about caching and blindly tries to validate against the outdated link, and crashes when that fails. Maybe |
Thanks, it is working fine now |
@minrk The components/codemirror repo doesn't seem to be updating (it's missing 5.22). Also, it'd be nice if it could restore the old bower.json file. |
@marijnh 5.22.0 should be posted now with the bower.json restored. |
@minrk Thanks! Any chance this could be automated? |
The best option remains npm here: https://www.npmjs.com/package/codemirror Honestly, I love Bower but NPM is more powerful. |
Many people using Composer for assets. It's handy to use only one tool instead of several. The package from http://codemirror.net/codemirror.zip contains all files but there's no version control plus Composer complains about unsecure connection. Very confusing situation. It should be noted in readme |
It says I simply have to import the lib/codemirror.js, but - it doesn't exist! |
Don't clone the repository to install. Install with npm or download the zip file form the website. |
There's no codemirror.js file in the repository on version 5.20.0
The text was updated successfully, but these errors were encountered: