Skip to content

Moved C# SDK's packages ignore from SDK's .gitignore to project root#4211

Merged
rekhoff merged 1 commit intomasterfrom
rekhoff/unity-6-missing-packages-fix
Feb 6, 2026
Merged

Moved C# SDK's packages ignore from SDK's .gitignore to project root#4211
rekhoff merged 1 commit intomasterfrom
rekhoff/unity-6-missing-packages-fix

Conversation

@rekhoff
Copy link
Contributor

@rekhoff rekhoff commented Feb 5, 2026

Description of Changes

Moves the root/sdks/csharp/packages/ directory from the root/sdks/csharp/.gitignore to root/.gitignore.
This is to resolve Issue #4207 , which was introduced during the DLLs generation rework.

/sdks/csharp/packages/ should be ignored by git, to prevent locally generated DLLs from accidentally getting added to the repo.

Root cause:
When Unity imports a package by URL, it looks at the .gitignore list and filters by it, causing the entire packages directory to not be imported. In earlier versions of Unity (like 2022.3 where this was initially tested), this was not a problem because Unity would allow us to do a dotnet restore. In modern version of Unity, this is no longer allowed as all imported packages are considered immutable.

Because the /sdks/csharp/ is cloned into com.clockworklabs.spacetimedbsdk, if we move at what level the root/sdks/csharp/packages/ is ignored at, we can prevent the accidental inclusion of the DLLs from developers in the SpacetimeDB repo, while ensuring com.clockworklabs.spacetimedbsdk does not contain a reference to ignore the packages directory.

API and ABI breaking changes

No API or ABI changes

Expected complexity level and risk

1

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning ways. -->

Testing

  • Tested removing the packages directory from the .gitignore list on a custom branch of com.clockworklabs.spacetimedbsdk to observe the behavior in both Unity 6000.3.2f1 and 2002.3.62f2.

@rekhoff rekhoff requested review from bfops and jdetter February 5, 2026 21:21
@rekhoff rekhoff self-assigned this Feb 5, 2026
@rekhoff rekhoff marked this pull request as ready for review February 5, 2026 21:21
Copy link
Collaborator

@bfops bfops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me. The alternative would be to un-ignore the directory during the release flow itself, but I think this works well too.

@rekhoff rekhoff added this pull request to the merge queue Feb 5, 2026
Merged via the queue into master with commit a95d754 Feb 6, 2026
56 of 57 checks passed
@rekhoff rekhoff deleted the rekhoff/unity-6-missing-packages-fix branch February 6, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants