Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Conversation

@marcelgerber
Copy link
Contributor

Now that we use CodeMirror 5, it's a little misleading our submodule is still called CodeMirror2. Thus, in this PR, I've renamed it to CodeMirror.

There are some things to keep in mind, though:

  • While most extensions will still work through our require mapping, other ways to access CodeMirror2 (FileSystem, node) won't work. Look out for those.
  • We probably cannot utilize deprecation warnings.
  • See if any extension accesses CodeMirror2 through anything else than a require (FileSystem, node, ...)
  • See if we can fire deprecation warnings
  • See if it makes sense to rename our adobe/CodeMirror2 repo as well

@rroshan1
Copy link
Contributor

I too had been contemplating updating the CodeMirror submodule name and its side-effects. Merging the changes.
Have raised an issue to track the action items mentioned in the description post this merge.

rroshan1 added a commit that referenced this pull request May 23, 2015
@rroshan1 rroshan1 merged commit 3d68a76 into master May 23, 2015
@marcelgerber marcelgerber deleted the marcel/codemirror2-to-codemirror branch May 23, 2015 10:00
@abose
Copy link
Contributor

abose commented May 23, 2015

We could have delayed this merge till the next release and give a heads-up in this release about the impending change; This could be a breaking change with some extensions. Also the three issues mentioned by marcel had to be verified before this change was merged.
I think we should revert this change for this release to allow extension devs enough time to verify their extensions or alternatively check the impact of this change before merge.
Created a revert just in case we decide to revert this for the release.
@prafulVaishnav @nethip

@abose abose restored the marcel/codemirror2-to-codemirror branch May 23, 2015 19:47
@marcelgerber
Copy link
Contributor Author

There's one extension that uses CodeMirror2 for literal access: Brackets-Themes by @MiguelCastillo - all the others only use brackets.getModule.

Knowing this, I think we don't need to revert the changes. Miguel is probably pretty fast in updating his extension so it checks whether CodeMirror2 or CodeMirror should be used.

Point 2: We don't really need them (it's a "nice to have" and nothing else) as we can simply leave the requirejs rerouting in.

Point 3: That's just our infrastructure and it's very easy and non-breaking to do.

@MiguelCastillo
Copy link
Contributor

@marcelgerber Thanks for roping me in. I will change update as soon as this is merged in. :) Thanks for the heads up.

@abose
Copy link
Contributor

abose commented May 23, 2015

Thanks Marcel, i'll run a search for the usage of codeMirror2 on the source codes in the extension registry just in case and update. If the extension usage is proper, there would be nothing to worry about this going in the release 🐹

@MiguelCastillo
Copy link
Contributor

Alright, I just created a PR that's ready to be merged in when this is merged. MiguelCastillo/Brackets-Themes#115

@marcelgerber
Copy link
Contributor Author

@MiguelCastillo This PR is already merged, but it's not yet part of a Brackets Release.
One other thing you could possibly do is check whether CodeMirror2 still exists and use the appropiate directory based on the result. Just a suggestion, though.

@abose That's actually what I already did, but nothing to say against a second pair of eyes :)

@MiguelCastillo
Copy link
Contributor

@marcelgerber oh man, I must be going crazy. I could not find the merged comment! I see it now that I went through the thread in more details... I wondering why I couldn't see the merge button :)

@marcelgerber
Copy link
Contributor Author

@MiguelCastillo Notice though that your PR will only work in Brackets, so better set your package.json's minimum Brackets version to 1.4, too.

That's why I suggested conditionally detecting what path to use above: It will still work for both versions post- and pre-1.4.
In order to make that work, don't yet change the brackets.getModule paths - CodeMirror2 will still work fine for now.

@nethip
Copy link
Contributor

nethip commented May 24, 2015

@marcelgerber Thanks for fixing this. This was a very good observation.

And thanks to @MiguelCastillo and @abose for collaborating on making sure this won't effect the other modules.

Since these are all architectural changes I feel we should use our slack channel to bring these up so that everyone can put in their opinions before merging these kind of changes to master.

@abose
Copy link
Contributor

abose commented May 25, 2015

@marcel, I ran a search on the extension registry for CodeMirro2 and it seems that all of them except Miguel's extension is using Bracket.getModule("path?Codemirror2/file") format. So this change would be safe for this release as you said.
I will go ahead and delete the reverting PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants