Skip to content

make implementations internal and sealed #490

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

Merged
merged 1 commit into from
Oct 18, 2018

Conversation

paulomorgado
Copy link
Contributor

Proposed Changes

The code base is filled with unnecessary public types or members and unnecessary virtual members.

This PR locks down everything possible to lock down.

Fixes #466

Types of Changes

  • Bugfix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance)

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

@kjnilsson
Copy link
Contributor

@paulomorgado did you run the test suite for this? When I run it I get a bunch of:

Error Message:
 OneTimeSetUp: Invalid signature for SetUp or TearDown method: ReleaseResources```

I don't think `ReleaseResources` should be private.

@paulomorgado paulomorgado force-pushed the internal branch 2 times, most recently from a86edf9 to 58ac7b2 Compare October 15, 2018 23:01
@paulomorgado
Copy link
Contributor Author

I think I got it solved.

I'm still having some trouble setting up a test environment. I'm running the server from a container but the tests are missing some rabbitmqctl.bat file. Is there a way to get it without having to install a server locally.

@michaelklishin
Copy link
Contributor

@paulomorgado RabbitMQ CLI tools ship with the broker.

@paulomorgado
Copy link
Contributor Author

@michaelklishin, can you tell me why the tests are failing now?

@michaelklishin
Copy link
Contributor

The only error I could spot was

CSC : error CS1617: Invalid option '7.3' for /langversion. Use '/langversion:?' to list supported values. [/tmp/build/b95f7b06/rabbitmq_dotnet_client/projects/client/Unit/Unit.csproj]
    0 Warning(s)rifying Checksum
    1 Error(s)Download complete

@paulomorgado
Copy link
Contributor Author

You need to upgrade the build tools on that build server.

@michaelklishin
Copy link
Contributor

We will. Note that we are happy to merge your contributions if they pass on our developer machines and update Concourse environment(s) later.

@kjnilsson
Copy link
Contributor

I updated dotnet on the ci image last week. Do we need to specify the langversion in the Unit project file or does it work without?

@bording
Copy link
Collaborator

bording commented Oct 17, 2018

@kjnilsson If you're actually running against the latest .NET Core SDK, then I would expect it to understand the 7.3 langversion. It seems like you've got something wrong in your CI still.

@kjnilsson
Copy link
Contributor

kjnilsson commented Oct 17, 2018

root@29fc37abe41d:/# dotnet --version
2.1.4

@kjnilsson
Copy link
Contributor

kjnilsson commented Oct 17, 2018

[EDIT] it doesn't build ok at all with no langversion but 7.2 seems ok

It builds ok if we remove LangVersion - please update the PR without a specific lang version (Why only add it for Unit anyway?). Cheers.

@bording
Copy link
Collaborator

bording commented Oct 17, 2018

@kjnilsson 2.1.4 is ancient. The latest is 2.1.403.

@bording
Copy link
Collaborator

bording commented Oct 17, 2018

It doesn't build ok at all with no langversion but 7.2 seems ok

If you don't specify a language version, it defaults to the latest major version of the C# language, which right now means 7.0. So if you're using any language features introduced in 7.1, 7.2, or 7.3, you'll get errors.

BTW, the LangVersion property also accepts "latest" as a value, which would let the project pick up the newest language features without needing to update the project value.

@paulomorgado
Copy link
Contributor Author

@bording, latest in my machine is 7.3. That's why it's a good practice to make the version explicit.

Meanwhile, I was able to make it work with 7.0 (default).

@bording
Copy link
Collaborator

bording commented Oct 17, 2018

@bording, latest in my machine is 7.3. That's why it's a good practice to make the version explicit.

It depends on what you're going for. If you know your build infrastructure is going to be updated regularly, them using "latest" reduces the need to always edit that value.

Copy link
Contributor

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

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

LGTM with .NET Core 2.1.403.

@kjnilsson kjnilsson merged commit d9a3383 into rabbitmq:master Oct 18, 2018
@paulomorgado paulomorgado deleted the internal branch October 18, 2018 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make implementation internal
4 participants