Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why mixes the modern .NET5 SDK format with the legacy .NET Framework project format? #6

Closed
GeorgeS2019 opened this issue Apr 13, 2021 · 10 comments
Labels
wontfix This will not be worked on

Comments

@GeorgeS2019
Copy link

Please look at the discussion here to understand the question addressed to the author of GodotXUnit

@rexfleischer
Copy link
Member

Sorry for the late comment.

I'm not entirely sure what's being asked. But this project isn't using NET5, it's on 4.7 iirc. I'm not very good with the build systems in dotnet, so suggestions and pull requests would be greatly appreciated.

One technical issue that should be brought up is with xunit. To have custom annotations (GodotFact), xunit requires the dll to be specified: https://github.com/fledware/GodotXUnit/blob/master/addons/GodotXUnit/GodotXUnitApi/GodotFactAttribute.cs#L48

I hope this clears some things up, let me know!

@rexfleischer
Copy link
Member

Also, I'd like to say thanks for the attention you've been giving to this project!

@GeorgeS2019
Copy link
Author

GeorgeS2019 commented Apr 21, 2021

@rexfleischer NOT .NET5 but .NET5 project format.

[.NET5 SDK project format]

  • GodotXUnit.csproj
    <Project Sdk="Godot.NET.Sdk/3.3.0">

[Non .NET5 SDK but legacy .NET framework project format]

  • GodotXUnit\tests\SubProjectForUnitTests\ SubProjectForUnitTests .csproj
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  • GodotXUnit\addons\GodotXUnit\GodotXUnitApi\ GodotXUnitApi.csproj
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

I feedback that it is more the issue we need to sort out as discussed here, the benefit of .NET5 project format for simplicity

@GeorgeS2019
Copy link
Author

@rexfleischer The other issues are as described, not sure if you have solutions soon

  • non IDE integration
  • using GD.Print statement within test (e.g. Fact and GodotFact) is not show up in the output of the (positive) test results ==> now we only get "No output"

@rexfleischer
Copy link
Member

rexfleischer commented Apr 21, 2021

  • non IDE integration

This would be really cool and I wanted to look into building a plugin for intellij to run tests there. But, all these build issues came up.

  • using GD.Print statement within test (e.g. Fact and GodotFact) is not show up in the output of the (positive) test results ==> now we only get "No output"

This is definitely on my radar of things. The issue is that the godot tests run in a different process than the godot IDE, so there needs to be a way to grab output sent by GD.Print, which I couldnt find. You can either use console output, or GDU.Print.

I see what you mean now by the mixing of project builds. That's the main problem that I ran into. Godot 3.2.3 very forcefully changed the csproj file on the root. For instance, if you pull down this project, godot will change the csproj file. But you can see it is the same: https://github.com/fledware/GodotXUnit/blob/master/GodotXUnit.csproj#L2

And I couldn't get Godot.NET.Sdk/3.2.3 to build the sub projects.

@GeorgeS2019
Copy link
Author

GeorgeS2019 commented Apr 21, 2021

@rexfleischer

Godot 3.2.3 very forcefully changed the csproj file

At least you have a provision for calling test.dll at a custom folder outside the godot project. I have not tested it yet. This could be one way to bring most of the unit tests in cs projects outside the godot project folder and use the .NET5 SDK project format.

@rexfleischer
Copy link
Member

That may be true, but then I don't think intellij will be able to find it if the attributes are hot loaded during compile time. I don't think that's a pattern I'd like to support.

@GeorgeS2019
Copy link
Author

@rexfleischer Do you plan to support Visual Studio e.g. 2019? There is a VS2019 Godot extension. Do you see a way to combine it?

@rexfleischer
Copy link
Member

I wasn't planning to. The only one I was planning to support was rider, because that's the IDE I use.

I was planning on doing this same type of thing when kotlin scripting becomes stable. I'd be able to reuse integration work with rider with the kotlin IDE.

@rexfleischer
Copy link
Member

I'm going to close this for now as won't fix. Until there is a way to have a multi project in godot, I'm not aware of a way to fix it.

If someone has a suggestion on how to have a multi project or some other solution, please open a different ticket as an enhancement.

@rexfleischer rexfleischer added the wontfix This will not be worked on label Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants