adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.25k stars 7.63k forks source link

Extension manager issue with CSSLint #6797

Open cfjedimaster opened 10 years ago

cfjedimaster commented 10 years ago

I've got my own CSSLint (installed) and wanted to compare it to another, and check Sprint 36's new multi-linter for the same extension feature. I only have mine installed, and Brackets seems to recognize that.

https://www.evernote.com/shard/s3/sh/848df34a-c5e5-454a-86dc-24a28f61108a/811822cbdea12798ea075860199fc83a

But when I tried to install it, note the error:

https://www.evernote.com/shard/s3/sh/97c6f915-2547-483c-bad5-3b71289feaef/0eed77f72198920197e68b115f0e0760

It says it is already installed. Note the version number is the same as mine. Our extensions have different ID values so I'm not sure why it is conflicting.

njx commented 10 years ago

Hmmm, I'm not seeing that - I can install your extension and then Ian's with no errors.

cfjedimaster commented 10 years ago

Weird. I've removed every extension but my CSSLint, and I still see it. Is there something I should check?

On Fri, Feb 7, 2014 at 3:22 PM, Narciso Jaramillo notifications@github.comwrote:

Hmmm, I'm not seeing that - I can install your extension and then Ian's with no errors.

Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/6797#issuecomment-34504779 .

Raymond Camden, Web Developer for Adobe

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: cfjedimaster

cfjedimaster commented 10 years ago

Ok, so removed my CSSLint too, and this time it worked. Going to try to compare the CSSLint I copied out.

On Fri, Feb 7, 2014 at 3:41 PM, Raymond Camden raymondcamden@gmail.comwrote:

Weird. I've removed every extension but my CSSLint, and I still see it. Is there something I should check?

On Fri, Feb 7, 2014 at 3:22 PM, Narciso Jaramillo < notifications@github.com> wrote:

Hmmm, I'm not seeing that - I can install your extension and then Ian's with no errors.

Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/6797#issuecomment-34504779 .

Raymond Camden, Web Developer for Adobe

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: cfjedimaster

Raymond Camden, Web Developer for Adobe

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: cfjedimaster

cfjedimaster commented 10 years ago

Ahah, I figured it out. Not sure if this is my fault, or a Brackets bug, or...

In my extension, I used a folder called brackets-csslint. When I removed everything and reinstalled, I noticed my extension used camden.csslint and his used... brackets-csslint.

So Brackets was trying to install his extension into my folder and it must have thought it was one of the same - hence the version warning.

So... maybe the extension docs should note (and it may say this already) that the physical folder used for installation will be the same as name, and developers should ensure they match when working on a new extension?

On Fri, Feb 7, 2014 at 3:55 PM, Raymond Camden raymondcamden@gmail.comwrote:

Ok, so removed my CSSLint too, and this time it worked. Going to try to compare the CSSLint I copied out.

On Fri, Feb 7, 2014 at 3:41 PM, Raymond Camden raymondcamden@gmail.comwrote:

Weird. I've removed every extension but my CSSLint, and I still see it. Is there something I should check?

On Fri, Feb 7, 2014 at 3:22 PM, Narciso Jaramillo < notifications@github.com> wrote:

Hmmm, I'm not seeing that - I can install your extension and then Ian's with no errors.

Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/6797#issuecomment-34504779 .

Raymond Camden, Web Developer for Adobe

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: cfjedimaster

Raymond Camden, Web Developer for Adobe

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: cfjedimaster

Raymond Camden, Web Developer for Adobe

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: cfjedimaster

peterflynn commented 10 years ago

Ah -- yes, because Extension Manager uses the extension id as the installation folder name. Normally that's fince since the Registry guarantees extension ids are unique. The problem comes if anyone manually installs an extension in the user folder and gives it a folder name that breaks that rule and collides with some other extension's id.

I think we should double-check that the extension id matches the folder name during the Update workflow, and bail with a different (more informative) error message if not. That seems like a fairly easy fix, and anything fancier is probably overkill...

cfjedimaster commented 10 years ago

I agree Peter. As it stands, this will probably only ever hit someone who builds extensions.

On Fri, Feb 7, 2014 at 5:51 PM, Peter Flynn notifications@github.comwrote:

Ah -- yes, because Extension Manager uses the extension id as the installation folder name. Normally that's fince since the Registry guarantees extension ids are unique. The problem comes if anyone manually installs an extension in the user folder and gives it a folder name that breaks that rule and collides with some other extension's id.

I think we should double-check that the extension id matches the folder name during the Update workflow, and bail with a different (more informative) error message if not. That seems like a fairly easy fix, and anything fancier is probably overkill...

Reply to this email directly or view it on GitHubhttps://github.com/adobe/brackets/issues/6797#issuecomment-34519958 .

Raymond Camden, Web Developer for Adobe

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: cfjedimaster

njx commented 10 years ago

Low pri to @dangoor