Giter Club home page Giter Club logo

Comments (8)

insomniacslk avatar insomniacslk commented on June 5, 2024 1

Hey Michael,
I'm sorry that this broke your build, I see that you have already committed an update on your side. We planned already to use vgo, as this project is now more widely used. For now I will commit to avoid breaking changes until we have switched to versioning. Would that be OK for you?

from dhcp.

stapelberg avatar stapelberg commented on June 5, 2024 1

After PR #279, github.com/u-root/u-root is the only dependency showing up as incompatible when enabling Go modules:

cat go.mod
module github.com/insomniacslk/dhcp

go 1.12

require (
	github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72
	github.com/hugelgupf/socketpair v0.0.0-20190312070548-ac4bdefbf625
	github.com/jsimonetti/rtnetlink v0.0.0-20190429090657-99ed6b5c17d2
	github.com/mdlayher/ethernet v0.0.0-20190313224307-5b5fc417d966
	github.com/mdlayher/netlink v0.0.0-20190423160922-382af5ec7c57
	github.com/mdlayher/raw v0.0.0-20190419142535-64193704e472
	github.com/stretchr/testify v1.3.0
	github.com/u-root/u-root v4.0.0+incompatible
	golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6
	golang.org/x/sys v0.0.0-20190429094411-2cc0cad0ac78
)

I think this is because u-root is using major version numbers without following the semantic import versioning convention (i.e. /v4 in the import path for major version 4). I would guess that u-root doesn’t really consider itself a library package.

However, it seems like u-root is only pulled in for the uio package, which provides endianness conversion. Those conversions are easily expressed in a helper package (see e.g. https://github.com/google/nftables/blob/master/binaryutil/binaryutil.go), which seems preferable to an external dependency.

from dhcp.

stapelberg avatar stapelberg commented on June 5, 2024 1

u-root does think of itself as a library,

Okay, that’s good to know

but we haven't gotten around to modules support yet.

Is there an issue we can follow? I’d like to see u-root work with modules rather sooner than later, especially given that Go 1.13 is on the horizon, which (IIRC) wants to make modules default-on.

from dhcp.

rjoleary avatar rjoleary commented on June 5, 2024 1

For u-root, there's this bug: u-root/u-root#805. This was one attempt: u-root/u-root#1152. Unfortunately, it's not as easy as running "go mod init".

It seems there are two separate milestones for supporting modules in u-root. The first is to support importing versioned u-root packages as @stapelberg is doing. It appears this can be done while maintaining compatibility with GOPATH and thus u-root's existing build system. The second milestone would be the more difficult task of adding modules support to u-root's build system.

I'll try to look into this more later this week. It seems https://github.com/u-root/NiChrome/blob/master/go.mod is suffering the same.

from dhcp.

stapelberg avatar stapelberg commented on June 5, 2024

Sure thing, thanks for your reply! :)

from dhcp.

insomniacslk avatar insomniacslk commented on June 5, 2024

We are not far from a stable 1.0 release :) Will get back to this soon

from dhcp.

hugelgupf avatar hugelgupf commented on June 5, 2024

u-root does think of itself as a library, but we haven't gotten around to modules support yet. (Switching is not trivial for us.)

cc @rjoleary

from dhcp.

hugelgupf avatar hugelgupf commented on June 5, 2024

The uio package is a common helper package we have for marshaling stuff. It's not just endianness conversion, but also deferred error handling so that code doesn't become littered with if err blocks.

I'd rather not have 3 different copies of that code to maintain, so I prefer it stay as a dependency.

from dhcp.

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.