1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00
Commit Graph

196 Commits

Author SHA1 Message Date
Thaddeus Crews
76239f8384 Merge pull request #111524 from Joy-less/update-source-generator-packages
Update Godot.SourceGenerators packages
2025-10-30 13:51:34 -05:00
Joyless
580a225a4a Update Godot.SourceGenerators packages
Fix issues

Update System.Security.Cryptography.Pkcs again

Downgrade Microsoft.CodeAnalysis.CSharp.Workspaces
2025-10-26 23:52:50 +00:00
Paviel Kraskoŭski
bdb4ca906f Fix source generation of statically imported members 2025-10-26 17:02:40 +03:00
Joyless
a5ce9c3706 Fix IsStaticallyResolvable 2025-10-11 21:20:01 +01:00
Thaddeus Crews
c2141e0aa5 Bump version to 4.6-dev 2025-09-15 15:50:22 -05:00
Thaddeus Crews
37a48c89f9 Merge pull request #106744 from L2750558108/fix-@-error-in-c#
Fix source generator exceptions appearing when use "@+internal keyword" as type or namespace name in C# script
2025-08-24 11:04:31 -05:00
2750558108
f192430921 Fix source generator exceptions appearing when use "@+internal keyword" as type or namespace name in C# script 2025-08-09 13:25:54 +08:00
Justin Sasso
aa0ed1b469 Update Dotnet iOS Export Process
Update iOS export to allow for hybrid globalization introduced in .NET 9 while preserving .NET 8 settings. Also allows for custom ICU or no ICU.
2025-07-01 14:02:28 -04:00
Egor Nikulin
976e60ea24 Mark referenced packages in SDK as implicitly defined
Should improve package manager behavior
and fix errors in solutions using CPM.

https://github.com/NuGet/Home/issues/13529
https://github.com/dotnet/sdk/pull/43151/files#r1746148520
2025-04-27 14:00:55 +04:00
Paul Joannon
88191b0b15 Fix extraction of C# default property values when negative 2025-04-13 17:57:20 +02:00
Rémi Verschelde
0d3ce48562 Merge pull request #104279 from L2750558108/pr-fix-nested-in-generic-errors
Fix nested GodotObject class in generic class lead to source generator errors in C#
2025-03-28 14:32:44 +01:00
2750558108
6a56ed8926 Fix nested GodotObject class in generic class lead to source generator errors in C# 2025-03-22 20:46:52 +08:00
Ivan Shakhov
724c0021c7 fix https://github.com/godotengine/godot/issues/104135 Generator for C# makes illegal code for a GodotObject with a primary ctor
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2025-03-21 08:34:25 -07:00
Thaddeus Crews
e1b9048ae4 Merge pull request #103536 from raulsntos/dotnet/shipped-diagnostics
Move entries from `AnalyzerReleases.Unshipped.md` to `AnalyzerReleases.Shipped.md`
2025-03-11 09:34:51 -05:00
Thaddeus Crews
850599c36d Merge pull request #98153 from Delsin-Yu/dotnet-warn-missing-tool-preprocessor
[Editor] Prevent `TOOLS` .Net DefineConstants being overriden by the user
2025-03-07 15:12:49 -06:00
Raul Santos
7dcad4c9ad Move entries from AnalyzerReleases.Unshipped.md to AnalyzerReleases.Shipped.md 2025-03-04 00:35:42 +01:00
Rémi Verschelde
1c35a31b9e Bump version to 4.5-dev
Mr. Godot told me to tell you he won't come this evening but surely tomorrow.
2025-03-03 17:27:40 +01:00
DE-YU_H14
b2b7c1fd77 Force include TOOLS in Editor to prevent data loss
Update modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.targets

Co-authored-by: Raul Santos <raulsntos@gmail.com>
2025-02-23 05:54:27 +08:00
Raul Santos
f4094b554d [.NET] Disallow [ExportToolButton] on members thay may store the Callable
Ensures the user doesn't store the Callable so the .NET assembly can be reloaded.
2025-02-14 01:09:59 +01:00
Paul Joannon
fb8553e4d7 Move to .NET8
- Change TFM and LangVersion
- Better exception throwing (CA1510, CA1512, CA1513)
- Better exception utility method definition (CA1859)
- Prefer comparing `.Count` over calling `.Any()` (CA1860)
- Prefer `.AsSpan()` over `.Substring()` (CA1846)
- Add a few more `scoped`
- Use `RuntimeHelpers.GetUninitializedObject()` instead of `FormatterServices.GetUninitializedObject()`
- Use delegate instead of delegate pointer in variant generic conversions
- Enable EnforceExtendedAnalyzerRules in source generator projects
- Disable CS8981 on structs named movable in Godot.NativeInterop
2024-12-13 14:00:13 +01:00
RedworkDE
f0b6b24d9e C#: Update to net7.0
Because of ref safety changes in the languages, all methods that return an interop struct have to have all other reference parameters marked as scoped to signal the the method does not capture that reference.

The variant change is necessary, because for some reason a type of the exact shape godot_variant is in, crashes the .NET 7 JIT, but when changing it to be sequential with the same effective layout it works.
2024-12-12 17:42:39 +01:00
Thaddeus Crews
57d08dbec3 C#: Fix warnings caught by new problem-matchers
• Restore MSVC problem matcher for Linux builds
2024-12-10 14:04:35 -06:00
Raul Santos
4e5080d805 [.NET] Preserve no-hint behavior for unmarshallable generics in dictionaries 2024-11-21 20:38:55 +01:00
Thaddeus Crews
ec7fd4f6f1 Merge pull request #97894 from paulloz/dotnet/export-tool-button
Implement `[ExportToolButton]`
2024-11-19 15:20:07 -06:00
Paul Joannon
4f52c2bb1f Implement [ExportToolButton] 2024-11-18 20:19:47 +01:00
Adam Johnston
186f35fc9b remove duplicate read/write only property warning from ScriptPropertiesGenerator 2024-11-13 14:23:53 -08:00
Zae
2a3d400dd8 C#: Escape signal parameters 2024-10-23 23:24:00 +08:00
Thaddeus Crews
cb3c01a5fe Merge pull request #97588 from TML233/generated-raise-signal
[C#] Change generated On{SignalName} to EmitSignal{SignalName}
2024-10-21 16:39:12 -05:00
Juan Pablo Arce
e3790de461 Fix exported typed dictionaries in .NET having an incorrect hint, which led to incorrect scene serialization 2024-10-18 00:55:24 -03:00
Zae
9c99e519c6 C#: Fix unhandled GD0303 error for nested generic attribute types 2024-10-11 03:03:05 +08:00
TML
fa48ed9945 Change generated On{SignalName} to EmitSignal{SignalName} 2024-09-28 22:10:33 +08:00
Raul Santos
da37998dc8 C#: Generate On{EventName} method to raise signal events 2024-09-26 20:10:53 +02:00
Raul Santos
445e822bcf C#: Generate signal event with the same accessibility as the delegate 2024-09-23 03:38:18 +02:00
Raul Santos
0aa46e19c5 C#: Fallback to CoreCLR/MonoVM hosting APIs when hostfxr/NativeAOT fails
Some platforms don't support hostfxr but we can use the coreclr/monosgen library directly to initialize the runtime.

Android exports now use the `android` runtime identifier instead of `linux-bionic`, this removes the restrictions we previously had:
- Adds support for all Android architectures (arm32, arm64, x32, and x64), previously only the 64-bit architectures were supported.
- Loads `System.Security.Cryptography.Native.Android` (the .NET library that binds to the Android OS crypto functions).
2024-09-16 17:07:03 +02:00
Thaddeus Crews
9853a69144 Implement typed dictionaries 2024-09-04 10:27:26 -05:00
Rémi Verschelde
0d0eb71694 Merge pull request #94599 from juanjp600/node-array-export-diagnostic
C#: Fix GD0107 not applying to arrays and dictionaries containing nodes
2024-08-16 23:45:26 +02:00
Rémi Verschelde
c2a4942850 Bump version to 4.4-dev
Mr. Godot still didn't show up...
2024-08-15 11:39:34 +02:00
Juan Pablo Arce
8aa444d212 Fix GD0107 not applying to arrays and dictionaries containing nodes 2024-07-24 02:20:29 -03:00
Raul Santos
65cd0c86f9 C#: Escape generated members 2024-06-15 19:07:42 +02:00
Gaoyao Massimo Hu
e3270113ca Remove useless isFirstEntry and useless source.Append("else ") 2024-05-14 07:44:56 +01:00
Gaoyao Massimo Hu
06b716d8b3 Fix C# Hint NodeType and ResourceType HintString 2024-05-08 16:22:52 +01:00
Rémi Verschelde
7d03b1de0b Style: Trim trailing whitespace and ensure newline at EOF
Found by apply the file_format checks again via #91597.
2024-05-08 10:12:46 +02:00
Rémi Verschelde
629e91acff Merge pull request #91479 from Repiteo/dotnet/sln-csproj-attributes
C#: Fix attributes for `sln`/`csproj` files
2024-05-04 11:52:29 +02:00
Thaddeus Crews
64f2e8b64f Dotnet: Fix attributes for sln/csproj files 2024-05-03 12:21:51 -05:00
K. S. Ernest (iFire) Lee
f9b488508c Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
Rémi Verschelde
4eaafc8fa8 Merge pull request #91375 from paulloz/dotnet/prevent-generator-crash-on-exported-unconstructed-generic-arrays
C#: Fix generator crash w/ generic arrays
2024-05-02 12:46:42 +02:00
Raul Santos
1510f88ae1 C#: Ignore late bound methods in MustBeVariantAnalyzer
If symbol is late bound (as is the case when using `dynamic`) we can't obtain the symbol to analyze the usage of `[MustBeVariant]`.
2024-05-01 03:18:21 +02:00
Paul Joannon
aba787393f C#: Fix generator crash w/ generic arrays 2024-04-30 22:22:09 +02:00
Konstantin Kretov
2b46e009fa Fill copyright field in .csproj files
This ensures that nuget packages will have both license and copyright fields filled.
2024-04-26 11:41:04 +02:00
Jason Hunter
bdbd9995f8 Add property UsingGodotNETSdk to Godot.NET.Sdk
The Godot.NET.Sdk (for C# use) should define the property `UsingGodotNETSdk` in its [SDK.props](a07dd0d6a5/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props).  

## Why
Defining this property allows shared build configuration (e.g. Directory.Build.targets or other imported msbuild files) to detect deterministically when they are operating within the scope of a project controlled by Godot.NET.Sdk.  This enables shared build configuration that may span many different projects within a folder to have Godot.NET.Sdk-specific configuration that only applies to Godot projects.

## Why named UsingGodotNETSdk
This naming scheme is common practice in Microsoft Dotnet SDKs.  For example, the property `UsingMicrosoftNETSdk` is defined by the default SDK, `UsingMicrosoftTraversalSdk` is defined by [Microsoft.Build.Traversal](363532de5b/src/Traversal/Sdk/Sdk.props (L10)), `UsingMicrosoftNoTargetsSdk` by [Microsoft.Build.NoTargets](363532de5b/src/NoTargets/Sdk/Sdk.props (L10)), and so on.  The property `UsingMicrosoftNETSdk` is even used in the implementation of Godot.NET.Sdk for conditional logic of the type predicted here.

Note that these "Using*" properties are _additive_ in the sense that more than one can be defined for a given project (as SDKs can effectively be built upon other SDKs, using them as components).  So, it is normal and appropriate for both `UsingMicrosoftNETSdk` and `UsingGodotNETSdk` to be simultaneously defined within the same project.
2024-03-18 09:48:52 -07:00