Re: [Chicken-users] porting eggs experiences and questions

2018-08-27 Thread Evan Hanson
On 2018-08-25 14:01, Jörg F. Wittenberger wrote:
> 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

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] porting eggs experiences and questions

2018-08-25 Thread kooda
Jörg F. Wittenberger  wrote:
> 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()

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] porting eggs experiences and questions

2018-08-25 Thread Jörg F . Wittenberger

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

On Aug 17 2018, Jörg F. Wittenberger wrote:


* 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.



___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] porting eggs experiences and questions

2018-08-17 Thread Jörg F . Wittenberger

Thanks Mario and Kristian for your responses.

On Aug 17 2018, Mario Domenech Goulart wrote:


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.


In my experience, that's not difficult.


once you know what you're doing ;-)


* 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.



* 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


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] porting eggs experiences and questions

2018-08-17 Thread Mario Domenech Goulart
Hi Jörg,

On 17 Aug 2018 12:33:28 +0200 Jörg F. Wittenberger 
 wrote:

> 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.

> 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).

> * 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).

> * 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.

> Thanks for all the work which went into C5.

All the best.
Mario
-- 
http://parenteses.org/mario

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] porting eggs experiences and questions

2018-08-17 Thread Kristian Lein-Mathisen
Hi Jörg,


> 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.


> 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

:

(import scheme) ;; make sure we have cond-expand
(cond-expand (chicken-5 (import (chicken base) (chicken foreign)))
 (else (import chicken foreign)))


>
> * 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?


> * 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
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users