what happened to using project relative paths?

I just upraged to 90.94 and can no longer see the project option to use
relative files paths. I could have sworn that i saw when i first set up
my project though :(

This is obviously an issue because we share our project configurations
and store them in version control.

I'm on MAC OS X 10.5 and using the directory based project config.

Regards,

Peter

13 comments
Comment actions Permalink

It looks like the option has been obliterated, and all my existing projects have been converted to absolute paths.

0
Comment actions Permalink

Hello Peter,

yes, an option to save dependencies outside project/module roots was dropped from the UI (and configuration itself), so dependencies outside project root now will have absolute paths. In order to let other members to resolve such dependencies in their own environments you have to define Path Variable (Settings - Path Variables) for every path which is used in such dependencies so others will be able to define same variable with paths corresponding their own directory layout.

For example, if I have external dependency to a common libraries which I do not want to put into the CVS (by different reasons: they are too big or shared between several projects, etc), I will put them outside the project root, i.e.:

/workspace/project  (the root for the project)
/common-libs (place where external libraries are located on my own machine)

Now I will add Path Variable with name "SHARED_LIBS" which will point to '/common-libs' on my machine so every path to '/common-libs' in project configuration will be replaced by variable "SHARED_LIBS", commit the project and checkout it on another machine which has a slightly different directory structure:

/myprojects/project (the root of the project on this machine)
/libs/shared/ (path to _same external libraries_ on this particular machine)

So now if I will try to open this project IDEA will be unable to resolve variable "SHARED_LIBS" and will ask you to define that variable by choosing a directory which contains all of the external libs required by the project ('/libs/shared' in this case).

Alexey.

0
Comment actions Permalink

Hi Alexey,

Thanks for your feedback.

Why was this changed?
What was wrong with giving people the option of using relative paths to
reference modules/libs outside of the project root?
Can this be changed back?

The problem I have with they way we layout our projects is that what
IDEA thinks is the project root, is not the actual project root. Let me
explain with an example layout.

Projects <-- different for all devs
|MyProject < actual project root and is the same for all devs
   |-- project_config <-- where we store project configs for IDEA
   | |-- idea7
   | |-- idea8
   | |-- idea9 <-- IDEA thinks this is the project root
   |   |--.idea
   |-- shared_lib1
   |-- shared_lib2
   |-- project_lib1
   |-- project_lib2

From the (attempted) diagram above, you can see that:
- all our libs (shared and project specific) are within the project root
(eg. Projects/MyProject/shared_lib1 and Projects/MyProject/project_lib1
are sub-directories of Projects/MyProject)
- we have a sub-directory (project_config) that stores the project
config for the different versions of IDEA we use and test
(Projects/MyProject/project_config)

The problem with this change of behaviour in IDEA is that all our libs
are referenced with absolute references, which as you say can be
different (and usually is) for each developer even though our project
layout doesn't change. Hence, we can't share the project config anymore.

Prior to this change, IDEA happily used relative references and
everything worked for all our developers because the actual project
structure is exactly the same for every developer even though the
location of the "Projects" directory differs between developers.

This issue is actually a show stopper for us upgrading to IDEA 9 :)

Regards,

Peter

On 20/10/09 2:39 PM, Alexey Pegov wrote:

Hello Peter,

>

yes, an option to save dependencies outside project/module roots was dropped from the UI (and configuration itself), so dependencies outside project root now will have absolute paths. In order to let other members to resolve such dependencies in their own environments you have to define Path Variable (Settings - Path Variables) for every path which is used in such dependencies so others will be able to define same variable with paths corresponding their own directory layout.

>

For example, if I have external dependency to a common libraries which I do not want to put into the CVS (by different reasons: they are too big or shared between several projects, etc), I will put them outside the project root, i.e.:

>

/workspace/project  (the root for the project)
/common-libs (place where external libraries are located on my own machine)

>

Now I will add Path Variable with name "SHARED_LIBS" which will point to '/common-libs' on my machine so every path to '/common-libs' in project configuration will be replaced by variable "SHARED_LIBS", commit the project and checkout it on another machine which has a slightly different directory structure:

>

/myprojects/project (the root of the project on this machine)
/libs/shared/ (path to same external libraries on this particular machine)

>

So now if I will try to open this project IDEA will be unable to resolve variable "SHARED_LIBS" and will ask you to define that variable by choosing a directory which contains all of the external libs required by the project ('/libs/shared' in this case).

>

Alexey.

>

---
Original message URL: http://www.jetbrains.net/devnet/message/5247433#5247433


0
Comment actions Permalink

Just a quick follow up.

There are two main issues as I see it:

1. The option to use relative paths when referencing modules/libs
outside of the "project root" has been removed for an unknown reason.
2. IDEA thinks the location of the project config is the "project root".

Either reverting or allowing developers to specify what the actual
project root is will resolve the issue in question.

Regards,

Peter

On 21/10/09 10:07 AM, Peter wrote:

Hi Alexey,

>

Thanks for your feedback.

>

Why was this changed?
What was wrong with giving people the option of using relative paths to
reference modules/libs outside of the project root?
Can this be changed back?

>

The problem I have with they way we layout our projects is that what
IDEA thinks is the project root, is not the actual project root. Let me
explain with an example layout.

>

Projects <-- different for all devs
|MyProject < actual project root and is the same for all devs
|-- project_config <-- where we store project configs for IDEA
| |-- idea7
| |-- idea8
| |-- idea9 <-- IDEA thinks this is the project root
| |--.idea
|-- shared_lib1
|-- shared_lib2
|-- project_lib1
|-- project_lib2

>

From the (attempted) diagram above, you can see that:
- all our libs (shared and project specific) are within the project root
(eg. Projects/MyProject/shared_lib1 and Projects/MyProject/project_lib1
are sub-directories of Projects/MyProject)
- we have a sub-directory (project_config) that stores the project
config for the different versions of IDEA we use and test
(Projects/MyProject/project_config)

>

The problem with this change of behaviour in IDEA is that all our libs
are referenced with absolute references, which as you say can be
different (and usually is) for each developer even though our project
layout doesn't change. Hence, we can't share the project config anymore.

>

Prior to this change, IDEA happily used relative references and
everything worked for all our developers because the actual project
structure is exactly the same for every developer even though the
location of the "Projects" directory differs between developers.

>

This issue is actually a show stopper for us upgrading to IDEA 9 :)

>

Regards,

>

Peter

>

On 20/10/09 2:39 PM, Alexey Pegov wrote:

>> Hello Peter,
>>
>> yes, an option to save dependencies outside project/module roots was
>> dropped from the UI (and configuration itself), so dependencies
>> outside project root now will have absolute paths. In order to let
>> other members to resolve such dependencies in their own environments
>> you have to define Path Variable (Settings - Path Variables) for every
>> path which is used in such dependencies so others will be able to
>> define same variable with paths corresponding their own directory layout.
>>
>> For example, if I have external dependency to a common libraries which
>> I do not want to put into the CVS (by different reasons: they are too
>> big or shared between several projects, etc), I will put them outside
>> the project root, i.e.:
>>
>> /workspace/project (the root for the project)
>> /common-libs (place where external libraries are located on my own
>> machine)
>>
>> Now I will add Path Variable with name "SHARED_LIBS" which will point
>> to '/common-libs' on my machine so every path to '/common-libs' in
>> project configuration will be replaced by variable "SHARED_LIBS",
>> commit the project and checkout it on another machine which has a
>> slightly different directory structure:
>>
>> /myprojects/project (the root of the project on this machine)
>> /libs/shared/ (path to same external libraries on this particular
>> machine)
>>
>> So now if I will try to open this project IDEA will be unable to
>> resolve variable "SHARED_LIBS" and will ask you to define that
>> variable by choosing a directory which contains all of the external
>> libs required by the project ('/libs/shared' in this case).
>>
>> Alexey.
>>
>> ---
>> Original message URL:
>> http://www.jetbrains.net/devnet/message/5247433#5247433
>

0
Comment actions Permalink

That's pretty inconvenient for us, too.
We do have some "big files" that are not in the project root as IDEA sees it, but they are in some standard folder in the project's real root.
Up to now sharing project files simply worked out of the box, because those relative paths were the same everywhere.

Now for no good reason at all every team member has to reconfigure the project?

Alexey Pegov wrote:

Hello Peter,

yes, an option to save dependencies outside project/module roots was dropped from the UI (and configuration itself), so dependencies outside project root now will have absolute paths. In order to let other members to resolve such dependencies in their own environments you have to define Path Variable (Settings - Path Variables) for every path which is used in such dependencies so others will be able to define same variable with paths corresponding their own directory layout.

For example, if I have external dependency to a common libraries which I do not want to put into the CVS (by different reasons: they are too big or shared between several projects, etc), I will put them outside the project root, i.e.:

/workspace/project  (the root for the project)
/common-libs (place where external libraries are located on my own machine)

Now I will add Path Variable with name "SHARED_LIBS" which will point to '/common-libs' on my machine so every path to '/common-libs' in project configuration will be replaced by variable "SHARED_LIBS", commit the project and checkout it on another machine which has a slightly different directory structure:

/myprojects/project (the root of the project on this machine)
/libs/shared/ (path to same external libraries on this particular machine)

So now if I will try to open this project IDEA will be unable to resolve variable "SHARED_LIBS" and will ask you to define that variable by choosing a directory which contains all of the external libs required by the project ('/libs/shared' in this case).

Alexey.

---
Original message URL: http://www.jetbrains.net/devnet/message/5247433#5247433

0
Comment actions Permalink

Hello Peter,


Projects <-- different for all devs
|MyProject < actual project root and is the same for all devs
   |-- project_config <-- where we store project configs for IDEA
   | |-- idea7
   | |-- idea8
   | |-- idea9 <-- IDEA thinks this is the project root
   |   |--.idea
   |-- shared_lib1
   |-- shared_lib2
   |-- project_lib1
   |-- project_lib2



In terms of IDEA project root is a directory which contains IPR file or .idea directory (for directory-based scheme), and in your case the 'actual project root' is really outside of the project root from IDEA point of view.

The only workaround I see is to move .idea from MyProject/project_config/idea9 and put it directly under MyProject. In this case you will be able to open MyProject with IDEA 9 and still be able to use configs under project_config for older versions of IDEA.

Anyway, thanks for your report, we'll try to figure it out once again.

0
Comment actions Permalink

Hello Stephen,

Yes, you'll need to introduce a Path Variable and every member of your team will have to define a path for it.

0
Comment actions Permalink

Sorry for being persistent, but:

    Why?

That feature was there for as long as I used IDEA (4.0 IIRC).
Why suddenly remove a useful feature?

0
Comment actions Permalink

+10000
I really can't understand the need to remove features... If they are working, don't remove them!

Add new features instead...


BTJ

0
Comment actions Permalink

I'll also add my -1 to this change. My project structure is as follows:

  • C:/dev/performasure/<BRANCH>
    • src (main project checkout)
      • build
        • idea
          • v7
          • v9
            • project file
            • various iml files
      • java
        • etc.
    • common (common Quest libs checkout)
      • quest-common.iml
      • java
        • etc.


The main project file references quest-common.iml via a relative path. It will always be in the same relative location.

0
Comment actions Permalink

Hi Alexey,

Why was this changed?
Why can't this option be reinstated?

Regards,

Peter

On 21/10/09 3:41 PM, Alexey Pegov wrote:

Hello Peter,

>


> Projects<-- different for all devs
> |MyProject<  actual project root and is the same for all devs
>     |-- project_config<-- where we store project configs for IDEA
>     | |-- idea7
>     | |-- idea8
>     | |-- idea9<-- IDEA thinks this is the project root
>     |   |--.idea
>     |-- shared_lib1
>     |-- shared_lib2
>     |-- project_lib1
>     |-- project_lib2
>
>

>

In terms of IDEA project root is a directory which contains IPR file or .idea directory (for directory-based scheme), and in your case the 'actual project root' is really outside of the project root from IDEA point of view.

>

The only workaround I see is to move .idea from MyProject/project_config/idea9 and put it directly under MyProject. In this case you will be able to open MyProject with IDEA 9 and still be able to use configs under project_config for older versions of IDEA.

>

Anyway, thanks for your report, we'll try to figure it out once again.

>

---
Original message URL: http://www.jetbrains.net/devnet/message/5247585#5247585


0
Comment actions Permalink

Peter,

and everybody,

in the next Maia EAP all paths will be stored relatively (but still no option, though).

0
Comment actions Permalink

Thanks Alexey. That will solve my problem.

Regards,

Peter

On 22/10/09 12:39 PM, Alexey Pegov wrote:

Peter,

>

and everybody,

>

in the next Maia EAP all paths will be stored relatively (but still no option, though).

>

---
Original message URL: http://www.jetbrains.net/devnet/message/5247703#5247703


0

Please sign in to leave a comment.