Ticket #35 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Build doesn't correctly handle .. in paths

Reported by: Florian Assigned to: Derek Parnell
Priority: Important Component: core
Version: 3.03 Severity: major
Keywords: Cc:

Description

I've only tested this on Linux with GDC!

Two files:

foo.d

module foo;

private import bar;

int main ( char[][] args )
{
    return 0;
}

bar.d

module bar;

private import foo;

void doSomething ( int i )
{
    int j = i * 2;
}

These are just examples, it happens with two files which import each other.

Both files are (for example) in /home/florian/dev/d/tests/buildtest
If you run build in a subfolder ( /home/florian/dev/d/tests/buildtest/somefolder ) with the following command, build will give the file foo.d twice to the linker:

build ../foo.d -V

Output of stdout and stderr is attached. Here the interesting part:

(...)
source file[0] ./../foo.d
source file[1] /home/florian/dev/d/tests/buildtest/bar.d
source file[2] /home/florian/dev/d/tests/buildtest/foo.d
(...)
Running '/usr/local/bin/gdc  foo.o bar.o foo.o -o /home/florian/dev/d/tests/buildtest/foo -lc -lgphobos -lpthread -lm'
(...)

Attachments

output.txt (2.5 kB) - added by Florian on 07/03/06 17:58:59.
The output of the build

Change History

07/03/06 17:58:59 changed by Florian

  • attachment output.txt added.

The output of the build

07/06/06 00:06:58 changed by Derek Parnell

  • status changed from new to assigned.

08/08/06 21:47:10 changed by Derek Parnell

  • status changed from assigned to closed.
  • version changed from 3.02 to 3.03.
  • resolution set to fixed.

Fixed.