Skip to content
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

Fix issue 623 #625

Closed

Conversation

james-d-mitchell
Copy link
Collaborator

This PR fixes Issue 623 by adding OnPosIntSetsTrans to the kernel module of the Semigroups package.

@james-d-mitchell james-d-mitchell added 3.* do not merge Label for PR that should not be merged labels Oct 9, 2019
@james-d-mitchell
Copy link
Collaborator Author

I need to add the tests from GAP to this PR too.

@james-d-mitchell james-d-mitchell added gap-compatibility A label for PRs or issues that are related to compatibility with changes in GAP and removed do not merge Label for PR that should not be merged labels Oct 9, 2019
@james-d-mitchell james-d-mitchell force-pushed the fix-issue-623 branch 2 times, most recently from ae76c75 to de927e1 Compare October 10, 2019 12:06
@james-d-mitchell
Copy link
Collaborator Author

Might eventually resolve Issue #623.

Genius idea to rename IS_MUTABLE_PLIST -> IS_PLIST_MUTABLE.

src/.clang-format Show resolved Hide resolved
src/pkg.cc Show resolved Hide resolved
src/pkg.cc Outdated Show resolved Hide resolved
src/pkg.cc Outdated Show resolved Hide resolved
}
CHANGED_BAG(res);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you check for the kernel version as suggested above, then you could also remove this function and just call SortPlistByRawObj

src/pkg.cc Outdated Show resolved Hide resolved
@@ -57,6 +59,126 @@ UInt T_SEMI = 0;
UInt T_BIPART = 0;
UInt T_BLOCKS = 0;

// Forward decl
Copy link
Contributor

@fingolfin fingolfin Oct 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this?

Suggested change
// Forward decl
// Forward decl of a function imported from the GAP kernel

I wonder how the code even loads with this in older GAP versions, though?!? Anyway, with the #if check for kernel versions, this would be a non-issue.
Ah silly me, in older GAP versions, FuncIMAGE_SET_TRANS_INT already exists anyway. And in gap-system/gap#3699 you add this function to a header file. So with the #if approach, you could safely delete this decl here anyway.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right you are, deleted!

james-d-mitchell and others added 2 commits October 11, 2019 20:57
Co-Authored-By: Max Horn <max@quendi.de>
Co-Authored-By: Max Horn <max@quendi.de>
@james-d-mitchell
Copy link
Collaborator Author

Thanks for your comments @fingolfin, I should have removed the request for you to review until I got this to work, I somehow thought this would be easier than it turned out to be... I'll try to update the PR soon.

@fingolfin
Copy link
Contributor

@james-d-mitchell please take your time

Co-Authored-By: Max Horn <max@quendi.de>
@james-d-mitchell
Copy link
Collaborator Author

Ok, I've spent another afternoon trying to figure out how to do this, and not break backwards compatibility for Semigroups, and I'm ready to give up.

The problem is to make OnPosIntSetsTrans work in GAP 4.9 we have to take large parts of trans.c[c] and put them into the Semigroups kernel module. This doesn't seem worth it to me.

We could stop supporting older versions of GAP, but doing that just to move this one function from the GAP kernel doesn't seem worth it to me. Another solution would be to remember that we want to do this and do it the next time it makes sense to update the version of GAP required by Semigroups.

If you have a better suggestion @fingolfin, I'm happy to hear it.

@fingolfin
Copy link
Contributor

@james-d-mitchell I am sorry that you wasted so much time on this :-(. Please don't bother doing any more on this. I'll take a look if I can see an "easy" (whatever that means) way to pull this off, and then I'll submit a PR; but otherwise, it really won't hurt us to leave OnPosIntSetsTrans in GAP itself.

@james-d-mitchell
Copy link
Collaborator Author

Not to worry @fingolfin I don't think it was a waste of time, just didn't work out. I'm going to close this PR, since I've given up on this.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gap-compatibility A label for PRs or issues that are related to compatibility with changes in GAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants