I tried to reproduce the problem and indeed `go mod tidy` seems to ignore the go.work file. This seems to be a bug; a opened the issue #51106.
Manlio On Wednesday, February 9, 2022 at 3:49:48 PM UTC+1 nikhil...@gmail.com wrote: > I did place them in go.work file only. > I commented the package in go.mod file. > > On Wed, Feb 9, 2022 at 7:07 PM Manlio Perillo <manlio....@gmail.com> > wrote: > >> The `use` directive must be added in the go.work file, not in the go.mod >> file. >> Also, you can use `go work use` command, instead of manually editing the >> go.work file. >> >> Manlio >> On Wednesday, February 9, 2022 at 1:00:02 PM UTC+1 nikhil...@gmail.com >> wrote: >> >>> I updated the project. >>> ran go work init cmd >>> then added >>> use ../go-bitswap >>> >>> replace github.com/ipfs/go-bitswap v0.5.1 => ../go-bitswap` >>> and comment in my go.mod file. >>> >>> But when I run go mod tidy it comes back in the go.mod file. >>> using go 1.18v >>> >>> workspace : D:\test\workspace >>> hierarchy : workspace\src\github.com\ipfs\go-bitswap >>> workspace\src\github.com\ipfs\go-ipfs >>> >>> So, in the go-ipfs folder go.mod file I am trying to refer to the >>> go-bitswap local directory. >>> >>> Thank you >>> Susarla Nikhilesh >>> On Wed, Feb 9, 2022 at 3:51 PM Manlio Perillo <manlio....@gmail.com> >>> wrote: >>> >>>> >>>> On Wednesday, February 9, 2022 at 9:42:49 AM UTC+1 nikhil...@gmail.com >>>> wrote: >>>> >>>>> I was trying to init the work file as instructed, but I have a package >>>>>>> which still doesn't work in 1.18 >>>>>>> >>>>>>> [image: image.png] >>>>>>> So, is there any other alternative? >>>>>>> >>>>>>> Thank you >>>>>>> Susarla Nikhilesh >>>>>>> >>>>>> >>>> Update quic-go to the latest release: >>>> https://github.com/lucas-clemente/quic-go/releases/tag/v0.25.0 >>>> >>>> Manlio >>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "golang-nuts" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/golang-nuts/3c3m4anlzR8/unsubscribe. >>>> To unsubscribe from this group and all its topics, send an email to >>>> golang-nuts...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/golang-nuts/f5ee2267-4cbf-4652-8b17-c4f7a47f5badn%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/golang-nuts/f5ee2267-4cbf-4652-8b17-c4f7a47f5badn%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "golang-nuts" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/golang-nuts/3c3m4anlzR8/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> golang-nuts...@googlegroups.com. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/golang-nuts/f0d86f2d-fe48-4653-91b6-05bf00abc525n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/golang-nuts/f0d86f2d-fe48-4653-91b6-05bf00abc525n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/735809a9-048d-4804-87fb-65a0f259a28an%40googlegroups.com.