-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Move PathUtils to Brackets core code? #11726
Comments
👍 for this. Semi-offtopic, but I think that that regexp is amazing / like the comment says, scary:
|
👍 |
We would just need to be sure to continue exposing the global variable with a deprecation warning (like we do with the global CodeMirror) in order to prevent sudden extension breaking. I am trying to think where |
Guys, this brings out a question for me ... why do we use git submodules instead of bower/npm modules? For codemirror, mustache, ... |
Submodules allow you keep forks of the code and make modifications to them without publishing anywhere. (Take Also, commits in #11734 do not specify where it's been taken from, at which version/sha it the snapshot has been taken. |
That's the point @busykai -> do we really need or want to keep forks and make modifications to thirdparty libraries? Take the https://github.com/adobe/CodeMirror2 example, what code do we have in there, which is not present in the upstream https://github.com/codemirror/CodeMirror ? Github says |
Personally, apart the globals, I do not like submodules too. |
@busykai the original I agree that the commits could have had the versions they were taken originally from, but then again the repo has been stale for 4.5 years so I am not sure if it's that relevant (unless the original |
I really doubt @jblas is planning to make changes to his 4 years old code anytime soon ... |
@zaggino, if you don't have a fork you never have a space to maneuver. If I remember correctly, we needed a modified version of
why not submit a PR to
so I could not even figure it was modified. why not contribute the modification upstream? that the open source for you: you contribute to somebody else's code so others could take advantage. if the repository is stale and inactive then you could copy it. in this case i haven't event figured it was modified (because you have nothing to compare it to, no history). the code actually says:
So is it modified or not? Go figure...
i really don't think we should be using "I like" as an argument. :) one person's "like" vs another's "don't like" are counterproductive discussions. what make sense and what does not should the ruling force. submodules are enormously useful for our projects, like it or not. overall, this was worth a discussion before the PR was merged. it should not be done in haste. we should at the very least move the code to |
@busykai Well yeah, the modification comment was about needing to do more than I also agree that pulling the code and then modifying the code in separate commits would have made sense to have a cleaner slate for library. Basically the only part I disagree with is that "I do not like" is a perfectly valid argument against globals because globals are bad, period 🐹 |
Cant we git submodule to thirdparty folder and then just use the library normally instead of using global? like using require(thirdparty/pathutils)? |
@abose like I mentioned above, the file exposes itself as |
Hey guys, Adobe guy here. :-) The path-utils was written by me on my own time (not Adobe's) hence the license not mentioning Adobe. I also contributed parts of it to jquery-mobile which I was working on at the time. In any case, I tend to write my utils so they are agnostic to the environment they are used in. What exactly are you guys after here? A way to just pull it in via git submodule? I'm hesitant to add a dependency on requirejs in path-utils.js for the reason I mentioned above, but if it helps you guys out I could checkin a version of path-utils-[something].js that uses requirejs. |
Or could we contribute to a new branch in the repo, and submodule to that branch from brackets so that the main repo remains tidy? |
@abose sure that's fine. |
Hi @jblas. I thought the library was used only for Brackets so I wanted to have in the core instead of a module that seemed unused. @busykai You are right about personal tastes. |
given @jblas agrees, i believe it's what needs to be done. |
@busykai @abose I was also going to mention that the other option is to just fork the path-utils and just have brackets pull in your fork (with requirejs added) as a submodule? Either way I'm fine, though the latter means you can make changes to your hearts delight and not have to rely on me for anything. :-) |
@ficristo As of jblas/path-utils#1 |
I wondered what was PathUtils and found that was coming from
https://github.com/jblas/path-utils
It does not seem used outside Brackets, at least there isn't a package.json or bower.json.
Seems written by and Adobe guy, so, can be relicensed (I think this is a must but not sure) and imported?
My main motivation is very simple: I do not like global variables.
The text was updated successfully, but these errors were encountered: