Giter Site home page Giter Site logo

Comments (19)

acabarbaye avatar acabarbaye commented on August 20, 2024 1

yes there is a whole go project
see

λ ls -l
total 172
drw-rw-rw-  4 adrcab01 0   4096 2022-03-04 09:55 auth
drw-rw-rw-  2 adrcab01 0   4096 2022-03-04 09:55 cache
drw-rw-rw-  2 adrcab01 0   4096 2022-03-07 19:11 config
drw-rw-rw-  2 adrcab01 0      0 2022-02-16 10:52 context
drw-rw-rw-  3 adrcab01 0   4096 2022-03-02 11:03 entity
drw-rw-rw-  3 adrcab01 0   4096 2022-03-04 09:55 errors
-rw-rw-rw-  1 adrcab01 0   3806 2022-03-21 18:49 go.mod
-rw-rw-rw-  1 adrcab01 0 119586 2022-03-21 18:49 go.sum
drw-rw-rw-  2 adrcab01 0      0 2022-02-22 00:21 headers
drw-rw-rw-  4 adrcab01 0   4096 2022-03-21 17:04 links
drw-rw-rw-  2 adrcab01 0      0 2022-03-04 09:55 logger
drw-rw-rw-  3 adrcab01 0   4096 2022-03-04 09:55 marshalling
drw-rw-rw-  3 adrcab01 0   4096 2022-03-02 11:03 metadata
drw-rw-rw-  3 adrcab01 0   4096 2022-03-04 09:55 middleware
drw-rw-rw-  2 adrcab01 0      0 2022-02-22 00:35 mime
drw-rw-rw-  2 adrcab01 0   4096 2022-02-24 01:59 mocks
-rw-rw-rw-  1 adrcab01 0    110 2022-03-21 18:49 module.properties
drw-rw-rw-  3 adrcab01 0   4096 2022-03-21 18:49 pagination
drw-rw-rw-  2 adrcab01 0      0 2022-03-07 19:11 server

from golds.

acabarbaye avatar acabarbaye commented on August 20, 2024 1

I can confirm that go101.org/golds@main works

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

@acabarbaye
Thanks for the report, I will check it soon.

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

Meanwhile, it will be very helpful if your project is open sourced.

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

I just created a new tag v0.4.3 for an earlier commit.
Could you help me check if it works?

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

@acabarbaye
Could you help me check if the error still exist in the latest develop branch?

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

@acabarbaye
I will make a new tag v0.4.4 for this project.
If it has the same problem as v0.4.2, please let me know.

The problem might be caused by a latest version of dependency package.

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

@acabarbaye

I create a main branch which is updated to v0.4.2.
I will keep this branch unchanged for a long time.
If you still have problem using the latest Golds versions,
you can try to install Golds by run

go install go101.org/golds@main

though this branch doesn't support custom generics now.

from golds.

acabarbaye avatar acabarbaye commented on August 20, 2024

Hi @go101,
Thanks for looking into this
I checked with golds 0.4.5 and I am getting the same problem.
go101.org/golds@main does not work with go 1.18

λ golds -gen -wdpkgs-listing=solo -only-list-exporteds -dir=./tmps -nouses ./...
code-analyse.go:1087: !!! t.index: 238 interface{comparable}
panic: unnamed interface should have collected direct selectors now. &code.TypeInfo{TT:(*types.Interface)(0xc0000d8300), Underlying:(*code.TypeInfo)(0xc005700dc0), TypeName:(*code.TypeName)(nil), Implements:[]code.Implementation(nil), ImplementedBys:[]*code.TypeInfo(nil), Aliases:[]*code.TypeName(nil), Underlieds:[]*code.TypeName(nil), DirectSelectors:[]*code.Selector(nil), EmbeddingFields:0, AllMethods:[]*code.Selector(nil), AllFields:[]*code.Selector(nil), AsTypesOf:[]code.ValueResource(nil), AsInputsOf:[]code.ValueResource(nil), AsOutputsOf:[]code.ValueResource(nil), attributes:0x20000000, index:0xee, counter:0x69}

goroutine 1 [running]:
go101.org/golds/code.(*CodeAnalyzer).collectSelectorsForInterfaceType(0xf50600?, 0xc005700dc0, 0x1, 0x69, 0xc005c17850)
        C:/Users/adrcab01/go/pkg/mod/go101.org/[email protected]/code/code-analyse.go:1088 +0x9c7
go101.org/golds/code.(*CodeAnalyzer).collectSelectorsForInterfaceType(0xc005c17780?, 0xc00577f400, 0x0, 0x69, 0xc005c17850)
        C:/Users/adrcab01/go/pkg/mod/go101.org/[email protected]/code/code-analyse.go:1162 +0x6e8
go101.org/golds/code.(*CodeAnalyzer).analyzePackages_CollectSelectors(0xc004236000)
        C:/Users/adrcab01/go/pkg/mod/go101.org/[email protected]/code/code-analyse.go:904 +0xfe
go101.org/golds/code.(*CodeAnalyzer).AnalyzePackages(0xc004236000, 0xc005c17a20)
        C:/Users/adrcab01/go/pkg/mod/go101.org/[email protected]/code/code-analyse.go:61 +0x225
go101.org/golds/internal/server.(*docServer).analyze(0xc0000a6140, {0xc0000d6060, 0x1, 0xc58508?}, {{0xb70c60, 0x6}, {0x0, 0x0}, 0x0, 0x1, ...}, ...)
        C:/Users/adrcab01/go/pkg/mod/go101.org/[email protected]/internal/server/server.go:316 +0x4ce
go101.org/golds/internal/server.GenDocs({{0xb70c60, 0x6}, {0x0, 0x0}, 0x0, 0x1, 0x1, 0x0, 0x0, {0xb6ee51, ...}, ...}, ...)
        C:/Users/adrcab01/go/pkg/mod/go101.org/[email protected]/internal/server/tool_gen-docs.go:506 +0x377
go101.org/golds/internal/app.run()
        C:/Users/adrcab01/go/pkg/mod/go101.org/[email protected]/internal/app/run.go:229 +0xf05
go101.org/golds/internal/app.Main(...)
        C:/Users/adrcab01/go/pkg/mod/go101.org/[email protected]/internal/app/run.go:33
main.main()
        C:/Users/adrcab01/go/pkg/mod/go101.org/[email protected]/main.go:10 +0x53

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

@acabarbaye
I'm I forgot check this branch on 1.18.
I just pushed a new commit and verified that it works for 1.18 now.

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

Sorry for my carelessness.

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

@acabarbaye
Are there really some go files in the directory shown in the error message?

from golds.

acabarbaye avatar acabarbaye commented on August 20, 2024

it actually works on Windows but fails on Linux (the same command)

server.go:296: no packages matched

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

What does go list -json ./... output?

I also ever encountered this problem when running Golds under a directory for the first time.

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

And what is the output for go list -e -json -compiled=true -test=false -export=true -deps=true -find=false -- ./...?
Only the part for the "no Go files in" package part is needed.

from golds.

acabarbaye avatar acabarbaye commented on August 20, 2024

What does go list -json ./... output?

I also ever encountered this problem when running Golds under a directory for the first time.

See output on linux and windows
output-simple-linux.txt
output-simple-windows.txt

from golds.

acabarbaye avatar acabarbaye commented on August 20, 2024

go list -e -json -compiled=true -test=false -export=true -deps=true -find=false -- ./...

See output on linux and windows:
output-linux.txt

output-windows.txt

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

This project depends on golang.org/x/tools/go/packages.
After spending some time to study the source code of the dependency package,
it looks to me the error no Go files in ... should be contained
in the json output of the command
go list -e -json -compiled=true -test=false -export=true -deps=true -find=false -- ./...

But I didn't find the text in either output-linux.txt or output-windows.txt.

Maybe I haven't understanded the dependency code well.


It is great if you could upload a minimum project to reproduce this issue, by removing your private code.


BTW, I just pushed some small commits to the develop branch.
These fixes might affect the no packages matched problem a bit,
but I think they should be irrelevant to this no Go files in ... problem, but I'm not100% sure.

from golds.

zigo101 avatar zigo101 commented on August 20, 2024

@acabarbaye
I just fixed another bug: #28, and I'm not sure whether or not the two bugs have the same cause.

from golds.

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.