-
Notifications
You must be signed in to change notification settings - Fork 120
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
Should be easier to use, with dependencies from Homebrew and mimic build conf. Documentation enabled by default. #190
Conversation
6b7e67c
to
2083bbc
Compare
68ba649
to
c258e08
Compare
I think your CI is broken. I've tested this locally and it works better than current implementation for macOS, Linux should be the same as it was before. |
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.
This is great, I'm really looking forward to having this in asdf-erlang.
Just for testing purposes.
We're gonna have to do similar workaround for wx, I got this error:
|
That's odd though, because that worked fine for me, crypto didn't until we changed linker flags, but Just to make sure, you done |
Yes, I have wxmac installed through brew. And yeah I can test it on a x64 machine, I'll try it later today. |
@wojtekmach I think I found why it worked for me.
You don't have those on ARM_big_sur, but x64 Big Sur does.
|
@wojtekmach Latest push will do this Introducing
Can make the paths given dynamic and recursive in the future if necessary but will be slower install since it would have to go through each binary and check linked flags. Maybe better if we can clear up what else needs to be linked - that being said it's pretty damn fast now with download and install under 15 seconds, that's 98% faster. :) Anyway, I ran this on Catalina and it had no issues, so we'll just leave it in there for all macOS major versions, though I'm not sure if |
Great, I verified the latest changes and both crypto and observer is working for me well. The output of all path updating and re-signing is quite verbose so my minor suggestion would be to print "Updating and re-signing shared libraries, set DEBUG=1 for full output" or something like that and otherwise hide the output. But I think it's totally fine to ship it as is, it's such a big improvement over compiling from source. |
Yeah I agree, but they were inherently just for me to check, I'll check to see if ASDF as a debug var it uses and rely on that, otherwise I'll get rid of them. I'm doing a small update to prepare for any future new binaries that need to change, so it could go straight to recursive checks if needed, but without implementing it now, give me a few minutes. |
@wojtekmach
Ok, I think I'm done for now. |
@wojtekmach Are we done here? |
👍 |
3f33433
to
8260be0
Compare
… fetch specific version when setting `ASDF_KERL_VERSION`. * Will use git to clone `kerl` quitly and checkout versioned tags instead of downloading from Github CDN. * Enable shell docs out of the box by default and allow opt out using `KERL_BUILD_DOCS="no" - technically any value will opt out, kerl just checks if it's set, and not its value. Since we're opting in by default, we will check `!= "yes"` for opt out. * Will come with out of the box settings for `KERL_CONFIGURE_OPTIONS` with additional settings for macOS that matches `Homebrew` * `--disable-debug` * `--disable-silent-rules` * `--enable-dynamic-ssl-lib` * `--enable-hipe` * `--enable-sctp` * `--enable-shared-zlib` * `--enable-smp-support` * `--enable-threads` * `--enable-wx` * `--without-javac` * macOS only: * `--with-ssl=$(brew --prefix openssl)` * `--enable-darwin-64bit` * `--enable-kernel-poll` * `--with-dynamic-trace=dtrace` * macOS only: Unless custom `KERL_CONFIGURE_OPTIONS`, asdf-erlang will default to using Homebrew for following dependencies: - `autoconf` - `libtool` - `openssl` - `wxmac` This will allow `asdf-erlang` & `asdf-elixir` to be used out of the box and be much easier for majority of macOS users. Avoiding using esotoric configuration and environment variables to keep track for various plugins should be a focus. Allowing someone to just put a plugin in, and pick a version without sifting through massive documentation and configuration is beneficial.
b451201
to
de8c070
Compare
…RCE=YES. Removed uninstall, asdf current uninstall will suffice. Added list-bin-paths so we can skip symlinking glob dirs. ASDF should preferably handle globs, it sorta does it for checking executables, but not when creating shims.
@seivan what happened? :) |
@wojtekmach I am doing prebuilt (macOS) support for more languages, and a lot of this logic would do better outside of the plugins. |
Out of curiosity, by keeping logic outside of the plugins you mean inside asdf core or outside asdf? In any case, I and I'm sure many people really appreciate your effort and showing the way to implement this, thank you! |
That's the part that bothers me, so right now it's a submodule used by ruby, node and erlang. Core does not afaik(!) know deal with submodules, and I'm on the fence wether or not it's a bad idea, but that's the approach I am going with now. There's also silly util functions like getting plugin dir, check for necessary dependencies and (for macOS) offer an approach to fetch them -using using Homebrew. Similar to how
We'll see when it's done and I can I can show it. So far all three languages work fine, even Ruby's quirk of hard coding gem loading paths in the binary (based on Brew), by using exec-env it can be pointed to the right path but right now it's hard-coded for macOS. It will remain hard-coded for macOS as that's the only platform I support for pre-built as of today, but will obviously check it's macOS before doing so later on. There's a lot of inertia and low hanging fruit here. |
Gotcha, makes sense to share the behaviour somehow so that plugins can easily use it. |
@seivan @wojtekmach I am applying some of these changes in #276. The main Homebrew changes here won't be accepted - at least for now - but I figured I'd let you know some of this is going to end up in |
This will allow
asdf-erlang
&asdf-elixir
to be used out of the box and be much easier for majority of macOS users.Avoiding using esotoric configuration and environment variables to keep track for various plugins should be a focus.
So, at least for macOS users asdf-erlang should try to use as much as possible from Homebrew for building, with sane configuration defaults (mimic Homebrew) and make documentation enabled by default
Will use existing kerl from
$PATH
(like installed by Homebrew) or fetch specific version when settingASDF_KERL_VERSION
.Will use git to clone
kerl
quitly and checkout versioned tags instead of downloading from Github CDN.Enable shell docs out of the box by default and allow opt out using
KERL_BUILD_DOCS="no"
- technically any value will opt out, kerl just checks if it's set, and not its value. Since we're opting in by default, we will check!= "yes"
for opt out.Will enable prebuilt binaries for macOS supporting (supported versions of Erlang will of course vary)
This allows installing Erlang in matter of seconds versus 10 minutes on slower machines.
Can optout of prebuilt binaries for macOS with
ASDF_ERLANG_FROM_SOURCE=YES
These will also opt out:
ASDF_INSTALL_TYPE="ref"
KERL_CONFIGURE_OPTIONS
OTP_GITHUB_URL
Failing to find proper binaries will default to installing from source.
No longer symlinks binaries from globs, instead added a
list-bin-paths
that outputs all the directories with binaries. Preferably this should have been handled by asdf itself, but will have to do for now.Will come with out of the box settings for
KERL_CONFIGURE_OPTIONS
:--disable-debug
--disable-silent-rules
--enable-dynamic-ssl-lib
--enable-hipe
--enable-sctp
--enable-shared-zlib
--enable-smp-support
--enable-threads
--enable-wx
--without-javac
--with-ssl=$(brew --prefix openssl)
--enable-darwin-64bit
--enable-kernel-poll
--with-dynamic-trace=dtrace
macOS only: Unless custom
KERL_CONFIGURE_OPTIONS
, asdf-erlang will default to using Homebrew for following dependencies:openssl
wxmac
autoconf
libtool
Keep in mind, this treats
KERL_BASE_DIR
andkerlc
as ephemeral by keeping it in all intmp
.You can override this by setting
ASDF_KERL_BASE_DIR
and it will setKERL_CONFIG=$ASDF_KERL_BASE_DIR/.kerlc
That being said, as a user of asdf-erlang, I'd assume you're not really opting to interact with it by default. So it would make sense to treat it as ephemeral resource more than a configuration to keep around.
Using default
KERL_CONFIGURE_OPTIONS
if unset.For
macOS
this contains additional checks, where it depends on Homebrew and packages installed by it.So if a macOS user wants to opt out of dependencies used by Homebrew, they would need to set their own
KERL_CONFIGURE_OPTIONS
.This is similar to changes in asdf-vm/asdf-ruby#205 I am trying to keep the logic and folder organization the same, since I'm maintaining both of these forks for myself, hence moving
utils.sh
out tolib/utils.sh
, also it feels cleaner not to have non-asdf commands underbin/