~kmaasrud/DjotNet

fc863e76237d2dc553d88443182d8169a1d5010e — kmaasrud 1 year, 16 days ago
initial commit
6 files changed, 375 insertions(+), 0 deletions(-)

A .gitignore
A DjotNet.sln
A flake.lock
A flake.nix
A src/Library/Library.fsproj
A src/Library/Program.fs
A  => .gitignore +245 -0
@@ 1,245 @@
# Downloaded packages and build tools.
/lkg
/packages
/Tools

/tests/scripts/current
/release
/debug
/Proto

# Patches that may have been generated by scripts.
# (These aren't generally useful to commit directly; if anything, they should be applied.)
scripts/*.patch

/fcs/FSharp.Compiler.Service/illex.fs
/fcs/FSharp.Compiler.Service/ilpars.fs
/fcs/FSharp.Compiler.Service/ilpars.fsi
/fcs/FSharp.Compiler.Service/lex.fs
/fcs/FSharp.Compiler.Service/pars.fs
/fcs/FSharp.Compiler.Service/pars.fsi
/fcs/FSharp.Compiler.Service/pplex.fs
/fcs/FSharp.Compiler.Service/pppars.fs
/fcs/FSharp.Compiler.Service/pppars.fsi
/src/*.userprefs
/src/fsharp/FSStrings.resources
/src/fsharp/FSharp.Build/*.resx
/src/fsharp/FSharp.Build-proto/*.resx
/src/fsharp/FSharp.Build-proto/*.resources
/src/fsharp/FSharp.Compiler-proto/*.resx
/src/fsharp/FSharp.Compiler-proto/*.resources
/src/fsharp/FSharp.Compiler-proto/*.sln
/src/fsharp/FSharp.Compiler-proto/*.userprefs
/src/fsharp/fsi/*.resx
/src/fsharp/FSharp.Compiler.Interactive.Settings/*.resx
/src/fsharp/FSharp.Compiler.Server.Shared/*.resx
/src/fsharp/fsi/Fsi.sln
/src/fsharp/FSharp.Build/*.resources
/src/fsharp/FSharp.Compiler.Private/*.resx
/src/fsharp/FSharp.Compiler.Private/*.resources
/src/fsharp/FSharp.Compiler.Private/*.sln
/src/fsharp/FSharp.Compiler.Private/*.userprefs
/src/*.log
/src/fsharp/Fsc-proto/illex.fs
/src/fsharp/Fsc-proto/ilpars.fs
/src/fsharp/Fsc-proto/ilpars.fsi
/src/fsharp/Fsc-proto/lex.fs
/src/fsharp/Fsc-proto/pars.fs
/src/fsharp/Fsc-proto/pars.fsi
/src/fsharp/Fsc-proto/pplex.fs
/src/fsharp/Fsc-proto/pppars.fs
/src/fsharp/Fsc-proto/pppars.fsi
/src/fsharp/FSharp.LanguageService.Compiler/illex.*
/src/fsharp/FSharp.LanguageService.Compiler/ilpars.*
/src/fsharp/FSharp.LanguageService.Compiler/lex.*
/src/fsharp/FSharp.LanguageService.Compiler/pars.*
/src/fsharp/FSharp.LanguageService.Compiler/pplex.fs
/src/fsharp/FSharp.LanguageService.Compiler/pppars.fs
/src/fsharp/FSharp.LanguageService.Compiler/pppars.fsi
/vsintegration/src/unittests/Unittests.fsi
/tests/*FSharp_Failures.env
/tests/*FSharp_Failures.lst
/tests/fsharpqa/testenv/bin/
/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.dll
/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.pdb
/tests/Xnet40-fsharpqa-suite-failures.log.*
/tests/fsharp/typeProviders/splitAssemblyTools/provider.dll
/tests/fsharp/typeProviders/splitAssemblyTypeproviders/provider.dll
/vsintegration/src/service/FsPkgs/FSharp.Project/FS/FSharp.ProjectSystem.FSharp.fsi
/vsintegration/src/service/FsPkgs/FSharp.Project/FS/ctofiles/
/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Utils.dll
/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExprLibrary.dll
/tests/fsharpqa/Source/*net40-fsharpqa-suite-failures.env
/tests/fsharpqa/Source/*net40-fsharpqa-suite-failures.lst
/tests/**/FSharp.Core.dll
/tests/fsharp/optimize/stats/FSharpOptimizationInfo.FSharp.Core
/tests/fsharp/optimize/stats/FSharpSignatureInfo.FSharp.Core
lib/debug
lib/release
lib/proto
lib/bootstrap/4.0/*.mdb
lib/bootstrap/4.0/*.xml
lib/bootstrap/4.0/fsharpc
lib/bootstrap/4.0/fsharpi
lib/bootstrap/4.0/policy*
aclocal.m4
src/*.userprefs
src/fsharp/FSStrings.resources
packages
src/fsharp/FSharp.Build/*.resx
src/fsharp/FSharp.Build-proto/*.resx
src/fsharp/FSharp.Build-proto/*.resources
src/fsharp/FSharp.Compiler-proto/*.resx
src/fsharp/FSharp.Compiler-proto/*.resources
src/fsharp/FSharp.Compiler-proto/*.sln
src/fsharp/FSharp.Compiler-proto/*.userprefs
src/fsharp/fsi/*.resx
src/fsharp/FSharp.Compiler.Interactive.Settings/*.resx
src/fsharp/FSharp.Compiler.Server.Shared/*.resx
src/fsharp/fsi/Fsi.sln
src/fsharp/FSharp.Build/*.resources
src/fsharp/FSharp.Compiler/*.resx
src/fsharp/FSharp.Compiler/*.resources
src/fsharp/FSharp.Compiler/*.sln
src/fsharp/FSharp.Compiler/*.userprefs
Debug
Release
Proto
sign_temp
.libs
configure
config.log
config.status
src/fsharp/FSharp.Compiler/illex.fs
src/fsharp/FSharp.Compiler/ilpars.fs
src/fsharp/FSharp.Compiler/ilpars.fsi
src/fsharp/FSharp.Compiler/lex.fs
src/fsharp/FSharp.Compiler/pars.fs
src/fsharp/FSharp.Compiler/pars.fsi
src/fsharp/FSharp.Compiler/pplex.fs
src/fsharp/FSharp.Compiler/pppars.fs
src/fsharp/FSharp.Compiler/pppars.fsi
src/fsharp/FSharp.Compiler-proto/illex.fs
src/fsharp/FSharp.Compiler-proto/ilpars.fs
src/fsharp/FSharp.Compiler-proto/ilpars.fsi
src/fsharp/FSharp.Compiler-proto/lex.fs
src/fsharp/FSharp.Compiler-proto/pars.fs
src/fsharp/FSharp.Compiler-proto/pars.fsi
src/fsharp/FSharp.Compiler.Silverlight/lex.fs
src/fsharp/FSharp.Compiler.Silverlight/pars.fs
src/fsharp/FSharp.Compiler.Silverlight/pars.fsi
src/fsharp/FSharp.Compiler-proto/pplex.fs
src/fsharp/FSharp.Compiler-proto/pppars.fs
src/fsharp/FSharp.Compiler-proto/pppars.fsi
*~
*.suo
obj
src/fsharp/FSharp.Data.TypeProviders/FSData.resx
src/fsharp/fsiAnyCpu/FSIstrings.resx
*.actual
*.mdb
*test.txt
tests/fsharp/optimize/stats/*
tests/fsharp/core/printing/*
tests/fsharp/core/csfromfs/*
tests/fsharp/core/control*/*
tests/fsharp/core/unicode/*
tests/fsharp/optimize/*/*
tests/fsharp/typeProviders/builtin/*
tests/*.log
tests/fsharp/core/fsfromcs/*
tests/fsharp/core/load-script/out.txt
test.fs
*.resx
Vagrantfile
.vagrant
out
fsharp/FSharp.Compiler.Silverlight/FSComp.resx
fsharp/Script2.fsx
fsharp/Script3.fsx
tests/fsharp/core/resources/Resources.resources
test*.il
test*.res
tmptest*.ml
tmptest*.mli
*.csdl
*.ssdl
_UNATTENDEDLOG
test.ok
build.ok
*.dll.config
*.exe.config
*.pdb
*.exe
*.dll
*.err
*.diff
*.vsdiff
*.vserr

*.userprefs
extras
ossreadme*.txt
src/fsharp/FSharp.LanguageService.Compiler/illex.*
src/fsharp/FSharp.LanguageService.Compiler/ilpars.*
src/fsharp/FSharp.LanguageService.Compiler/lex.*
src/fsharp/FSharp.LanguageService.Compiler/pars.*
src/fsharp/FSharp.LanguageService.Compiler/pplex.fs
src/fsharp/FSharp.LanguageService.Compiler/pppars.fs
src/fsharp/FSharp.LanguageService.Compiler/pppars.fsi
vsintegration/src/unittests/Unittests.fsi
vsintegration/src/FSharp.ProjectSystem.FSharp/ctofiles/MenusAndCommands.cto
tests/*FSharp_Failures.env
tests/*FSharp_Failures.lst
tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.dll
tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Module01.pdb
tests/XFSharpQA_Failures.log.*
vsintegration/src/vs/FsPkgs/FSharp.Project/FS/FSharp.ProjectSystem.FSharp.fsi
vsintegration/src/vs/FsPkgs/FSharp.Project/FS/ctofiles/
tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Utils.dll
tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExprLibrary.dll
packages
FSharp.Core.Nuget/*.nupkg
tests/fsharpqa/Source/*FSharpQA_Failures.env
tests/fsharpqa/Source/*FSharpQA_Failures.lst
*.csproj.user
*.fsproj.user
*.sln.DotSettings.user
*.log
*.jrs
*.chk
*.bak
FSharp.Compiler.Tools.Nuget/*.nupkg
FSharp.Core.Nuget/*.nupkg
artifacts/*.nupkg
*.orig
*.mdf
*.ldf
*.cto
*.vstman
project.lock.json
Tools/
Backup/
tests/fsharp/core/array/dont.run.peverify
tests/fsharp/core/innerpoly/dont.run.peverify
tests/fsharp/typecheck/sigs/neg94-pre.dll
times
/tests/fsharpqa/testenv/bin/System.ValueTuple.dll
source_link.json
.vs/
/VSRelease/net40/bin
System.ValueTuple.dll
tests/fsharpqa/testenv/bin/System.ValueTuple.dll

!lib/bootstrap/signed/**/*
*/.fake
/fcs/packages/
*/paket-files/
/fcs/TestResult.xml
/tests/fcs/
/fcs/.paket/Paket.Restore.targets
msbuild.binlog
/fcs/FSharp.Compiler.Service.netstandard/*.fs
/fcs/FSharp.Compiler.Service.netstandard/*.fsi

.fake
\ No newline at end of file

A  => DjotNet.sln +27 -0
@@ 1,27 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{965E8BCB-356D-49CC-AC0B-CA50BED4AD04}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Library", "src\Library\Library.fsproj", "{6ADCFBD4-7A15-4B72-B57F-F10F52FFAB33}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{6ADCFBD4-7A15-4B72-B57F-F10F52FFAB33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{6ADCFBD4-7A15-4B72-B57F-F10F52FFAB33}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{6ADCFBD4-7A15-4B72-B57F-F10F52FFAB33}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{6ADCFBD4-7A15-4B72-B57F-F10F52FFAB33}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(NestedProjects) = preSolution
		{6ADCFBD4-7A15-4B72-B57F-F10F52FFAB33} = {965E8BCB-356D-49CC-AC0B-CA50BED4AD04}
	EndGlobalSection
EndGlobal

A  => flake.lock +43 -0
@@ 1,43 @@
{
  "nodes": {
    "nixpkgs": {
      "locked": {
        "lastModified": 1676300157,
        "narHash": "sha256-1HjRzfp6LOLfcj/HJHdVKWAkX9QRAouoh6AjzJiIerU=",
        "owner": "nixos",
        "repo": "nixpkgs",
        "rev": "545c7a31e5dedea4a6d372712a18e00ce097d462",
        "type": "github"
      },
      "original": {
        "owner": "nixos",
        "ref": "nixos-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
    "root": {
      "inputs": {
        "nixpkgs": "nixpkgs",
        "utils": "utils"
      }
    },
    "utils": {
      "locked": {
        "lastModified": 1676283394,
        "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
        "owner": "numtide",
        "repo": "flake-utils",
        "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
        "type": "github"
      },
      "original": {
        "owner": "numtide",
        "repo": "flake-utils",
        "type": "github"
      }
    }
  },
  "root": "root",
  "version": 7
}

A  => flake.nix +47 -0
@@ 1,47 @@
{
  description = ".NET project template";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    utils.url = "github:numtide/flake-utils";
  };

  outputs = inputs @ {nixpkgs, ...}:
    inputs.utils.lib.eachDefaultSystem (system: let
      pkgs = import nixpkgs {inherit system;};
    in rec {
      # `nix build`
      packages.default = with pkgs;
        buildDotnetModule {
          name = "Project";
          src = ./.;
          projectFile = "Project.sln";

          # to generate a new dependency file run:
          # `nix build .#default.passthru.fetch-deps && sh ./result`
          # and then copy the printed path to this directory with the name deps.nix
          nugetDeps = ./deps.nix;

          dotnet-sdk = dotnetCorePackages.sdk_6_0;
          dotnet-runtime = dotnet-aspnetcore;
        };

      # `nix run`
      apps.default = inputs.utils.lib.mkApp {drv = packages.default;};

      # `nix develop`
      devShells.default = with pkgs;
        mkShell {
          buildInputs = [
            dotnet-sdk
            icu
            vscode
          ];

          shellHook = ''
            export DOTNET_ROOT=${dotnet-sdk}
            export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${lib.makeLibraryPath [icu]}
          '';
        };
    });
}

A  => src/Library/Library.fsproj +12 -0
@@ 1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="Program.fs" />
  </ItemGroup>

</Project>

A  => src/Library/Program.fs +1 -0
@@ 1,1 @@
module Main = printfn "Hello from DjotNet"