summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/Godot.SourceGenerators.csproj
Commit message (Collapse)AuthorAgeFilesLines
* Bump version to 4.4-devRémi Verschelde2024-08-151-1/+1
| | | | Mr. Godot still didn't show up...
* Dotnet: Fix attributes for `sln`/`csproj` filesThaddeus Crews2024-05-031-1/+1
|
* Fill copyright field in .csproj filesKonstantin Kretov2024-04-261-0/+1
| | | | This ensures that nuget packages will have both license and copyright fields filled.
* Merge pull request #87253 from van800/van800/analyserRémi Verschelde2024-02-211-2/+1
|\ | | | | | | Provide a roslyn analyzers corresponding to the GD0001 and GD0002
| * provide analyser corresponding to the GD0001 and GD0002, add ↵Ivan Shakhov2024-02-211-2/+1
| | | | | | | | | | | | | | ClassPartialModifierAnalyzerFix, and tests Co-authored-by: Raul Santos <raulsntos@gmail.com> Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
* | C#: Add analyzer release trackingRaul Santos2024-02-191-0/+5
|/ | | | Fixes diagnostic RS2008.
* C#: Fix to allow usage of [MustBeVariant] in generic typed attributesAlberto Vilches2024-01-211-1/+1
|
* Bump version to 4.3-devRémi Verschelde2023-11-291-1/+1
| | | | | | The essential doesn't change. -- Samuel Beckett, Waiting for Godot
* C#: Suppress NU5128 warningRaul Santos2023-07-151-0/+1
| | | | Suppress dependencies of SourceGenerators package to fix NU5128.
* Bump version to 4.2-devRémi Verschelde2023-07-051-1/+1
| | | | Keep on waitin'
* Bump version to 4.1-devRémi Verschelde2023-03-011-1/+1
| | | | Can't stop, won't stop, they said, huh?
* C#: Make GodotSharp API a NuGet packageIgnacio Roldán Etcheverry2022-08-221-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | In the past, the Godot editor distributed the API assemblies and copied them to project directories for projects to reference them. This changed with the move to .NET 5/6. Godot no longer copies the assemblies to project directories. However, the project Sdk still tried to reference them from the same location. From now on, the GodotSharp API is distributed as a NuGet package, which the Sdk can reference. Added an option to `build_assemblies.py` to copy all Godot NuGet packages to an existing local NuGet source. This will be needed during development, while packages are not published to a remote NuGet repository. This option also makes sure to remove packages of the same version installed (~/.nuget/packages). Very useful during development, when packages change, to make sure the package being used by a project is the same we just built and not one from a previous build. A local NuGet source can be created like this: ``` mkdir ~/MyLocalNuGetSource && \ dotnet nuget add source ~/MyLocalNuGetSource/ -n MyLocalNuGetSource ```
* C#: Add source generator for properties and exports default valuesIgnacio Roldán Etcheverry2022-08-221-1/+1
| | | | | | | | | | | | | | The editor no longer needs to create temporary instances to get the default values. The initializer values of the exported properties are still evaluated at runtime. For example, in the following example, `GetInitialValue()` will be called when first looks for default values: ``` [Export] int MyValue = GetInitialValue(); ``` Exporting fields with a non-supported type now results in a compiler error rather than a runtime error when the script is used.
* C#/netcore: Add base desktop game export implementationIgnacio Roldán Etcheverry2022-08-221-2/+2
| | | | | | | | | This base implementation is still very barebones but it defines the path for how exporting will work (at least when embedding the .NET runtime). Many manual steps are still needed, which should be automatized in the future. For example, in addition to the API assemblies, now you also need to copy the GodotPlugins assembly to each game project.
* Add a simple C# .editorconfigAaron Franke2021-07-231-2/+3
|
* Add C# source generator for a new ScriptPath attributeIgnacio Etcheverry2021-03-061-0/+40
This source generator adds a newly introduced attribute, `ScriptPath` to all classes that: - Are top-level classes (not inner/nested). - Have the `partial` modifier. - Inherit `Godot.Object`. - The class name matches the file name. A build error is thrown if the generator finds a class that meets these conditions but is not declared `partial`, unless the class is annotated with the `DisableGodotGenerators` attribute. We also generate an `AssemblyHasScripts` assembly attribute which Godot uses to get all the script classes in the assembly, eliminating the need for Godot to search them. We can also avoid searching in assemblies that don't have this attribute. This will be good for performance in the future once we support multiple assemblies with Godot script classes. This is an example of what the generated code looks like: ``` using Godot; namespace Foo { [ScriptPathAttribute("res://Player.cs")] // Multiple partial declarations are allowed [ScriptPathAttribute("res://Foo/Player.cs")] partial class Player {} } [assembly:AssemblyHasScripts(new System.Type[] { typeof(Foo.Player) })] ``` The new attributes replace script metadata which we were generating by determining the namespace of script classes with a very simple parser. This fixes several issues with the old approach related to parser errors and conditional compilation. It also makes the task part of the MSBuild project build, rather than a separate step executed by the Godot editor.