mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Merge branch 'core-factoring' into eliminate-core-loc
This commit is contained in:
commit
08fb441b01
25
Dockerfile
25
Dockerfile
@ -1,7 +1,7 @@
|
||||
# Put protoc and twirp tooling in its own image
|
||||
FROM haskell:8.6 as haskell
|
||||
RUN cabal new-update hackage.haskell.org,HEAD
|
||||
RUN cabal new-install proto-lens-protoc
|
||||
RUN cabal v2-update && \
|
||||
cabal v2-install proto-lens-protoc
|
||||
RUN which proto-lens-protoc
|
||||
|
||||
FROM golang:1.13-stretch AS protoc
|
||||
@ -22,18 +22,23 @@ ENTRYPOINT ["/protobuf/bin/protoc", "-I/protobuf", "--plugin=protoc-gen-haskell=
|
||||
FROM haskell:8.6 as build
|
||||
WORKDIR /build
|
||||
|
||||
# Build and cache the dependencies first so we can cache these layers.
|
||||
# Build just the dependencies so that this layer can be cached
|
||||
COPY semantic.cabal .
|
||||
COPY semantic-core semantic-core
|
||||
RUN cabal new-update hackage.haskell.org,HEAD
|
||||
RUN cabal new-configure semantic semantic-core
|
||||
RUN cabal new-build --only-dependencies
|
||||
COPY semantic-core semantic-core/
|
||||
COPY semantic-java semantic-java/
|
||||
COPY semantic-json semantic-json/
|
||||
COPY semantic-python semantic-python/
|
||||
COPY semantic-source semantic-source/
|
||||
COPY semantic-tags semantic-tags/
|
||||
COPY cabal.project .
|
||||
RUN cabal v2-update && \
|
||||
cabal v2-build --flags="release" --only-dependencies
|
||||
|
||||
# Copy in and build the entire project
|
||||
# Build all of semantic
|
||||
COPY . .
|
||||
RUN cabal new-build --flags="release" semantic:exe:semantic
|
||||
RUN cabal v2-build --flags="release" semantic:exe:semantic
|
||||
|
||||
# A fake `install` target until we can get `cabal new-install` to work
|
||||
# A fake `install` target until we can get `cabal v2-install` to work
|
||||
RUN cp $(find dist-newstyle/build/x86_64-linux -name semantic -type f -perm -u=x) /usr/local/bin/semantic
|
||||
|
||||
# Create a fresh image containing only the compiled CLI program, so that the
|
||||
|
@ -104,7 +104,7 @@ supportedExts = foldr append mempty supportedLanguages
|
||||
lookup k = Map.lookup k Lingo.languages
|
||||
|
||||
codeNavLanguages :: [Language]
|
||||
codeNavLanguages = [Go, Ruby, Python, JavaScript, TypeScript, PHP]
|
||||
codeNavLanguages = [Go, Java, Ruby, Python, JavaScript, TypeScript, PHP]
|
||||
|
||||
pathIsMinified :: FilePath -> Bool
|
||||
pathIsMinified = isExtensionOf ".min.js"
|
||||
|
@ -180,7 +180,7 @@ goParser' :: c (Term (Sum Go.Syntax)) => (Language, SomeParser c Loc)
|
||||
goParser' = (Go, SomeParser goParser)
|
||||
|
||||
javaParser' :: c PreciseJava.Term => (Language, SomeParser c Loc)
|
||||
javaParser' = (Python, SomeParser javaParserPrecise)
|
||||
javaParser' = (Java, SomeParser javaParserPrecise)
|
||||
|
||||
javascriptParser' :: c (Term (Sum TSX.Syntax)) => (Language, SomeParser c Loc)
|
||||
javascriptParser' = (JavaScript, SomeParser tsxParser)
|
||||
|
@ -7,7 +7,7 @@ import Test.Tasty.HUnit
|
||||
testTree :: TestTree
|
||||
testTree = testGroup "Data.Language"
|
||||
[ testCase "supportedExts returns expected list" $
|
||||
supportedExts @=? [".go",".rb",".builder",".eye",".fcgi",".gemspec",".god",".jbuilder",".mspec",".pluginspec",".podspec",".rabl",".rake",".rbuild",".rbw",".rbx",".ru",".ruby",".spec",".thor",".watchr",".py",".bzl",".cgi",".fcgi",".gyp",".gypi",".lmi",".py3",".pyde",".pyi",".pyp",".pyt",".pyw",".rpy",".spec",".tac",".wsgi",".xpy",".js","._js",".bones",".es",".es6",".frag",".gs",".jake",".jsb",".jscad",".jsfl",".jsm",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".ts",".php",".aw",".ctp",".fcgi",".inc",".php3",".php4",".php5",".phps",".phpt"]
|
||||
supportedExts @=? [".go",".java",".rb",".builder",".eye",".fcgi",".gemspec",".god",".jbuilder",".mspec",".pluginspec",".podspec",".rabl",".rake",".rbuild",".rbw",".rbx",".ru",".ruby",".spec",".thor",".watchr",".py",".bzl",".cgi",".fcgi",".gyp",".gypi",".lmi",".py3",".pyde",".pyi",".pyp",".pyt",".pyw",".rpy",".spec",".tac",".wsgi",".xpy",".js","._js",".bones",".es",".es6",".frag",".gs",".jake",".jsb",".jscad",".jsfl",".jsm",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".ts",".php",".aw",".ctp",".fcgi",".inc",".php3",".php4",".php5",".phps",".phpt"]
|
||||
, testCase "codeNavLanguages returns expected list" $
|
||||
codeNavLanguages @=? [Go, Ruby, Python, JavaScript, TypeScript, PHP]
|
||||
codeNavLanguages @=? [Go, Java, Ruby, Python, JavaScript, TypeScript, PHP]
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user