... a number of issues
> What about "examples" (pure examples, stored in the OE) that require a package?
I envisage only the Lazarus Examples stored in OE, examples belonging to external packages belong in external packages.
> -- 3) A package, unknown to the IDE (maybe removed, but example DB not yet updated) -> This would be an error, but needs handling.
The local Examples dbase could be updated daily (when user opens Example Window) or manually. If they remove a package and later that day expect to find the associated Example there, well, and error message is all we can do. But the point is, the Example has gone when the OPM has gone.
> IMHO we need at least the ability to specify "required packages" for the example.
While agree, I think it can be done with just FP defines in the project code and a mention in the Project Description, "This demo requires Lazarus 2.0.12 or later".
We are not trying to make an unattended Build System, a new user using an old Lazarus will learn something from the experience.
> But the design of the meta file should allow to easily add them, including backward compatibilty.
Right now, due to its simplicity, the meta data is just plain text. If we intend to make it, the meta data, more complicated, then probably need to move to xml or json etc. My demo uses json for the master.meta file.
> I would expect that contributors maintain their own GIT repo. (I guess we start with "git repo" as storage, probably keep it at this, but extension would be an issue for later...)
See earlier discussion with Trev about safety. Suppose I have an example in my own github repo, there is a link in the Lazarus Repo to it. It demonstrates how to read all files on disk into a TStringList. Been there for years. I have too much to drink one night and add a two lines -
for St in STL do
deletefile(St);
Or an example that encrypts the user's disk until they find some bitcoin ....
> So, it could be quite likely we can re-use some of the code from the OPM package. (just pass in our OE Url / some config/opts)
That side of it is all working now in the demo I mentioned yesterday. Its quite easy....
> Like OPM, we could also allow the user, to get the latest example from the contributor. This would of course not have been reviewed by us.
With an appropriate warning / disclaimer.
(disregarding the next section because -
* I do not believe we should be automatically pointing to repositories out of our control
* required versions of FPC/Lazarus can be handled in project code
Martin, I suspect you see this facility as supporting large code base projects. I don't, its about small, self contained demonstrations of how to do one particular thing each. Nothing here should be an "application", just enough code to compile and demonstrate one useful trick. Most of the existing Examples are small, all thats lacking is a review and meta data.)Davo