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

WIP: [Obsolete] Integration of requirements checker plugin #1074

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ run . cabal_install --ghcjs ./codeworld-prediction \
./codeworld-error-sanitizer \
./codeworld-api \
./codeworld-base \
./codeworld-requirements \
./codeworld-game-api \
QuickCheck \
linear
Expand Down Expand Up @@ -52,7 +53,8 @@ run . cabal_install ./codeworld-server \
./codeworld-api \
./codeworld-game-server \
./codeworld-account \
./codeworld-auth
./codeworld-auth \
-f build-plugin-for-ghcjs

# Build the JavaScript client code for FunBlocks, the block-based UI.
run . cabal_install --ghcjs ./funblocks-client
Expand Down
8 changes: 1 addition & 7 deletions codeworld-compiler/codeworld-compiler.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ Library

Other-modules:
CodeWorld.Compile.Framework
CodeWorld.Compile.Requirements
CodeWorld.Compile.Requirements.Eval
CodeWorld.Compile.Requirements.Language
CodeWorld.Compile.Requirements.LegacyLanguage
CodeWorld.Compile.Requirements.Matcher
CodeWorld.Compile.Requirements.Types
CodeWorld.Compile.Stages

Build-depends:
Expand All @@ -54,7 +48,7 @@ Library
directory,
exceptions,
filepath,
ghc-lib-parser < 8.8,
starsandspirals marked this conversation as resolved.
Show resolved Hide resolved
ghc-lib-parser >= 0.20190603 && < 0.20190703,
hashable,
haskell-src-exts >= 1.20,
megaparsec,
Expand Down
8 changes: 5 additions & 3 deletions codeworld-compiler/src/CodeWorld/Compile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ compileSource stage src err mode verbose = fromMaybe CompileAborted <$>
compileStatus = CompileSuccess,
compileErrors = [],
compileReadSource = Nothing,
compileParsedSource = Nothing,
compileGHCParsedSource = Nothing
compileParsedSource = Nothing
}
timeout = case stage of
GenBase _ _ _ _ -> maxBound :: Int
Expand All @@ -101,7 +100,6 @@ build = do
checkDangerousSource
ifSucceeding checkCodeConventions
ifSucceeding compileCode
ifSucceeding checkRequirements

errPath <- gets compileOutputPath
diags <- sort <$> gets compileErrors
Expand Down Expand Up @@ -152,6 +150,8 @@ buildArgs "codeworld" =
, "base"
, "-package"
, "codeworld-base"
, "-fplugin"
, "CodeWorld.Requirements.RequirementsChecker"
, "-Wall"
, "-Wdeferred-type-errors"
, "-Wdeferred-out-of-scope-variables"
Expand Down Expand Up @@ -200,6 +200,8 @@ buildArgs "haskell" =
, "codeworld-api"
, "-package"
, "QuickCheck"
, "-fplugin"
, "CodeWorld.Requirements.RequirementsChecker"
]

runCompiler :: FilePath -> Int -> [String] -> Bool -> IO (ExitCode, Text)
Expand Down
2 changes: 1 addition & 1 deletion codeworld-compiler/src/CodeWorld/Compile/Framework.hs
Original file line number Diff line number Diff line change
Expand Up @@ -320,4 +320,4 @@ srcSpanFor src off len =
next (!n, !ln, !col) '\r' = (n - 1, ln, col)
next (!n, !ln, !col) '\n' = (n - 1, ln + 1, 1)
next (!n, !ln, !col) '\t' = (n - 1, ln, col + 8 - (col - 1) `mod` 8)
next (!n, !ln, !col) _ = (n - 1, ln, col + 1)
next (!n, !ln, !col) _ = (n - 1, ln, col + 1)
128 changes: 0 additions & 128 deletions codeworld-compiler/src/CodeWorld/Compile/Requirements.hs

This file was deleted.

Loading