From 826bdcce8b6c89eee25eee57cdcae6eb0fb5794b Mon Sep 17 00:00:00 2001 From: kkm Date: Mon, 15 Oct 2018 00:59:22 -0700 Subject: [PATCH] Fix build and tests (absolutely minimal yet) Issue: #84 --- .gitignore | 4 ++-- src/FsLex/fslexast.fs | 2 +- .../JsonLexAndYaccExample.fsproj | 1 + .../LexAndYaccMiniProject.fsproj | 6 +++--- tests/TestProjectUsingNugetPackage/.gitignore | 3 +++ tests/fsyacc/.gitignore | 2 +- tests/fsyacc/OldFsYaccTests.fsx | 13 ++++++------- 7 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 tests/TestProjectUsingNugetPackage/.gitignore diff --git a/.gitignore b/.gitignore index 8f0a04a..c58afa7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. -# Fake dir -.fake +/.*/ +/paket-files/ # User-specific files *.suo diff --git a/src/FsLex/fslexast.fs b/src/FsLex/fslexast.fs index 9661964..db9727c 100644 --- a/src/FsLex/fslexast.fs +++ b/src/FsLex/fslexast.fs @@ -1,6 +1,6 @@ (* (c) Microsoft Corporation 2005-2008. *) -module FsLexYacc.FsLex.AST +module internal FsLexYacc.FsLex.AST open System.Collections.Generic open Microsoft.FSharp.Text diff --git a/tests/JsonLexAndYaccExample/JsonLexAndYaccExample.fsproj b/tests/JsonLexAndYaccExample/JsonLexAndYaccExample.fsproj index f849377..8e3b516 100644 --- a/tests/JsonLexAndYaccExample/JsonLexAndYaccExample.fsproj +++ b/tests/JsonLexAndYaccExample/JsonLexAndYaccExample.fsproj @@ -12,6 +12,7 @@ v4.5 4.3.1.0 JsonLexAndYaccExample + true true diff --git a/tests/LexAndYaccMiniProject/LexAndYaccMiniProject.fsproj b/tests/LexAndYaccMiniProject/LexAndYaccMiniProject.fsproj index ccf8b0e..069b424 100644 --- a/tests/LexAndYaccMiniProject/LexAndYaccMiniProject.fsproj +++ b/tests/LexAndYaccMiniProject/LexAndYaccMiniProject.fsproj @@ -52,13 +52,13 @@ + + ..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll + ..\..\bin\FsLexYacc.Runtime.dll - - True - diff --git a/tests/TestProjectUsingNugetPackage/.gitignore b/tests/TestProjectUsingNugetPackage/.gitignore new file mode 100644 index 0000000..56ab39e --- /dev/null +++ b/tests/TestProjectUsingNugetPackage/.gitignore @@ -0,0 +1,3 @@ +Lexer.fs +Parser.fs +Parser.fsi diff --git a/tests/fsyacc/.gitignore b/tests/fsyacc/.gitignore index afdbe46..3547b51 100644 --- a/tests/fsyacc/.gitignore +++ b/tests/fsyacc/.gitignore @@ -1,4 +1,3 @@ - /FSharp.Core.dll /FsLexYacc.Runtime.dll /repro1885.fs @@ -27,3 +26,4 @@ /test2compat.exe /test2compat.ml /test2compat.mli +/test*.exe.config diff --git a/tests/fsyacc/OldFsYaccTests.fsx b/tests/fsyacc/OldFsYaccTests.fsx index 11c8cfe..d7476ab 100644 --- a/tests/fsyacc/OldFsYaccTests.fsx +++ b/tests/fsyacc/OldFsYaccTests.fsx @@ -11,7 +11,7 @@ open System.IO let run exe args = traceImportant <| sprintf "Running '%s' with args '%s'" exe args - if not <| directExec (fun x-> + if not <| directExec (fun x-> x.FileName <- exe x.Arguments <- args) then failwithf "'%s' failed '%s'" exe args @@ -21,12 +21,11 @@ let fsYacc = run @"..\..\bin\fsyacc.exe" let fsc output files = traceImportant <| sprintf "Building '%s' with from %A" output files "lexing.fs"::"parsing.fs"::@"..\..\src\Common\Arg.fs"::"arg.fs"::"tree.ml"::files - |> Fsc (fun p -> - { p with References = [@"FsLexYacc.Runtime.dll" - @"System.Runtime" - @"System.IO" - @"..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll"] - Output = output; Debug = true; FscTarget = FscTarget.Exe }) + |> Compile [ Out output; Target TargetType.Exe; Debug true; NoFramework + Reference @"FsLexYacc.Runtime.dll" + Reference @"System.Runtime" + Reference @"System.IO" + Reference @"..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll" ] File.WriteAllText(output |> FileHelper.changeExt ".exe.config","""