#262 Link to (source) Folder issues

open
Editor (491)
5
2006-03-30
2006-03-30
Anonymous
No

Hi:

First of all, thank you for a great plugin..! Great
work..!

Our python files are stored differently (than the
PYTHONPATH) in our Source repository for some
historical reasons. So, I have to create a link
folder to use the existing structure

I created a Pydev project and added a src folder that
links to a local directory, which is named
differently. Note that the name of the "link" folder
matches with the PYTHONPATH.

For example, my current folder structure on my hard
disk is like this:
root
- y1
- x11
- x12
I created a link called "x1" and linked it to root.
So, the structure under the Pydev project is like
this:
root
- x1
- x11
- x12
In my PYTHONPATH, I specified the source folder as:
"root", as the correct PYTHONPATH as required by our
application is "/root" with the first directory in
the PYTHONPATH as "x1" and not "y1".
In Eclipse, this does not seem to recognize the
Python files. Pressing "Force Restore Internal Info"
button also does not seem to help.

Looks like you might have to change the plugin to
look at the link folder name to calculate the module
paths/names (located below the PYTHONPATH).

Also, the package imports are all signalled as errors
due to this problem.

I hope this is not very confusing..!

Should you have any questions, please do not hesitate
to contact me..

Thanks
Shashi Velur
vshashi at gmail

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2006-04-01

    Logged In: YES
    user_id=617340

    Yeap, pydev does not currently support links... I'll have to
    take a better look at it to see how to fix it (it probably
    won't get into the next version).

    Cheers,

    Fabio

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2006-04-01

    Logged In: YES
    user_id=617340

    Also, there is one more note to it... It works if you put
    the link itself in the pythonpath (and not one level before it).

     
  • Jonathan Knowles

    Logged In: YES
    user_id=1467427
    Originator: NO

    Dear Fabio

    I'd like to politely ask: could the the priority of this bug could be raised?

    The truth is I'd love to adopt PyDev for our project (and also to promote PyDev to my co-developers), but the lack of support for symbolic links hurts the case for adoption.

    While I'm not an File I/O expert, I've done some crude experiments and it seems the J2SE 5.0 (and above) java.io.File implementation is transparent to symbolic links. In other words, File objects resolve to their targets. For example:

    // a real directory:
    File file1 = new File("/home/jonathan/test/directory");

    // a symbolic link to "/home/jonathan/test/directory":
    File file2 = new File("/home/jonathan/test/directory-link");

    // these should succeed:
    assert(file1.exists() && file1.isDirectory());
    assert(file2.exists() && file2.isDirectory());
    assert(file1.getCanonicalPath().equals(file2.getCanonicalPath()));

    Let me know if I can be of any assistance in fixing this bug. I'm happy to look into patching the code base if you're interested.

    Keep up the good work!

    Jonathan Knowles

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks