-
Notifications
You must be signed in to change notification settings - Fork 160
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
Compatibility with GAP.jl #3497
Conversation
f05f400
to
968e614
Compare
Codecov Report
@@ Coverage Diff @@
## master #3497 +/- ##
==========================================
+ Coverage 84.75% 85.43% +0.68%
==========================================
Files 698 699 +1
Lines 346577 346778 +201
==========================================
+ Hits 293728 296273 +2545
+ Misses 52849 50505 -2344
|
245cfac
to
1d83398
Compare
I added error checking, and also updated this PR since GAPTypes is a released package now. If tests pass, I think this could be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebasguts since you say that this PR is important "Because we need it to use GAP.jl properly in other Julia modules. Plus, we could then finally pin a released GAP version in GAP.jl, no downloading master anymore", please mention this in release notes under
gap/doc/changes/changes-4.10.xml
Line 832 in ce16a7d
Fix stack scanning for the Julia GC when GAP is used as a library |
src/julia_gc.c
Outdated
@@ -817,6 +817,26 @@ void InitBags(UInt initial_size, Bag * stack_bottom, UInt stack_align) | |||
max_pool_obj_size = jl_gc_max_internal_obj_size(); | |||
jl_gc_enable_conservative_gc_support(); | |||
jl_init(); | |||
|
|||
// Import GAPTypes module to have access | |||
// to GapObj abstract type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird wrapping, perhaps that comment could go into a single line? (Clearly, this is very important ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except for lack of testing what happens if GAPTypes.jl
is missing (e.g. because the user wiped ~/.julia
, which I sometimes do, so this is actually quite realistic).
23581b0
to
af4e2aa
Compare
@fingolfin @alex-konovalov I think I adressed both comments now. |
doc/changes/changes-4.10.xml
Outdated
@@ -667,6 +667,9 @@ Specify the Julia binary instead of the Julia prefix | |||
Export Julia <C>CFLAGS</C>, <C>LDFLAGS</C>, and <C>LIBS</C> to <C>sysinfo.gap</C> | |||
(<URL><LinkText>&Hash;3248</LinkText><Link>https://github.com/gap-system/gap/pull/3248</Link></URL>). | |||
</Item> | |||
<Item> | |||
Make <C>MPtr</C> Julia type of GAP objects depend on abstract Julia <C>GapObj</C> type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use &GAP;
for GAP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
af4e2aa
to
0201022
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine w/me, thanks
0201022
to
44e5337
Compare
@@ -497,6 +497,9 @@ AS_IF([test "x$with_julia" != xno ],[ | |||
AS_IF([ test $? != 0 ], [AC_MSG_ERROR([failed to obtain JULIA_LIBS from julia-config.jl])]) | |||
JULIA_LIBS=${JULIA_LIBS//\'/} | |||
AC_MSG_RESULT([${JULIA_LIBS}]) | |||
AC_MSG_NOTICE([installing GAPTypes.jl]) | |||
${JULIA} -e 'import Pkg; Pkg.add("GAPTypes")' | |||
AS_IF([ test $? != 0 ], [AC_MSG_ERROR([failed to install GAPTypes.jl])]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you verify that this works as intended? (E.g. by changing the previous line to use Pkg.add("foobarquux")
to force an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep.
doc/changes/changes-4.10.xml
Outdated
@@ -667,6 +667,10 @@ Specify the Julia binary instead of the Julia prefix | |||
Export Julia <C>CFLAGS</C>, <C>LDFLAGS</C>, and <C>LIBS</C> to <C>sysinfo.gap</C> | |||
(<URL><LinkText>&Hash;3248</LinkText><Link>https://github.com/gap-system/gap/pull/3248</Link></URL>). | |||
</Item> | |||
<Item> | |||
Make <C>MPtr</C> Julia type of &GAP; objects depend on abstract Julia <C>GapObj</C> type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Depends" sounds wrong to me. "Derive from" ? "Be a subtype of"
Make <C>MPtr</C> Julia type of &GAP; objects depend on abstract Julia <C>GapObj</C> type | |
Change <C>MPtr</C> Julia type of &GAP; objects to be a subtype of the abstract Julia <C>GapObj</C> type |
doc/changes/changes-4.10.xml
Outdated
@@ -667,6 +667,10 @@ Specify the Julia binary instead of the Julia prefix | |||
Export Julia <C>CFLAGS</C>, <C>LDFLAGS</C>, and <C>LIBS</C> to <C>sysinfo.gap</C> | |||
(<URL><LinkText>&Hash;3248</LinkText><Link>https://github.com/gap-system/gap/pull/3248</Link></URL>). | |||
</Item> | |||
<Item> | |||
Make <C>MPtr</C> Julia type of &GAP; objects depend on abstract Julia <C>GapObj</C> type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Depends" sounds wrong to me. "Derive from" ? "Be a subtype of"
Make <C>MPtr</C> Julia type of &GAP; objects depend on abstract Julia <C>GapObj</C> type | |
Change <C>MPtr</C> Julia type of &GAP; objects to be a subtype of the abstract Julia <C>GapObj</C> type | |
provided by the Julia package <C>GAPTypes.jl</C> |
* Added installation of GAPTypes.jl to configure when compilation with Julia is requested * Made MPtr, Bag, and LargeBag Julia types instances of GapObj
2c1f40d
to
145b186
Compare
Addressed the last comments. Feel free to merge it. |
Backported in commit df86a36 |
We forgot to add this to the release notes for 4.10.2, but it's not so important, so I decided to omit this from the 4.11 release notes, too. |
Description
with Julia is requested
Please use the following template to submit a pull request, filling
in at least the "Text for release notes" and/or "Further details".
Thank You!
Checklist for pull request reviewers
If your code contains kernel C code, run
clang-format
on it; thesimplest way is to use
git clang-format
, e.g. like this (don'tforget to commit the resulting changes):
usage of relevant labels
release notes: not needed
orrelease notes: to be added
bug
orenhancement
ornew feature
stable-4.X
add thebackport-to-4.X
labelbuild system
,documentation
,kernel
,library
,tests
runnable tests
adequate pull request title
well formulated text for release notes
relevant documentation updates
sensible comments in the code