Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,20 @@

* Do not open an issue on GitHub until you have collected positive feedback about the change. GitHub issues are primarily intended for bug reports and fixes.

#### **Building**

* When first cloning the repo, make sure to run `git submodule update --init --recursive` otherwise the submodules (e.g. `shared-infrastructure`) will be missing.

* Run `dotnet build` in the root of the repo, or open the ImageSharp.sln file in Visual Studio and build from there.
Copy link
Member

Choose a reason for hiding this comment

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

Does dotnet build indeed work out of the box for ImageSharp.sln? (Not on my system for sure, but it's broken in many ways.)

Copy link
Contributor Author

@wilka wilka Jul 14, 2020

Choose a reason for hiding this comment

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

Good question, I didn't try it in detail, but from a fresh clone of the repo on my machine, when running dotnet build I got this:

C:\temp\ImageSharp  master ≣  > dotnet build
Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Restored C:\temp\ImageSharp\src\ImageSharp\ImageSharp.csproj (in 1.47 sec).
  Restored C:\temp\ImageSharp\tests\ImageSharp.Tests\ImageSharp.Tests.csproj (in 1.56 sec).
  Restored C:\temp\ImageSharp\tests\ImageSharp.Tests.ProfilingSandbox\ImageSharp.Tests.ProfilingSandbox.csproj (in 1.73 sec).
  Restored C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj (in 1.78 sec).
  1 of 5 projects are up-to-date for restore.
  MinVer: Using { Commit: ab8ab39, Tag: 'v1.0.0-rc.3', Version: 1.0.0-rc.3, Height: 3 }.
  MinVer: Calculated version 1.0.0-rc.3.3.
  MinVer: Using { Commit: ab8ab39, Tag: 'v1.0.0-rc.3', Version: 1.0.0-rc.3, Height: 3 }.
  MinVer: Using { Commit: ab8ab39, Tag: 'v1.0.0-rc.3', Version: 1.0.0-rc.3, Height: 3 }.
  MinVer: Calculated version 1.0.0-rc.3.3.
  MinVer: Calculated version 1.0.0-rc.3.3.
  MinVer: Using { Commit: ab8ab39, Tag: 'v1.0.0-rc.3', Version: 1.0.0-rc.3, Height: 3 }.
  MinVer: Calculated version 1.0.0-rc.3.3.
  MinVer: Using { Commit: ab8ab39, Tag: 'v1.0.0-rc.3', Version: 1.0.0-rc.3, Height: 3 }.
  MinVer: Calculated version 1.0.0-rc.3.3.
  MinVer: Using { Commit: ab8ab39, Tag: 'v1.0.0-rc.3', Version: 1.0.0-rc.3, Height: 3 }.
  MinVer: Calculated version 1.0.0-rc.3.3.
  ImageSharp -> C:\temp\ImageSharp\artifacts\bin\src\ImageSharp\Debug\net472\SixLabors.ImageSharp.dll
  ImageSharp -> C:\temp\ImageSharp\artifacts\bin\src\ImageSharp\Debug\netstandard2.0\SixLabors.ImageSharp.dll
  ImageSharp -> C:\temp\ImageSharp\artifacts\bin\src\ImageSharp\Debug\netcoreapp3.1\SixLabors.ImageSharp.dll
  ImageSharp -> C:\temp\ImageSharp\artifacts\bin\src\ImageSharp\Debug\netcoreapp2.1\SixLabors.ImageSharp.dll
  ImageSharp -> C:\temp\ImageSharp\artifacts\bin\src\ImageSharp\Debug\netstandard1.3\SixLabors.ImageSharp.dll
  ImageSharp -> C:\temp\ImageSharp\artifacts\bin\src\ImageSharp\Debug\netstandard2.1\SixLabors.ImageSharp.dll
CSC : warning CS8002: Referenced assembly 'Colourful, Version=2.0.3.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
CSC : warning CS8002: Referenced assembly 'Pfim, Version=0.9.1.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
  ImageSharp.Benchmarks -> C:\temp\ImageSharp\artifacts\bin\tests\ImageSharp.Benchmarks\Debug\netcoreapp3.1\ImageSharp.Benchmarks.dll
  ImageSharp.Tests -> C:\temp\ImageSharp\artifacts\bin\tests\ImageSharp.Tests\Debug\netcoreapp3.1\SixLabors.ImageSharp.Tests.dll
  ImageSharp.Tests -> C:\temp\ImageSharp\artifacts\bin\tests\ImageSharp.Tests\Debug\netcoreapp2.1\SixLabors.ImageSharp.Tests.dll
CSC : warning CS8002: Referenced assembly 'Colourful, Version=2.0.3.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
CSC : warning CS8002: Referenced assembly 'Pfim, Version=0.9.1.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
  ImageSharp.Benchmarks -> C:\temp\ImageSharp\artifacts\bin\tests\ImageSharp.Benchmarks\Debug\netcoreapp2.1\ImageSharp.Benchmarks.dll
  ImageSharp.Tests.ProfilingSandbox -> C:\temp\ImageSharp\artifacts\bin\tests\ImageSharp.Tests.ProfilingSandbox\Debug\netcoreapp2.1\win7-x64\ImageSharp.Tests.ProfilingSandbox.dll
CSC : warning CS8002: Referenced assembly 'Colourful, Version=2.0.3.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
CSC : warning CS8002: Referenced assembly 'Pfim, Version=0.9.1.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
  ImageSharp.Benchmarks -> C:\temp\ImageSharp\artifacts\bin\tests\ImageSharp.Benchmarks\Debug\net472\ImageSharp.Benchmarks.exe
  ImageSharp.Tests.ProfilingSandbox -> C:\temp\ImageSharp\artifacts\bin\tests\ImageSharp.Tests.ProfilingSandbox\Debug\netcoreapp3.1\win7-x64\ImageSharp.Tests.ProfilingSandbox.dll
  ImageSharp.Tests -> C:\temp\ImageSharp\artifacts\bin\tests\ImageSharp.Tests\Debug\net472\SixLabors.ImageSharp.Tests.dll
  ImageSharp.Tests.ProfilingSandbox -> C:\temp\ImageSharp\artifacts\bin\tests\ImageSharp.Tests.ProfilingSandbox\Debug\net472\win7-x64\ImageSharp.Tests.ProfilingSandbox.exe

Build succeeded.

CSC : warning CS8002: Referenced assembly 'Colourful, Version=2.0.3.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
CSC : warning CS8002: Referenced assembly 'Pfim, Version=0.9.1.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
CSC : warning CS8002: Referenced assembly 'Colourful, Version=2.0.3.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
CSC : warning CS8002: Referenced assembly 'Pfim, Version=0.9.1.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
CSC : warning CS8002: Referenced assembly 'Colourful, Version=2.0.3.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
CSC : warning CS8002: Referenced assembly 'Pfim, Version=0.9.1.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. [C:\temp\ImageSharp\tests\ImageSharp.Benchmarks\ImageSharp.Benchmarks.csproj]
    6 Warning(s)
    0 Error(s)

Time Elapsed 00:01:37.79

So it seemed to work.

Copy link
Contributor Author

@wilka wilka Jul 14, 2020

Choose a reason for hiding this comment

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

I also tried dotnet test (again with no parameters) and that seemed to work as well. It ran SixLabors.ImageSharp.Tests.dll 3 times under xunit for NetCore 3.1, 2.1 and Framework 4.7.2:

ImageSharp\artifacts\...\Debug\netcoreapp3.1\SixLabors.ImageSharp.Tests.dll(.NETCoreApp,Version=v3.1)

Test Run Successful.
Total tests: 16748
     Passed: 16732
    Skipped: 16

ImageSharp\artifacts\...\Debug\netcoreapp2.1\SixLabors.ImageSharp.Tests.dll(.NETCoreApp,Version=v2.1)
Test Run Successful.
Total tests: 16745
     Passed: 16729
    Skipped: 16

ImageSharp\artifacts\...\Debug\net472\SixLabors.ImageSharp.Tests.dll(.NETFramework,Version=v4.7.2)
Test Run Successful.
Total tests: 16745
     Passed: 16729
    Skipped: 16

Copy link
Member

@antonfirsov antonfirsov Jul 14, 2020

Choose a reason for hiding this comment

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

@JimBobSquarePants works as intended I guess. We should probably document it in the main README.MD as well.

Copy link
Member

Choose a reason for hiding this comment

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

Yep @antonfirsov that would be wise. @wilka if you could do that it would be greatly appreciated.


#### **Running tests and Debugging**

* Expected test output is pulled in as a submodule from the [ImageSharp.Tests.Images repository](https://github.com/SixLabors/Imagesharp.Tests.Images/tree/master/ReferenceOutput). To succesfully run tests, make sure that you have updated the submodules!
* Debugging (running tests in Debug mode) is only supported on .NET Core 2.1, because of JIT Code Generation bugs like [dotnet/coreclr#16443](https://github.com/dotnet/coreclr/issues/16443) or [dotnet/coreclr#20657](https://github.com/dotnet/coreclr/issues/20657)

#### **Do you have questions about consuming the library or the source code?**

* Ask any question about how to use ImageSharp in the [ImageSharp Gitter Chat Room](https://gitter.im/ImageSharp/General).
* Ask any question about how to use ImageSharp over in the [discussions section](https://github.com/SixLabors/ImageSharp/discussions).

#### Code of Conduct
This project has adopted the code of conduct defined by the [Contributor Covenant](https://contributor-covenant.org/) to clarify expected behavior in our community.
Expand Down