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

Add -n/--non-interactive option to juvix init #2500

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

paulcadman
Copy link
Collaborator

@paulcadman paulcadman commented Nov 3, 2023

When moving to Package.juvix, the package configuration file cannot be empty. So it's convenient to have a quick way to create a Package.juvix file (previously you could run touch juvix.yaml.

This PR adds the -n / --non-interactive option to juvix init. This will create a default Package.juvix, using the name of the current directory to populate the package name.

Similarly for the interactive version of juvix init, if the name of the current directory is not a valid Juvix module then a fallback name is used instead.

For example:

$ mkdir /tmp/new-package
$ cd /tmp/new-package
$ juvix init -n
$ cat Package.juvix
module Package;

import PackageDescription.V1 open;

package : Package :=
  defaultPackage
    {name := "new-package";
     version := mkVersion 0 0 0;
     dependencies := [defaultStdlib]};

@paulcadman paulcadman added this to the 0.5.4 milestone Nov 3, 2023
@paulcadman paulcadman self-assigned this Nov 3, 2023
@paulcadman paulcadman merged commit e8a5d20 into main Nov 6, 2023
@paulcadman paulcadman deleted the non-interactive-juvix-init branch November 6, 2023 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants