[Gambas-user] Share code across projects
Benoît Minisini
gambas at ...1...
Sun Jan 24 17:49:51 CET 2016
Le 24/01/2016 17:17, Tobias Boege a écrit :
> Hi everybody,
>
> with the semester break upcoming, I plan to supplement a project of mine
> with some other applications in which I want to use classes from the
> project. I have not, if memory serves, written any "local" components yet.
> By "local" I mean a component which is *not* installed into /usr/lib/gambas3.
>
>>From what I remember from other threads, I could:
> - symlink source files around,
> - copy source files around,
> - install the project to /usr/lib/gambas3, or
> - create a Library.
>
> I don't really want to copy source files as I presume they will change
> considerably during development. The symlink solution is kind of dirty and
> makes the projects less easy to give to others. I would prefer not to touch
> /usr/lib/gambas3 for some private project of very limited scope (i.e. it is
> way too specific to lie amongst the general components). As I imagine, using
> a library becomes messy, too, if it should be shared by multiple projects.
> Also I couldn't really share my project because the library path is absolute
> and won't work on somebody else's computer (right?).
>
> How are you others doing this? Did you notice or can you imagine any problems
> with your way of doing it? Any arguments in favour of the library approach?
>
> I think a user-specific directory for custom components would be nice. It
> would be a standard path relative to a user's home directory which is
> taken into account by the IDE (when it lists the installed components) and
> the interpreter (when it loads components). Or is that considered a security
> risk, Benoit?
>
> Regards,
> Tobi
>
User-specific directory for components was existing before but has been
removed.
I think that custom components (in the sense of Gambas) can be a
security risk, but it is above all a management mess.
Moreover, as I said elsewhere, for me components are part of the
language, it's like "interpreter drivers".
So I'd prefer using libraries for that.
But to fit your needs, I have to enhance the libraries support with:
- The ability to share libraries between different projects without
having to put everything in the same directory.
- The ability to explicitly load a library from any path.
What do you think?
--
Benoît Minisini
More information about the User
mailing list