-
Notifications
You must be signed in to change notification settings - Fork 134
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
Booktest failures on julia nightly #4402
Comments
The issue is that multi-line input with comments is partially broken in the latest nightly versions (only when entering line-by-line, not when pasting). For example try entering something like this: julia> function bla()
a=1
b=2 #a comment
ERROR: ParseError:
# Error @ REPL[2]:3:4
a=1
b=2 #a comment
# └ ── Expected `end`
Stacktrace:
[1] top-level scope
@ REPL:1 In previous julia versions the error only appears after entering the second empty line. |
Most of the issues have been resolved by JuliaSyntax.jl v1.0.2, which has been backported to 1.12-dev. However, one different error that looks similar is still there: From worker 2: cornerstones/number-theory: Test Failed at /home/oscarci-tester/oscar-runners/runner-01/_work/Oscar.jl/Oscar.jl/test/book/test.jl:272
From worker 2: Expression: normalize_repl_output(content) == computed
From worker 2: Evaluated: "julia> Oscar.randseed!(3371100);\n\njulia> Qx, x = QQ[\"x\"];\n\njulia> K, a = number_field(x^4 + 4*x^2 + 2, \"a\");\n\njulia> b = rand(K, -10:10) # random element with coefficients\n # between -10 and 10\n5*a^3 - 7*a^2 + 8*a - 8\n\njulia> A, mA = automorphism_group(K);\n\njulia> list = [mA(s)(b) for s in A]\n4-element Vector{AbsSimpleNumFieldElem}:\n 5*a^3 - 7*a^2 + 8*a - 8\n -7*a^3 + 7*a^2 - 26*a + 20\n -5*a^3 - 7*a^2 - 8*a - 8\n 7*a^3 + 7*a^2 + 26*a + 20\n\njulia> X = matrix(QQ, coordinates.(list))\n[-8 8 -7 5]\n[20 -26 7 -7]\n[-8 -8 -7 -5]\n[20 26 7 7]\n\njulia> det(X) != 0\ntrue\n\njulia> det(matrix(QQ, [coordinates(mA(s)(a)) for s in A]))\n0\n\njulia> V, f = galois_module(K);\n\njulia> OK = ring_of_integers(K);\n\njulia> M = f(OK);\n\njulia> is_free(M)\nfalse\n\njulia> fl = is_locally_free(M, 2)\nfalse\n\njulia> prime_decomposition_type(OK, 2)\n1-element Vector{Tuple{Int64, Int64}}:\n (1, 4)\n\njulia> K, a = number_field(x^4 - x^3 + x^2 - x + 1, \"a\");\n\njulia> is_tamely_ramified(K)\ntrue\n\njulia> V, f = galois_module(K); OK = ring_of_integers(K); M = f(OK);\n\njulia> fl, c = is_free_with_basis(M); # the elements of c form a basis\n\njulia> b = preimage(f, c[1]) # the element may be different per session\na^3\n\njulia> A, mA = automorphism_group(K);\n\njulia> X = matrix(ZZ, [coordinates(OK(mA(s)(b))) for s in A])\n[0 0 0 1]\n[1 -1 1 -1]\n[0 0 -1 0]\n[0 1 0 0]\n\njulia> det(X)\n-1\n\njulia> k, = number_field(x^4 - 13*x^2 + 16); candidates = []; for F in abelian_normal_extensions(k, [2], ZZ(10)^13)\n K, = absolute_simple_field(number_field(F))\n if !is_tamely_ramified(K)\n continue\n end\n if !is_isomorphic(galois_group(K)[1], quaternion_group(8))\n continue\n end\n push!(candidates, K)\nend\n\njulia> length(candidates)\n2\n\njulia> K = candidates[2]; V, f = galois_module(K); OK = ring_of_integers(K); M = f(OK);\n\njulia> fl = is_free(M)\nfalse\n\njulia> defining_polynomial(K)\nx^8 + 105*x^6 + 3465*x^4 + 44100*x^2 + 176400" == "julia> Oscar.randseed!(3371100);\n\njulia> Qx, x = QQ[\"x\"];\n\njulia> K, a = number_field(x^4 + 4*x^2 + 2, \"a\");\n\njulia> b = rand(K, -10:10) # random element with coefficients\n5*a^3 - 7*a^2 + 8*a - 8\n\njulia> A, mA = automorphism_group(K);\n\njulia> list = [mA(s)(b) for s in A]\n4-element Vector{AbsSimpleNumFieldElem}:\n 5*a^3 - 7*a^2 + 8*a - 8\n -7*a^3 + 7*a^2 - 26*a + 20\n -5*a^3 - 7*a^2 - 8*a - 8\n 7*a^3 + 7*a^2 + 26*a + 20\n\njulia> X = matrix(QQ, coordinates.(list))\n[-8 8 -7 5]\n[20 -26 7 -7]\n[-8 -8 -7 -5]\n[20 26 7 7]\n\njulia> det(X) != 0\ntrue\n\njulia> det(matrix(QQ, [coordinates(mA(s)(a)) for s in A]))\n0\n\njulia> V, f = galois_module(K);\n\njulia> OK = ring_of_integers(K);\n\njulia> M = f(OK);\n\njulia> is_free(M)\nfalse\n\njulia> fl = is_locally_free(M, 2)\nfalse\n\njulia> prime_decomposition_type(OK, 2)\n1-element Vector{Tuple{Int64, Int64}}:\n (1, 4)\n\njulia> K, a = number_field(x^4 - x^3 + x^2 - x + 1, \"a\");\n\njulia> is_tamely_ramified(K)\ntrue\n\njulia> V, f = galois_module(K); OK = ring_of_integers(K); M = f(OK);\n\njulia> fl, c = is_free_with_basis(M); # the elements of c form a basis\n\njulia> b = preimage(f, c[1]) # the element may be different per session\na^3\n\njulia> A, mA = automorphism_group(K);\n\njulia> X = matrix(ZZ, [coordinates(OK(mA(s)(b))) for s in A])\n[0 0 0 1]\n[1 -1 1 -1]\n[0 0 -1 0]\n[0 1 0 0]\n\njulia> det(X)\n-1\n\njulia> k, = number_field(x^4 - 13*x^2 + 16); candidates = []; for F in abelian_normal_extensions(k, [2], ZZ(10)^13)\n K, = absolute_simple_field(number_field(F))\n if !is_tamely_ramified(K)\n continue\n end\n if !is_isomorphic(galois_group(K)[1], quaternion_group(8))\n continue\n end\n push!(candidates, K)\nend\n\njulia> length(candidates)\n2\n\njulia> K = candidates[2]; V, f = galois_module(K); OK = ring_of_integers(K); M = f(OK);\n\njulia> fl = is_free(M)\nfalse\n\njulia> defining_polynomial(K)\nx^8 + 105*x^6 + 3465*x^4 + 44100*x^2 + 176400"
From worker 2:
From worker 2: Stacktrace:
From worker 2: [1] macro expansion
From worker 2: @ ~/oscar-runners/runner-01/_work/_tool/julia/nightly/x64/share/julia/stdlib/v1.13/Test/src/Test.jl:679 [inlined]
From worker 2: [2] macro expansion
From worker 2: @ ~/oscar-runners/runner-01/_work/Oscar.jl/Oscar.jl/test/book/test.jl:272 [inlined]
From worker 2: [3] macro expansion
From worker 2: @ ~/oscar-runners/runner-01/_work/_tool/julia/nightly/x64/share/julia/stdlib/v1.13/Test/src/Test.jl:1771 [inlined]
From worker 2: [4] (::var"#test_chapter##1#test_chapter##2"{String, String, Vector{Any}, var"#close_repl#close_repl##0", var"#sanitize_input#sanitize_input##0"{var"#normalize_repl_output#normalize_repl_output##0"}, var"#normalize_repl_output#normalize_repl_output##0", Vector{String}, Vector{String}})()
From worker 2: @ Main ~/oscar-runners/runner-01/_work/Oscar.jl/Oscar.jl/test/book/test.jl:233
From worker 2: """
From worker 2: julia> Oscar.randseed!(3371100);
From worker 2:
From worker 2: julia> Qx, x = QQ[\"x\"];
From worker 2:
From worker 2: julia> K, a = number_field(x^4 + 4*x^2 + 2, \"a\");
From worker 2:
From worker 2: julia> b = rand(K, -10:10) # random element with coefficients
From worker 2: - # between -10 and 10
From worker 2: 5*a^3 - 7*a^2 + 8*a - 8
From worker 2:
From worker 2: julia> A, mA = automorphism_group(K);
[...] https://github.com/oscar-system/Oscar.jl/actions/runs/13362124166/job/37313475421#step:11:943 @benlorenz Could this maybe be due to some of the book testing code or is this still a julia issue? |
Hm, the |
This is probably another julia issue, I haven't really looked into it but a quick look indicates that nightly and 1.12 swallow the comment while 1.11 prints it back.
If you paste this in 1.11 it looks exactly like here, in 1.12 and nightly it changes to:
|
Workaround in #4599, could be reverted once the julia issue is solved. |
e.g. in the scheduled job from this morning here
I have seen the same failures in some PRs as well, e.g. in https://github.com/oscar-system/Oscar.jl/actions/runs/12311840722/job/34362745516#step:10:2229.
The failures happen in
cornerstones/polyhedral-geometry
andcornerstones/algebraic-geometry
.More details:
The text was updated successfully, but these errors were encountered: