Actually the idea of configurations (sets of package to load) is definitely part of Goran roadmap (He's written about it on the list before).
I think it'll probably turn out both pretty simple, and very, very useful.
One small problem with using scripts is composition - how do you handle a script that loads two scripts, that have a shared requirement? with scripts, you load it twice. Configurations should handle that better.
Daniel
Stephen Pair spair@acm.org wrote:
Good...it sounds like the simplest thing that could possibly work. It's important I think to keep these things nicely separated from packages (as they have the potential to grow permutationally with the number of packages).
- Stephen
-----Original Message----- From: squeak-dev-admin@lists.squeakfoundation.org [mailto:squeak-dev-admin@lists.squeakfoundation.org]On Behalf Of Ned Konz Sent: Tuesday, November 19, 2002 10:03 PM To: squeak-dev@lists.squeakfoundation.org Subject: Re: DVS (thanks!) & SqueakMap thoughts
On Tuesday 19 November 2002 07:05 pm, Stephen Pair wrote:
Sure, but what I would like is to be able to put the various packages on SqueakMap separately and then have "bundles" that are essentially just scripts that load a set of packages in a specific order.
That should be easy to do with plain ST fileins. The SqueakMap API lets you download and install packages easily. We've discussed doing this before to make 'image configurations' of various kinds that load a number of different packages in order.
It would also be nice if SqueakMap would let me categorize these things separately from reqular packages.
It should be possible to add a "package format" category for these.
-- Ned Konz http://bike-nomad.com GPG key ID: BEEA7EFE
Ned Konz wrote:
Actually the idea of configurations (sets of package to load) is definitely part of Goran roadmap (He's written about it on the list before).
I think it'll probably turn out both pretty simple, and very, very useful.
One small problem with using scripts is composition - how do you handle a script that loads two scripts, that have a shared requirement? with scripts, you load it twice. Configurations should handle that better.
Daniel
I'm not suggesting that load scripts would solve everything...just that they would be useful. DVS doesn't solve all the thorny issues of packages, bug darned if isn't incredibly useful.
But, regarding this specific issue, I would not write any load scripts that loaded other load scripts. Load scripts would only load packages (which shouldn't be loading other packages). In this case you would have a lot of cases where load scripts were duplicating entire sets of packages (so no reuse), but on the other hand it keeps things simple and dumb until something better can be implemented.
- Stephen
This post is LONG, but it explains how I intend to deal with dependencies in SM.
"Stephen Pair" spair@acm.org wrote:
Ned Konz wrote:
Actually the idea of configurations (sets of package to load) is definitely part of Goran roadmap (He's written about it on the list before).
I think it'll probably turn out both pretty simple, and very, very useful.
One small problem with using scripts is composition - how do you handle a script that loads two scripts, that have a shared requirement? with scripts, you load it twice. Configurations should handle that better.
Daniel
I'm not suggesting that load scripts would solve everything...just that they would be useful. DVS doesn't solve all the thorny issues of packages, bug darned if isn't incredibly useful.
But, regarding this specific issue, I would not write any load scripts that loaded other load scripts. Load scripts would only load packages (which shouldn't be loading other packages). In this case you would have a lot of cases where load scripts were duplicating entire sets of packages (so no reuse), but on the other hand it keeps things simple and dumb until something better can be implemented.
- Stephen
Let me share the solution I am mulling over in my head for this. I have been bouncing these ideas on Daniel, Ned, Doug, Roel and more. It goes like this:
First, I want to introduce the term "package release" meaning "SSP 1.2". A specific version of a package.
There are IMHO two distinct problems we want to solve:
1. To be able to post a "load script" (earlier I called this an "image configuration" but that was maybe a tad too specific) that when installed installs numerous other package releases in a specified order into the image. This can be used for: 1. Distros. A full mega image with whatever you like to distribute. 2. Kernel building. The load script will then act as a Make file to load packages on top of the microkernel image from Dan and the boys. 3. Tasks. A load script can easily install a whole bunch of stuff that someone thinks is a good "bunch of stuff" to have for a specific task. Like "Web Application Development" including Seaside, Comanche, SSP etc.
2. To be able to describe the minimal requirements a package needs in order to function. I call this a "package configuration". Given a query of for example a set of packages we want to install, we can traverse these published package configurations and figure out what other package releases we need to include and if there are conflicts etc.
Ok, what is a "load script" then? Well, as some of you have already described it is simply a .st file that uses the SM API to load packages/package releases into the image. Having it as a script gives us full flexibility - we can install a package release, patch it up, fix some nuisance, load the next etc. It also makes a "load script" nothing else than a package.
But currently SM can only load packages and not specific package releases. That is why we need to add support for that. When we have that we can probably write:
SMSqueakMap default installPackageNamed: 'SSP' version: '1.0'
...or something similar. If we follow the convention that a package release is immutable (we can't really promise that today since the actual packages aren't stored at SM) this would let us create "immutable" load scripts too. If it only loads specific package releases in a specific order then the end result will always be the same.
Now - a load script can also do dynamic stuff like for example load the newest available package or ask the user for more direction etc. So, we would probably like to distinguish between a "dynamic load script" and a "static load script" or something like that. Still, just a category on SM so the "load script" maintainer gives us his word.
Ok, so a load script is nothing more than a .st package with a few more categories on it. Neat! The only thing missing from doing this today is the unability to specify a specific package release. But otherwise this is doable today - and I have already added categories for this!
Fine, what the heck is a package configuration then? It is a tested minimal setup for a specific package release to work. So it goes something like this in english:
"I Göran Hultgren have verified to my abilities that package release Mungo 1.3 works fine with minimal required package releases Bimbo 2.4 and Zingo 1.02."
Notes: 1. A package configuration is not a script. It is declarative. Otherwise we can not use them for dependency analysis and conflict detection etc. 2. For a given package release (Mungo 1.3) there can be numerous package configurations by different people - the maintainer of Mungo but also from dope heads like Göran Hultgren. 3. A package configuration is published by a person. You can choose to trust him/her or not. Or you can choose to only trust the maintainer of Mungo and thus ignore package configurations from other people. 4. A package configuration is a tested setup for one specific package release. The above does not say if Zingo works ok, only that Mungo works according to Göran. 5. A package configuration *only* lists package releases, not packages. That is after all exactly what Göran tested - he can not make any promises for using Mungo 1.3 with Zingo 2.0.
Ok, given these package configurations we can traverse them and figure out what other package releases are needed and if this presents us with conflicts. And there will be conflicts! Since we yet typically can not have Zingo 2.0 at the same time as Zingo 1.02 we will want to deal with the conflicts. How? Well, if we add one more little thing this can actually be helped a lot:
For each package release we let the maintainer categorize the new release in respect to how much it has changed relative to the previous release. I call this the "compatibility level" of a package release. Given 6 levels (or more/less, I will not describe them in detail here) we can then give the user advice like:
"Hey, Mungo 1.3 has a dependency conflict with Pingu 1.2. They both rely on Zingo but Pingu has only been verified to work with Zingo 2.0. According to the compatibility level of Zingo 2.0 it is categorized as *compatible* (=level 4, changes have been made but the maintainer says he hasn't changed the API so it should work), would you like to use that instead?"
And then the user can say, hey - hit me. It could also have said that,
"Hey, Houston. We have a problem. Mungo 1.3 has a dependency conflict with Pingu 1.2. They both rely on Zingo but Pingu has only been verified to work with Zingo 2.0. Zingo 2.0 is categorized as *non compatble* (=level 6, the maintainer promises us that there is no chance in hell that it is compatible, the API is totally new) so we are basically up shit creek. Go have some coffee?"
Ok, this turned into a long post. Note also that the two concepts outlined above have a nice property - since a "load script" is a package it will be versionable. No strange things there.
And since a "package configuration" only refers to package releases (which are immutable) they do not need to be versioned I think - it there was something wrong with it, just change it. And a "package configuration" is not a package because they differ in a few important ways:
1. They are not installable code. They do not refer to something downloadable etc. 2. They are connected to a specific package release. That is not something a package is.
etc. So this is a new beast. But load scripts are not.
Anyway, how does it sound?
Daniel has been bugging me with trying to unify these two concepts but I like them separated and simple. Note that a "load script" can of course use the package configurations through the API of SM. Note also that a load script can of course use other load scripts - they are after all just packages. In that respect only our imagination sets the limits.
Note also that a package configuration is not "composable" or anything - it's a simple list (possibly ordered) of package releases, nothing else. Maybe we could let it have a Composite pattern and let it refer to other package configurations - but perhaps it will just make things complicated.
regards, Göran
Goran --
Are you planning to use something like Stephen Pair's VersionNumber package, to encapsulate version info? Of course that would create a dependency of the SqueakMap package on another package... :)
I notice that right now SMCard>>currentVersion: expects a String. As we move deeper into package version dependencies/configurations/conflicts etc. it seems like Version objects of some kind might make for more informative debugging than just Strings.
goran.hultgren@bluefish.se wrote:
This post is LONG, but it explains how I intend to deal with dependencies in SM.
Brent Vukmer bvukmer@blackboard.com wrote:
Goran --
Are you planning to use something like Stephen Pair's VersionNumber package, to encapsulate version info? Of course that would create a
Yes. I have already talked with Stephen about that. No point in not doing it. But that will be the automatic number not changeable by the registrant. We also need a simple String so that people can still use their own schemes for version naming.
dependency of the SqueakMap package on another package... :)
Well, if I do it in one big swoop then we will have support for that, right! :-) Nice bootstrapping there.
I notice that right now SMCard>>currentVersion: expects a String. As we move deeper into package version dependencies/configurations/conflicts etc. it seems like Version objects of some kind might make for more informative debugging than just Strings.
Yes, but they are a complement - not a replacement. People still want to have a nice readable label. But internally we want to have a nice number like Stephen has implemented.
regards, Göran
hi goran
There are IMHO two distinct problems we want to solve:
- To be able to post a "load script" (earlier I called this an "image
configuration" but that was maybe a tad too specific) that when installed installs numerous other package releases in a specified order into the image. This can be used for:
- Distros. A full mega image with whatever you like to distribute.
- Kernel building. The load script will then act as a Make file to
load packages on top of the microkernel image from Dan and the boys. 3. Tasks. A load script can easily install a whole bunch of stuff that someone thinks is a good "bunch of stuff" to have for a specific task. Like "Web Application Development" including Seaside, Comanche, SSP etc.
- To be able to describe the minimal requirements a package needs in
order to function. I call this a "package configuration". Given a query of for example a set of packages we want to install, we can traverse these published package configurations and figure out what other package releases we need to include and if there are conflicts etc.
Call it prerequisite ;)
Ok, what is a "load script" then? Well, as some of you have already described it is simply a .st file that uses the SM API to load packages/package releases into the image. Having it as a script gives us full flexibility - we can install a package release, patch it up, fix some nuisance, load the next etc. It also makes a "load script" nothing else than a package.
But currently SM can only load packages and not specific package releases. That is why we need to add support for that. When we have that we can probably write:
SMSqueakMap default installPackageNamed: 'SSP' version: '1.0'
...or something similar. If we follow the convention that a package release is immutable (we can't really promise that today since the actual packages aren't stored at SM) this would let us create "immutable" load scripts too. If it only loads specific package releases in a specific order then the end result will always be the same.
Now - a load script can also do dynamic stuff like for example load the newest available package or ask the user for more direction etc. So, we would probably like to distinguish between a "dynamic load script" and a "static load script" or something like that. Still, just a category on SM so the "load script" maintainer gives us his word.
Ok, so a load script is nothing more than a .st package with a few more categories on it. Neat! The only thing missing from doing this today is the unability to specify a specific package release. But otherwise this is doable today - and I have already added categories for this!
Fine, what the heck is a package configuration then? It is a tested minimal setup for a specific package release to work. So it goes something like this in english:
"I Gˆran Hultgren have verified to my abilities that package release Mungo 1.3 works fine with minimal required package releases Bimbo 2.4 and Zingo 1.02."
Notes:
- A package configuration is not a script. It is declarative.
Otherwise we can not use them for dependency analysis and conflict detection etc. 2. For a given package release (Mungo 1.3) there can be numerous package configurations by different people - the maintainer of Mungo but also from dope heads like Gˆran Hultgren. 3. A package configuration is published by a person. You can choose to trust him/her or not. Or you can choose to only trust the maintainer of Mungo and thus ignore package configurations from other people. 4. A package configuration is a tested setup for one specific package release. The above does not say if Zingo works ok, only that Mungo works according to Gˆran. 5. A package configuration *only* lists package releases, not packages. That is after all exactly what Gˆran tested - he can not make any promises for using Mungo 1.3 with Zingo 2.0.
Ok, given these package configurations we can traverse them and figure out what other package releases are needed and if this presents us with conflicts. And there will be conflicts! Since we yet typically can not have Zingo 2.0 at the same time as Zingo 1.02 we will want to deal with the conflicts. How? Well, if we add one more little thing this can actually be helped a lot:
For each package release we let the maintainer categorize the new release in respect to how much it has changed relative to the previous release. I call this the "compatibility level" of a package release. Given 6 levels (or more/less, I will not describe them in detail here) we can then give the user advice like:
"Hey, Mungo 1.3 has a dependency conflict with Pingu 1.2. They both rely on Zingo but Pingu has only been verified to work with Zingo 2.0. According to the compatibility level of Zingo 2.0 it is categorized as *compatible* (=level 4, changes have been made but the maintainer says he hasn't changed the API so it should work), would you like to use that instead?"
And then the user can say, hey - hit me. It could also have said that,
"Hey, Houston. We have a problem. Mungo 1.3 has a dependency conflict with Pingu 1.2. They both rely on Zingo but Pingu has only been verified to work with Zingo 2.0. Zingo 2.0 is categorized as *non compatble* (=level 6, the maintainer promises us that there is no chance in hell that it is compatible, the API is totally new) so we are basically up shit creek. Go have some coffee?"
Ok, this turned into a long post. Note also that the two concepts outlined above have a nice property - since a "load script" is a package it will be versionable. No strange things there.
And since a "package configuration" only refers to package releases (which are immutable) they do not need to be versioned I think - it there was something wrong with it, just change it. And a "package configuration" is not a package because they differ in a few important ways:
- They are not installable code. They do not refer to something
downloadable etc. 2. They are connected to a specific package release. That is not something a package is.
etc. So this is a new beast. But load scripts are not.
Anyway, how does it sound?
Daniel has been bugging me with trying to unify these two concepts but I like them separated and simple. Note that a "load script" can of course use the package configurations through the API of SM. Note also that a load script can of course use other load scripts - they are after all just packages. In that respect only our imagination sets the limits.
Note also that a package configuration is not "composable" or anything
it's a simple list (possibly ordered) of package releases, nothing else. Maybe we could let it have a Composite pattern and let it refer to other package configurations - but perhaps it will just make things complicated.
regards, Gˆran
Dr. Stéphane DUCASSE (ducasse@iam.unibe.ch) http://www.iam.unibe.ch/~ducasse/ "if you knew today was your last day on earth, what would you do different? ... especially if, by doing something different, today might not be your last day on earth" Calvin&Hobbes
Stephane,
you cite far too much of the original post. Please stop doing that, so I can read your posts.
Thanks, -Simon
Göran wrote:
Notes:
- A package configuration is not a script. It is declarative. Otherwise
we can not use them for dependency analysis and conflict detection etc.
If you design the API well enough the "load script" can be as good as an exclusively declarative syntax. For example instead of being so explicit in the load script:
SMSqueakMap default installPackageNamed: 'SSP' version: '1.0'
We could write:
(PackageConfiguration new:
Comanche 5.0 SSP 1.0 Seaside 2.0 )) load !
But, I'd say just get the ability to have multiple versions of a package on SqueakMap right now and let's play with that for a few weeks first. Next we might want to express package pre-reqs (to specific versions of a package). Package configs would override any expressed pre-req (for example, in the above scenario Seaside 2.0 might have a pre-req of Comanche 4.0, but our package config overrides that and is loading Comanche 5.0 instead).
- Stephen
"Stephen Pair" spair@acm.org wrote:
Göran wrote:
Notes:
- A package configuration is not a script. It is declarative. Otherwise
we can not use them for dependency analysis and conflict detection etc.
If you design the API well enough the "load script" can be as good as an exclusively declarative syntax. For example instead of being so explicit in the load script:
SMSqueakMap default installPackageNamed: 'SSP' version: '1.0'
We could write:
(PackageConfiguration new:
Comanche 5.0 SSP 1.0 Seaside 2.0 )) load !
Yes, I will consider this type of design. Note though that I don't want to restrict the load scripts much - I want them to be very flexible and instead let the "package configurations" take the hit of being strict and declarative and thus easily used for dependency analysis and conflict detection.
regards, Göran
Hi
I agree with daniel. I think that configurations should be a place that analysis tools can use for checking dependencies and other cycle. If you have that in plain code this will be difficult.
Stef On mercredi, novembre 20, 2002, at 09:33 am, danielv@netvision.net.il wrote:
Actually the idea of configurations (sets of package to load) is definitely part of Goran roadmap (He's written about it on the list before).
I think it'll probably turn out both pretty simple, and very, very useful.
One small problem with using scripts is composition - how do you handle a script that loads two scripts, that have a shared requirement? with scripts, you load it twice. Configurations should handle that better.
Daniel
Stephen Pair spair@acm.org wrote:
Good...it sounds like the simplest thing that could possibly work. It's important I think to keep these things nicely separated from packages (as they have the potential to grow permutationally with the number of packages).
- Stephen
-----Original Message----- From: squeak-dev-admin@lists.squeakfoundation.org [mailto:squeak-dev-admin@lists.squeakfoundation.org]On Behalf Of Ned Konz Sent: Tuesday, November 19, 2002 10:03 PM To: squeak-dev@lists.squeakfoundation.org Subject: Re: DVS (thanks!) & SqueakMap thoughts
On Tuesday 19 November 2002 07:05 pm, Stephen Pair wrote:
Sure, but what I would like is to be able to put the various packages on SqueakMap separately and then have "bundles" that are essentially just scripts that load a set of packages in a specific order.
That should be easy to do with plain ST fileins. The SqueakMap API lets you download and install packages easily. We've discussed doing this before to make 'image configurations' of various kinds that load a number of different packages in order.
It would also be nice if SqueakMap would let me categorize these things separately from reqular packages.
It should be possible to add a "package format" category for these.
-- Ned Konz http://bike-nomad.com GPG key ID: BEEA7EFE
Dr. Stéphane DUCASSE (ducasse@iam.unibe.ch) http://www.iam.unibe.ch/~ducasse/ "if you knew today was your last day on earth, what would you do different? ... especially if, by doing something different, today might not be your last day on earth" Calvin&Hobbes
squeak-dev@lists.squeakfoundation.org