-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changes in lib/oper1.g
#4417
Comments
I agree that in principle it would be better if no generated files were in the repository, including the Thing is, when I rewrote our build system, I contemplated doing all that, but ultimately decided against it because it seemed like a somewhat convoluted and risky task (at least if one wants to do it right... more on that later) and at the same didn't seem worth the effort, esp. compared to other needs. All in all I think it was the right call, as else I might not have finished the build system overhaul and I don't want to imagine the consequence. In practice, those GAP files are rarely modified, and we are already doing much better than in the distant past, when sometimes changes to those GAP files were not reflected by changes in the corresponding C files for months. Anyway, the rest mostly follows from this decision:
diff --git a/bin/BuildPackages.sh b/bin/BuildPackages.sh
index fc9cce437..bb9ad7502 100755
--- a/bin/BuildPackages.sh
+++ b/bin/BuildPackages.sh
@@ -194,7 +194,7 @@ run_configure_and_make() {
then
if grep Autoconf ./configure > /dev/null
then
- local PKG_NAME=$($GAP -q -T -A -r <<GAPInput
+ local PKG_NAME=$($GAP -q -T -A -r -M <<GAPInput
Read("PackageInfo.g");
Print(GAPInfo.PackageInfoCurrent.PackageName);
GAPInput
Back to the issue of not adding the results of the gac compilation to the repository: back then, I am happy I ignored it. Now that the "new" build system is not new anymore, it may be worth re-exploring the options here, as we have a much better starting position. The core problem is that to produce those files, we first need to compile GAP without them, and also pass
I think that's it: trying to
(Later, we could probably either substantially simplify |
@fingolfin thanks for the information. Your pull request #4421 has solved the problem with I am not sure that the test in For the treatment of the files in |
Regarding
Now, I am not saying this is sufficient, as it is just a side effect. But one could add Or, one could completely uncouple this test from the fact that Of course adding pattern based output filtering to |
@fingolfin Thanks for the explanation. Yes, I think the nicest way to improve the test is to extend |
Yesterday I tried to make a harmless little change in
lib/oper1.g
.(Of course, experienced developers know that changes in this file are never harmless.)
When I had created the pull request, the CI tests reported failures.
The first one showed that also the file
src/c_oper1.c
must be updated (which can be done by callingmake docomp
). The failure happened in a strange place, a call tobin/BuildPackages.sh
. Namely, the functionrun_configure_and_make
tries to determine the name of a package by calling GAP, reading thePackageInfo.g
file, extracting the name, and printing it. However, the first printed value was a message of the form#W Static module lib/oper1.g has CRC mismatch, ignoring
, which is currently not a valid package name.Since GAP works nicely without
src/c_oper1.c
, I think the installation of packages should not fail because this file is not up to date. Perhaps GAP could simply be started with the-M
option, in order to omit the warning message?The next question is why the generated file
src/c_oper1.c
must be under version control at all. It can be created when GAP gets installed. This would save some developers' work.After updating
src/c_oper1.c
, the HPCGAP related CI tests complained, since also the filesrc/hpc/c_oper1.c
must be updated. For this update, one has to runmake docomp
for an installed HPCGAP.Again, the natural situation for creating
src/hpc/c_oper1.c
is installation time (this time the installation of HPCGAP), and the file would not need to be under version control.(Is it really expected from a GAP developer to install HPCGAP, just because of a harmless little change in
lib/oper1.g
?)The next failure was reported from the following test in
tst/testinstall/varargs.tst
.The aim of this test is to show an example of the
<<compiled GAP code>>
case, but the test actually checks that the code of a particular function occurs in a particular line oflib/oper1.g
.Thus we are forced to adjust this testfile because of changes in
lib/oper1.g
. Is this acceptable?We could extend the code of
Test
such that the two outputs get modified according to some rules before they get compared, in order to admit predefined differences in tests.A rudimentary version of such an approach is taken in the tests for the JuliaInterface package --there are other instances where this problem arises.
I could create a pull request for this functionality if others regard it as reasonable.
The text was updated successfully, but these errors were encountered: