dragonboat icon indicating copy to clipboard operation
dragonboat copied to clipboard

tan & linux

Open biskit opened this issue 4 months ago • 5 comments

trying to compile code that includes github.com/lni/dragonboat/v4/plugin/tan so it can be used in

			Expert: dbconfig.ExpertConfig{
				LogDB:        dbconfig.GetTinyMemLogDBConfig(),
				LogDBFactory: tan.Factory,
			}

compiles fine on osx but on linux errors

/home/bs/github.com/dragonboat/internal/tan/prealloc_linux.go:33:13: impossible type assertion: f.(*os.File)
	*os.File does not implement "github.com/lni/vfs".File (missing method Preallocate)

biskit avatar Oct 21 '25 20:10 biskit

Master is locked to vfs@8852fd8 which does not include vfs PR #3 adding Preallocate.

It looks like you ran go get -u and upgraded the vfs dependency.
You probably need to reset your go.mod and go.sum files in the dragonboat directory.

But I'm also a bit baffled by the code path in your error message reading /github.com/dragonboat/ because the path should be /github.com/lni/dragonboat/. So your go environment may also be somehow misconfigured.

kevburnsjr avatar Oct 21 '25 23:10 kevburnsjr

thanks @kevburnsjr

i have a local version of vfs with mods to support a different version of pebble (v1.1.4) and hence the go.mod for dragonboat points to a local version of vfs

ie: replace github.com/lni/vfs => ../vfs

may be I can checkout vfs@8852fd8 apply my patches to it and try compile on linux?

biskit avatar Oct 22 '25 01:10 biskit

It looks like you ran go get -u and upgraded the vfs dependency.

no. i upgraded the pebble used by vfs to 1.1.4 and that made me clone vfs locally, hence dragonboat locally as well

biskit avatar Oct 22 '25 01:10 biskit

i did it because i have another piece of code that depends on pebble v1.1.4

if the versions of pebble can coexist, i can use stock lni/dragonboat

biskit avatar Oct 22 '25 22:10 biskit

per #363 master should compile without pebble and vfs

why I cannot?

biskit avatar Oct 23 '25 19:10 biskit