Open thkoch2001 opened 9 years ago
I am afraid none of your points would really work, AFAICS:
How do other self hosting languages (Haskell, Scala?) do it?
I've not yet worked on any compiled package in Debian. So I don't want to give false informations on how other debian packages solve this. However I believe that bootstrapping Frege from Java Source files is still beneficial.
In some sense, yes:
I am sorry this all sounds that terrible, It's just that I see no easy way, and don't want to hide the technical difficulties that I see.
I see the value, and appreciate it, in building everything from sources. But it is simply difficult with self-hosting compilers.
Also, I would anticipate that at some point Frege's compiler will move from generating Java to generating JVM bytecode, like most other compilers, so any thoughts of blessing the generated Java source code as somehow "official" in any way seems completely wrong-headed to me.
That might open a new issue. Is Frege able to produce reproducible builds? https://wiki.debian.org/ReproducibleBuilds/About
Debian aims to have byte for byte identical builds of its packages independently of the time or machine. Is the bytecode produced by Frege identical in two subsequent builds of the same source code?
Reproducability is not a must have to enter the debian archive but it's a good thing to aim for.
No, it's not.
For one, we have a time stamp of the time of compilation.
And then, as mentioned before, the compiler generates a lot of synthetic symbols (not just local variables) using a unique number generator. The state of that number generator is not deterministic in case of parallel builds. But those builds are the way to go if you want to compile some program like the compiler that consists of many modules, since it figures out the dependency order and thus which modules can be compiled when and which ones can be build concurrently.
To be sure, the generated programs are identical up to renamings of certan variables. But I guess that is not what is looked for.
It seems that guys from GHC will have to do some changes to implement deterministic builds: https://ghc.haskell.org/trac/ghc/ticket/4012
Would it be possible to put a pre-built compiler in the source package? That's what the rustc Debian package does: https://sources.debian.net/src/rustc/1.6.0%2Bdfsg1-2/dl/
You mean the java files? Sure, but this would get fairly big. Surely not less than 100MB.
Isn't https://github.com/Frege/frege/releases/download/3.23.288/frege3.23.422-ga05a487.jar all that's needed? It's less than 20MB.
Now, option 2 is exactly what we have already: Access to all versions of the sources through git, and a recent enough compiler to compile HEAD in the releases area.
As mentioned in #170, debian (and other distros) have good reasons to build everything from source. This is difficult (but not impossible) if something depends on itself for being built.
Are there ways how Frege could become easier to build without Frege? Some Ideas: