-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
kawa 2.3 #8301
kawa 2.3 #8301
Conversation
ce26d7d
to
a58d462
Compare
I'm not thrilled with the notion that |
a58d462
to
461c403
Compare
@ilovezfs If you run the existing formula, the REPL is broken, because of missing the jline functionality for line editing. The official distribution runs correctly. There is already a change for I wrote to the maintainer and he recommends using the official binary release - https://sourceware.org/ml/kawa/2016-q4/msg00089.html |
I think it just needs ENV.deparallelize so that the test runs correctly. |
461c403
to
7c69640
Compare
Specifically, please try this:
|
I'll give it a try, that might fix the library import issue. To get line editing to work in the REPL, I think there are more flags missing to From kawa-2.2's
|
Right, we'd need to build https://github.com/jline/jline3 etc. |
I don't understand the reluctance to use the existing binary distribution - similar projects like |
I'd prefer we build those too ;) |
I really just want a working installation of kawa out of homebrew, and this patch got me there. Also, even by building it and then distributing binary Bottles of the build, it's all quite circular. Either way, I tried your suggestion, it did not fix the two issues. (1) Importing SRFIs, (2) line editing in REPL. I'm gonna go back to hacking in Kawa for now. I think other Kawa users on MacOS will also appreciate having a working installation, so please consider merging this in. Let me know if there's another else I can do. Thanks!
|
You re-poured the bottle and did not test the diff. |
Okay, |
[The maintainer - i.e. me] recommends using the official binary release I did not mean to necessarily recommend that - though that is one option. If building from source, what I do suggest is that Homebrew should install Kawa in a directory layout similar to the Kawa binary releases, and then optionally creating symlinks to (files in) that directory. (I'm being vague because I know little about MacOS and less about Homebrew.) For example on Linux you might install into (You can still use the old readline front-end, but it has fewer features, and is no longer the default.) |
inreplace "bin/kawa" do |s| | ||
s.gsub! /thisfile=`type -p \$0`/, "thisfile=#{bin}/kawa" | ||
s.gsub! %r{\$kawadir/lib}, "$kawadir/libexec" | ||
end |
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.
Would be good to submit these patches upstream; we'd rather not have a patch like this indefinitely.
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.
A better approach may be to install bin
and lib
to libexec
and use a symlink or wrapper script which looks like it could avoid all this patching.
end | ||
url "https://ftpmirror.gnu.org/kawa/kawa-2.2.zip" | ||
mirror "https://ftp.gnu.org/gnu/kawa/kawa-2.2.zip" | ||
sha256 "eb2b8301786d5e983769c2e29ba7caf69afcb14977eac16d544471b9a3c79f79" | ||
|
||
depends_on :java |
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.
Is there a specific version we could add here e.g. depends_on :java => "1.7+"
?
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.
Yeah, I see from the release notes that since Kawa 2.0, it targets Java 7.
From the release notes:
The default is now Java 7, rather than Java 6. This means the checked-in source code is pre-processed for Java 7, and future binary releases will require Java 7.
I'm fine with us using the binary release. We typically do so for Java stuff as there's no benefit to building from source (either optimisation or cross-platformability). |
7c69640
to
a18654a
Compare
Thanks for the review @MikeMcQuaid! I think this is good to go. I have updated the PR with your suggestions and rebased it on top of the latest |
The original reason I had for converting this to use a source build is that the published source tarball had triggered Rather than ending up in this situation repeatedly, I thought it would be better to switch us over to use the source tarball, which at the time I converted it was in fact the only one actually available for the latest tag. |
Thanks @ilovezfs. I'd probably like to hear some upstream thoughts on this before we merge this. |
@PerBothner is the Kawa maintainer and he cuts the releases, so he can speak to the timeliness of the binary releases. Note: I volunteer to take over the maintenance of this Formula. I'm active on the Kawa mailing list and I can work with Per to make sure this gets updated whenever he makes new Kawa releases. |
@duncanmak Homebrew doesn't really work like that, I'm afraid. You can't maintain the formula as you don't have commit access to do so. You can submit updates but we'll still run into problems with e.g. @ilovezfs's script. |
The Kawa release process changed a lot last year, in addition to the source repository moving to gitlab. A "binary release" used to be just a jar file; it is now a zip that includes the jar file, a shell script, helper libraries and documentation. I think homebrew should just grab a recent binary release and unzip it. The issue is figuring out which binary release and when it grab it. What is unclear to me is how homebrew handles updates - i.e. new releases. Does a homebrew maintainer perform any kind of update/release? Is it handled when a user types 'brew update'? If there is a central database of versions, is it updated manually or is there some mechanism to do it automatically? If it is automatic, I can establish a convention with either a file naming a "current release" or a symlink to the current release. |
@MikeMcQuaid Is there anything else I need to do to this PR in the Ruby code? |
@duncanmak I'd like to hear the thoughts of @ilovezfs first. |
Looks like 2.3 is out now according to livecheck though the website is saying 2.2. |
I made the official Kawa 2.3 release this morning, including updating the website and sending an announcement to the Kawa mailing list. (I re-uploaded the release to fix a small but very visible documentation bug. I re-used the 2.3 version number since it was only a slight doc change.) I suggest using the latest |
'while test -L "$thisfile"; do thisfile=$(readlink -f "$thisfile"); done', | ||
"thisfile=#{pkgshare}/bin/kawa" | ||
rm Dir["bin/*.bat"] | ||
|
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.
remove blank lines 14 and 17 please
If you can squash this down to one commit with the commit subject
that would be good. |
bottle block was replaced with :bottle_unneeded as requested
859bcd3
to
b50e6bd
Compare
LGTM. |
b50e6bd
to
e69fccb
Compare
🚀 Thanks @duncanmak for spotting the problems with this formula and fixing them, and for your patience. |
A couple of things I suggest testing, if you haven't:
That should bring up a browser for the Kawa manual. See browse-manual in https://www.gnu.org/software/kawa/Options.html
Brings up a new window, preferably using DomTerm. (See manual for details.) By default the REPL should be doing input editing using the jline library. I haven't done any testing on MacOS, so if any of these fail, it may be an actual Kawa limitation (that should be fixed), rather than homebrew-related. |
|
One reason for getting DomTerm working is so the Composable Pictures support works. There are other reasons - see https://www.gnu.org/software/kawa/REPL-Console.html |
I noticed that kawa -w is broken on the Mac because of the terminal support.
I've been trying to fix it, but I haven't had time.
…On Tue, Jan 17, 2017 at 1:06 AM, ilovezfs ***@***.***> wrote:
kawa: --browse-manual failed: /usr/local/Cellar/kawa/2.3/libexec/doc/kawa-manual.epub does not exist
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8301 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAASt9ouyqBMaxOM6O1RS2bw8XhUto3Rks5rTFpYgaJpZM4LXxp1>
.
--
Duncan.
|
The path to the epub file is Right now, it's looking for it at |
I guessed there might be an issue with --browse-manual, because it didn't look like the doc directory was installed as a sibling directory to the bin directory. Specifically, the kawa.home property should point to a directory with the lib, bin, and doc sub-directories. That is why I recommended unziping the entire binary release (kawa-VERSION.zip) into a single tree and then adding symlinks as desired. |
ideally
would do the entire job with everything in the standard locations and no string replacements needed :) |
Looks like some interaction between the DomTerm support and the JLine supprt. (Note promptTemplate2 should only be for continuation lines, so that is strange.)To only test DomTerm, without JLine, you can try:
|
@ilovezfs the string replacement is to avoid using It was @MikeMcQuaid who suggested installing to I don't know what the norm is with Homebrew, but let's change it if that's not necessary. |
@duncanmak right. For portability, it "shouldn't" be using readlink -f
It is necessary here because the standard |
If someone is willing to debug the -w Exception(s), they probably need to re-compile from source. What is supposed to happen is shown by this log, after I added 'new Error(XXX).printStacTrace()' in appropriate places:
I.e the CheckConsole.prompt1 and CheckConsole.prompt2 ThreadLocations (which is a wrapper around InheritableThreadLocal) should be set in Language.setCurrentLanguage. While that is a different thread than the one running DomTermBackend.run, then latter is a child of the former, so it "should" work. |
FYI I uploaded a binary snapshot of the development "invoke" branch |
@PerBothner Thanks. I've made it
so we should be OK. |
That looks good. |
The existing formula builds kawa using incorrect configure flags. The
resulting jar file is missing functionality (can't import SRFI
libraries). The installation also doesn't include the new JARs that's
part of the distribution, and domterm.jar, jline.jar and servlet.jar,
which means the REPL is crippled without line editing functionality.
Fix the formula to use the official binary that's distributed by the
maintainer and add test for importing built-in libraries.
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?