dbuenzli / topkg

The transitory OCaml software packager
http://erratique.ch/software/topkg
ISC License
69 stars 25 forks source link

Remember build configuration ? #55

Closed dbuenzli closed 7 years ago

dbuenzli commented 8 years ago

Currently a call to topkg build CONF..., does not remember the build configuration, this means that for example we cannot test if the tests are up-to-date when we do a topkg test since we no longer know the build system invocation. I suspect some frustration may come out of this in the future with people needing to do a topkg build && topkg test or even a topkg build CONF... && topkg test which means that we need again ad-hoc side shell-scripts and/or makefiles.

But this involves introducing STATE, iiiiik.

paurkedal commented 8 years ago

I think it would be nicer if Topkg read the configuration from a file, say pkg/pkg.config, if it exists. I would just edit this by hand, possible have several which I could symlink between. This file should of course not be committed to RCS, but one containing samples/defaults/documentation could.

If somebody still want topkg to act statefully, it could provide a lightweight config subcommand which would create or overwrite pkg/pkg.config. This may also simplify build rules.

dbuenzli commented 7 years ago

I suspect some frustration may come out of this in the future with people needing to do a topkg build && topkg test

It seems people have overcome this frustration by using Makefiles. Though that conflicts with https://github.com/dbuenzli/topkg/issues/60, I'd say this should only be for the most complex packages.

Let's keep the system simple.