Closed ross-spencer closed 3 months ago
As mentioned in #45 some commits break builds at the moment. As more people have a look into this and try it out, I have to be more "branch-true".
And you are right, I will split it into different files (there is also a local branch where I did that) and add a build pragma on top of every file, e.g. //go:build linux
But I am in general not sure if we want the filesystem type identified by FileTrove. Do you have an opinion here, @ross-spencer ? This is driven by #30
But I am in general not sure if we want the filesystem type identified by FileTrove
With the caveat I am still learning about filetrove, I feel this in general a really useful thing for tooling to report on and I don't think we have any digipres tools doing this already? Yet, there are definitely issues transferring data across file-system boundaries. So +1 from me!
Build issue solved
Describe the bug A clear and concise description of what the bug is.
Windows and MacOS specific imports cannot be understood in Linux after recent changes: https://github.com/steffenfritz/FileTrove/blob/5e5c16b19c5d5a9eab840331619889f82891a329/filesystem.go
To Reproduce Steps to reproduce the behavior:
Building fileTrove in Linux results in error, for example, build cannot find
syscall.NewLazyDLL
Expected behavior A clear and concise description of what you expected to happen.
Builds work on all OS.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here, e.g. test data
My workaround was to separate the OS dependent functions into the following additional files:
filesystem_macos.go
filesystem_windows.go
With the specific build commands for MacOS and Windows at the top.
Then in filesystem.go, the platform dependent naming can be removed in favor of a generic function name that will work on each independent build environment: