-
Notifications
You must be signed in to change notification settings - Fork 51
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
Use a Juvix source file to define a package #2434
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paulcadman
force-pushed
the
juvix-package-file
branch
3 times, most recently
from
October 16, 2023 19:03
f1ffe16
to
087ef77
Compare
This was referenced Oct 20, 2023
paulcadman
force-pushed
the
juvix-package-file
branch
from
October 23, 2023 07:44
4d657fa
to
2021238
Compare
paulcadman
added a commit
that referenced
this pull request
Oct 23, 2023
Depends on: * #2451 This PR is part of a series implementing: * #2336 In attempt to make the main PR: * #2434 easier to review. Changes in this PR refactor EntryPoint, Package, Pipeline, Root, splitting out the types into Base modules so that they can be imported and used in subsequent PRs with fewer dependencies to avoid package cycles.
paulcadman
added a commit
that referenced
this pull request
Oct 23, 2023
) Depends on: * #2458 This PR is part of a series implementing: * #2336 In attempt to make the main PR: * #2434 easier to review. This PR introduces standard JuvixError handling for errors related to the loading of the juvix.yaml file. Before this PR errors were thrown as Text and then communicated to the user using the `error` function.
paulcadman
force-pushed
the
juvix-package-file
branch
from
October 23, 2023 18:10
2021238
to
2864246
Compare
paulcadman
force-pushed
the
juvix-package-file
branch
from
October 24, 2023 12:32
05fbb6b
to
35b2f61
Compare
paulcadman
force-pushed
the
juvix-package-file
branch
from
October 25, 2023 10:08
33fbb79
to
e000f31
Compare
The default package name is "my-project" and the project depends on ".juvix-build/stdlib" if no dependency is specified.
The defaultStdlibDependency is resolved against the configured build directory.
janmasrovira
force-pushed
the
juvix-package-file
branch
from
October 27, 2023 10:37
e000f31
to
25d3a8e
Compare
janmasrovira
approved these changes
Oct 27, 2023
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.
🛥️
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on:
Use JuvixError instead of Text for errors in Package file loading #2459This PR is part of a series implementing:
This PR adds the package file loading function, including a file evaluation effect. It integrates this with the existing
readPackage
function and adds tests / smoke tests.Package.juvix format
Instead of
juvix.yaml
(which is still supported currently) users can now place aPackage.juvix
file in the root of their project. The simplestPackage.juvix
file you can write is:The PackageDescription module defines the
Package
type. Users can use "go-to definition" in their IDE from the Package file to see the documentation and definitions.Users may also import
Stdlib.Prelude
in their Package file. This is loaded from the global project. No other module imports are supported.Notes:
Package.juvix
andjuvix.yaml
thenPackage.juvix
is used in preference.Default stdlib dependency
The
Dependency
type has a constructor calleddefaultStdlib
. This means that any project can use the compiler builtin standard library dependency. Withjuvix.yaml
this dependency is only available when thedependencies
field is unspecified.Validation
As well as the standard type checking validation that the Juvix compiler provides additional validation is made on the file.
The Package module must contain the identifier
package
and it must have typePackage
that's obtained from the globalPackageDescription
module.Every dependency specified in the Package.juvix must be unique.
Closes Proposal: Use a Juvix source file to define a package instead of YAML #2336
Examples
Package with name and version
Package with GitHub dependency
Package with main and buildDir fields