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

erlang 20.0 #14815

Closed
wants to merge 5 commits into from
Closed

erlang 20.0 #14815

wants to merge 5 commits into from

Conversation

goncalotomas
Copy link
Contributor

Created with brew bump-formula-pr.

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 21, 2017

The man resource block and the html resource block need to be bumped, too.

Also, since this is a major version bump, we'll need to check whether these build successfully with the new version:

  • couchdb
  • ejabberd
  • lfe
  • mercury
  • rabbitmq
  • rebar
  • rebar@3
  • syntaxerl
  • tsung
  • wrangler
  • yaws

@goncalotomas
Copy link
Contributor Author

goncalotomas commented Jun 21, 2017

Hi @ilovezfs,

This is my first contribution, so please forgive me for asking a (possibly) dumb question: is there any practical way of checking for compilation issues that doesn't involve downloading all of them?
Also, despite having changed the formula when I run erl I see that I'm still running version 19.3. How can I switch to the new version using homebrew?

@ilovezfs
Copy link
Contributor

You'll need keg_only :versioned_formula for erlang@19

@ilovezfs
Copy link
Contributor

is there any practical way of checking for compilation issues without downloading all of them?

You could revision bump all of them in this PR and see if any fail.

Also, despite having changed the formula when I run erl I see that I'm still running version 19.3.

brew uninstall erlang, brew pull 14815 and then brew install -dvs erlang

sha256 "fc82c5377ad9e84a37f67f2b2b50b27fe4e689440ae9e5d0f5dcfb440a9487ac"
head "https://github.com/erlang/otp.git"

bottle do
Copy link
Contributor

Choose a reason for hiding this comment

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

bottle block should be removed since this is technically a new formula.

# Download tarball from GitHub; it is served faster than the official tarball.
url "https://github.com/erlang/otp/archive/OTP-19.3.tar.gz"
sha256 "fc82c5377ad9e84a37f67f2b2b50b27fe4e689440ae9e5d0f5dcfb440a9487ac"
head "https://github.com/erlang/otp.git"
Copy link
Contributor

Choose a reason for hiding this comment

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

head should point at the , :branch => "maint-19" or be removed.

@goncalotomas
Copy link
Contributor Author

goncalotomas commented Jun 21, 2017

@ilovezfs
Just learned how to revision bump formulae. I think I did all that you listed 😅
Fingers crossed, let's see if everything still works!

@ilovezfs
Copy link
Contributor

Thanks @goncalotomas! This is quite an ambitious first PR but you're doing great!

@goncalotomas
Copy link
Contributor Author

goncalotomas commented Jun 21, 2017

It seems that the all of the checksums were wrong, and I can't tell why I'm having different results. For instance, after downloading the file otp_doc_html_20.0.tar.gz I ran:

shasum -a 256 otp_doc_html_20.0.tar.gz

And I get a different value (just checked the Jenkins output). How are these checksums calculated, what am I doing wrong?

@goncalotomas
Copy link
Contributor Author

@ilovezfs
Is it possible that the build jobs are stuck with some weird error? Both of them hung with the following message:

18:00:15 Configuration Homebrew Core Pull Requests » yosemite is still in the queue: Waiting for next available executor on yosemite

I guess this means that there are no 'workers' running Yosemite, but is the build going to fail eventually?

@barttenbrinke
Copy link
Contributor

@goncalotomas Nice work, you beat me to it by 45 minutes 👍

@goncalotomas
Copy link
Contributor Author

goncalotomas commented Jun 21, 2017

Some of the formulas contained head after revision errors, and I believe they were all fixed in my last commit.

2 packages failed due to pre-compile Erlang version checks:

  • couchdb
  • couchdb-lucene

I will check for ways to bypass this or open an issue in the CouchDB repository.

yaws broke because of compiling with warnings_as_errors and this new version of Erlang raises at least one warning on their code.
There is an open issue already and a fix should be made available soon™.

@ilovezfs
Copy link
Contributor

It seems that the all of the checksums were wrong, and I can't tell why I'm having different results.

Did you check if the files you downloaded were actually valid tarballs?

@ilovezfs
Copy link
Contributor

Did you have a chance to test rabbitmq?

@goncalotomas
Copy link
Contributor Author

Did you check if the files you downloaded were actually valid tarballs?

I downloaded the files multiple times and despite being .tar.gz I only received .tar files when using Safari. Downloading with Chrome apparently fixed it.

Did you have a chance to test rabbitmq?

I don't remember seeing any failed tests, but I tried to compile and it appears there are errors similar to yaws. I will see if there are any issues related to OTP 20 already open.

I'm assuming this won't be merged until all packages compile, right?

@ilovezfs
Copy link
Contributor

I downloaded the files multiple times and despite being .tar.gz I only received .tar files when using Safari. Downloading with Chrome apparently fixed it.

I think there is a setting in Safari preferences to disable auto extraction.

I'm assuming this won't be merged until all packages compile, right?

Now that we know which formulae build and which formulae don't build, I think we should proceed without doing any revision bumps in this PR.

For the formulae that failed to build (couchdb and yaws), you can make it depends_on "erlang@19" in this PR.

Also, this should be squashed down to be 1 commit per formula.

@ilovezfs
Copy link
Contributor

(You should revision bump couchdb and yaws, though, as part of adding depends_on "erlang@19")

Also, if you do want to make that change to erlang@18, it should be in a separate PR because it won't require a new bottle.

@goncalotomas
Copy link
Contributor Author

OK, I think I didn't forget anything.
Now, how can I squash things down to one commit per formula?

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 22, 2017

git reset HEAD^15
rm Aliases/erlang@20
git checkout -- Aliases/erlang@19
git mv Aliases/erlang@19 Aliases/erlang@20
git add Formula/erlang.rb
git commit -m "erlang 20.0"
git add Formula/erlang@19.rb
git commit -m "erlang@19 19.3 (new formula)"
git add Formula/couchdb.rb
git commit -m "couchdb: depend on erlang@19"
etc.
git push -f

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 22, 2017

@goncalotomas so I'm taking a look at the build failures. For couchdb, we need this:

diff --git a/Formula/couchdb.rb b/Formula/couchdb.rb
index 294d132..ef8e3da 100644
--- a/Formula/couchdb.rb
+++ b/Formula/couchdb.rb
@@ -60,7 +60,7 @@ class Couchdb < Formula
                           "--localstatedir=#{var}",
                           "--sysconfdir=#{etc}",
                           "--disable-init",
-                          "--with-erlang=#{HOMEBREW_PREFIX}/lib/erlang/usr/include",
+                          "--with-erlang=#{Formula["erlang@19"].opt_lib}/erlang/usr/include",
                           "--with-js-include=#{HOMEBREW_PREFIX}/include/js",
                           "--with-js-lib=#{HOMEBREW_PREFIX}/lib"
     system "make"

@goncalotomas
Copy link
Contributor Author

Changed. 😄

@ilovezfs
Copy link
Contributor

Next up, rabbitmq ... :)

@ilovezfs
Copy link
Contributor

@goncalotomas OK, rabbitmq needs this:

diff --git a/Formula/rabbitmq.rb b/Formula/rabbitmq.rb
index 5ca74d4..a91c9ad 100644
--- a/Formula/rabbitmq.rb
+++ b/Formula/rabbitmq.rb
@@ -20,7 +20,8 @@ class Rabbitmq < Formula
     # Correct SYS_PREFIX for things like rabbitmq-plugins
     inreplace sbin/"rabbitmq-defaults" do |s|
       s.gsub! "SYS_PREFIX=${RABBITMQ_HOME}", "SYS_PREFIX=#{HOMEBREW_PREFIX}"
-      erlang = Formula["erlang"]
+      erlang = Formula["erlang@19"]
+      s.gsub! /^ERL_DIR=$/, "ERL_DIR=#{erlang.opt_bin}/"
       s.gsub! "CLEAN_BOOT_FILE=start_clean", "CLEAN_BOOT_FILE=#{erlang.opt_lib/"erlang/bin/start_clean"}"
       s.gsub! "SASL_BOOT_FILE=start_sasl", "SASL_BOOT_FILE=#{erlang.opt_lib/"erlang/bin/start_clean"}"
     end

@goncalotomas
Copy link
Contributor Author

Also changed.
I'll try to do the same procedure to squash the commits once the build is successful :)

@ilovezfs
Copy link
Contributor

For the fossies mirror it's complaining about we can use these instead:

https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/erlang/otp_doc_man_19.3.tar.gz
https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/erlang/otp_doc_html_19.3.tar.gz

@goncalotomas
Copy link
Contributor Author

But won't it complain about the checksum not being the same?

@ilovezfs
Copy link
Contributor

The checksum is the same :)

@goncalotomas
Copy link
Contributor Author

The checksum of https://www.mirrorservice.org/sites/ftp.netbsd.org/pub/pkgsrc/distfiles/erlang/otp_doc_html_19.3.tar.gz is the same as https://www.erlang.org/download/otp_doc_html_20.0.tar.gz?

That's weird, they're different major versions and everything :)

@ilovezfs
Copy link
Contributor

ilovezfs commented Jun 22, 2017

No the ones in the @19

@goncalotomas
Copy link
Contributor Author

I was confused for a minute there xD

@goncalotomas
Copy link
Contributor Author

Sorry.

@ilovezfs
Copy link
Contributor

No worries!

@ilovezfs
Copy link
Contributor

I won't cancel this one :)

@ilovezfs
Copy link
Contributor

🍏

@goncalotomas
Copy link
Contributor Author

@ilovezfs
Updated to use 1 commit per formula like you previously asked for.

@ilovezfs
Copy link
Contributor

@goncalotomas Thanks!

Do you have links for the upstream issues for the ones that didn't build with the new Erlang?

@goncalotomas
Copy link
Contributor Author

Yes.

Here you go:
Yaws: erlyaws/yaws#309
CouchDB: apache/couchdb#611
RabbitMQ: rabbitmq/rabbitmq-server#1272

@ilovezfs ilovezfs closed this in 058840a Jun 23, 2017
@ilovezfs
Copy link
Contributor

Thanks for your first contribution to Homebrew, @goncalotomas! Without people like you submitting PRs we couldn't run this project. You rock!

🚀

@goncalotomas goncalotomas deleted the erlang-20.0 branch June 23, 2017 10:06
@michaelklishin
Copy link
Contributor

michaelklishin commented Jun 23, 2017

A couple of things I'd like to mention here. First of all, thank you @goncalotomas for uncovering rabbitmq/rabbitmq-server#1272. It only affect master, though, which targets next feature release and not even at RC stage yet. So while it needs to be fixed, Homebrew formula should not build RabbitMQ from master.

On top of that, OTP 20 is not supported by any GA release of RabbitMQ at the moment, so pinning Erlang version to 19.3 is necessary for the next few months either way. OTP 20 should work fine for development environments starting with 3.6.11.

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants