Addon Manager Redesign 2021

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
adrianinsaval
Veteran
Posts: 3148
Joined: Thu Apr 05, 2018 5:15 pm

Re: Addon Manager Redesign 2021

Post by adrianinsaval »

@chennes would it be possible to add a field in the xml where an addon could specify a git branch/tag for a specific versions of FreeCAD? or is that already the case? This made me think about that since otherwise it could be hard to improve or update the help addon in the future since it must be compatible with earlier versions of FreeCAD.
User avatar
chennes
Veteran
Posts: 2239
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager Redesign 2021

Post by chennes »

The package.xml file isn't a good place to put that information, because that file itself is fetched from git, from whatever branch the FreeCAD-Addons repository tells the AM is the primary branch to use. It would probably better to set up a system in the addon flags file:
https://github.com/FreeCAD/FreeCAD-addo ... flags.json
Chris Hennes
Pioneer Library System
adrianinsaval
Veteran
Posts: 3148
Joined: Thu Apr 05, 2018 5:15 pm

Re: Addon Manager Redesign 2021

Post by adrianinsaval »

is that file fetched by the addon manager or is it copied at build time?
User avatar
Zolko
Veteran
Posts: 1794
Joined: Mon Dec 17, 2018 10:02 am

Re: Addon Manager Redesign 2021

Post by Zolko »

adrianinsaval wrote: Tue Jun 28, 2022 12:31 pm would it be possible to add a field in the xml where an addon could specify a git branch/tag for a specific versions of FreeCAD? or is that already the case?
there is a tag about a minimum required FreeCAD version : is that enough for your plan ?

Code: Select all

<freecadmin>0.19.0</freecadmin>
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
User avatar
chennes
Veteran
Posts: 2239
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager Redesign 2021

Post by chennes »

adrianinsaval wrote: Wed Jun 29, 2022 1:32 am is that file fetched by the addon manager or is it copied at build time?
It is fetched by the Addon Manager when it refreshes its cache, and because it's part of the Addon, it's also downloaded when installing the Addon.
Chris Hennes
Pioneer Library System
User avatar
chennes
Veteran
Posts: 2239
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager Redesign 2021

Post by chennes »

Zolko wrote: Wed Jun 29, 2022 7:54 am there is a tag about a minimum required FreeCAD version : is that enough for your plan ?
No, it really would be quite nice to be able to have an Addon specify to FreeCAD which branch to use for a given FreeCAD version, I'm just not certain what the best approach is for it. We are already sort of abusing the notion of a "submodule" in git-speak, since we don't actually use the .gitmodules files the way it was intended. In some ways it seems that what we need is a branch of the FreeCAD-Addons repository itself that is specific to a version of FreeCAD.
Chris Hennes
Pioneer Library System
User avatar
Zolko
Veteran
Posts: 1794
Joined: Mon Dec 17, 2018 10:02 am

Re: Addon Manager Redesign 2021

Post by Zolko »

chennes wrote: Wed Jun 29, 2022 2:46 pm No, it really would be quite nice to be able to have an Addon specify to FreeCAD which branch to use for a given FreeCAD version
I don't agree here:

1) the Addon is started by FreeCAD, therefore it's too late for the addon to specify which FreeCAD version to use. You'd need to jumps through hoops to change this, would complicate things for a benefit that is not clear. This rather looks like a solution in search of a problem

2) this would/could lead to fragmentation inside FreeCAD, meaning that some FreeCAD "stuff" would be incompatible with other FreeCAD "stuff".
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
adrianinsaval
Veteran
Posts: 3148
Joined: Thu Apr 05, 2018 5:15 pm

Re: Addon Manager Redesign 2021

Post by adrianinsaval »

Zolko wrote: Thu Jun 30, 2022 9:18 am 1) the Addon is started by FreeCAD, therefore it's too late for the addon to specify which FreeCAD version to use. You'd need to jumps through hoops to change this, would complicate things for a benefit that is not clear. This rather looks like a solution in search of a problem
I don't understand what you mean by too late? The purpose is to allow for example 0.20 to fetch a version of an add-on that is compatible with 0.20 5 years from now instead of a newer incompatible version. The current system were the master branch is always used does not allow this.
2) this would/could lead to fragmentation inside FreeCAD, meaning that some FreeCAD "stuff" would be incompatible with other FreeCAD "stuff".
That is already the case, some add-ons are not compatible with older versions of FreeCAD, this is hard to avoid since add-ons may want to use newer features/technologies
User avatar
Zolko
Veteran
Posts: 1794
Joined: Mon Dec 17, 2018 10:02 am

Re: Addon Manager Redesign 2021

Post by Zolko »

adrianinsaval wrote: Thu Jun 30, 2022 11:18 am I don't understand what you mean by too late? The purpose is to allow for example 0.20 to fetch a version of an add-on ...
Ah, I misunderstood. I thought it was at runtime, not during installation. Sorry for the confusion

... that is compatible with 0.20, 5 years from now, instead of a newer incompatible version.
wouldn't that add more burden on the developers/maintainers of the addon : should we keep track of which version of the addon is compatible with which version of FreeCAD, and keep those late versions available ?
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
adrianinsaval
Veteran
Posts: 3148
Joined: Thu Apr 05, 2018 5:15 pm

Re: Addon Manager Redesign 2021

Post by adrianinsaval »

As most things I would expect this to be optional and just grab latest master when not specified, also the old versions are almost always available in the git history, we could have a system were we just use a specific format of git tags to identify versions. For example add a FCv020 tag to the commit before you make a breaking change that will only work in >0.21
Post Reply