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

Support basic dependencies #1622

Merged
merged 61 commits into from
Dec 20, 2022
Merged

Support basic dependencies #1622

merged 61 commits into from
Dec 20, 2022

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Nov 15, 2022

This Pr has two goals:

  1. Add support for local dependencies.
  2. Refactor most of the code that was using FilePath to use Path.

In order to specify the list of dependencies for a package, the field dependencies has been added to the juvix.yaml.
The dependencies field is a list of directories (relative or absolute) that must point to other directories that also contain a juvix.yaml.
As expected, if we add a package to the list of dependencies, we will be able to access its modules through import statements.
Regarding the standard library, the behaviour is as follows:

  1. If the dependencies field is omitted, the stdlib is copied under .juvix-build/stdlib.
  2. If the dependencies field is not omitted and contains the directory .juvix-build/stdlib, it is also copied.
  3. otherwise the stdlib is not copied.

We have discussed some alternatives that are much better than the current behaviour, but we agreed to change that in a separate pr.

commit 055aeca
Author: Jan Mas Rovira <janmasrovira@gmail.com>
Date:   Wed Nov 30 15:46:40 2022 +0100

    change export to avoid conflicts

commit 98043d0
Author: Jan Mas Rovira <janmasrovira@gmail.com>
Date:   Tue Nov 29 16:45:58 2022 +0100

    add recursor for pure implementation

commit df84249
Author: Jan Mas Rovira <janmasrovira@gmail.com>
Date:   Mon Nov 28 21:58:39 2022 +0100

    refactor Files

commit 3fbf9a3
Author: Paul Cadman <git@paulcadman.dev>
Date:   Wed Nov 30 14:58:01 2022 +0000

    Use the same stack version in all CI jobs and remove `stack setup` step (#1651)

    * Remove `stack setup` step as this was only required for macOS

    * Use haskell setup action so same version of stack is used in tests and build
commit ca41030
Author: janmasrovira <janmasrovira@gmail.com>
Date:   Wed Nov 30 18:38:06 2022 +0100

    Files pure refactor (#1652)

commit 57a6a7e
Author: Łukasz Czajka <62751+lukaszcz@users.noreply.github.com>
Date:   Wed Nov 30 16:26:44 2022 +0100

    Fix 'not a primitive type' error message (#1648)

commit 3fbf9a3
Author: Paul Cadman <git@paulcadman.dev>
Date:   Wed Nov 30 14:58:01 2022 +0000

    Use the same stack version in all CI jobs and remove `stack setup` step (#1651)

    * Remove `stack setup` step as this was only required for macOS

    * Use haskell setup action so same version of stack is used in tests and build
commit f5de5fa
Author: Łukasz Czajka <62751+lukaszcz@users.noreply.github.com>
Date:   Tue Dec 6 11:33:20 2022 +0100

    Translation from JuvixAsm to C (#1619)

commit fb2723c
Author: Jonathan Cubides <jonathan.cubides@uib.no>
Date:   Mon Dec 5 11:20:00 2022 +0100

    Update Changelog v0.2.7 🎉

commit 6534287
Author: Jonathan Cubides <jonathan.cubides@uib.no>
Date:   Mon Dec 5 10:28:35 2022 +0100

    Ignore binary files from examples

commit 2db738a
Author: janmasrovira <janmasrovira@gmail.com>
Date:   Fri Dec 2 10:04:56 2022 +0100

    Upgrade stack snapshot to use ghc-9.2.5 (#1621)

    * upgrade stack snapshot to use ghc-9.2.5

    * use lts-20.2

    * Update alpine GHC Dockerfile to 9.2.5

    We also build the Juvix runtime before the stack build in the
    linux-static-binary workflow file.

    * Add some documentation on how to build and deploy the alpine GHC image

    * Docker documentation clarification.

    Co-authored-by: Paul Cadman <git@paulcadman.dev>

commit ca41030
Author: janmasrovira <janmasrovira@gmail.com>
Date:   Wed Nov 30 18:38:06 2022 +0100

    Files pure refactor (#1652)

commit 57a6a7e
Author: Łukasz Czajka <62751+lukaszcz@users.noreply.github.com>
Date:   Wed Nov 30 16:26:44 2022 +0100

    Fix 'not a primitive type' error message (#1648)

commit 3fbf9a3
Author: Paul Cadman <git@paulcadman.dev>
Date:   Wed Nov 30 14:58:01 2022 +0000

    Use the same stack version in all CI jobs and remove `stack setup` step (#1651)

    * Remove `stack setup` step as this was only required for macOS

    * Use haskell setup action so same version of stack is used in tests and build
@janmasrovira janmasrovira changed the title Support basic dependencies wip Support basic dependencies Dec 8, 2022
@janmasrovira janmasrovira marked this pull request as ready for review December 15, 2022 22:43
This is now required at the root of the `juvix-stdlib` directory for
cabal-install as now the stdlib is processed as a Juvix package
Copy link
Collaborator

@paulcadman paulcadman left a comment

Choose a reason for hiding this comment

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

🚢

@paulcadman paulcadman added this to the 0.2.8 milestone Dec 20, 2022
@janmasrovira janmasrovira merged commit af63c36 into main Dec 20, 2022
@janmasrovira janmasrovira deleted the package-dependencies branch December 20, 2022 12:05
@jonaprieto jonaprieto linked an issue Dec 20, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal for supporting basic dependencies
4 participants