HaxeFoundation / intellij-haxe

Haxe plugin for IntelliJ Platform based IDEs (IDEA, Android-Studio)
http://intellij-haxe.org
Apache License 2.0
222 stars 99 forks source link

Haxelib added twice #101

Open boozook opened 9 years ago

boozook commented 9 years ago

Plugin version: latest build.

I have a library (in my haxelib-repo) named "Signal". In the "Project Structure" I added from "Global Libraries" my library. And this library mansioned in build.hxml:

-cp src
-cp tests
-main Main
-lib signal
-dce full
--each
-x out/tests/main

After reopen/reindex this project i get two similar dependencies, where one is auto-generated. Need to test existing dependencies before creating new ones. And additionally try find it in "Global Libraries" or project's "Libraries".

screen shot 2015-01-11 at 17 54 43

TIR: STB-7319

EBatTiVo commented 9 years ago

There is logic to detect this already in place. Obviously, it isn't working. :/

Is the path that "Signal 1,0,0" is installed to the same as that found and placed in the auto-generated path? (e.g. Is it installed to "/Users/ak/Developer/Haxe/libs/signal/1,0,0"?) Or is it installed in two places on your machine -- your user space and a global installation?

The code lives at src/com/intellij/plugins/haxe/haxelib/HaxelibProjectUpdater.java Look for syncModuleClasspaths() and syncProjectClasspath().

boozook commented 9 years ago

Yes, "Signal 1,0,0" installed only to "/Users/ak/Developer/Haxe/libs/signal/1,0,0". Path of Haxelib-repo is /Users/ak/Developer/Haxe/libs.

On 12 ÿíâ. 2015 ã., at 8:17, Eric B notifications@github.com wrote:

There is logic to detect this already in place. Obviously, it isn't working. :/

Is the path that "Signal 1,0,0" is installed to the same as that found and placed in the auto-generated path? (e.g. Is it installed to "/Users/ak/Developer/Haxe/libs/signal/1,0,0"?) Or is it installed in two places on your machine -- your user space and a global installation?

— Reply to this email directly or view it on GitHub.

as3boyan commented 9 years ago

Ok, second copy - that comes from my original implementation, first "Signal 1.0" maybe added somewhere(by TiVo) not sure, need to test

boozook commented 9 years ago

Stop! This is misunderstanding. "Signal 1.0" I created early into the Global Libraries and added it to dependencies to module. For plugin need checking already existing dependencies before creating/adding new.

On 13 ÿíâ. 2015 ã., at 21:35, as3boyan notifications@github.com wrote:

Ok, second copy - that comes from my original implementation, first "Signal 1.0" maybe added somewhere(by TiVo) not sure, need to test

— Reply to this email directly or view it on GitHub.

as3boyan commented 9 years ago

Oh, I see, we do not check global libraries currently, I haven't found a way to do this yet. Good idea.

Ok, then I read title I thought that plugin adds it twice.

boozook commented 9 years ago

One place, one path, but two names:

  1. "Signal 1.0" - it's i handy added;
  2. name=path - generated by plugin. Both have a path = "/Users/ak/Developer/Haxe/libs/signal/1,0,0".

On 12 ÿíâ. 2015 ã., at 8:17, Eric B notifications@github.com wrote:

There is logic to detect this already in place. Obviously, it isn't working. :/

Is the path that "Signal 1,0,0" is installed to the same as that found and placed in the auto-generated path? (e.g. Is it installed to "/Users/ak/Developer/Haxe/libs/signal/1,0,0"?) Or is it installed in two places on your machine -- your user space and a global installation?

— Reply to this email directly or view it on GitHub.

as3boyan commented 9 years ago

Yeah, I see, the key is that first lib - is a global lib, current implementation checks only module-level dependencies/libs

EBatTiVo commented 9 years ago

Yeah, I see, the key is that first lib - is a global lib, current implementation checks only module-level dependencies/libs

The current implementation checks global libs as well as module libs. It even removes module level libs (that were automatically added) if they are added to global libs. At least, that's the way it's /supposed/ to work.