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

Bump target framework to 6.0 for test projects #2173

Merged
merged 2 commits into from
Aug 2, 2022

Conversation

tkiapril
Copy link
Contributor

@tkiapril tkiapril commented Jul 22, 2022

Resolves #2164. Resolves #2090.

To fully drop 3.1, Libplanet, Libplanet.Analyzers, Libplanet.Net, Libplanet.Stun, and Libplanet.Tools projects also has to be bumped to 6.0.

Note: When Libplanet.Explorer project is set to target net6.0, it requires 6.x version of Microsoft.AspNetCore.Mvc.NewtonsoftJson package. However, since MSBuild bundled with Mono cannot correctly interpret net6.0 moniker, it is impossible to build the project with mono. For this, a new target ReleaseMono was set up to specifically exclude Libplanet.Explorer* projects from being built with mono.

Note 2: With netcoreapp3.1, only the executable produced with dotnet publish was marked executable. However, with net6.0, all the produced binaries are marked executable. Because of this, bin_name had to be produced in another way, which at the moment is looking whether it has o+x (or g+x) permission.

@tkiapril tkiapril force-pushed the bump-net branch 8 times, most recently from 7b9a3e7 to bb539b0 Compare July 22, 2022 11:11
@tkiapril tkiapril changed the title Bump target framework to 6.0 for test projects WIP Bump target framework to 6.0 for test projects Jul 25, 2022
@tkiapril tkiapril force-pushed the bump-net branch 21 times, most recently from a820bce to 1096cc7 Compare July 26, 2022 02:33
longfin
longfin previously approved these changes Jul 27, 2022
@@ -119,15 +119,15 @@ commands:
- run: |
msbuild \
-t:Restore \
-p:Configuration=Release \
-p:Configuration=ReleaseMono \
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this purpose to merely have a separated output directory?

Copy link
Contributor Author

@tkiapril tkiapril Jul 28, 2022

Choose a reason for hiding this comment

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

This is actually for excluding Libplanet.Explorer* projects from being compiled on Mono target. This is implemented via having a new ReleaseMono build target on the solution and excluding specific projects from the target, and then using the build target on Mono.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, could you mention that in CONTRIBUTING.md file?

longfin
longfin previously approved these changes Aug 2, 2022
Notes:

When `Libplanet.Explorer` project is set to target `net6.0`, it
requires `6.x` version of `Microsoft.AspNetCore.Mvc.NewtonsoftJson`
package. However, since MSBuild bundled with Mono cannot correctly
interpret `net6.0` moniker, it is impossible to build the project
with mono. For this, a new target `ReleaseMono` was set up to
specifically exclude `Libplanet.Explorer*` projects from being
built with mono.

With `netcoreapp3.1`, only the executable produced with
`dotnet publish` was marked executable. However, with `net6.0`,
all the produced binaries are marked executable. Because of this,
`bin_name` had to be produced in another way, which at the moment
is looking whether it has `o+x` (or `g+x`) permission.
@pull-request-quantifier-deprecated

This PR has 152 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Medium
Size       : +58 -94
Percentile : 50.4%

Total files changed: 23

Change summary by file extension:
.yml : +16 -16
.json : +2 -2
.sh : +3 -1
.yaml : +1 -1
.md : +20 -8
.explorer : +2 -2
.csproj : +14 -64
.sln : +0 -0

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

@tkiapril tkiapril requested a review from longfin August 2, 2022 07:22
@tkiapril tkiapril merged commit d5ddefa into planetarium:main Aug 2, 2022
@tkiapril tkiapril deleted the bump-net branch August 2, 2022 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Bump TargetFramework of Libplanet.Test and other test projects Test projects require .NET Core 3.1
3 participants