You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Christofer Dutz <ch...@c-ware.de> on 2020/12/14 18:57:00 UTC

[DISCUSS] [PLC4Go] to "internal" or not to "internal"?

Hi all,

I am currently struggling a bit with myself here.

Go has a "feature" where you can put code in an "internal" directory. This code is then not accessible from the outside.
So if you have a dependency to a module you can only access code that is not in an "internal" directory.

This allows us to force the user to use only the core API of PLC4Go.

Now I would like to work on some discovery code ... for that I would like to use the genrated code. Unfortunately this is not possible.

So I'm a bit torn here now ... we have this cool API and even cooler generated code.
However if someone would want to use that generated code to do something cool, he has to copy everything.

So for my discovery experiments I have to duplicate the generated code, which sort of sucks.

I thought if I moved them to a public package, but add some "dangerzone" (or whatever) directory as the root, it could encourage people to NOT use it.

What do you think?

Chris


AW: [DISCUSS] [PLC4Go] to "internal" or not to "internal"?

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi all,

The more I think of it, the more I come to the conclusion to leave things in the "internal" and to duplicate the code. The reason ist hat even if I'm currently playing around with the code, it still is my goal to bring the code back tot he main repo. 

Perhaps not instantly, but as soon as I'm happy with my experiments and it's time to start fleshing out the PLC4X discovery API.

Chris


-----Ursprüngliche Nachricht-----
Von: Christofer Dutz <ch...@c-ware.de> 
Gesendet: Montag, 14. Dezember 2020 19:57
An: dev@plc4x.apache.org
Betreff: [DISCUSS] [PLC4Go] to "internal" or not to "internal"? 

Hi all,

I am currently struggling a bit with myself here.

Go has a "feature" where you can put code in an "internal" directory. This code is then not accessible from the outside.
So if you have a dependency to a module you can only access code that is not in an "internal" directory.

This allows us to force the user to use only the core API of PLC4Go.

Now I would like to work on some discovery code ... for that I would like to use the genrated code. Unfortunately this is not possible.

So I'm a bit torn here now ... we have this cool API and even cooler generated code.
However if someone would want to use that generated code to do something cool, he has to copy everything.

So for my discovery experiments I have to duplicate the generated code, which sort of sucks.

I thought if I moved them to a public package, but add some "dangerzone" (or whatever) directory as the root, it could encourage people to NOT use it.

What do you think?

Chris