[Lazarus] Managing Packages with many versions

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list
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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list


On Fri, 31 Mar 2017, Marcos Douglas B. Santos via Lazarus wrote:

> 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.
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list

On Fri, Mar 31, 2017 at 11:54 AM, Michael Van Canneyt via Lazarus <[hidden email]> 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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list


On Fri, 31 Mar 2017, Marcos Douglas B. Santos via Lazarus wrote:

> On Fri, Mar 31, 2017 at 11:54 AM, Michael Van Canneyt via Lazarus <
> [hidden email]> 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 ;-)

>
> 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.
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list

On Fri, Mar 31, 2017 at 12:22 PM, Michael Van Canneyt via Lazarus <[hidden email]> wrote:
Below. Bellow is something a cow does ;-)

 Yeah, sorry.  :)
 
 
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.




--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Fri, 31 Mar 2017 11:42:20 -0300
"Marcos Douglas B. Santos via Lazarus" <[hidden email]>
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

 
> 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
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list

On Fri, Mar 31, 2017 at 1:18 PM, Mattias Gaertner via Lazarus <[hidden email]> 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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list
On Fri, 31 Mar 2017 15:03:11 -0300
"Marcos Douglas B. Santos via Lazarus" <[hidden email]>
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?

Mattias
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list
On Fri, Mar 31, 2017 at 6:38 PM, Mattias Gaertner via Lazarus <[hidden email]> 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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
Mattias,

On Fri, Mar 31, 2017 at 1:18 PM, Mattias Gaertner via Lazarus
<[hidden email]> 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?
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
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list
On Sun, 2 Apr 2017 00:17:28 -0300
"Marcos Douglas B. Santos via Lazarus" <[hidden email]>
wrote:

>[...] Mattias,
>
> On Fri, Mar 31, 2017 at 1:18 PM, Mattias Gaertner via Lazarus
> <[hidden email]> 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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Managing Packages with many versions

Free Pascal - Lazarus mailing list
On Sun, Apr 2, 2017 at 3:48 AM, Mattias Gaertner via Lazarus
<[hidden email]> wrote:
>> > 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.

>> 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.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus

screenshot.png (16K) Download Attachment