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

Remove System.ServiceModel.Primitives dependency. #1017

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Commits on May 8, 2022

  1. feature: Add ArrayBufferPool implementation.

    Add an ArrayPool<byte> from the System.Buffers namespace. With it, one
    can exclude the System.ServiceModel.Primitives package.
    shanecelis committed May 8, 2022
    Configuration menu
    Copy the full SHA
    1264afb View commit details
    Browse the repository at this point in the history
  2. feature: Add a build flavor 'Minimal'

    In an effort to use NetMQ with Unity3D, one problem was trying to
    satisfy the dependencies for `System.ServiceModel.Primitives`. It
    required also providing `System.ServiceModel.{Http,Duplex,NetTcp}` and
    perhaps more before I gave up. These dependencies were only noticed
    while Unity3D built the project. When using NetMQ in a regular dotnet
    project, I've had no problems with the `System.ServiceModel.Primitives`
    dependencies.
    
    I added an alternative implementation of `IBufferPool` using the
    `ArrayPool` from `System.Buffers` but it is unused. I instrumented the
    build system to have a "Flavor" that by default is set to "Standard",
    which changes nothing from before.
    
    For my usecase, however, I set the flavor to "Minimal".
    
        $ dotnet build -p:Flavor=Minimal
    
    This excludes "System.ServiceModel.Primitives" and defines a
    preprocessor flag of `FLAVOR_MINIMAL` that excludes the
    BufferManagerBufferPool class and uses the ArrayBufferPool instead.
    shanecelis committed May 8, 2022
    Configuration menu
    Copy the full SHA
    444a1de View commit details
    Browse the repository at this point in the history

Commits on May 11, 2022

  1. Configuration menu
    Copy the full SHA
    8c87cbc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f944d62 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    75f916a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7c8512c View commit details
    Browse the repository at this point in the history
  5. chore: Remove System.ServiceModel.Primitives ref.

    Subsitute with reference to System.Buffers.
    shanecelis committed May 11, 2022
    Configuration menu
    Copy the full SHA
    e412930 View commit details
    Browse the repository at this point in the history
  6. feature: Add USE_SERVICE_MODEL define for testing.

    I expect the BufferMangerBufferPool implementation will go away
    but before that happens I wanted the tests for each implementation to
    remain accessible. If you define USE_SERVICE_MODEL, it will build the
    old pool implementation and use it. And it'll also run tests against the
    old and new pool.
    shanecelis committed May 11, 2022
    Configuration menu
    Copy the full SHA
    5a7e7b7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ceef6b9 View commit details
    Browse the repository at this point in the history