Coder Social home page Coder Social logo

asdf-ocaml's Introduction

asdf-ocaml's People

Contributors

maciektalaska avatar vic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

asdf-ocaml's Issues

How to configure shell

Hello!

The installer for this plugin prints the following message upon completion:

1. To configure OPAM in the current shell session, you need to run:

      eval (opam config env --root=/home/louis/.asdf/installs/ocaml/4.06.0)

2. To correctly configure OPAM for subsequent use, add the following
   line to your profile file (for instance ~/.config/fish/config.fish):

      . /home/louis/.asdf/installs/ocaml/4.06.0/opam-init/init.fish > /dev/null 2> /dev/null or true

3. To avoid issues related to non-system installations of `ocamlfind`
   add the following lines to ~/.ocamlinit (create it if necessary):

      let () =
        try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
        with Not_found -> ()
      ;;

It seems that this would be incorrect as versions change.

What's the recommended way to configure this when using this plugin?

OCaml 4.07.1 fails to install

louispilfold ~ $ asdf install ocaml 4.07.1
Checking for available remotes: rsync and local, git.
  - you won't be able to use mercurial repositories unless you install the hg
    command on your system.
  - you won't be able to use darcs repositories unless you install the darcs
    command on your system.

[WARNING] Recommended external solver aspcud not found.

=-=- Fetching repository information =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫 
[default] synchronized from https://opam.ocaml.org
[NOTE] The repository 'default' will be *permanently* redirected to
       https://opam.ocaml.org/1.2.2 (opam-version < "2.0~")
[default] synchronized from https://opam.ocaml.org/1.2.2
Cannot find /home/louispilfold/.asdf/installs/ocaml/4.07.1/compilers/4.07.1/4.07.1/4.07.1.comp: 4.07.1 is not a valid compiler name.
[ERROR] Initialisation failed
OpamGlobals.Exit(1)
mv: cannot move '/tmp/ocaml_onH7qnB/opam' to '/home/louispilfold/.asdf/installs/ocaml/4.07.1/4.07.1/bin/': No such file or directory

4.07.0 does not have the same problem

external resolver

Is there any hope for also having the plugin build and install aspcud or in general some external resolver? OPAM is barely useful without one -- the very first package I wanted to install with it, install claims it isn't there although I can do info etc on it just fine. Apparently this happens because the internal resolver is junk.

I'd just install one of them with yum but, ha ha, none of them are in the repos for Fedora or RHEL. And really, it'd be nice to have it all packaged together here, if it's possible.

Install OCaml without Opam

I don't think we need to force the installation from Opam. Because esy (and maybe others?) provides a really clean workflow for OCaml and Reason. So I think it's a good reason to rewrite all of this script to compile OCaml from source. What do you guys think about this?

CC: @vic @schutm

Location of opam packages

Hi,

Currently asdf-ocaml initializes a switch in the asdf/releases directory during installation (the line ./opam init --yes --root $install_path --comp $release in install).

Does this mean that package are also stored in this directory and 'local projects/switches' are not possible? If so I'd like to add OPAMROOT=$ASDF_INSTALL_PATH; export OPAMROOT to exec-env to ensure I don't have to set it manually. I can of course create a CR for this.

Best regards,
--Martin

Failed to install ocaml 4.07 and 4.08

When tried to install recent versions of ocaml got the following error

asdf install ocaml 4.08.1                                  
downloading latest opam...
opam                             100%[==========================================================>]   5,82M  1,35MB/s    за 6,8s    
installing specified version of ocaml...
[NOTE] Will configure from built-in defaults.
Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!

<><> Fetching repository information ><><><><><><><><><><><><><><><><><><><><><>
[default] Initialised

<><> Required setup - please read <><><><><><><><><><><><><><><><><><><><><><><>

  In normal operation, opam only alters files within ~/.opam.

  However, to best integrate with your system, some environment variables
  should be set. If you allow it to, this initialisation step will update
  your bash configuration by adding the following line to ~/.bash_profile:

    test -r /home/roman/.asdf/installs/ocaml/4.08.1/opam-init/init.sh && . /home/roman/.asdf/installs/ocaml/4.08.1/opam-init/init.sh > /dev/null 2> /dev/null || true

  Otherwise, every time you want to access your opam installation, you will
  need to run:

    eval $(opam env)

  You can always re-run this setup with 'opam init' later.

Do you want opam to modify ~/.bash_profile? [N/y/f]
(default is 'no', use 'f' to choose a different file) A hook can be added to opam's init scripts to ensure that the shell remains in sync with the opam environment when they are loaded.
Set that up? [y/N] y
[ERROR] No compiler matching '4.08.1' found, use 'opam switch list-available' to see what is available, or use '--packages' to
        select packages explicitly.
mv: unable to move '/tmp/ocaml_89YOGZm/opam' to  '/home/roman/.asdf/installs/ocaml/4.08.1/4.08.1/bin/': No such file or directory

while the version 4.06.1 installed well

using opam

Hi, I just a question about using this plugin with opam (noob to ocaml in general).

After playing around with it for a bit, it seems opam will need to download the compiler version itself regardless of any compilers that have been downloaded previously through this plugin. So, essentially, you get two versions of a compiler in order to use opam. Is this expected? Or am I just configuring it wrong.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.