[Gambas-user] Debugging with libraries

Christof Thalhofer chrisml at ...3340...
Tue Feb 2 17:40:41 CET 2016


Am 02.02.2016 um 12:31 schrieb Tobias Boege:

> Pffff, sounds error-prone if *I* had to do it -- and not the nice kind of
> error but the bad kind where you permanently lose files or forget that you
> have still old copies of library sources in some project and wonder why the
> code crashes. 

Therefore I copy them in a folder  ".src/LIB". If it exists, I know,
that I'm debugging a lib in the project.

> If I have to mess with the source trees anyway, I guess this
> suits me better:
> 
>   - In all projects which use the library:
>      - Remove the library dependence,
>      - Symlink to the library source into .src,
>      - Add the components needed by the library sources,
>   - Until satisfied:
>      - Change library from one project,
>      - Check that other projects using the library don't break,
>   - Again in all projects which use the library:
>      - Remove symlinks,
>      - Remove unnecessary components,
>      - Enter library as dependence.
> 
> The benefits being that nothing needs to be copied and the library is
> updated in every project that uses it, so the changes can be checked
> against quickly.

Hmm. That was the thing I've tried first, but somehow Gambas IDE removed
the writable-flag from the sourcefiles I'v symlinked. So I had to fiddle
around with a broken library afterwards.

I did not try if Gambas IDE does that already.

> The problem with this project is that I deliberately didn't overthink the
> interfaces beforehand. I still think this was a good choice because I had
> something usable after a month. Now that I extend the library, I have to
> gradually rewrite portions of it, including interfaces and whole class
> designs, and check against other projects using the library. That's maybe
> a different workflow than you have, e.g. there is no notion of "stable"
> class in my library.

That's normal programmer's life. Permanently there is something you did
not think about before.

:-)

For that I try to keep code as long as possible inside the project, so
it becomes stable by testing over time. And if it's done it can be
shared. But even then sometimes I have to rewrite portions of it and
sometimes also interfaces.

Fortunately I work with Git and can do a fast "git grep" over the whole
sources to find all occurences.


Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20160202/44e5fdd9/attachment.sig>


More information about the User mailing list