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

juvix init generated juvix.yaml is incompatible with the internal-build-dir #2274

Open
paulcadman opened this issue Aug 4, 2023 · 1 comment
Assignees
Labels
Milestone

Comments

@paulcadman
Copy link
Collaborator

A juvix project created using juvix init comes with a pre-populated dependencies field that points to the stdlib dependency in the default build directory .juvix-build:

juvix.yaml

dependencies:
- .juvix-build/stdlib/
name: foo
version: 0.0.0

However we allow users of juvix compile to override the build directory using the --internal-build-dir flag. This currently works because (see #2273) the default stdlib is always copied to .juvix-build/stdlib, the --internal-build-dir.

To fix this we could implement:

and then have some way of referencing the global project dir in a dependency (perhaps with a magic #GLOBAL_PROJECT variable?, though this is ugly, but the global project location is dynamic, it depends on XDG_CONFIG_HOME).

dependencies:
- #GLOBAL_PROJECT/<current_juvix_version_at_juvix_init_invokcation_time>/stdlib
paulcadman added a commit that referenced this issue Aug 9, 2023
)

The mechanism for using `--internal-build-flag` to set the build
directory for the default stdlib location already existed, it was just
unused (Nothing always passed in, instead of the entry point):


https://github.com/anoma/juvix/blob/11ebc4acde4d1c7e70568b35326074e5ee671a77/src/Juvix/Compiler/Concrete/Translation/FromParsed/Analysis/PathResolver.hs#L128

This PR fixes that issue, adds some smoke tests to check the behaviour
of the stdlib dependency.

* Closes #2273

The issue with what to do with relative stdlib dependency paths when
`--internal-build-flag` is set remains open:
#2274
@jonaprieto jonaprieto added this to the 0.5.2 milestone Sep 25, 2023
@paulcadman
Copy link
Collaborator Author

Discussed with the team.

We should use an external dependency for the standard library:

dependencies:
- git:
     url: https://github.com/anoma/juvix-stdlib
     name: stdlib
     ref: v1.2.3  

We should publish releases of the standard library before doing this:

@jonaprieto jonaprieto modified the milestones: 0.5.2, 0.5.3 Oct 2, 2023
@jonaprieto jonaprieto modified the milestones: 0.5.3, 0.5.4 Oct 31, 2023
@jonaprieto jonaprieto modified the milestones: 0.5.4, 0.5.5 Nov 17, 2023
@jonaprieto jonaprieto modified the milestones: 0.5.5, 0.5.6 Dec 1, 2023
@jonaprieto jonaprieto modified the milestones: 0.5.6, 0.6.1 Mar 9, 2024
@paulcadman paulcadman modified the milestones: 0.6.1, 0.6.2 Mar 25, 2024
@paulcadman paulcadman modified the milestones: 0.6.2, 0.6.3, 0.6.4 Jun 12, 2024
@paulcadman paulcadman modified the milestones: 0.6.4, 0.6.5 Jul 2, 2024
@paulcadman paulcadman modified the milestones: 0.6.5, 0.6.6 Jul 19, 2024
@paulcadman paulcadman modified the milestones: 0.6.6, 0.6.7 Aug 15, 2024
@paulcadman paulcadman modified the milestones: 0.6.8, 0.6.9 Nov 11, 2024
@paulcadman paulcadman modified the milestones: 0.6.9, 0.6.10 Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants