Discussion:
[Pharo-users] subpackages in P7
Roelof Wobben
2018-11-27 08:33:10 UTC
Permalink
Hello,

Right now I have three seperate packages.

Project
Project-test
Project-Actions


Is it possible in P7 to have something like this

Project
---   Tests
----  Actions

and if so, how to I make it work,
Esteban Lorenzano
2018-11-27 09:47:57 UTC
Permalink
Yes, you can :)
(But I would recommend it doing it with tests)

Usually, what you do is to create your package “Project” and then inside that package you can add the tags “test” and “Actions”,

But now you already have three packages, and you want to move, for example “Project-Actions” into “Project”. To do this you need to select “Project-Action” and with right click select the option “extras” in your context menu. From there, you need to select “demote to package with tag”. This will move all Project-Action package into “Project” package, “Action” tag.

Cheers,
Esteban
Post by Roelof Wobben
Hello,
Right now I have three seperate packages.
Project
Project-test
Project-Actions
Is it possible in P7 to have something like this
Project
--- Tests
---- Actions
and if so, how to I make it work,
Roelof Wobben
2018-11-27 14:03:29 UTC
Permalink
Thanks,

So better is leave it this way. So three seperate packages as I
understand you well.

Roelof
Post by Esteban Lorenzano
Yes, you can :)
(But I would recommend it doing it with tests)
Usually, what you do is to create your package “Project” and then inside that package you can add the tags “test” and “Actions”,
But now you already have three packages, and you want to move, for example “Project-Actions” into “Project”. To do this you need to select “Project-Action” and with right click select the option “extras” in your context menu. From there, you need to select “demote to package with tag”. This will move all Project-Action package into “Project” package, “Action” tag.
Cheers,
Esteban
Post by Roelof Wobben
Hello,
Right now I have three seperate packages.
Project
Project-test
Project-Actions
Is it possible in P7 to have something like this
Project
--- Tests
---- Actions
and if so, how to I make it work,
Esteban Lorenzano
2018-11-27 14:32:29 UTC
Permalink
Post by Roelof Wobben
Thanks,
So better is leave it this way. So three seperate packages as I understand you well.
I just said I would keep “tests” separated. The rest I do not have any opinion :)

Esteban
Post by Roelof Wobben
Roelof
Post by Esteban Lorenzano
Yes, you can :)
(But I would recommend it doing it with tests)
Usually, what you do is to create your package “Project” and then inside that package you can add the tags “test” and “Actions”,
But now you already have three packages, and you want to move, for example “Project-Actions” into “Project”. To do this you need to select “Project-Action” and with right click select the option “extras” in your context menu. From there, you need to select “demote to package with tag”. This will move all Project-Action package into “Project” package, “Action” tag.
Cheers,
Esteban
Post by Roelof Wobben
Hello,
Right now I have three seperate packages.
Project
Project-test
Project-Actions
Is it possible in P7 to have something like this
Project
--- Tests
---- Actions
and if so, how to I make it work,
Peter Uhnak
2018-11-27 16:30:12 UTC
Permalink
The main benefit of using separate packages instead of tags is that you can
choose what to load.

That's why MyPackage-Test is best kept separate, because when other project
is loading your project, they don't need to load such package (which can
speed up dependency loading and makes for smaller images).

As changing it in either direction is usually simple, don't worry about not
using the "right" style.

Peter
Post by Roelof Wobben
Post by Roelof Wobben
Thanks,
So better is leave it this way. So three seperate packages as I
understand you well.
I just said I would keep “tests” separated. The rest I do not have any
opinion :)
Esteban
Post by Roelof Wobben
Roelof
Post by Esteban Lorenzano
Yes, you can :)
(But I would recommend it doing it with tests)
Usually, what you do is to create your package “Project” and then
inside that package you can add the tags “test” and “Actions”,
Post by Roelof Wobben
Post by Esteban Lorenzano
But now you already have three packages, and you want to move, for
example “Project-Actions” into “Project”. To do this you need to select
“Project-Action” and with right click select the option “extras” in your
context menu. From there, you need to select “demote to package with tag”.
This will move all Project-Action package into “Project” package, “Action”
tag.
Post by Roelof Wobben
Post by Esteban Lorenzano
Cheers,
Esteban
Post by Roelof Wobben
Hello,
Right now I have three seperate packages.
Project
Project-test
Project-Actions
Is it possible in P7 to have something like this
Project
--- Tests
---- Actions
and if so, how to I make it work,
Sean P. DeNigris
2018-12-01 02:50:06 UTC
Permalink
Post by Peter Uhnak
That's why MyPackage-Test is best kept separate, because when other project
is loading your project, they don't need to load such package
Just to give another angle, while everything said in this thread is true, I
typically start with a monolithic package + sub tags and only split the
package if forced to. I view premature splitting as similar to premature
optimization. There is a cost of increased complication with dependencies
and related management.



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Loading...