Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

feat: stub out to go-libipfs #59

Merged
merged 5 commits into from
Feb 1, 2023
Merged

feat: stub out to go-libipfs #59

merged 5 commits into from
Feb 1, 2023

Conversation

aschmahmann
Copy link
Contributor

@aschmahmann aschmahmann commented Jan 31, 2023

Plan is to rearchive this repo once this is done

@@ -1,3 +1,3 @@
{
"version": "v0.2.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a patch version bump so people can upgrade and things will work, or minor so they don't have to follow us along to go-libipfs?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that go-libipfs have newer versions of libs which could break stuff.

For example if I import example.com@v1.0.0 and go-libipfs imports example.com@v1.1.0, updating to go-ipfs-files@v0.2.1 will update example.com@v1.0.0 to example.com@v1.1.0.

I don't really care about it but that why goreleaser is angry with you when you update go.mod and bump a patch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated to 0.3.0

@aschmahmann
Copy link
Contributor Author

aschmahmann commented Jan 31, 2023

Any ideas what's going on with goreleaser? When I run go mod tidy locally everything is fine, and don't we still have the things go-releaser things we're missing?

Comment on lines +62 to +104
WriteTo = files.WriteTo
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewFilter = files.NewFilter
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewLinkFile = files.NewLinkFile
// Deprecated: moved to github.com/ipfs/go-libipfs/files
ToSymlink = files.ToSymlink
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewMultiFileReader = files.NewMultiFileReader
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewFileFromPartReader = files.NewFileFromPartReader
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewBytesFile = files.NewBytesFile
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewReaderFile = files.NewReaderFile
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewReaderStatFile = files.NewReaderStatFile
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewReaderPathFile = files.NewReaderPathFile
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewSerialFile = files.NewSerialFile
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewSerialFileWithFilter = files.NewSerialFileWithFilter
// Deprecated: moved to github.com/ipfs/go-libipfs/files
FileEntry = files.FileEntry
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewMapDirectory = files.NewMapDirectory
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewSliceDirectory = files.NewSliceDirectory
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewTarWriter = files.NewTarWriter
// Deprecated: moved to github.com/ipfs/go-libipfs/files
ToFile = files.ToFile
// Deprecated: moved to github.com/ipfs/go-libipfs/files
ToDir = files.ToDir
// Deprecated: moved to github.com/ipfs/go-libipfs/files
FileFromEntry = files.FileFromEntry
// Deprecated: moved to github.com/ipfs/go-libipfs/files
DirFromEntry = files.DirFromEntry
// Deprecated: moved to github.com/ipfs/go-libipfs/files
Walk = files.Walk
// Deprecated: moved to github.com/ipfs/go-libipfs/files
NewWebFile = files.NewWebFile
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually like to keep the old file structure (*only files that had public symbols).

This makes the review process much easier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I separated by commits. You can go back earlier and see. I'm also happy to revert if that's better

go.mod Outdated Show resolved Hide resolved
@hacdias
Copy link
Member

hacdias commented Feb 1, 2023

@aschmahmann I think the problem with GoRelease is that functions are now variable. So instead of doing:

NewMultiFileReader = files.NewMultiFileReader

Maybe we should:

func NewMultiFileReader(file Directory, form bool) *MultiFileReader {
	return files.NewMultiFileReader(file, form)
}

I don't think this would give any practical errors, as it should work fine. But that's the reason why goreleaser is complaining. I will change the version to 0.3.0 so we follow what we did with other repositories. Also, thanks for doing this!

@github-actions
Copy link

github-actions bot commented Feb 1, 2023

Suggested version: v0.3.0
Comparing to: v0.2.0 (diff)

Changes in go.mod file(s):

diff --git a/go.mod b/go.mod
index 3103656..c66bf30 100644
--- a/go.mod
+++ b/go.mod
@@ -1,15 +1,10 @@
 module github.com/ipfs/go-ipfs-files
 
-require (
-	github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3
-	github.com/stretchr/testify v1.7.0
-	golang.org/x/sys v0.0.0-20190302025703-b6889370fb10
-)
+require github.com/ipfs/go-libipfs v0.4.0
 
 require (
-	github.com/davecgh/go-spew v1.1.0 // indirect
-	github.com/pmezard/go-difflib v1.0.0 // indirect
-	gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
+	github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect
+	golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
 )
 
 go 1.18

gorelease says:

# github.com/ipfs/go-ipfs-files
## compatible changes
DirFromEntry: changed from func to var
FileEntry: changed from func to var
FileFromEntry: changed from func to var
NewBytesFile: changed from func to var
NewFileFromPartReader: changed from func to var
NewFilter: changed from func to var
NewLinkFile: changed from func to var
NewMapDirectory: changed from func to var
NewMultiFileReader: changed from func to var
NewReaderFile: changed from func to var
NewReaderPathFile: changed from func to var
NewReaderStatFile: changed from func to var
NewSerialFile: changed from func to var
NewSerialFileWithFilter: changed from func to var
NewSliceDirectory: changed from func to var
NewTarWriter: changed from func to var
NewWebFile: changed from func to var
ToDir: changed from func to var
ToFile: changed from func to var
ToSymlink: changed from func to var
Walk: changed from func to var
WriteTo: changed from func to var

# summary
Suggested version: v0.3.0

gocompat says:

(empty)

Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, commit by commit. Thanks for this @aschmahmann! I'm merging and releasing as 0.3.0 for the reasons outlined by @Jorropo. I will archive this repo after the release is complete.

@hacdias hacdias merged commit c613b4c into master Feb 1, 2023
@hacdias hacdias deleted the feat/stub-libipfs branch February 1, 2023 09:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants