Giter Site home page Giter Site logo

Comments (5)

bojanz avatar bojanz commented on June 12, 2024 1

Hm, I seem to have misunderstood how go mod works. I ran go mod tidy && go mod vendor and it didn't mention or download the benchmark dependencies. Which makes sense, I don't import the benchmarks package.

Sorry for wasting your time.

from decimal.

ericlagergren avatar ericlagergren commented on June 12, 2024

This is a good idea, thanks.

from decimal.

bojanz avatar bojanz commented on June 12, 2024

Is there anything I can do to push this along? Or is this blocked on v4?

I am preparing a currency handling package, and using this library instead of cockroachdb/apd is giving me noticeably better performance (on top of a more friendly API), but the go mod issues are giving me pause. Of course, my own API doesn't expose the decimal implementation, so it will be safe to swap out later without breakage.

from decimal.

ericlagergren avatar ericlagergren commented on June 12, 2024

If you want to submit a PR that would be fantastic! I haven't had a moment to sit down and do it yet, sorry about that.

from decimal.

bojanz avatar bojanz commented on June 12, 2024

Apologies, managed to lose track of this.

I tried doing a "go mod init github.com/ericlagergren/decimal/benchmarks" in the benchmarks directly and running "go mod tidy" both there and in the root directory. This cleans up the root directory as expected, but the go.mod in benchmarks/ is incomplete (e.g. missing cockroachdb/apd) for some reason:

module github.com/ericlagergren/decimal/benchmarks

go 1.14

require (
	github.com/apmckinlay/gsuneido v0.0.0-20200514163306-0630c2de03b0 // indirect
	github.com/ericlagergren/decimal v0.0.0-20191206042408-88212e6cfca9 // indirect
	github.com/shopspring/decimal v1.2.0 // indirect
)

I also get the following warning when running "go mod tidy" in the benchmarks directory:

github.com/ericlagergren/decimal/benchmarks: ambiguous import: found package github.com/ericlagergren/decimal/benchmarks in multiple modules:
	github.com/ericlagergren/decimal/benchmarks (/Users/bojanz/dev/go/decimal/benchmarks)
	github.com/ericlagergren/decimal v0.0.0-20191206042408-88212e6cfca9 (/Users/bojanz/go/pkg/mod/github.com/ericlagergren/[email protected]/benchmarks)

I might be using go mod incorrectly...

from decimal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.