Page 1 of 1
Why a unique package name per module?
Posted: Sun Apr 11, 2021 5:21 pm
by jgillmanjr
Greetings!
The programmer's guide mentions that the package name should be unique per module, and I'm just curious what the reason is for this?
Admittedly I'm fresh to java (my background is in python), but it seems that unique package names wouldn't be required since modules are wrapped up into individual classes extending VoltageModule.
Thanks for any insight!
-Jason
Re: Why a unique package name per module?
Posted: Mon Apr 12, 2021 1:21 pm
by creart
I assume it's a matter of having unique identifiers for every single package, just as a new class needs a unique name?
Re: Why a unique package name per module?
Posted: Tue Apr 13, 2021 12:38 am
by jgillmanjr
But if the module's class name is unique, wouldn't that mitigate the need for a different package/namespace name per module?
Re: Why a unique package name per module?
Posted: Tue Apr 13, 2021 5:04 am
by creart
I don’t know.. it might have to do with how Cherry works with those modules.. all modules are uploaded to their server and transformed into optimized code (at least that’s what I understand).. so maybe they need the uniqye packages for that.. after all the package name is tested once you run it in VMD, when it exists you get a message..
Re: Why a unique package name per module?
Posted: Thu Apr 15, 2021 4:21 pm
by jgillmanjr
Well, I think I found my answer.
It looks like the product is based on that. As a result, the demo volume module I built and the module I'm currently working on show as the same product, but just different builds.
This seems wonky, but I can at least understand why the different package names are needed.
Re: Why a unique package name per module?
Posted: Thu Apr 15, 2021 5:37 pm
by Steve W
jgillmanjr wrote: ↑Thu Apr 15, 2021 4:21 pm
It looks like the product is based on
that.
that (above) =
this (below)?
creart wrote: ↑Tue Apr 13, 2021 5:04 am
. . .
all modules are uploaded to their server and transformed into optimized code . . .
Just curious. Trying to follow your thread in case I ever want to get into coding modules.
Re: Why a unique package name per module?
Posted: Thu Apr 15, 2021 6:41 pm
by jgillmanjr
Steve,
To clarify, it appears as though the package name is what's used to identify the product in the developer dashboard.
So for example, before I changed the package names of the tutorial volume module and the other one I'm working on, both apparently fell under the same product, but as different builds as seen below.
But now that I gave them their own package names
Hope that helps!
Re: Why a unique package name per module?
Posted: Thu Apr 15, 2021 11:18 pm
by Steve W
jgillmanjr wrote: ↑Thu Apr 15, 2021 6:41 pm
Hope that helps!
Yes, I now understand. Thanks for taking the time to clarify with the images and an explanation of the differences.