mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-09-11 15:26:19 +03:00
waspls is now part of waspc (#716)
This commit is contained in:
parent
6cd38b0f94
commit
99487ff2f7
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,8 +5,5 @@
|
||||
# editor related
|
||||
.idea/
|
||||
|
||||
# cabal related
|
||||
dist-newstyle/
|
||||
|
||||
# macOS related
|
||||
.DS_Store
|
||||
|
@ -366,6 +366,11 @@ If it happens just once every so it is probably nothing to worry about. If it ha
|
||||
- Publish new [docs](/web#deployment) from the `release` branch as well.
|
||||
- Announce new release in Discord.
|
||||
|
||||
#### Determining next version
|
||||
waspc is following typical SemVer versioning scheme, so major.minor.patch.
|
||||
There is one a bit peculiar thing though: waspc, besides being a wasp compiler and CLI, also contains wasp language server (waspls) inside it, under the subcommand.
|
||||
So how do changes to waspls affect the version of waspc, since they are packaged together as one exe? We have decided, for practical reasons, to have them affect the patch number, possibly maybe minor, but not major.
|
||||
|
||||
## Documentation
|
||||
External documentation, for users of Wasp, is hosted at https://wasp-lang.dev/docs, and its source is available at [web/docs](/web/docs), next to the website and blog.
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
-- You can benchmark your code quickly and effectively with Criterion. See its
|
||||
-- website for help: <http://www.serpentine.com/criterion/>.
|
||||
import Criterion.Main
|
||||
|
||||
main :: IO ()
|
||||
main = defaultMain [bench "const" (whnf const ())]
|
@ -1,6 +1,6 @@
|
||||
with-compiler: ghc-8.10.7
|
||||
|
||||
packages: waspc/ waspls/
|
||||
packages: .
|
||||
|
||||
package waspc
|
||||
-- This causes cabal to build modules (of local packages, which are waspc and waspls) on all cores,
|
||||
@ -8,12 +8,7 @@ package waspc
|
||||
-- NOTE: If this is enabled at the same time as cabal's parallelization on package-level,
|
||||
-- it can have counter-effect of increasing compilation time due to cabal and ghc fighting
|
||||
-- for common resource: cpu threads.
|
||||
-- This is not a problem for us for now since we have only two packages in our project, with one of
|
||||
-- them being significantly larger (waspc).
|
||||
ghc-options: -j
|
||||
|
||||
package waspls
|
||||
-- Same as above
|
||||
-- This is not a problem for us for now since we have only one package in our project.
|
||||
ghc-options: -j
|
||||
|
||||
-- This causes cabal to build packages on all cores, instead of just one.
|
@ -22,6 +22,7 @@ import Wasp.Cli.Command.Deps (deps)
|
||||
import Wasp.Cli.Command.Info (info)
|
||||
import Wasp.Cli.Command.Start (start)
|
||||
import qualified Wasp.Cli.Command.Telemetry as Telemetry
|
||||
import Wasp.Cli.Command.WaspLS (runWaspLS)
|
||||
import Wasp.Cli.Terminal (title)
|
||||
import Wasp.Util (indent)
|
||||
import qualified Wasp.Util.Terminal as Term
|
||||
@ -43,6 +44,7 @@ main = withUtf8 . (`E.catch` handleInternalErrors) $ do
|
||||
["completion"] -> Command.Call.PrintBashCompletionInstruction
|
||||
["completion:generate"] -> Command.Call.GenerateBashCompletionScript
|
||||
["completion:list"] -> Command.Call.BashCompletionListCommands
|
||||
("waspls" : _) -> Command.Call.WaspLS
|
||||
_ -> Command.Call.Unknown args
|
||||
|
||||
telemetryThread <- Async.async $ runCommand $ Telemetry.considerSendingData commandCall
|
||||
@ -62,6 +64,7 @@ main = withUtf8 . (`E.catch` handleInternalErrors) $ do
|
||||
Command.Call.GenerateBashCompletionScript -> runCommand generateBashCompletionScript
|
||||
Command.Call.BashCompletionListCommands -> runCommand bashCompletion
|
||||
Command.Call.Unknown _ -> printUsage
|
||||
Command.Call.WaspLS -> runWaspLS
|
||||
|
||||
-- If sending of telemetry data is still not done 1 second since commmand finished, abort it.
|
||||
-- We also make sure here to catch all errors that might get thrown and silence them.
|
||||
@ -85,6 +88,7 @@ printUsage =
|
||||
title " GENERAL",
|
||||
cmd " new <project-name> Creates new Wasp project.",
|
||||
cmd " version Prints current version of CLI.",
|
||||
cmd " waspls Run Wasp Language Server. Add --help to get more info.",
|
||||
title " IN PROJECT",
|
||||
cmd " start Runs Wasp app in development mode, watching for file changes.",
|
||||
cmd " db <db-cmd> [args] Executes a database command. Run 'wasp db' for more info.",
|
||||
|
@ -14,4 +14,5 @@ data Call
|
||||
| PrintBashCompletionInstruction
|
||||
| GenerateBashCompletionScript
|
||||
| BashCompletionListCommands
|
||||
| WaspLS
|
||||
| Unknown [String] -- all args
|
||||
|
@ -1,18 +1,15 @@
|
||||
module Main where
|
||||
module Wasp.Cli.Command.WaspLS
|
||||
( runWaspLS,
|
||||
)
|
||||
where
|
||||
|
||||
import Data.Version (showVersion)
|
||||
import qualified Options.Applicative as O
|
||||
import qualified Paths_waspls
|
||||
import qualified Wasp.LSP.Server as LSP
|
||||
import qualified Wasp.LSP.Server as LS
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
runWaspLS :: IO ()
|
||||
runWaspLS = do
|
||||
args <- parseArgsOrPrintUsageAndExit
|
||||
case command args of
|
||||
PrintVersion -> printVersion
|
||||
Serve -> LSP.serve $ optionsLogFile $ options args
|
||||
where
|
||||
printVersion = putStrLn $ showVersion Paths_waspls.version
|
||||
LS.serve $ optionsLogFile $ options args
|
||||
|
||||
parseArgsOrPrintUsageAndExit :: IO Args
|
||||
parseArgsOrPrintUsageAndExit =
|
||||
@ -22,28 +19,17 @@ parseArgsOrPrintUsageAndExit =
|
||||
(O.progDesc "LSP Server for the Wasp language" <> O.fullDesc)
|
||||
|
||||
data Args = Args
|
||||
{ command :: Command,
|
||||
options :: Options
|
||||
{ options :: Options
|
||||
}
|
||||
|
||||
data Command = PrintVersion | Serve
|
||||
|
||||
data Options = Options
|
||||
{ optionsLogFile :: Maybe FilePath,
|
||||
optionsUseStdio :: Bool
|
||||
}
|
||||
|
||||
-- NOTE: Here we assume that first arg on command line is "waspls".
|
||||
parseArgs :: O.Parser Args
|
||||
parseArgs = Args <$> parseCommand <*> parseOptions
|
||||
|
||||
parseCommand :: O.Parser Command
|
||||
parseCommand = O.hsubparser versionCommand O.<|> pure Serve
|
||||
where
|
||||
versionCommand =
|
||||
O.command
|
||||
"version"
|
||||
(O.info (pure PrintVersion) (O.fullDesc <> O.progDesc "Display version and exit"))
|
||||
<> O.metavar "version"
|
||||
parseArgs = Args <$> O.hsubparser (O.command "waspls" (O.info parseOptions (O.progDesc "Run Wasp Language Server")))
|
||||
|
||||
parseOptions :: O.Parser Options
|
||||
parseOptions = Options <$> O.optional parseLogFile <*> parseStdio
|
@ -8,4 +8,5 @@ jobs: $ncpus
|
||||
constraints:
|
||||
ormolu ==0.4.0.0,
|
||||
stan ==0.0.1.0,
|
||||
hlint ==3.3.6
|
||||
hlint ==3.3.6,
|
||||
prune-juice ==0.7
|
@ -39,6 +39,7 @@ function dev_tool_path () {
|
||||
}
|
||||
STAN_CMD="$BUILD_ALL_CMD && $(install_dev_tool stan) && $(dev_tool_path stan) report ${ARGS[@]}"
|
||||
HLINT_CMD="$(install_dev_tool hlint) && $(dev_tool_path hlint) . ${ARGS[@]}"
|
||||
PRUNE_JUICE_CMD="$(install_dev_tool prune-juice) && $(dev_tool_path prune-juice) ${ARGS[@]}"
|
||||
ORMOLU_BASE_CMD="$(install_dev_tool ormolu) && $(dev_tool_path ormolu) --color always --check-idempotence"
|
||||
ORMOLU_CHECK_CMD="$ORMOLU_BASE_CMD --mode check "'$'"(git ls-files '*.hs' '*.hs-boot')"
|
||||
ORMOLU_FORMAT_CMD="$ORMOLU_BASE_CMD --mode inplace "'$'"(git ls-files '*.hs' '*.hs-boot')"
|
||||
@ -82,6 +83,8 @@ print_usage () {
|
||||
"Runs static code analysis on the code, generating stan.html. Builds the project first if needed."
|
||||
print_usage_cmd "hlint <args>" \
|
||||
"Runs linter on the codebase."
|
||||
print_usage_cmd "prune-juice <args>" \
|
||||
"Runs prune-juice on the codebase, which detects unused dependencies."
|
||||
print_usage_cmd "ormolu:check" \
|
||||
"Runs the code formatter and reports if code is correctly formatted or not."
|
||||
print_usage_cmd "ormolu:format" \
|
||||
@ -138,6 +141,9 @@ case $COMMAND in
|
||||
hlint)
|
||||
echo_and_eval "$HLINT_CMD"
|
||||
;;
|
||||
prune-juice)
|
||||
echo_and_eval "$PRUNE_JUICE_CMD"
|
||||
;;
|
||||
ormolu:check)
|
||||
echo_and_eval "$ORMOLU_CHECK_CMD"
|
||||
;;
|
||||
|
@ -60,11 +60,14 @@ common common-all
|
||||
-- to .hie directory. This information can then be used by other tools, e.g. stan (static analyzer).
|
||||
-fwrite-ide-info -hiedir=.hie
|
||||
default-extensions:
|
||||
OverloadedStrings
|
||||
TemplateHaskell
|
||||
QuasiQuotes
|
||||
ScopedTypeVariables
|
||||
LambdaCase
|
||||
OverloadedStrings
|
||||
TemplateHaskell
|
||||
QuasiQuotes
|
||||
ScopedTypeVariables
|
||||
LambdaCase
|
||||
FlexibleContexts
|
||||
MultiParamTypeClasses
|
||||
DisambiguateRecordFields
|
||||
|
||||
common common-exe
|
||||
ghc-options:
|
||||
@ -111,150 +114,180 @@ library
|
||||
, uuid ^>= 1.3.15
|
||||
-- 'array' is used by code generated by Alex for src/Analyzer/Parser/Lexer.x
|
||||
, array ^>= 0.5.4
|
||||
, deepseq
|
||||
, deepseq ^>= 1.4.4
|
||||
other-modules: Paths_waspc
|
||||
exposed-modules:
|
||||
FilePath.Extra
|
||||
Wasp.Analyzer
|
||||
Wasp.Analyzer.AnalyzeError
|
||||
Wasp.Analyzer.ErrorMessage
|
||||
Wasp.Analyzer.Evaluator
|
||||
Wasp.Analyzer.Evaluator.Bindings
|
||||
Wasp.Analyzer.Evaluator.Evaluation
|
||||
Wasp.Analyzer.Evaluator.Evaluation.Combinators
|
||||
Wasp.Analyzer.Evaluator.Evaluation.Internal
|
||||
Wasp.Analyzer.Evaluator.Evaluation.TypedDictExpr
|
||||
Wasp.Analyzer.Evaluator.Evaluation.TypedDictExpr.Combinators
|
||||
Wasp.Analyzer.Evaluator.Evaluation.TypedExpr
|
||||
Wasp.Analyzer.Evaluator.Evaluation.TypedExpr.Combinators
|
||||
Wasp.Analyzer.Evaluator.EvaluationError
|
||||
Wasp.Analyzer.Parser
|
||||
Wasp.Analyzer.Parser.AST
|
||||
Wasp.Analyzer.Parser.AST.PrettyPrinter
|
||||
Wasp.Analyzer.Parser.Ctx
|
||||
Wasp.Analyzer.Parser.ConcreteParser
|
||||
Wasp.Analyzer.Parser.ConcreteParser.ParseError
|
||||
Wasp.Analyzer.Parser.CST
|
||||
Wasp.Analyzer.Parser.CST.Traverse
|
||||
Wasp.Analyzer.Parser.ConcreteParser.ParserLib
|
||||
Wasp.Analyzer.Parser.Lexer
|
||||
Wasp.Analyzer.Parser.Lexer.Lexer
|
||||
Wasp.Analyzer.Parser.Lexer.Internal
|
||||
Wasp.Analyzer.Parser.ParseError
|
||||
Wasp.Analyzer.Parser.PrettyPrinter
|
||||
Wasp.Analyzer.Parser.AbstractParser
|
||||
Wasp.Analyzer.Parser.AbstractParser.Monad
|
||||
Wasp.Analyzer.Parser.SourceOffset
|
||||
Wasp.Analyzer.Parser.SourcePosition
|
||||
Wasp.Analyzer.Parser.SourceRegion
|
||||
Wasp.Analyzer.Parser.SourceSpan
|
||||
Wasp.Analyzer.Parser.Token
|
||||
Wasp.Analyzer.Parser.TokenSet
|
||||
Wasp.Analyzer.StdTypeDefinitions
|
||||
Wasp.Analyzer.StdTypeDefinitions.App.Dependency
|
||||
Wasp.Analyzer.StdTypeDefinitions.Entity
|
||||
Wasp.Analyzer.Type
|
||||
Wasp.Analyzer.TypeChecker
|
||||
Wasp.Analyzer.TypeChecker.AST
|
||||
Wasp.Analyzer.TypeChecker.Internal
|
||||
Wasp.Analyzer.TypeChecker.Monad
|
||||
Wasp.Analyzer.TypeChecker.TypeError
|
||||
Wasp.Analyzer.TypeDefinitions
|
||||
Wasp.Analyzer.TypeDefinitions.Class.HasCustomEvaluation
|
||||
Wasp.Analyzer.TypeDefinitions.Class.IsDeclType
|
||||
Wasp.Analyzer.TypeDefinitions.Class.IsEnumType
|
||||
Wasp.Analyzer.TypeDefinitions.Internal
|
||||
Wasp.Analyzer.TypeDefinitions.TH
|
||||
Wasp.Analyzer.TypeDefinitions.TH.Common
|
||||
Wasp.Analyzer.TypeDefinitions.TH.Decl
|
||||
Wasp.Analyzer.TypeDefinitions.TH.Enum
|
||||
Wasp.AppSpec
|
||||
Wasp.AppSpec.Action
|
||||
Wasp.AppSpec.App
|
||||
Wasp.AppSpec.App.Auth
|
||||
Wasp.AppSpec.App.Client
|
||||
Wasp.AppSpec.App.Db
|
||||
Wasp.AppSpec.App.Dependency
|
||||
Wasp.AppSpec.App.Server
|
||||
Wasp.AppSpec.Core.Decl
|
||||
Wasp.AppSpec.Core.Ref
|
||||
Wasp.AppSpec.Entity
|
||||
Wasp.AppSpec.Entity.Field
|
||||
Wasp.AppSpec.ExternalCode
|
||||
Wasp.AppSpec.ExtImport
|
||||
Wasp.AppSpec.Job
|
||||
Wasp.AppSpec.JSON
|
||||
Wasp.AppSpec.Operation
|
||||
Wasp.AppSpec.Page
|
||||
Wasp.AppSpec.Query
|
||||
Wasp.AppSpec.Route
|
||||
Wasp.AppSpec.Valid
|
||||
Wasp.AppSpec.Util
|
||||
Wasp.Common
|
||||
Wasp.CompileOptions
|
||||
Wasp.Data
|
||||
Wasp.Error
|
||||
Wasp.ExternalCode
|
||||
Wasp.Generator
|
||||
Wasp.Generator.Common
|
||||
Wasp.Generator.DbGenerator
|
||||
Wasp.Generator.DbGenerator.Common
|
||||
Wasp.Generator.DbGenerator.Jobs
|
||||
Wasp.Generator.DbGenerator.Operations
|
||||
Wasp.Generator.DockerGenerator
|
||||
Wasp.Generator.ExternalCodeGenerator
|
||||
Wasp.Generator.ExternalCodeGenerator.Common
|
||||
Wasp.Generator.ExternalCodeGenerator.Js
|
||||
Wasp.Generator.FileDraft
|
||||
Wasp.Generator.FileDraft.CopyDirFileDraft
|
||||
Wasp.Generator.FileDraft.CopyFileDraft
|
||||
Wasp.Generator.FileDraft.TemplateFileDraft
|
||||
Wasp.Generator.FileDraft.TextFileDraft
|
||||
Wasp.Generator.FileDraft.Writeable
|
||||
Wasp.Generator.FileDraft.WriteableMonad
|
||||
Wasp.Generator.Job
|
||||
Wasp.Generator.Job.IO
|
||||
Wasp.Generator.Job.Process
|
||||
Wasp.Generator.JsImport
|
||||
Wasp.Generator.Monad
|
||||
Wasp.Generator.ServerGenerator
|
||||
Wasp.Generator.ServerGenerator.AuthG
|
||||
Wasp.Generator.ServerGenerator.Common
|
||||
Wasp.Generator.ServerGenerator.ConfigG
|
||||
Wasp.Generator.ServerGenerator.ExternalCodeGenerator
|
||||
Wasp.Generator.ServerGenerator.JobGenerator
|
||||
Wasp.Generator.ServerGenerator.OperationsG
|
||||
Wasp.Generator.ServerGenerator.OperationsRoutesG
|
||||
Wasp.Generator.ServerGenerator.Setup
|
||||
Wasp.Generator.ServerGenerator.Start
|
||||
Wasp.Generator.Setup
|
||||
Wasp.Generator.Start
|
||||
Wasp.Generator.Templates
|
||||
Wasp.Generator.WebAppGenerator
|
||||
Wasp.Generator.WebAppGenerator.AuthG
|
||||
Wasp.Generator.WebAppGenerator.Common
|
||||
Wasp.Generator.WebAppGenerator.ExternalCodeGenerator
|
||||
Wasp.Generator.WebAppGenerator.OperationsGenerator
|
||||
Wasp.Generator.WebAppGenerator.OperationsGenerator.ResourcesG
|
||||
Wasp.Generator.WebAppGenerator.RouterGenerator
|
||||
Wasp.Generator.WebAppGenerator.Setup
|
||||
Wasp.Generator.WebAppGenerator.Start
|
||||
Wasp.Generator.WriteFileDrafts
|
||||
Wasp.Lib
|
||||
Wasp.NpmDependency
|
||||
Wasp.Psl.Ast.Model
|
||||
Wasp.Psl.Generator.Model
|
||||
Wasp.Psl.Parser.Model
|
||||
Wasp.SemanticVersion
|
||||
Wasp.Util
|
||||
Wasp.Util.Control.Monad
|
||||
Wasp.Util.Fib
|
||||
Wasp.Util.IO
|
||||
Wasp.Util.Terminal
|
||||
Wasp.WaspignoreFile
|
||||
Wasp.Generator.NpmDependencies
|
||||
Wasp.Generator.NpmInstall
|
||||
Wasp.Message
|
||||
FilePath.Extra
|
||||
Wasp.Analyzer
|
||||
Wasp.Analyzer.AnalyzeError
|
||||
Wasp.Analyzer.ErrorMessage
|
||||
Wasp.Analyzer.Evaluator
|
||||
Wasp.Analyzer.Evaluator.Bindings
|
||||
Wasp.Analyzer.Evaluator.Evaluation
|
||||
Wasp.Analyzer.Evaluator.Evaluation.Combinators
|
||||
Wasp.Analyzer.Evaluator.Evaluation.Internal
|
||||
Wasp.Analyzer.Evaluator.Evaluation.TypedDictExpr
|
||||
Wasp.Analyzer.Evaluator.Evaluation.TypedDictExpr.Combinators
|
||||
Wasp.Analyzer.Evaluator.Evaluation.TypedExpr
|
||||
Wasp.Analyzer.Evaluator.Evaluation.TypedExpr.Combinators
|
||||
Wasp.Analyzer.Evaluator.EvaluationError
|
||||
Wasp.Analyzer.Parser
|
||||
Wasp.Analyzer.Parser.AST
|
||||
Wasp.Analyzer.Parser.AST.PrettyPrinter
|
||||
Wasp.Analyzer.Parser.Ctx
|
||||
Wasp.Analyzer.Parser.ConcreteParser
|
||||
Wasp.Analyzer.Parser.ConcreteParser.ParseError
|
||||
Wasp.Analyzer.Parser.CST
|
||||
Wasp.Analyzer.Parser.CST.Traverse
|
||||
Wasp.Analyzer.Parser.ConcreteParser.ParserLib
|
||||
Wasp.Analyzer.Parser.Lexer
|
||||
Wasp.Analyzer.Parser.Lexer.Lexer
|
||||
Wasp.Analyzer.Parser.Lexer.Internal
|
||||
Wasp.Analyzer.Parser.ParseError
|
||||
Wasp.Analyzer.Parser.PrettyPrinter
|
||||
Wasp.Analyzer.Parser.AbstractParser
|
||||
Wasp.Analyzer.Parser.AbstractParser.Monad
|
||||
Wasp.Analyzer.Parser.SourceOffset
|
||||
Wasp.Analyzer.Parser.SourcePosition
|
||||
Wasp.Analyzer.Parser.SourceRegion
|
||||
Wasp.Analyzer.Parser.SourceSpan
|
||||
Wasp.Analyzer.Parser.Token
|
||||
Wasp.Analyzer.Parser.TokenSet
|
||||
Wasp.Analyzer.StdTypeDefinitions
|
||||
Wasp.Analyzer.StdTypeDefinitions.App.Dependency
|
||||
Wasp.Analyzer.StdTypeDefinitions.Entity
|
||||
Wasp.Analyzer.Type
|
||||
Wasp.Analyzer.TypeChecker
|
||||
Wasp.Analyzer.TypeChecker.AST
|
||||
Wasp.Analyzer.TypeChecker.Internal
|
||||
Wasp.Analyzer.TypeChecker.Monad
|
||||
Wasp.Analyzer.TypeChecker.TypeError
|
||||
Wasp.Analyzer.TypeDefinitions
|
||||
Wasp.Analyzer.TypeDefinitions.Class.HasCustomEvaluation
|
||||
Wasp.Analyzer.TypeDefinitions.Class.IsDeclType
|
||||
Wasp.Analyzer.TypeDefinitions.Class.IsEnumType
|
||||
Wasp.Analyzer.TypeDefinitions.Internal
|
||||
Wasp.Analyzer.TypeDefinitions.TH
|
||||
Wasp.Analyzer.TypeDefinitions.TH.Common
|
||||
Wasp.Analyzer.TypeDefinitions.TH.Decl
|
||||
Wasp.Analyzer.TypeDefinitions.TH.Enum
|
||||
Wasp.AppSpec
|
||||
Wasp.AppSpec.Action
|
||||
Wasp.AppSpec.App
|
||||
Wasp.AppSpec.App.Auth
|
||||
Wasp.AppSpec.App.Client
|
||||
Wasp.AppSpec.App.Db
|
||||
Wasp.AppSpec.App.Dependency
|
||||
Wasp.AppSpec.App.Server
|
||||
Wasp.AppSpec.Core.Decl
|
||||
Wasp.AppSpec.Core.Ref
|
||||
Wasp.AppSpec.Entity
|
||||
Wasp.AppSpec.Entity.Field
|
||||
Wasp.AppSpec.ExternalCode
|
||||
Wasp.AppSpec.ExtImport
|
||||
Wasp.AppSpec.Job
|
||||
Wasp.AppSpec.JSON
|
||||
Wasp.AppSpec.Operation
|
||||
Wasp.AppSpec.Page
|
||||
Wasp.AppSpec.Query
|
||||
Wasp.AppSpec.Route
|
||||
Wasp.AppSpec.Valid
|
||||
Wasp.AppSpec.Util
|
||||
Wasp.Common
|
||||
Wasp.CompileOptions
|
||||
Wasp.Data
|
||||
Wasp.Error
|
||||
Wasp.ExternalCode
|
||||
Wasp.Generator
|
||||
Wasp.Generator.Common
|
||||
Wasp.Generator.DbGenerator
|
||||
Wasp.Generator.DbGenerator.Common
|
||||
Wasp.Generator.DbGenerator.Jobs
|
||||
Wasp.Generator.DbGenerator.Operations
|
||||
Wasp.Generator.DockerGenerator
|
||||
Wasp.Generator.ExternalCodeGenerator
|
||||
Wasp.Generator.ExternalCodeGenerator.Common
|
||||
Wasp.Generator.ExternalCodeGenerator.Js
|
||||
Wasp.Generator.FileDraft
|
||||
Wasp.Generator.FileDraft.CopyDirFileDraft
|
||||
Wasp.Generator.FileDraft.CopyFileDraft
|
||||
Wasp.Generator.FileDraft.TemplateFileDraft
|
||||
Wasp.Generator.FileDraft.TextFileDraft
|
||||
Wasp.Generator.FileDraft.Writeable
|
||||
Wasp.Generator.FileDraft.WriteableMonad
|
||||
Wasp.Generator.Job
|
||||
Wasp.Generator.Job.IO
|
||||
Wasp.Generator.Job.Process
|
||||
Wasp.Generator.JsImport
|
||||
Wasp.Generator.Monad
|
||||
Wasp.Generator.ServerGenerator
|
||||
Wasp.Generator.ServerGenerator.AuthG
|
||||
Wasp.Generator.ServerGenerator.Common
|
||||
Wasp.Generator.ServerGenerator.ConfigG
|
||||
Wasp.Generator.ServerGenerator.ExternalCodeGenerator
|
||||
Wasp.Generator.ServerGenerator.JobGenerator
|
||||
Wasp.Generator.ServerGenerator.OperationsG
|
||||
Wasp.Generator.ServerGenerator.OperationsRoutesG
|
||||
Wasp.Generator.ServerGenerator.Setup
|
||||
Wasp.Generator.ServerGenerator.Start
|
||||
Wasp.Generator.Setup
|
||||
Wasp.Generator.Start
|
||||
Wasp.Generator.Templates
|
||||
Wasp.Generator.WebAppGenerator
|
||||
Wasp.Generator.WebAppGenerator.AuthG
|
||||
Wasp.Generator.WebAppGenerator.Common
|
||||
Wasp.Generator.WebAppGenerator.ExternalCodeGenerator
|
||||
Wasp.Generator.WebAppGenerator.OperationsGenerator
|
||||
Wasp.Generator.WebAppGenerator.OperationsGenerator.ResourcesG
|
||||
Wasp.Generator.WebAppGenerator.RouterGenerator
|
||||
Wasp.Generator.WebAppGenerator.Setup
|
||||
Wasp.Generator.WebAppGenerator.Start
|
||||
Wasp.Generator.WriteFileDrafts
|
||||
Wasp.Lib
|
||||
Wasp.NpmDependency
|
||||
Wasp.Psl.Ast.Model
|
||||
Wasp.Psl.Generator.Model
|
||||
Wasp.Psl.Parser.Model
|
||||
Wasp.SemanticVersion
|
||||
Wasp.Util
|
||||
Wasp.Util.Control.Monad
|
||||
Wasp.Util.Fib
|
||||
Wasp.Util.IO
|
||||
Wasp.Util.Terminal
|
||||
Wasp.WaspignoreFile
|
||||
Wasp.Generator.NpmDependencies
|
||||
Wasp.Generator.NpmInstall
|
||||
Wasp.Message
|
||||
|
||||
library waspls
|
||||
import: common-all
|
||||
hs-source-dirs: waspls/src
|
||||
exposed-modules:
|
||||
Wasp.LSP.Server
|
||||
other-modules:
|
||||
Wasp.LSP.ServerState
|
||||
Wasp.LSP.ServerConfig
|
||||
Wasp.LSP.ServerM
|
||||
Wasp.LSP.Handlers
|
||||
Wasp.LSP.Diagnostic
|
||||
Wasp.LSP.Completion
|
||||
Wasp.LSP.Util
|
||||
Wasp.LSP.Syntax
|
||||
build-depends:
|
||||
base
|
||||
, aeson
|
||||
, aeson-pretty
|
||||
, deepseq
|
||||
, data-default ^>=0.7.1.1
|
||||
, hslogger ^>=1.3.1.0
|
||||
, lens ^>=5.1
|
||||
, lsp ^>=1.4.0.0
|
||||
, lsp-types ^>=1.4.0.1
|
||||
, mtl
|
||||
, text
|
||||
, transformers ^>=0.5.6.2
|
||||
, utf8-string
|
||||
, waspc
|
||||
|
||||
library cli-lib
|
||||
import: common-all
|
||||
@ -271,36 +304,39 @@ library cli-lib
|
||||
, cryptonite
|
||||
, fsnotify
|
||||
, http-conduit
|
||||
, optparse-applicative ^>=0.17.0.0
|
||||
, path
|
||||
, path-io
|
||||
, strong-path
|
||||
, utf8-string
|
||||
, uuid
|
||||
, waspc
|
||||
, waspls
|
||||
other-modules: Paths_waspc
|
||||
exposed-modules:
|
||||
Wasp.Cli.Command
|
||||
Wasp.Cli.Command.BashCompletion
|
||||
Wasp.Cli.Command.Build
|
||||
Wasp.Cli.Command.Call
|
||||
Wasp.Cli.Command.Clean
|
||||
Wasp.Cli.Command.Common
|
||||
Wasp.Cli.Command.Compile
|
||||
Wasp.Cli.Command.CreateNewProject
|
||||
Wasp.Cli.Command.Db
|
||||
Wasp.Cli.Command.Db.Migrate
|
||||
Wasp.Cli.Command.Deps
|
||||
Wasp.Cli.Command.Info
|
||||
Wasp.Cli.Command.Start
|
||||
Wasp.Cli.Command.Telemetry
|
||||
Wasp.Cli.Command.Telemetry.Common
|
||||
Wasp.Cli.Command.Telemetry.Project
|
||||
Wasp.Cli.Command.Telemetry.User
|
||||
Wasp.Cli.Command.Watch
|
||||
Wasp.Cli.Common
|
||||
Wasp.Cli.Terminal
|
||||
Wasp.Cli.Command.Message
|
||||
Wasp.Cli.Message
|
||||
Wasp.Cli.Command
|
||||
Wasp.Cli.Command.BashCompletion
|
||||
Wasp.Cli.Command.Build
|
||||
Wasp.Cli.Command.Call
|
||||
Wasp.Cli.Command.Clean
|
||||
Wasp.Cli.Command.Common
|
||||
Wasp.Cli.Command.Compile
|
||||
Wasp.Cli.Command.CreateNewProject
|
||||
Wasp.Cli.Command.Db
|
||||
Wasp.Cli.Command.Db.Migrate
|
||||
Wasp.Cli.Command.Deps
|
||||
Wasp.Cli.Command.Info
|
||||
Wasp.Cli.Command.Start
|
||||
Wasp.Cli.Command.Telemetry
|
||||
Wasp.Cli.Command.Telemetry.Common
|
||||
Wasp.Cli.Command.Telemetry.Project
|
||||
Wasp.Cli.Command.Telemetry.User
|
||||
Wasp.Cli.Command.Watch
|
||||
Wasp.Cli.Command.WaspLS
|
||||
Wasp.Cli.Common
|
||||
Wasp.Cli.Terminal
|
||||
Wasp.Cli.Command.Message
|
||||
Wasp.Cli.Message
|
||||
|
||||
executable wasp-cli
|
||||
import: common-all, common-exe
|
||||
@ -344,39 +380,59 @@ test-suite waspc-test
|
||||
, tasty-quickcheck ^>= 0.10
|
||||
, tasty-golden ^>= 2.3.5
|
||||
other-modules:
|
||||
Analyzer.Evaluation.EvaluationErrorTest
|
||||
Analyzer.EvaluatorTest
|
||||
Analyzer.Parser.ConcreteParserTest
|
||||
Analyzer.Parser.CST.TraverseTest
|
||||
Analyzer.Parser.ParseErrorTest
|
||||
Analyzer.Parser.SourcePositionTest
|
||||
Analyzer.ParserTest
|
||||
Analyzer.TestUtil
|
||||
Analyzer.TypeChecker.InternalTest
|
||||
Analyzer.TypeCheckerTest
|
||||
AnalyzerTest
|
||||
AppSpec.ValidTest
|
||||
ErrorTest
|
||||
FilePath.ExtraTest
|
||||
Fixtures
|
||||
Generator.ExternalCodeGenerator.JsTest
|
||||
Generator.FileDraft.CopyFileDraftTest
|
||||
Generator.FileDraft.TemplateFileDraftTest
|
||||
Generator.MockWriteableMonad
|
||||
Generator.WebAppGeneratorTest
|
||||
Generator.WriteFileDraftsTest
|
||||
Psl.Common.ModelTest
|
||||
Psl.Generator.ModelTest
|
||||
Psl.Parser.ModelTest
|
||||
Test.Util
|
||||
Util.FibTest
|
||||
Util.Control.MonadTest
|
||||
UtilTest
|
||||
Util.Diff
|
||||
SemanticVersionTest
|
||||
WaspignoreFileTest
|
||||
Paths_waspc
|
||||
Generator.NpmDependenciesTest
|
||||
Analyzer.Evaluation.EvaluationErrorTest
|
||||
Analyzer.EvaluatorTest
|
||||
Analyzer.Parser.ConcreteParserTest
|
||||
Analyzer.Parser.CST.TraverseTest
|
||||
Analyzer.Parser.ParseErrorTest
|
||||
Analyzer.Parser.SourcePositionTest
|
||||
Analyzer.ParserTest
|
||||
Analyzer.TestUtil
|
||||
Analyzer.TypeChecker.InternalTest
|
||||
Analyzer.TypeCheckerTest
|
||||
AnalyzerTest
|
||||
AppSpec.ValidTest
|
||||
ErrorTest
|
||||
FilePath.ExtraTest
|
||||
Fixtures
|
||||
Generator.ExternalCodeGenerator.JsTest
|
||||
Generator.FileDraft.CopyFileDraftTest
|
||||
Generator.FileDraft.TemplateFileDraftTest
|
||||
Generator.MockWriteableMonad
|
||||
Generator.WebAppGeneratorTest
|
||||
Generator.WriteFileDraftsTest
|
||||
Psl.Common.ModelTest
|
||||
Psl.Generator.ModelTest
|
||||
Psl.Parser.ModelTest
|
||||
Test.Util
|
||||
Util.FibTest
|
||||
Util.Control.MonadTest
|
||||
UtilTest
|
||||
Util.Diff
|
||||
SemanticVersionTest
|
||||
WaspignoreFileTest
|
||||
Paths_waspc
|
||||
Generator.NpmDependenciesTest
|
||||
|
||||
test-suite cli-test
|
||||
import: common-all, common-exe
|
||||
type: exitcode-stdio-1.0
|
||||
hs-source-dirs: cli/test
|
||||
main-is: TastyDiscoverDriver.hs
|
||||
build-tool-depends:
|
||||
tasty-discover:tasty-discover
|
||||
build-depends:
|
||||
, base
|
||||
, waspc
|
||||
, cli-lib
|
||||
, QuickCheck ^>= 2.14
|
||||
, tasty ^>= 1.4.2
|
||||
-- tasty-hspec 1.1.7 introduces breaking changes, which is why we have < 1.1.7 .
|
||||
, tasty-hspec >= 1.1 && < 1.1.7
|
||||
, tasty-quickcheck ^>= 0.10
|
||||
other-modules:
|
||||
TerminalTest
|
||||
Paths_waspc
|
||||
|
||||
test-suite e2e-test
|
||||
import: common-all, common-exe
|
||||
@ -408,35 +464,4 @@ test-suite e2e-test
|
||||
Tests.WaspCompileTest
|
||||
Tests.WaspJobTest
|
||||
Tests.WaspMigrateTest
|
||||
Tests.WaspNewTest
|
||||
|
||||
test-suite cli-test
|
||||
import: common-all, common-exe
|
||||
type: exitcode-stdio-1.0
|
||||
hs-source-dirs: cli/test
|
||||
main-is: TastyDiscoverDriver.hs
|
||||
build-tool-depends:
|
||||
tasty-discover:tasty-discover
|
||||
build-depends:
|
||||
, base
|
||||
, waspc
|
||||
, cli-lib
|
||||
, QuickCheck ^>= 2.14
|
||||
, tasty ^>= 1.4.2
|
||||
-- tasty-hspec 1.1.7 introduces breaking changes, which is why we have < 1.1.7 .
|
||||
, tasty-hspec >= 1.1 && < 1.1.7
|
||||
, tasty-quickcheck ^>= 0.10
|
||||
other-modules:
|
||||
TerminalTest
|
||||
Paths_waspc
|
||||
|
||||
benchmark waspc-benchmarks
|
||||
import: common-all, common-exe
|
||||
type: exitcode-stdio-1.0
|
||||
hs-source-dirs: benchmark
|
||||
main-is: Main.hs
|
||||
other-modules: Paths_waspc
|
||||
build-depends:
|
||||
base
|
||||
, criterion ^>= 1.5
|
||||
, waspc
|
||||
Tests.WaspNewTest
|
8
waspls/.gitignore
vendored
8
waspls/.gitignore
vendored
@ -1,8 +0,0 @@
|
||||
dist-newstyle
|
||||
.hie
|
||||
|
||||
*.orig
|
||||
*~
|
||||
.dir-locals.el
|
||||
.projectile
|
||||
.vscode
|
@ -1,12 +0,0 @@
|
||||
- arguments:
|
||||
# NOTE: List of extensions below should reflect the list
|
||||
# of default extensions from package.yaml.
|
||||
- -XOverloadedStrings
|
||||
- -XScopedTypeVariables
|
||||
|
||||
- ignore: {name: Use camelCase} # We can decide this on our own.
|
||||
- ignore: {name: Eta reduce} # We can decide this on our own.
|
||||
- ignore: {name: Use newtype instead of data} # We can decide this on our own.
|
||||
- ignore: {name: Use $>} # I find it makes code harder to read if enforced.
|
||||
- ignore: {name: Use list comprehension} # We can decide this on our own.
|
||||
- ignore: {name: Use ++} # I sometimes prefer concat over ++ due to the nicer formatting / extensibility.
|
@ -1,5 +0,0 @@
|
||||
# Revision history for waspls
|
||||
|
||||
## 0.1.0.0 -- YYYY-mm-dd
|
||||
|
||||
* First version. Released on an unsuspecting world.
|
@ -1,20 +0,0 @@
|
||||
Copyright (c) 2022 Wasp Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -1,16 +0,0 @@
|
||||
# Waspls
|
||||
|
||||
This directory contains source code of the `wasp` language server (aka `waspls`)
|
||||
and this README is aimed at the contributors to the project.
|
||||
|
||||
## Overview
|
||||
|
||||
`waspls` is implemented in Haskell. It depends on `waspc` for parsing and
|
||||
analyzing wasp source code. Cabal is currently configured to look in `../waspc`
|
||||
for the `waspc` package, so do not move `waspls` out of the `wasp` repo without
|
||||
adjusting this line in `cabal.project`.
|
||||
|
||||
## Usage
|
||||
|
||||
Use in any place an LSP server can be used. Run `waspls --help` for usage
|
||||
information.
|
@ -1,2 +0,0 @@
|
||||
cradle:
|
||||
cabal:
|
@ -1,5 +0,0 @@
|
||||
{-# OPTIONS_GHC -F -pgmF tasty-discover -optF --modules=*Test.hs #-}
|
||||
|
||||
-- -optF --modules=*Test.hs tells tasty-discover to pick up only files that match *Test.hs.
|
||||
-- I did not do this for any strong reason so we can remove it in the future if we figure out
|
||||
-- it is too restrictive.
|
@ -1,110 +0,0 @@
|
||||
cabal-version: 2.4
|
||||
|
||||
-- TODO: Would it be just all easier if I merged this into waspc cabal package?
|
||||
|
||||
name: waspls
|
||||
version: 0.1.0.0
|
||||
description: Please see the README on GitHub at <https://github.com/wasp-lang/wasp/waspls#readme>
|
||||
homepage: https://github.com/wasp-lang/wasp/waspls#readme
|
||||
bug-reports: https://github.com/wasp-lang/wasp/issues
|
||||
author: Wasp Team
|
||||
maintainer: team@wasp-lang.dev
|
||||
copyright: Wasp, Inc.
|
||||
license: MIT
|
||||
license-file: LICENSE
|
||||
extra-source-files:
|
||||
README.md
|
||||
CHANGELOG.md
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: https://github.com/wasp-lang/wasp
|
||||
|
||||
common common-all
|
||||
default-language: Haskell2010
|
||||
ghc-options:
|
||||
-Wall
|
||||
-- -optP-Wno-nonportable-include-path avoids warning caused by .../autogen/cabal_macros.h. on OSX.
|
||||
-optP-Wno-nonportable-include-path
|
||||
-- -fwrite-ide-info and -hiedir=.hie tell GHC to write compile-time information about the code
|
||||
-- to .hie directory. This information can then be used by other tools, e.g. stan (static analyzer).
|
||||
-fwrite-ide-info -hiedir=.hie
|
||||
default-extensions:
|
||||
OverloadedStrings
|
||||
ScopedTypeVariables
|
||||
FlexibleContexts
|
||||
MultiParamTypeClasses
|
||||
DisambiguateRecordFields
|
||||
|
||||
common common-exe
|
||||
ghc-options:
|
||||
-threaded -rtsopts -with-rtsopts=-N
|
||||
|
||||
library
|
||||
import: common-all
|
||||
exposed-modules:
|
||||
Wasp.LSP.Server
|
||||
other-modules:
|
||||
Paths_waspls
|
||||
Wasp.LSP.ServerState
|
||||
Wasp.LSP.ServerConfig
|
||||
Wasp.LSP.ServerM
|
||||
Wasp.LSP.Handlers
|
||||
Wasp.LSP.Diagnostic
|
||||
Wasp.LSP.Completion
|
||||
Wasp.LSP.Util
|
||||
Wasp.LSP.Syntax
|
||||
hs-source-dirs:
|
||||
src
|
||||
build-tool-depends:
|
||||
, alex:alex
|
||||
build-depends:
|
||||
, base ^>=4.14.3.0
|
||||
, waspc
|
||||
, lsp ^>=1.4.0.0
|
||||
, lsp-types ^>=1.4.0.1
|
||||
, containers ^>=0.6.5.1
|
||||
, mtl ^>=2.2.2
|
||||
, transformers ^>=0.5.6.2
|
||||
, text ^>=1.2.4.1
|
||||
, data-default ^>=0.7.1.1
|
||||
, hslogger ^>=1.3.1.0
|
||||
, aeson ^>=1.5.6
|
||||
, lens ^>=5.1
|
||||
, aeson-pretty ^>= 0.8
|
||||
, utf8-string ^>= 1.0.2
|
||||
-- 'array' is used by code generated by Alex for src/Analyzer/Parser/Lexer.x
|
||||
, array ^>= 0.5.4
|
||||
, deepseq
|
||||
|
||||
test-suite waspls-test
|
||||
import: common-all, common-exe
|
||||
type: exitcode-stdio-1.0
|
||||
hs-source-dirs: test
|
||||
main-is: TastyDiscoverDriver.hs
|
||||
build-tool-depends:
|
||||
, tasty-discover:tasty-discover
|
||||
build-depends:
|
||||
, base
|
||||
, waspls
|
||||
, deepseq
|
||||
, containers ^>= 0.6.5
|
||||
, QuickCheck ^>= 2.14
|
||||
, tasty ^>= 1.4.2
|
||||
-- tasty-hspec 1.1.7 introduces breaking changes, which is why we have < 1.1.7 .
|
||||
, tasty-hspec >= 1.1 && < 1.1.7
|
||||
, tasty-quickcheck ^>= 0.10
|
||||
other-modules:
|
||||
|
||||
executable waspls
|
||||
import: common-all, common-exe
|
||||
main-is: Main.hs
|
||||
other-modules:
|
||||
Paths_waspls
|
||||
hs-source-dirs:
|
||||
exe
|
||||
build-depends:
|
||||
, base ^>=4.14.3.0
|
||||
, optparse-applicative ^>=0.17.0.0
|
||||
, waspls
|
||||
default-language: Haskell2010
|
10
waspls/watch
10
waspls/watch
@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Rebuilds project when a source file changes
|
||||
|
||||
inotifywait -m -e close_write -r src/ exe/ waspls.cabal |
|
||||
while read directory action file; do
|
||||
printf "\033[33mFile changed. Starting recompile...\033[0m\n"
|
||||
cabal build
|
||||
printf "\033[1;32mFinished\033[0m\n"
|
||||
done
|
Loading…
Reference in New Issue
Block a user