fix: Undo handleError(-1) introduced in v2.7.1
This commit is contained in:
@@ -18,7 +18,7 @@ let versionFile = Path.getFullName ".version"
|
||||
Target.create "Clean" (fun _ -> Shell.cleanDir distPath)
|
||||
|
||||
Target.create "InstallClient" (fun _ ->
|
||||
run npm "install" "."
|
||||
run bun "install" "."
|
||||
run dotnet "tool restore" "."
|
||||
)
|
||||
|
||||
|
||||
@@ -72,16 +72,16 @@ let createProcess exe arg dir =
|
||||
|> CreateProcess.ensureExitCode
|
||||
|
||||
let dotnet = createProcess "dotnet"
|
||||
let npm =
|
||||
let npmPath =
|
||||
match ProcessUtils.tryFindFileOnPath "npm" with
|
||||
let bun =
|
||||
let bunPath =
|
||||
match ProcessUtils.tryFindFileOnPath "bun" with
|
||||
| Some path -> path
|
||||
| None ->
|
||||
"npm was not found in path. Please install it and make sure it's available from your path. " +
|
||||
"bun was not found in path. Please install it and make sure it's available from your path. " +
|
||||
"See https://safe-stack.github.io/docs/quickstart/#install-pre-requisites for more info"
|
||||
|> failwith
|
||||
|
||||
createProcess npmPath
|
||||
createProcess bunPath
|
||||
|
||||
let run proc arg dir =
|
||||
proc arg dir
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0
|
||||
|
||||
# Add keys and sources lists
|
||||
RUN apt-get update && apt-get install -y ca-certificates gnupg
|
||||
RUN mkdir -p /etc/apt/keyrings
|
||||
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
ENV NODE_MAJOR=20
|
||||
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
||||
# Bun version
|
||||
ARG BUN_INSTALL=/usr/local
|
||||
ARG BUN_VERSION=bun-v1.2.16
|
||||
|
||||
# Install node, 7zip, yarn, git, process tools
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y nodejs p7zip-full git procps ssh-client
|
||||
&& apt-get install -y p7zip-full git procps ssh-client unzip
|
||||
|
||||
# Install Bun
|
||||
RUN set -eux; \
|
||||
curl -fsSL https://bun.sh/install > /usr/local/bin/install-bun \
|
||||
&& chmod +x /usr/local/bin/install-bun \
|
||||
&& /usr/local/bin/install-bun $BUN_VERSION debug-info
|
||||
|
||||
ENV BUN_INSTALL=/usr/local
|
||||
|
||||
# Clean up
|
||||
RUN apt-get autoremove -y \
|
||||
@@ -19,7 +24,7 @@ RUN apt-get autoremove -y \
|
||||
# Trouble brewing
|
||||
RUN rm /etc/ssl/openssl.cnf
|
||||
|
||||
# add dotnet tools to path to pick up fake and paket installation
|
||||
# Add dotnet tools to path to pick up fake and paket installation
|
||||
ENV PATH="/root/.dotnet/tools:${PATH}"
|
||||
|
||||
# Copy endpoint specific user settings into container to specify
|
||||
|
||||
9
.envrc
Normal file
9
.envrc
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# the shebang is ignored, but nice for editors
|
||||
|
||||
if type -P lorri &>/dev/null; then
|
||||
eval "$(lorri direnv)"
|
||||
else
|
||||
echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]'
|
||||
use nix
|
||||
fi
|
||||
72
.github/workflows/build-test.yml
vendored
72
.github/workflows/build-test.yml
vendored
@@ -1,72 +0,0 @@
|
||||
name: build-test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
env:
|
||||
URL_NETCDF_WIN: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netCDF4.7.2-NC4-64.exe
|
||||
jobs:
|
||||
build-test-windows:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --no-restore
|
||||
- name: Download NetCDF
|
||||
shell: pwsh
|
||||
run: |
|
||||
Invoke-WebRequest $env:URL_NETCDF_WIN -OutFile netcdf.exe
|
||||
7z x netcdf.exe bin/*
|
||||
Add-Content -Path $env:GITHUB_PATH -Value (Join-Path (Get-Location) "bin") -Encoding UTF8
|
||||
- name: Test
|
||||
run: dotnet test --no-build --verbosity normal
|
||||
|
||||
build-test-linux:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --no-restore ScientificDataSet
|
||||
- name: Download NetCDF
|
||||
run: sudo apt-get install libnetcdf-dev
|
||||
- name: Test
|
||||
run: dotnet test --verbosity normal SDSLiteTests
|
||||
|
||||
build-test-macos:
|
||||
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 5.0.x
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --no-restore ScientificDataSet
|
||||
- name: Download NetCDF
|
||||
env:
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
run: brew install netcdf
|
||||
- name: Test
|
||||
run: dotnet test --verbosity normal SDSLiteTests
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -29,3 +29,8 @@ node_modules
|
||||
.idea
|
||||
.vscode
|
||||
.ionide
|
||||
dist/
|
||||
|
||||
# Nix
|
||||
.direnv/
|
||||
result*
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
variables:
|
||||
SDK_VERSION: 9.0
|
||||
SKIP_TESTS: "true"
|
||||
DEPLOY_NAME: sdslite
|
||||
|
||||
include:
|
||||
- project: oceanbox/gitlab-ci
|
||||
ref: v2
|
||||
ref: v4.1
|
||||
file: DotnetPackage.gitlab-ci.yml
|
||||
|
||||
inputs:
|
||||
project-name: sdslite
|
||||
project-dir: .
|
||||
|
||||
69
SDSlite.sln
69
SDSlite.sln
@@ -1,69 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30517.126
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
# Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FetchClimate1", "FetchClimate1", "{540EC0ED-4A07-4AC9-A68E-E06BDD4FF89A}"
|
||||
# EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ScientificDataSet", "ScientificDataSet\ScientificDataSet.csproj", "{24D8613C-E1E9-4D7B-ABAA-051EED4E5DBC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "sdsutil", "sdsutil\sdsutil.csproj", "{0EAC3EBD-DC4D-4854-8C70-E096C49F8D47}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDSLiteTests", "SDSLiteTests\SDSLiteTests.csproj", "{C6919B51-ED1A-455E-89E0-F295ECFC722B}"
|
||||
EndProject
|
||||
# Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClimateService.Common", "FetchClimate1\ClimateService.Common\ClimateService.Common.csproj", "{87558098-AEAB-46A0-8BEF-D838630AC90E}"
|
||||
# EndProject
|
||||
# Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClimateService.Client", "FetchClimate1\ClimateServiceClient\ClimateService.Client.csproj", "{B02F58BB-072E-4DC7-AAAB-674C14E01E9D}"
|
||||
# EndProject
|
||||
# Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ScientificDataSet.DataSetReplicator", "ScientificDataSet.DataSetReplicator\ScientificDataSet.DataSetReplicator.csproj", "{CC740DCD-9607-45C6-812C-DE797DF4A50B}"
|
||||
# EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1FC31A69-438C-47C0-A833-73226ADBAA5E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.github\workflows\build-test.yml = .github\workflows\build-test.yml
|
||||
Licence.txt = Licence.txt
|
||||
README.md = README.md
|
||||
Common\Version.proj = Common\Version.proj
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{24D8613C-E1E9-4D7B-ABAA-051EED4E5DBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{24D8613C-E1E9-4D7B-ABAA-051EED4E5DBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{24D8613C-E1E9-4D7B-ABAA-051EED4E5DBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{24D8613C-E1E9-4D7B-ABAA-051EED4E5DBC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0EAC3EBD-DC4D-4854-8C70-E096C49F8D47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0EAC3EBD-DC4D-4854-8C70-E096C49F8D47}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0EAC3EBD-DC4D-4854-8C70-E096C49F8D47}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0EAC3EBD-DC4D-4854-8C70-E096C49F8D47}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C6919B51-ED1A-455E-89E0-F295ECFC722B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C6919B51-ED1A-455E-89E0-F295ECFC722B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C6919B51-ED1A-455E-89E0-F295ECFC722B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C6919B51-ED1A-455E-89E0-F295ECFC722B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{87558098-AEAB-46A0-8BEF-D838630AC90E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{87558098-AEAB-46A0-8BEF-D838630AC90E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{87558098-AEAB-46A0-8BEF-D838630AC90E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{87558098-AEAB-46A0-8BEF-D838630AC90E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B02F58BB-072E-4DC7-AAAB-674C14E01E9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B02F58BB-072E-4DC7-AAAB-674C14E01E9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B02F58BB-072E-4DC7-AAAB-674C14E01E9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B02F58BB-072E-4DC7-AAAB-674C14E01E9D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CC740DCD-9607-45C6-812C-DE797DF4A50B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CC740DCD-9607-45C6-812C-DE797DF4A50B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CC740DCD-9607-45C6-812C-DE797DF4A50B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CC740DCD-9607-45C6-812C-DE797DF4A50B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
# {87558098-AEAB-46A0-8BEF-D838630AC90E} = {540EC0ED-4A07-4AC9-A68E-E06BDD4FF89A}
|
||||
# {B02F58BB-072E-4DC7-AAAB-674C14E01E9D} = {540EC0ED-4A07-4AC9-A68E-E06BDD4FF89A}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D2DD130A-C9B4-444E-B1BB-5A37CA4AC782}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
11
SDSlite.slnx
Normal file
11
SDSlite.slnx
Normal file
@@ -0,0 +1,11 @@
|
||||
<Solution>
|
||||
<Folder Name="/Solution Items/">
|
||||
<File Path=".github/workflows/build-test.yml" />
|
||||
<File Path="Common/Version.proj" />
|
||||
<File Path="Licence.txt" />
|
||||
<File Path="README.md" />
|
||||
</Folder>
|
||||
<Project Path="ScientificDataSet/ScientificDataSet.csproj" />
|
||||
<Project Path="SDSLiteTests/SDSLiteTests.csproj" />
|
||||
<Project Path="sdsutil/sdsutil.csproj" />
|
||||
</Solution>
|
||||
@@ -1256,7 +1256,9 @@ namespace Microsoft.Research.Science.Data.NetCDF4
|
||||
{
|
||||
HandleResult(res);
|
||||
}
|
||||
HandleResult(-1);
|
||||
// NOTE(mrtz): If this is enabled, createDimension fails with:
|
||||
// `Microsoft.Research.Science.Data.NetCDF4.NetCDFException: Returned for all errors in the v2 API`
|
||||
// HandleResult(-1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1381,4 +1383,3 @@ namespace Microsoft.Research.Science.Data.NetCDF4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user