[M3devel] examples should not be in PkgInfo.txt

Jay K jay.krell at cornell.edu
Sat Aug 15 06:14:38 CEST 2009


> when it is built 
 
Trivial.
 
> when it is shipped
 
Maybe trivial. An empty directory or with contents?
If it has contents, just ship the contents.
If it is empty, there may or may not be a way currently.
 
 
Generally you shouldn't write anything to the installation during build, only ship.
And if under the influence of overrides, you shouldn't touch the installation at all -- which falls out of not touching during build and ship isn't allowed.
(but maybe for next release this whole override thing goes away -- just clone the existing install and ship to it while building, no need to ever split build from ship)
 
 
You can in general do pretty arbirary things in build and ship.
You are limited by the quake builtins, which are fairly substantial, what you can do by running comamnd lines which is also pretty substantial but a recurring portability hazard (Olaf write some .sh; I write some .cmd or .py; repeat), and what you add to quake, which is basically unlimited, though then a hazard regarding building with old versions, you can probe for what is there with if defined("foo") use foo end.
 
 
I haven't seen that there is a good clean way to add stuff and make it trivially available either at build or ship.
 
I was accidentally doing ship stuff at build time like with the symlinks and stuff.
 
Some folks resort to writing into .m3ship which seems sleazy.
  It is the underlying mechanism, but seems maybe worth abstracting.
  You know -- what if it is open by cm3 and disallowing other writers or has been flushed at other than a line boundary?
 
I think maybe better would be to have .m3ship
 say if exists(m3user.ship)
      include(m3user.ship)
     end
 
or such, and then m3user.ship is where users can write to.
 
or even simply, ship("foo") writes "foo" into .m3ship.
 
There is an ambiguity between declarative and imperative code -- the stuff in .m3ship might be order dependent and you might not know where in the order you are.
 
 
 - Jay


________________________________
> Date: Fri, 14 Aug 2009 19:53:40 -0400
> From: rcoleburn at scires.com
> To: m3devel at elegosoft.com
> Subject: Re: [M3devel] examples should not be in PkgInfo.txt
>
>
>
>
>
>
>
> Agree that they are useful for CM3IDE.
>
>
>
> Is there a way to have CM3IDE ship this folder to the cm3 root, e.g., C:\cm3\examples, when it is built and shipped? Otherwise, user has to know to copy the folder there. This only has to be done once, so copying the folder at the time CM3IDE is built and installed seems logical.
>
>
>
> Examples folder is strictly a set of source packages. There should be no derived files there. When user browses to a particular example in CM3IDE and asks to build it, CM3IDE will create a package containing the source of the example and the derived files in the user's private repository. That way each user gets their own private copy to muck around with.
>
>
>
> Indeed, entire examples folder tree can be marked read-only without any ill-effect because of the way CM3IDE works.
>
>
>
> Regards,
>
> Randy
>
>>>> Olaf Wagner 8/14/2009 12:18 PM>>>
> Quoting Randy Coleburn :
>
>> I see that someone has put some of the examples folder packages into
>> PkgInfo.txt std group.
>>
>> None of these packages in the "examples" folder should go into PkgInfo.txt.
>>
>> Reason is that these are examples meant to be built using CM3IDE.
>> CM3IDE will create a package folder in the user's private repository
>> for the example and build it there locally. We don't want to build
>> and ship these as part of the std distribution. Only the sources
>> are needed. The "examples" folder and its contents need to be
>> copied to the root of your cm3 installation. That's all.
>
> I put them there, because they were not packed into the installation
> archives. They can also not be build with the usual tooling at all.
>
> What's the problem with them being included in the package list?
>
> If they are only useful for cm3ide, they should probably be part of
> that package (i.e. moved from cm3/examples to cm3/m3-sys/cm3ide/examples).
>
> Olaf
> --
> Olaf Wagner -- elego Software Solutions GmbH
> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
> http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
>


More information about the M3devel mailing list