Skip to content

Commit

Permalink
fix smoke
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Dec 6, 2023
1 parent 5b9f514 commit 497e024
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
1 change: 0 additions & 1 deletion app/App.hs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ reAppIO args@RunAppIOArgs {..} =
getMainFile' :: (Members '[SCache Package, Embed IO] r') => Maybe (AppPath File) -> Sem r' (Path Abs File)
getMainFile' = \case
Just p -> embed (prepathToAbsFile invDir (p ^. pathPath))
-- Nothing -> case pkg ^. packageMain of
Nothing -> do
pkg <- getPkg
case pkg ^. packageMain of
Expand Down
22 changes: 22 additions & 0 deletions tests/smoke/Commands/typecheck.smoke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,26 @@ tests:
equals: "Well done! It type checks\n"
exit-status: 0

- name: typecheck-global-package
command:
shell:
- bash
script: |
base=$PWD
temp=$(mktemp -d)
trap 'rm -rf -- "$temp"' EXIT
configDir=$temp/config
projDir=$temp/projDir
mkdir $configDir
export XDG_CONFIG_HOME="$configDir"
mkdir $projDir
cd $projDir
echo 'module foo;' > foo.juvix
juvix typecheck foo.juvix
stdout:
equals: "Well done! It type checks\n"
exit-status: 0

- name: typecheck-package-description
command:
shell:
Expand All @@ -69,7 +89,9 @@ tests:
export XDG_CONFIG_HOME="$configDir"
mkdir $projDir
cd $projDir
echo 'module foo;' > foo.juvix
# side-effect: initializes the global project / the package package
juvix typecheck foo.juvix > /dev/null
globalPackageDir=$(juvix dev root)
packagePackageDir="$(dirname $globalPackageDir)"/package
juvix typecheck "$packagePackageDir/PackageDescription/V2.juvix"
Expand Down

0 comments on commit 497e024

Please sign in to comment.