Discussion:
[Chicken-users] porting eggs experiences and questions
Jörg F. Wittenberger
2018-08-17 10:33:28 UTC
Permalink
Hi,

I just ported a first egg. (Pigeon-hole, "simple" mailbox with capacity
constraint flow control and no timeouts.)

* Question: what's about the .release-info

This https://wiki.call-cc.org/porting-c4-to-c5 was helpful, but does not
mention the release process.

How would I mark a release for C5?

Any thought on how to have both a C4 and C5 version in the same repo? I'll
have to support C4 for quite a while. Now I wonder how best reorganize the
code to work for both.

* Observation: chicken-install does not install dependencies

This is just odd: The .egg file contains (dependencies srfi-18);
chicken-install did the download but not install it. So compilation failed
until I manually did

chicken-install srfi-18

* chicken-install -n -test

Fails. One needs to actually install first, then run the test.

Better at least warn that we test the installed version, not the
current one. (I recall this bite me before.)

Best: just load the version from the working directory.

Thanks for all the work which went into C5.

/Jörg
Kristian Lein-Mathisen
2018-08-17 12:49:07 UTC
Permalink
Hi Jörg,
Post by Jörg F. Wittenberger
How would I mark a release for C5?
Create a new release-info file and let the chicken core team add it to the
CHICKEN 5 coop.
I both in the same repo, eg nanomsg5.release-info for C5 and
nanomsg.release-info for C4.
Post by Jörg F. Wittenberger
Any thought on how to have both a C4 and C5 version in the same repo? I'll
have to support C4 for quite a while. Now I wonder how best reorganize the
code to work for both.
I've kept C4 support by using cond-expand, like this
<https://github.com/Adellica/chicken-nanomsg/blob/master/nanomsg-module.scm#L43-L46>
:

(import scheme) ;; make sure we have cond-expand
(cond-expand (chicken-5 (import (chicken base) (chicken foreign)))
(else (import chicken foreign)))
Post by Jörg F. Wittenberger
* Observation: chicken-install does not install dependencies
This is just odd: The .egg file contains (dependencies srfi-18);
chicken-install did the download but not install it. So compilation failed
until I manually did
chicken-install srfi-18
That seems like a bug. No error messages after downloading?
Post by Jörg F. Wittenberger
* chicken-install -n -test
Fails. One needs to actually install first, then run the test.
Better at least warn that we test the installed version, not the
current one. (I recall this bite me before.)
Best: just load the version from the working directory.
Thanks for all the work which went into C5.
/Jörg
_______________________________________________
Chicken-users mailing list
https://lists.nongnu.org/mailman/listinfo/chicken-users
Mario Domenech Goulart
2018-08-17 15:02:46 UTC
Permalink
Hi Jörg,
Post by Jörg F. Wittenberger
I just ported a first egg. (Pigeon-hole, "simple" mailbox with
capacity constraint flow control and no timeouts.)
* Question: what's about the .release-info
This https://wiki.call-cc.org/porting-c4-to-c5 was helpful, but does
not mention the release process.
How would I mark a release for C5?
Basically, you need a .release-info file that points to the tarball of
your egg for CHICKEN 5.

Regarding tagging on the same repo, I don't know exactly what apporach
people are using. In svn, as eggs for CHICKEN 4 and 5 are in diferent
directories, and there are directories for tags, the versioning scheme
for eggs for CHICKEN 4 and 5 are completely independent.
Post by Jörg F. Wittenberger
Any thought on how to have both a C4 and C5 version in the same repo?
I'll have to support C4 for quite a while. Now I wonder how best
reorganize the code to work for both.
I'm maintaining all my eggs in the same repo, same branch, same
.release-info file and same versioning scheme for both CHICKEN 4 and 5.
In my experience, that's not difficult.

I don't intend to maintain multiple repositories/branches for each egg,
and I don't intend to phase out my aggs for CHICKEN 4 anytime soon.

In theory, to make your eggs work with both CHICKEN 4 and 5, you just
need an extra .egg file and some `cond-expand' here and there. In the
extreme case where large portions of your code are CHICKEN
version-specific, you can use `cond-expand' to `include' files that are
specific to some particular CHICKEN version. I intend to resort to the
`include' trick for salmonella, for example (a significant part of
salmonella for CHICKEN 4 is not compatible with CHICKEN 5, and
vice-versa).
Post by Jörg F. Wittenberger
* Observation: chicken-install does not install dependencies
This is just odd: The .egg file contains (dependencies srfi-18);
chicken-install did the download but not install it. So compilation
failed until I manually did
chicken-install srfi-18
That's weird. We don't observe this behavior on any of the automated
tests (http://tests.call-cc.org).
Post by Jörg F. Wittenberger
* chicken-install -n -test
Fails. One needs to actually install first, then run the test.
Better at least warn that we test the installed version, not the
current one. (I recall this bite me before.)
Best: just load the version from the working directory.
I think this pretty much depends on how tests are implemented. If they
import things assuming that the eggs are installed, you have to install
them before running tests. Or you can hack your tests to load/import
the code from the source directory.
Post by Jörg F. Wittenberger
Thanks for all the work which went into C5.
All the best.
Mario
--
http://parenteses.org/mario
Jörg F. Wittenberger
2018-08-17 17:09:12 UTC
Permalink
Thanks Mario and Kristian for your responses.
Post by Mario Domenech Goulart
I'm maintaining all my eggs in the same repo, same branch, same
.release-info file and same versioning scheme for both CHICKEN 4 and 5.
That's what I'd want.
Post by Mario Domenech Goulart
In my experience, that's not difficult.
once you know what you're doing ;-)
Post by Mario Domenech Goulart
Post by Jörg F. Wittenberger
* Observation: chicken-install does not install dependencies
This is just odd: The .egg file contains (dependencies srfi-18);
chicken-install did the download but not install it. So compilation
failed until I manually did
chicken-install srfi-18
That's weird. We don't observe this behavior on any of the automated
tests (http://tests.call-cc.org).
It is. But it seems consistent in my setup.

I tried: `chicken-install srfi-13`: this did the download for srfi-14
compiled and failed to install srfi-13.

Next I did `chicken-install srfi-14` and it installed from the download
cache. Then chicken-install srfi-13 succeeded.

Maybe I'm using a weired setup? In order to not confuse c4 and c5 I have no
chicken in my default path. I cleaned up the $PREFIX ("~/c5") and installed
c5rc1 there. Then I added ~/c5/bin to $PATH.
Post by Mario Domenech Goulart
Post by Jörg F. Wittenberger
* chicken-install -n -test
Fails. One needs to actually install first, then run the test.
Better at least warn that we test the installed version, not the
current one. (I recall this bite me before.)
Best: just load the version from the working directory.
I think this pretty much depends on how tests are implemented. If they
import things assuming that the eggs are installed, you have to install
them before running tests. Or you can hack your tests to load/import
the code from the source directory.
What's your recommended way to load/import from the source directory?

Thanks

/Jörg
Jörg F. Wittenberger
2018-08-25 12:01:18 UTC
Permalink
Hi all,

in the meantime I understood why chicken-install would not install
dependencies:

chicken-install -n

While messing around I did not want the egg in the current directory to be
installed. Just the dependencies.

Apparently chicken-install passes the -n switch down to the dependencies it
need to install.

Those are then not installed, which makes chicken-install barf at the
depending eggs.

Maybe it makes more sense to have the -n switch only in effect for the egg
in the current directory while still installing dependencies.

Best

/Jörg
Post by Jörg F. Wittenberger
Post by Mario Domenech Goulart
Post by Jörg F. Wittenberger
* Observation: chicken-install does not install dependencies
This is just odd: The .egg file contains (dependencies srfi-18);
chicken-install did the download but not install it. So compilation
failed until I manually did
chicken-install srfi-18
That's weird. We don't observe this behavior on any of the automated
tests (http://tests.call-cc.org).
It is. But it seems consistent in my setup.
I tried: `chicken-install srfi-13`: this did the download for srfi-14
compiled and failed to install srfi-13.
k***@upyum.com
2018-08-25 17:30:44 UTC
Permalink
Post by Jörg F. Wittenberger
Apparently chicken-install passes the -n switch down to the dependencies it
need to install.
I reported the same thing on IRC today. I think it makes sense and would like
to have a switch that instructs chicken-install to *only* build, and install if -n is
not present, the egg’s dependencies.

I had to resort to some trickery when making an easy build script for Ensemble,
and would have liked such a command flag.

https://www.upyum.com/cgit.cgi/ensemble/tree/build.sh?id=78d4597062984bcaa81279fe79d1be0c90a8970a
See extract_dependencies() and build_normal_deps()
Evan Hanson
2018-08-28 03:22:30 UTC
Permalink
Post by Jörg F. Wittenberger
Maybe it makes more sense to have the -n switch only in effect for the egg
in the current directory while still installing dependencies.
That makes sense to me.

In the case where people don't want dependencies to be installed either,
they can set CHICKEN_INSTALL_REPOSITORY and CHICKEN_REPOSITORY_PATH to
install into a throwaway repository. It's not as easy to go the other
direction.

Evan

Loading...