Skip to content

Commit

Permalink
Put config dir back in .wasp dir
Browse files Browse the repository at this point in the history
  • Loading branch information
sodic committed Sep 11, 2024
1 parent 68bfe30 commit 0758747
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions waspc/src/Wasp/Project/Analyze.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import Wasp.Project.Common
( CompileError,
CompileWarning,
WaspProjectDir,
dotWaspDirInWaspProjectDir,
findFileInWaspProjectDir,
packageJsonInWaspProjectDir,
prismaSchemaFileInWaspProjectDir,
Expand Down Expand Up @@ -147,7 +148,9 @@ executeMainWaspJsFile waspProjectDir absCompiledMainWaspJsFile = do
ExitFailure _status -> return $ Left ["Error while running the compiled *.wasp.mts file."]
ExitSuccess -> return $ Right absSpecOutputFile
where
absSpecOutputFile = waspProjectDir </> [relfile|config/spec.json|]
-- TODO: The config part of the path is problematic because it relies on TSC to create it during compilation,
-- see notes in compileWaspFile.
absSpecOutputFile = waspProjectDir </> dotWaspDirInWaspProjectDir </> [relfile|config/spec.json|]
absEntrypointFile = waspProjectDir </> tsSdkEntryPointFromProjectDir

-- TODO: Reconsider the return value. Can I write the function in such a way
Expand Down Expand Up @@ -186,10 +189,10 @@ compileWaspTsFile waspProjectDir = do
)
case tscExitCode of
ExitFailure _status -> return $ Left ["Error while running TypeScript compiler on the *.wasp.mts file."]
-- TODO: I shoulde be getting the compiled file path from the tsconfig.node.file
ExitSuccess -> return $ Right absCompiledWaspJsFile
where
absCompiledWaspJsFile = waspProjectDir </> [relfile|config/main.wasp.mjs|]
-- TODO: I should be getting the compiled file path from the tsconfig.node.file
absCompiledWaspJsFile = waspProjectDir </> dotWaspDirInWaspProjectDir </> [relfile|config/main.wasp.mjs|]

analyzeWaspLangFile :: Psl.Schema.Schema -> Path' Abs (File WaspLangFile) -> IO (Either [CompileError] [AS.Decl])
analyzeWaspLangFile prismaSchemaAst waspFilePath = do
Expand Down

0 comments on commit 0758747

Please sign in to comment.