Skip to content

Commit f4bae0f

Browse files
committed
Merge branch 'main' into dimension-labels
2 parents c738153 + 7ca45f8 commit f4bae0f

File tree

78 files changed

+1556
-367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1556
-367
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"clangsharppinvokegenerator": {
6-
"version": "15.0.2",
6+
"version": "16.0.0",
77
"commands": [
88
"ClangSharpPInvokeGenerator"
99
]

.github/workflows/nightly.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Nightly-Build
22

33
env:
44
TILEDB_NIGHTLY_BUILD: 1
5+
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
56

67
on:
78
schedule:
@@ -19,23 +20,29 @@ jobs:
1920
matrix:
2021
os: [ubuntu-latest, macos-latest, windows-latest]
2122
include:
22-
- BOOTSTRAP: ../bootstrap --enable-s3 --enable-serialization --force-build-all-deps
23+
- BOOTSTRAP: ../bootstrap --enable-s3 --enable-serialization --force-build-all-deps --enable-vcpkg
2324
- os: ubuntu-latest
2425
platform: linux-x86_64
2526
- os: macos-latest
2627
platform: macos-x86_64
2728
- os: windows-latest
2829
platform: windows-x86_64
29-
BOOTSTRAP: ../bootstrap.ps1 -EnableS3 -EnableSerialization -EnableBuildDeps
30-
tag: [release-2.15, dev]
30+
BOOTSTRAP: ../bootstrap.ps1 -EnableS3 -EnableSerialization -EnableBuildDeps -EnableVcpkg
31+
- tag: dev
32+
tag: [release-2.17, dev]
3133
runs-on: ${{ matrix.os }}
3234
steps:
3335
- name: Checkout TileDB
3436
uses: actions/checkout@v3
3537
with:
3638
repository: TileDB-Inc/TileDB
3739
ref: ${{ matrix.tag }}
38-
40+
- name: Export GitHub Actions cache variables
41+
uses: actions/github-script@v6
42+
with:
43+
script: |
44+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
45+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
3946
- name: Build TileDB
4047
run: |
4148
mkdir -p build
@@ -45,21 +52,22 @@ jobs:
4552
cmake --build . --config Release --target install-tiledb
4653
cd ../
4754
mkdir -p artifacts/${{ matrix.platform }}
48-
mv dist/* artifacts/${{ matrix.platform }}
55+
mv build/dist/* artifacts/${{ matrix.platform }}
4956
5057
# We combine the binaries of the many platforms per tag by uploading them to the same artifact.
5158
- name: Upload native artifacts
5259
uses: actions/upload-artifact@v3
5360
with:
5461
name: tiledb-native-${{ matrix.tag }}
5562
path: artifacts/
63+
retention-days: 1
5664

5765
Pack-NuGet:
5866
needs: Build-Native
5967
strategy:
6068
fail-fast: false
6169
matrix:
62-
tag: [release-2.15, dev]
70+
tag: [release-2.17, dev]
6371
runs-on: ubuntu-latest
6472
steps:
6573
- name: Checkout TileDB-CSharp
@@ -91,14 +99,15 @@ jobs:
9199
with:
92100
name: tiledb-nuget-${{ matrix.tag }}
93101
path: scripts/nuget/packages/
102+
retention-days: 5
94103

95104
Test-NuGet:
96105
needs: Pack-NuGet
97106
strategy:
98107
fail-fast: false
99108
matrix:
100109
os: [ubuntu-latest, macos-latest, windows-latest]
101-
tag: [release-2.15, dev]
110+
tag: [release-2.17, dev]
102111
runs-on: ${{ matrix.os }}
103112
steps:
104113
- name: Checkout TileDB-CSharp

.github/workflows/tiledb-csharp.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,35 @@ name: CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, 'release/*' ]
66
pull_request:
7-
branches: [ main ]
7+
branches: [ main, 'release/*' ]
88
workflow_dispatch:
99
workflow_call:
1010

1111
jobs:
12+
Validate-Package:
13+
runs-on: ubuntu-latest
14+
steps:
15+
# Checks out repository
16+
- uses: actions/checkout@v3
17+
18+
- name: Remove existing .NET versions
19+
shell: bash
20+
run: |
21+
rm -rf $DOTNET_ROOT
22+
23+
- name: Set up .NET SDK from global.json
24+
uses: actions/setup-dotnet@v3
25+
26+
- name: Display .NET versions
27+
run: dotnet --info
28+
29+
# Package validation runs as part of packing.
30+
- name: Dotnet pack for TileDB.CSharp
31+
run: |
32+
dotnet pack -c Release sources/TileDB.CSharp
33+
1234
Run-Tests:
1335
strategy:
1436
fail-fast: false

Directory.Packages.props

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
<TileDBNativePackageName>TileDB.Native</TileDBNativePackageName>
5-
<TileDBNativePackageVersion>[2.15.0,2.16.0)</TileDBNativePackageVersion>
5+
<TileDBNativePackageVersion>[2.17.0,2.18.0)</TileDBNativePackageVersion>
66

77
<!-- The DevelopmentBuild property switches to the locally built native packages.
88
They have a different name to avoid publishing them by mistake, and to
@@ -25,12 +25,12 @@
2525
</PropertyGroup>
2626
<ItemGroup>
2727
<PackageVersion Include="$(TileDBNativePackageName)" Version="$(TileDBNativePackageVersion)" />
28-
<PackageVersion Include="GitHubActionsTestLogger" Version="2.0.1" />
29-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
30-
<PackageVersion Include="MSTest.TestAdapter" Version="3.0.2" />
31-
<PackageVersion Include="MSTest.TestFramework" Version="3.0.2" />
32-
<PackageVersion Include="coverlet.collector" Version="3.2.0" PrivateAssets="all" />
33-
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="8.51.0.59060" />
28+
<PackageVersion Include="GitHubActionsTestLogger" Version="2.3.2" />
29+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
30+
<PackageVersion Include="MSTest.TestAdapter" Version="3.0.4" />
31+
<PackageVersion Include="MSTest.TestFramework" Version="3.0.4" />
32+
<PackageVersion Include="coverlet.collector" Version="6.0.0" PrivateAssets="all" />
33+
<GlobalPackageReference Include="SonarAnalyzer.CSharp" Version="9.3.0.71466" />
3434
<GlobalPackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1" />
3535
</ItemGroup>
3636
</Project>

docs/obsoletions.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Following [the deprecation policy of TileDB Embedded][core-deprecation], obsolet
77
|Diagnostic codes|Deprecated in version|Removed in version|
88
|----------------|---------------------|------------------|
99
|[`TILEDB0001`](#TILEDB0001)[`TILEDB0011`](#TILEDB0011)|5.3.0|5.5.0|
10+
|[`TILEDB0012`](#TILEDB0012)[`TILEDB0012`](#TILEDB0012)|5.7.0|5.9.0|
1011

1112
## `TILEDB0001` - Enum value names that start with `TILEDB_` were replaced with C#-friendly names.
1213

@@ -299,4 +300,23 @@ Some of these methods were renamed or had their signature changed (for example t
299300

300301
Instead of setting ranges and subarrays on the `Query`, create and configure a `Subarray` object, and assign it to the query using the `Query.SetSubarray` method.
301302

303+
## `TILEDB0012` - Members of the `TileDB.Interop` namespace will become internal in a future version and should not be used by user code.
304+
305+
<a name="TILEDB0012"></a>
306+
307+
Some APIs in the `TileDB.Interop` namespace that were inadvertently removed in version 5.3.0 were reintroduced in version 5.7.0. They are marked as obsolete and hidden from IntelliSense and will be removed from the public API for good in version 5.9.0. They were also reintroduced in patch releases 5.3.1 and 5.4.1, obsoleted under the [`TILEDB0003`](#TILEDB0003) code.
308+
309+
### Version introduced
310+
311+
5.7.0
312+
313+
### Recommended action
314+
315+
The obsoleted APIs fall into the following categories:
316+
317+
- The `MarshaledString` and `MarshaledStringOut` types are used to help convert strings from and to ASCII and pass them to native code. If you are using them in user code for native code interop, you should use .NET's [built-in P/Invoke](https://learn.microsoft.com/en-us/dotnet/standard/native-interop/charset) marshaling instead. For other kinds of encoding conversions, you should use APIs from the [`System.Text.Encoding`](https://learn.microsoft.com/en-us/dotnet/api/system.text.encoding) class.
318+
- The `__sFile` and `LibC` types have no members and there is no reason to use them anyway.
319+
- The types that derive from `SafeHandle` are used to safely manage the lifetime of native TileDB objects. With the APIs in the `TileDB.CSharp` namespace providing broad coverage of TileDB's functionalities while also being safer and easier to sue, these types provide limited utility. You should use the APIs in the `TileDB.CSharp` namespace instead.
320+
- Types with the name `tiledb_***_t` were made public again only to support the APIs of the safe handles above. They have little other use on their own. You should use APIs in the `TileDB.CSharp` namespace instead.
321+
302322
[core-deprecation]: https://github.com/TileDB-Inc/TileDB/blob/dev/doc/policy/api_changes.md

examples/TileDB.CSharp.Example/ExampleIncompleteQuery.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ from b in Enumerable.Range(1, 10)
5151
{
5252
arrayWrite.Open(QueryType.Write);
5353

54-
var queryWrite = new Query(Ctx, arrayWrite);
54+
var queryWrite = new Query(arrayWrite);
5555
queryWrite.SetLayout(LayoutType.Unordered);
5656
queryWrite.SetDataBuffer("rows", rowsData);
5757
queryWrite.SetDataBuffer("cols", colsData);
@@ -73,7 +73,7 @@ private static void ReadArray()
7373
using (var arrayRead = new Array(Ctx, ArrayPath))
7474
{
7575
arrayRead.Open(QueryType.Read);
76-
var queryRead = new Query(Ctx, arrayRead);
76+
var queryRead = new Query(arrayRead);
7777
queryRead.SetLayout(LayoutType.Unordered);
7878

7979
queryRead.SetDataBuffer("rows", rowsRead);

examples/TileDB.CSharp.Example/ExampleIncompleteQueryStringDimensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private static void WriteArray()
4343
{
4444
arrayWrite.Open(QueryType.Write);
4545

46-
var queryWrite = new Query(Ctx, arrayWrite);
46+
var queryWrite = new Query(arrayWrite);
4747
queryWrite.SetLayout(LayoutType.Unordered);
4848
queryWrite.SetDataBuffer("rows", rowsData);
4949
queryWrite.SetOffsetsBuffer("rows", rowsOffsets);
@@ -62,7 +62,7 @@ private static void ReadArray()
6262
using (var arrayRead = new Array(Ctx, ArrayPath))
6363
{
6464
arrayRead.Open(QueryType.Read);
65-
var queryRead = new Query(Ctx, arrayRead);
65+
var queryRead = new Query(arrayRead);
6666
queryRead.SetLayout(LayoutType.Unordered);
6767
var subarray = new Subarray(arrayRead);
6868
subarray.AddRange("rows", "a", "eeeee");

examples/TileDB.CSharp.Example/ExampleIncompleteQueryVariableSize.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private static void WriteArray()
3737
using (var array_write = new Array(Ctx, ArrayPath))
3838
{
3939
array_write.Open(QueryType.Write);
40-
var query_write = new Query(Ctx, array_write);
40+
var query_write = new Query(array_write);
4141
query_write.SetLayout(LayoutType.Unordered);
4242
query_write.SetDataBuffer("rows", dim1_data_buffer);
4343
query_write.SetDataBuffer("cols", dim2_data_buffer);
@@ -58,7 +58,7 @@ private static void ReadArray()
5858
using (var array_read = new Array(Ctx, ArrayPath))
5959
{
6060
array_read.Open(QueryType.Read);
61-
var query_read = new Query(Ctx, array_read);
61+
var query_read = new Query(array_read);
6262
query_read.SetLayout(LayoutType.Unordered);
6363
query_read.SetDataBuffer("rows", dim1_data_buffer_read);
6464
query_read.SetDataBuffer("cols", dim2_data_buffer_read);

examples/TileDB.CSharp.Example/ExampleQuery.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private static void WriteArray()
3434
using (var array_write = new Array(Ctx, ArrayPath))
3535
{
3636
array_write.Open(QueryType.Write);
37-
var query_write = new Query(Ctx, array_write);
37+
var query_write = new Query(array_write);
3838
query_write.SetLayout(LayoutType.Unordered);
3939
query_write.SetDataBuffer("rows", dim1_data_buffer);
4040
query_write.SetDataBuffer("cols", dim2_data_buffer);
@@ -53,7 +53,7 @@ private static void ReadArray()
5353
using (var array_read = new Array(Ctx, ArrayPath))
5454
{
5555
array_read.Open(QueryType.Read);
56-
var query_read = new Query(Ctx, array_read);
56+
var query_read = new Query(array_read);
5757
query_read.SetLayout(LayoutType.RowMajor);
5858
query_read.SetDataBuffer("rows", dim1_data_buffer_read);
5959
query_read.SetDataBuffer("cols", dim2_data_buffer_read);

examples/TileDB.CSharp.Example/ExampleWritingDenseGlobal.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private static void WriteArray()
2929
using var array = new Array(Ctx, ArrayPath);
3030
array.Open(QueryType.Write);
3131

32-
using var queryWrite = new Query(Ctx, array, QueryType.Write);
32+
using var queryWrite = new Query(array, QueryType.Write);
3333
queryWrite.SetLayout(LayoutType.GlobalOrder);
3434
// Slice rows 1-4, columns 1-2 for a total of 8 cells
3535
using var subarray = new Subarray(array);
@@ -56,7 +56,7 @@ private static void ReadArray()
5656
{
5757
using var array = new Array(Ctx, ArrayPath);
5858
array.Open(QueryType.Read);
59-
using var readQuery = new Query(Ctx, array, QueryType.Read);
59+
using var readQuery = new Query(array, QueryType.Read);
6060
using var subarray = new Subarray(array);
6161
subarray.SetSubarray(1, 4, 1, 4);
6262
readQuery.SetSubarray(subarray);

examples/TileDB.CSharp.Example/ExampleWritingSparseGlobal.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private static void WriteArray()
2929
{
3030
using var array = new Array(Ctx, ArrayPath);
3131
array.Open(QueryType.Write);
32-
using var queryWrite = new Query(Ctx, array, QueryType.Write);
32+
using var queryWrite = new Query(array, QueryType.Write);
3333
queryWrite.SetLayout(LayoutType.GlobalOrder);
3434

3535
// Coordinates for global order writes must be provided in-order
@@ -57,7 +57,7 @@ private static void ReadArray()
5757
{
5858
using var array = new Array(Ctx, ArrayPath);
5959
array.Open(QueryType.Read);
60-
using var readQuery = new Query(Ctx, array, QueryType.Read);
60+
using var readQuery = new Query(array, QueryType.Read);
6161
using var subarray = new Subarray(array);
6262
subarray.SetSubarray(1, 4, 1, 4);
6363
readQuery.SetSubarray(subarray);

examples/TileDB.CSharp.Example/TileDB.CSharp.Example.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<OutputType>Exe</OutputType>
55
<RollForward>Major</RollForward>
66
<RootNamespace>TileDB.CSharp.Examples</RootNamespace>
7-
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
7+
<TargetFrameworks>net5.0;net6.0;net7.0</TargetFrameworks>
88
<UseCurrentRuntimeIdentifier>true</UseCurrentRuntimeIdentifier>
99
</PropertyGroup>
1010

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "7.0.200"
3+
"version": "7.0.305"
44
}
55
}

scripts/generate-bindings/GenerateBindings.proj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@
1717
<ConfigOption Include="multi-file" />
1818
<InputFile Include="tiledb/tiledb_experimental.h" />
1919
<TraversePaths Include="$(InputDir)/**/*.h" />
20+
<RemapHandleType Include="attribute" />
2021
<RemapHandleType Include="buffer" />
22+
<RemapHandleType Include="buffer_list" />
2123
<RemapHandleType Include="config" />
2224
<RemapHandleType Include="config_iter" />
2325
<RemapHandleType Include="ctx" />
26+
<RemapHandleType Include="dimension" />
2427
<RemapHandleType Include="dimension_label" />
28+
<RemapHandleType Include="domain" />
29+
<RemapHandleType Include="enumeration" />
2530
<RemapHandleType Include="error" />
2631
<RemapHandleType Include="filter" />
2732
<RemapHandleType Include="filter_list" />
@@ -31,10 +36,11 @@
3136
<RemapHandleType Include="vfs_fh" />
3237
<Remap Include="@(RemapHandleType->'tiledb_%(Identity)_handle_t=tiledb_%(Identity)_t')" />
3338
<Remap Include="tiledb_experimental_query_status_details_t=tiledb_query_status_details_t" />
39+
<ExcludeDump Include="array_schema" />
3440
<ExcludeDump Include="attribute" />
35-
<ExcludeDump Include="domain" />
3641
<ExcludeDump Include="dimension" />
37-
<ExcludeDump Include="array_schema" />
42+
<ExcludeDump Include="domain" />
43+
<ExcludeDump Include="enumeration" />
3844
<ExcludeDump Include="stats" />
3945
<ExcludeDump Include="stats_raw" />
4046
<ExcludeDump Include="fragment_info" />

sources/TileDB.CSharp/Array.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
using TileDB.CSharp.Marshalling;
66
using TileDB.CSharp.Marshalling.SafeHandles;
77
using TileDB.Interop;
8+
using ArrayHandle = TileDB.CSharp.Marshalling.SafeHandles.ArrayHandle;
9+
using ArraySchemaHandle = TileDB.CSharp.Marshalling.SafeHandles.ArraySchemaHandle;
10+
using ConfigHandle = TileDB.CSharp.Marshalling.SafeHandles.ConfigHandle;
811

912
namespace TileDB.CSharp
1013
{

0 commit comments

Comments
 (0)