chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Use name from egg file when installing typ


From: Evan Hanson
Subject: Re: [Chicken-hackers] [PATCH] Use name from egg file when installing types and inline files
Date: Sun, 10 Sep 2017 11:56:26 +1200

On 2017-09-09 11:17, Kooda wrote:
Well, actually, I’m not sure what makes more sense. I think it’s
strange that types and inline files are relative paths in the install
script while every other file is an absolute path.

The other thing I find strange, is that the doc says that the
(types-file) and (inline-file) declarations “Specifies that a
"type-database" file should be generated and installed…”, but currently
they don’t produce any code to generate them.

All is left to do so is passing `-ot` and `-oi` to csc, through
(link-options) for example, and thus the .egg file writer can’t put an
absolute path for those options because there is nothing in the .egg
file specification to do so.

OK, so I think there the two questions here are: (1) whether the egg
file should automatically add the "-ot" and "-oi" flags when calling
csc, and (2) whether the generated build and install scripts should use
absolute or relative paths to refer to files. The first question is
about a feature and the second is just an implementation detail.

For the first one, I agree with you that it would be good if there were
a way to do this. Less typing, more consistency, etc. We want to make it
easy for people to include these files. For the second question, I think
that we probably *should* prefix the filenames with the build directory,
just so that all the install(1) invocations are consistent.

I don't think we should worry about supporting absolute paths in either
of the egg file forms, since everything should be relative to the build
root instead.

So indeed the current behaviour makes more sense but I still think it’s
wrong.

Also, what’s the use of the file name overwrite for these two options?
I would think the component name is always the right name.

In any case, I think we need a way to specify whether the types/inline
file should be generated or taken from a manually written file in the
egg source directory.

How about this, using types files as an example?

 - (types-file) means a types file named after the extension should be
   generated and installed.

 - (types-file <filename>) means the file <filename> already exists and
   should only be installed, not generated.

I suppose it would work just as well in the opposite way, too, with the
empty form meaning the file already exists.

Thoughts?

Evan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]