Sign in Join

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

Mailing lists / lazarus / 2017-03

Managing Packages with many versions

12 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Marcos Douglas B. Santos

Hi,

I would like to know how I can manager my 3rd packages with different version.

For example, imagine that:
You have got a package called SmartFoo.lpk version 1.0. You are using the master/trunk version.
Whe you compile it you got this: smartfoo\lib\x86_64-win64\*ppu, *.o, etc

Now you can use this package in your projects.

Then, the author update this package to 2.0 version. Imagine that you have many projects using version 1.0 but you would like to update to 2.0 to work in just one project.

The problem is: I don't want to work in other projects right now but you need to mantain them compilable with the version 1.0 of SmartFoo if you need it any time.

What is the best approach to deal with it?

I've already read the Wiki http://wiki.freepascal.org/Lazarus_Packages but I can not realize how IDE will know about the right *.ppu files to use.

Best regards,
Marcos Douglas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170331/de8ce395/attachment.html>

Reply by email

Michael Van Canneyt
to Marcos Douglas B. Santos
Marcos Douglas B. Santos wrote 24 lines
Hi, I would like to know how I can manager my 3rd packages with different version. For example, imagine that: You have got a package called SmartFoo.lpk version 1.0. You are using the master/trunk version. Whe you compile it you got this: smartfoo\lib\x86_64-win64\*ppu, *.o, etc Now you can use this package in your projects. Then, the author update this package to 2.0 version. Imagine that you have many projects using version 1.0 but you would like to update to 2.0 to work in just one project. The problem is: I don't want to work in other projects right now but you need to mantain them compilable with the version 1.0 of SmartFoo if you need it any time. What is the best approach to deal with it? I've already read the Wiki http://wiki.freepascal.org/Lazarus_Packages but I can not realize how IDE will know about the right *.ppu files to use.

Put the various versions in different directories. The IDE will use the correct one based on the dependencies and the location. Every version needs to have been opened once in the IDE.

I use it all the time. Works fine, except some rather exotic error messages if the IDE doesn't find a matching version.

Michael.

Reply by email

Marcos Douglas B. Santos
to Michael Van Canneyt

On Fri, Mar 31, 2017 at 11:54 AM, Michael Van Canneyt via Lazarus <

Show quoted text 9 lines
wrote: Put the various versions in different directories. The IDE will use the correct one based on the dependencies and the location. Every version needs to have been opened once in the IDE. I use it all the time. Works fine, except some rather exotic error messages if the IDE doesn't find a matching version.

That is a way, thanks.
But I am thinking something like bellow:

smartfoo
\lib
\i386-win32\
\1.0
\1.1
\1.2.3
*.ppu (trunk)
\x86_64-win64
\1.0
*.ppu (trunk)

My point is each project just use PPU files, not the real sources because I would like
to have just one source.
The correct way is the author freeze the version using a label, but I can do this myself locally. Then, I can compile and copy the PPU files for the right lib\<plataform>\<version>.

But using this way I will need to set up which path to use when I add a package into the project, right?
What do you think about it?

Marcos Douglas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170331/052c3cc5/attachment.html>

Reply by email

Michael Van Canneyt
to Marcos Douglas B. Santos
Marcos Douglas B. Santos wrote 13 lines
On Fri, Mar 31, 2017 at 11:54 AM, Michael Van Canneyt via Lazarus < > wrote: > Put the various versions in different directories. The IDE will use the > correct one based on the dependencies and the location. Every version > needs to have been opened once in the IDE. > > I use it all the time. Works fine, except some rather exotic error messages > if the IDE doesn't find a matching version. > That is a way, thanks. But I am thinking something like bellow:

Below. Bellow is something a cow does ;-)

Show quoted text 23 lines
smartfoo \lib \i386-win32\ \1.0 \1.1 \1.2.3 *.ppu (trunk) \x86_64-win64 \1.0 *.ppu (trunk) My point is each project just use PPU files, not the real sources because I would like to have just one source. The correct way is the author freeze the version using a label, but I can do this myself locally. Then, I can compile and copy the PPU files for the right lib\<plataform>\<version>. But using this way I will need to set up which path to use when I add a package into the project, right? What do you think about it?

AFAIK The IDE will not work with that.

It needs the actual sources of each version.
So you need multiple directories with the sources of each version.

FPC itself can work with this, if properly configured.

Michael.

Reply by email

Marcos Douglas B. Santos
to Michael Van Canneyt

On Fri, Mar 31, 2017 at 12:22 PM, Michael Van Canneyt via Lazarus <

wrote: Below. Bellow is something a cow does ;-)

Yeah, sorry. :)

Show quoted text 7 lines
AFAIK The IDE will not work with that. It needs the actual sources of each version. So you need multiple directories with the sources of each version. FPC itself can work with this, if properly configured.

Well, Ok. I will use as you explained. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170331/9c96b83c/attachment.html>

Reply by email

Mattias Gaertner
to Marcos Douglas B. Santos: I would like to know how I can manager my 3rd packages with different version. For…

On Fri, 31 Mar 2017 11:42:20 -0300
"Marcos Douglas B. Santos via Lazarus"

[...] Then, the author update this package to 2.0 version. Imagine that you have many projects using version 1.0 but you would like to update to 2.0 to work in just one project.

A project can set a preferred version of a package: http://wiki.freepascal.org/Lazarus_Packages#Using_preferred_file_name

Show quoted text 8 lines
The problem is: I don't want to work in other projects right now but you need to mantain them compilable with the version 1.0 of SmartFoo if you need it any time. What is the best approach to deal with it? I've already read the Wiki http://wiki.freepascal.org/Lazarus_Packages but I can not realize how IDE will know about the right *.ppu files to use.

The IDE searches a lpk (correct name and version) and the corresponding .ppu files are stored relative to the lpk. See here http://wiki.freepascal.org/Lazarus_Packages#Different_versions_of_a_package

Mattias

Reply by email

Marcos Douglas B. Santos
to Mattias Gaertner

On Fri, Mar 31, 2017 at 1:18 PM, Mattias Gaertner via Lazarus <

Show quoted text 7 lines
wrote: The IDE searches a lpk (correct name and version) and the corresponding .ppu files are stored relative to the lpk. See here http://wiki.freepascal.org/Lazarus_Packages#Different_ versions_of_a_package

Mattias,

Yes, but as Michael said, I need to have many copies of the sources. I thought that I could use just one source and many /libs directories with the .ppu's

What do you think?

Best regards,
Marcos Douglas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170331/4e4ee646/attachment.html>

Reply by email

Mattias Gaertner
to Marcos Douglas B. Santos

On Fri, 31 Mar 2017 15:03:11 -0300
"Marcos Douglas B. Santos via Lazarus"

Show quoted text 6 lines
[...] Yes, but as Michael said, I need to have many copies of the sources. I thought that I could use just one source and many /libs directories with the .ppu's What do you think?

I guess different versions have different sources, don't they?

Mattias

Reply by email

Marcos Douglas B. Santos
to Mattias Gaertner

On Fri, Mar 31, 2017 at 6:38 PM, Mattias Gaertner via Lazarus <

Show quoted text 11 lines
wrote: >[...] > Yes, but as Michael said, I need to have many copies of the sources. > I thought that I could use just one source and many /libs directories with > the .ppu's > > What do you think? I guess different versions have different sources, don't they?

Yes, but we don't need the sources if we won't work on that sources. If we just need to use the lib, the ppu files should be enough. Well, maybe I could be wrong.

Thanks, anyway.

Marcos Douglas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170401/e4430edc/attachment.html>

Reply by email

Marcos Douglas B. Santos
to Mattias Gaertner: On Fri, 31 Mar 2017 11:42:20 -0300 "Marcos Douglas B. Santos via Lazarus" A project can…

Mattias,

Mattias Gaertner wrote 6 lines
> Then, the author update this package to 2.0 version. > Imagine that you have many projects using version 1.0 but you would like to > update to 2.0 to work in just one project. A project can set a preferred version of a package: http://wiki.freepascal.org/Lazarus_Packages#Using_preferred_file_name

But how can I choose the correct package if the different sources do not have Min or Max version numbers?
I mean, the `New Requirement dialog` should have an option to choose the package by path (default/preferred) and not only by Min Max. I saw that I can change this information editing the .lpi file, but would be great do this using IDE, don't you think?

Best regards,
Marcos Douglas

Reply by email

Mattias Gaertner
to Marcos Douglas B. Santos

On Sun, 2 Apr 2017 00:17:28 -0300
"Marcos Douglas B. Santos via Lazarus"

Show quoted text 13 lines
[...] Mattias, On Fri, Mar 31, 2017 at 1:18 PM, Mattias Gaertner via Lazarus wrote: >> Then, the author update this package to 2.0 version. >> Imagine that you have many projects using version 1.0 but you would like to >> update to 2.0 to work in just one project. > > A project can set a preferred version of a package: > http://wiki.freepascal.org/Lazarus_Packages#Using_preferred_file_name But how can I choose the correct package if the different sources do not have Min or Max version numbers?

Maybe my wording 'preferred version' was misleading, but the link explained the thing you were searching for.

I mean, the `New Requirement dialog` should have an option to choose the package by path (default/preferred) and not only by Min Max. I saw that I can change this information editing the .lpi file, but would be great do this using IDE, don't you think?

Just right click on the dependency:
http://wiki.freepascal.org/IDE_Window:_Project_Inspector#Store_file_name_as_preferred_for_this_dependency

Mattias

Reply by email

Marcos Douglas B. Santos
to Mattias Gaertner
Mattias Gaertner wrote 8 lines
> > A project can set a preferred version of a package: > > http://wiki.freepascal.org/Lazarus_Packages#Using_preferred_file_name > > But how can I choose the correct package if the different sources do > not have Min or Max version numbers? Maybe my wording 'preferred version' was misleading, but the link explained the thing you were searching for.

I already understood this, thanks.

Show quoted text 7 lines
> I mean, the `New Requirement dialog` should have an option to choose > the package by path (default/preferred) and not only by Min Max. > I saw that I can change this information editing the .lpi file, but > would be great do this using IDE, don't you think? Just right click on the dependency: http://wiki.freepascal.org/IDE_Window:_Project_Inspector#Store_file_name_as_preferred_for_this_dependency

I am talking about this dialog in attachment.

Using just "preferred", if I have two options, I can't change the path in "Required Packages" using the IDE. To do that I need a workaround: open the correct package in correct path and then, right click on the dependency to set the "preferred" path using the package opened. -------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot.png
Type: image/png
Size: 12496 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170402/6ee160ec/attachment.png>

Reply by email