Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-11

Package file management problem

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro

I just had the weirdest problem that's taken me about a week to track down.

Turns out I had a file by the same name in two different packages. When I would compile either package individually they'd work fine.

If I installed packageA into Lazarus and then tried to install packageB I'd get one error...
If I installed packageB and then packageA, I'd get a different error.

Neither error pointed to the duplicate file. One error reported that a different file couldn't be found (when it was present.) The other error reported that it couldn't compile the entire package because no source files were found.

Net result: Obviously you can't have two different files with the same name inside two different packages. That was my own mistake. However, perhaps we should consider some sort of a check before a package is installed? I don't know how we could improve the error generating since that's done by FPC... I think it would have to be a manual check of what source files are installed, prior to rebuilding Lazarus.

Note: it didn't matter if the source file was PRESENT inside another package's directory, only caused problems when it was installed in the package.

Tony Maro Systems Consultant The Maro Group (256) 337-5759 http://www.maro.net/

Reply by email

Mattias Gaertner
to Tony Maro
Show quoted text 25 lines
I just had the weirdest problem that's taken me about a week to track down. Turns out I had a file by the same name in two different packages. When I would compile either package individually they'd work fine. If I installed packageA into Lazarus and then tried to install packageB I'd get one error... If I installed packageB and then packageA, I'd get a different error. Neither error pointed to the duplicate file. One error reported that a different file couldn't be found (when it was present.) The other error reported that it couldn't compile the entire package because no source files were found. Net result: Obviously you can't have two different files with the same name inside two different packages. That was my own mistake. However, perhaps we should consider some sort of a check before a package is installed? I don't know how we could improve the error generating since that's done by FPC... I think it would have to be a manual check of what source files are installed, prior to rebuilding Lazarus. Note: it didn't matter if the source file was PRESENT inside another package's directory, only caused problems when it was installed in the package.

The IDE now checks its own unit path for ambigious units.

The check for ambigious units between two connected packages still needs to be implemented.

Mattias

Reply by email

Mattias Gaertner
to Tony Maro: I just had the weirdest problem that's taken me about a week to track down. Turns out I…
Show quoted text 19 lines
I just had the weirdest problem that's taken me about a week to track down. Turns out I had a file by the same name in two different packages. When I would compile either package individually they'd work fine. If I installed packageA into Lazarus and then tried to install packageB I'd get one error... If I installed packageB and then packageA, I'd get a different error. Neither error pointed to the duplicate file. One error reported that a different file couldn't be found (when it was present.) The other error reported that it couldn't compile the entire package because no source files were found. Net result: Obviously you can't have two different files with the same name inside two different packages. That was my own mistake. However, perhaps we should consider some sort of a check before a package is installed?

I implemented a check for ambigious units of connected packages.

Mattias

Reply by email