Contributing to DataLinq
This guide is for contributors working on the DataLinq repo itself.
1. Repository Setup
For the full fresh-machine setup path, including .NET SDK and Podman/WSL requirements, start with Dev and Test Environment.
Clone the repo and work from the solution under src:
git clone https://github.com/bazer/DataLinq.git
cd DataLinq
dotnet restore src/DataLinq.sln
dotnet build src/DataLinq.sln
The repo also carries a root global.json that opts dotnet test into the .NET 10 Microsoft.Testing.Platform runner.
The active solution file is:
src/DataLinq.sln
The repo currently targets .NET 8, .NET 9, and .NET 10. The active TUnit suites target net10.0.
2. Repo Layout
Important directories and projects:
src/DataLinqMain packaged runtime project.src/DataLinq.MySqlMySQL and MariaDB provider package.src/DataLinq.SQLiteSQLite provider package.src/DataLinq.CLIThe end-userdatalinqtool.src/DataLinq.GeneratorsSource generator project.src/DataLinq.ToolsShared tooling used by the CLI and generation pipeline.src/DataLinq.DevToolsShared repo-localdotnet/NuGet execution, output parsing, and artifact logging primitives for developer-facing CLIs.src/DataLinq.Dev.CLIDeveloper wrapper fordoctor,restore,build, andtestwith repo-local environment isolation and concise output.src/DataLinq.TestingShared test infrastructure, seeded harnesses, provider matrix logic, and environment helpers.src/DataLinq.Testing.CLICross-platform test infrastructure CLI for local orchestration and matrix runs.src/DataLinq.Tests.UnitPure in-process TUnit lane.src/DataLinq.Tests.ComplianceCross-provider behavior and SQLite-backed compliance lane.src/DataLinq.Tests.MySqlProvider-specific MySQL and MariaDB metadata and type-mapping lane.src/DataLinq.Generators.TestsGenerator-focused TUnit lane.src/DataLinq.Tests.ModelsShared test models and fixtures used by the active test suites and sample code.docsProject documentation.
3. Testing
The supported local entry points are:
DataLinq.Dev.CLIfordoctor,restore,build, and directdotnet testwrapping.DataLinq.Testing.CLIfor provider-matrix orchestration, container lifecycle, and suite runs that depend on target aliases or batches.DataLinq.Benchmark.CLIfor benchmark discovery, benchmark execution, and performance-history artifacts.
Detailed tool documentation lives here:
- Dev and Test Environment
- Internal Tooling
- DataLinq.Dev.CLI
- DataLinq.Testing.CLI
- DataLinq.Benchmark.CLI
- AI Assistant Guidance
Check the local dotnet execution profile before you start blaming the repo:
dotnet run --project src/DataLinq.Dev.CLI -- doctor --profile repo
Prefer the developer wrapper for restore/build so the repo uses its local .dotnet home, AppData, NuGet cache, and artifact paths:
dotnet run --project src/DataLinq.Dev.CLI -- restore
dotnet run --project src/DataLinq.Dev.CLI -- build
dotnet run --project src/DataLinq.Dev.CLI -- test src/DataLinq.Tests.Unit/DataLinq.Tests.Unit.csproj
Useful output modes:
--output quietOne-line success, concise failure summary.--output errorsDistinct compiler/NuGet errors only.--output failuresTest-failure focused output.--output diagFull diagnostic output with raw artifacts.
List the available targets, aliases, suites, and current runtime state:
dotnet run --project src/DataLinq.Testing.CLI -- list
Run the fast local lane:
dotnet run --project src/DataLinq.Testing.CLI -- run --suite all --alias quick
Run the main latest server-backed lane:
dotnet run --project src/DataLinq.Testing.CLI -- run --suite all --alias latest --batch-size 4
Run only a specific suite:
dotnet run --project src/DataLinq.Testing.CLI -- run --suite generators
dotnet run --project src/DataLinq.Testing.CLI -- run --suite unit
dotnet run --project src/DataLinq.Testing.CLI -- run --suite compliance --alias latest --batch-size 4
dotnet run --project src/DataLinq.Testing.CLI -- run --suite mysql --alias latest --batch-size 4
When invoking the CLI repeatedly from the same build output, prefer --no-build together with an explicit configuration and framework:
dotnet run --no-build --project src/DataLinq.Testing.CLI -c Debug --framework net10.0 -- run --suite all --alias latest --batch-size 4
Visual Studio runsettings live under src:
src/tests.quick.runsettingssrc/tests.latest.runsettingssrc/tests.all.runsettings
If you are only changing one slice of the codebase, prefer targeted suite runs over blanket full-matrix execution.
For benchmark work, use the benchmark wrapper instead of calling BenchmarkDotNet directly:
dotnet run --project src/DataLinq.Benchmark.CLI -- list
dotnet run --project src/DataLinq.Benchmark.CLI -- run
4. Documentation Changes
If behavior changes, update the matching docs:
- user-facing setup and usage docs in
docs/ - internal architecture docs only when the implementation still matches them
- dev-plan documents only when you are intentionally updating migration or design history
Do not let roadmap material pretend to be shipped behavior.
5. Coding Guidelines
- Use normal .NET naming conventions.
- Keep changes focused and defensible.
- Add tests when changing behavior.
- Add comments only when they explain something non-obvious.
- Prefer updating the shared test harness instead of rebuilding ad hoc fixtures in individual test projects.
6. Pull Requests
- Keep PRs small enough to review.
- Explain behavioral changes clearly.
- Mention test coverage and any known gaps.
- If docs changed, say which docs were updated.
7. License
DataLinq is released under the MIT License. By contributing, you agree that your contributions are released under that same license.