Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start of work to add spack #275

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vsoch
Copy link

@vsoch vsoch commented Sep 25, 2022

Hey @nishakm ! I am working on adding spack, and this is a WIP!

I got pretty far today but hit a nil pointer reference and wanted to ask if you had any insights to this error?

$ make generate
Running cli on version: v0.0.15-5-ga08d08a
INFO[2022-09-25T17:06:56-06:00] Starting to generate SPDX ...                
INFO[2022-09-25T17:06:56-06:00] Running generator for Module Manager: `spack` with output `bom-spack.spdx` 
INFO[2022-09-25T17:06:56-06:00] Current Language Version 0.19.0.dev0 (a08d6e790d3c4cfe7e084b75fdd1bfdc3981c2d5) 
INFO[2022-09-25T17:06:56-06:00] Global Setting File                          
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x84746f]

goroutine 1 [running]:
github.com/spdx/spdx-sbom-generator/pkg/models.(*CheckSum).String(...)
        /home/vanessa/Desktop/Code/spdx-sbom-generator/pkg/models/models.go:108
github.com/spdx/spdx-sbom-generator/pkg/format.(*Format).convertToPackage(_, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {{0x0, ...}, ...}, ...})
        /home/vanessa/Desktop/Code/spdx-sbom-generator/pkg/format/format.go:160 +0x14f
github.com/spdx/spdx-sbom-generator/pkg/format.(*Format).annotateDocumentWithPackages(0x0?, {0xc00010c280?, 0x1, 0x0?}, 0xc00010a2a0)
        /home/vanessa/Desktop/Code/spdx-sbom-generator/pkg/format/format.go:114 +0x125
github.com/spdx/spdx-sbom-generator/pkg/format.(*Format).Render(0xc003157b40)
        /home/vanessa/Desktop/Code/spdx-sbom-generator/pkg/format/format.go:63 +0x125
github.com/spdx/spdx-sbom-generator/pkg/handler.(*spdxHandler).Run(0xc00010a1c0)
        /home/vanessa/Desktop/Code/spdx-sbom-generator/pkg/handler/spdx.go:106 +0x4fe
main.generate(0x123c1a0, {0xaf8e0a?, 0x0?, 0x0?})
        /home/vanessa/Desktop/Code/spdx-sbom-generator/cmd/generator/generator.go:121 +0x373
github.com/spf13/cobra.(*Command).execute(0x123c1a0, {0xc0000a81c0, 0x0, 0x0})
        /home/vanessa/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0x123c1a0)
        /home/vanessa/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x39c
github.com/spf13/cobra.(*Command).Execute(...)
        /home/vanessa/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
main.main()
        /home/vanessa/Desktop/Code/spdx-sbom-generator/cmd/generator/generator.go:39 +0x65
exit status 2
make: *** [Makefile:32: generate] Error 1

At first glance it looks to be an issue with the checksum String() but I tried changing to use bytes, removing it, and nothing has changed so (before I go out for my run) I thought it might be more useful to open this for discussion and help!

Note that I am debugging the nil pointer reference and have commented out the other modules until then so I can easily run and see the spack error, and I haven't cleaned up the code yet. Also note that we can discuss the design - spack is typically installed to one root so instead of looking for it somehow in the PWD I look for spack on the path, and if it's found, we parse installed packages. Also ignore the make docker command - that was just for my local testing (and I'll be removing it!)

This has been super fun to work on today - I hope I can help more after this too!

Signed-off-by: vsoch [email protected]

I am debugging a nil pointer reference and have commented out the
other modules until then

Signed-off-by: vsoch <[email protected]>
@vsoch
Copy link
Author

vsoch commented Oct 25, 2022

Hey @nishakm ! Can you please set my expectation for when someone will be able to review this? Is there something else I need to do? Thank you!

@nishakm
Copy link
Collaborator

nishakm commented Nov 8, 2022

Hey @nishakm ! Can you please set my expectation for when someone will be able to review this? Is there something else I need to do? Thank you!

Sorry for the late reply! At this time, we're trying to re-evaluate the parser model. So I can't give feedback for this right now. If you want to contribute any ideas, please join our community meetings on Wednesdays at 11am-12pm PT.

@vsoch
Copy link
Author

vsoch commented Nov 8, 2022

So contributing to this project requires attending an in person meeting? Time is precious these days and that's a high bar. :/ I can engage here and contribute a lot in terms of code, but I think my preference is for asynchronous communication. Imagine how it would be if we had to devote a meeting hour every week to every OSS project we want to contribute to? Not enough hours in the day!

So please keep me in the loop. I will not be able to attend the meetings but I'm available on these channels.

@nishakm
Copy link
Collaborator

nishakm commented Nov 9, 2022

So contributing to this project requires attending an in person meeting? Time is precious these days and that's a high bar. :/ I can engage here and contribute a lot in terms of code, but I think my preference is for asynchronous communication. Imagine how it would be if we had to devote a meeting hour every week to every OSS project we want to contribute to? Not enough hours in the day!

So please keep me in the loop. I will not be able to attend the meetings but I'm available on these channels.

That's not what I meant :). Attending the meetings are always optional, and meeting minutes and decisions are recorded here: https://hackmd.io/EQ0DwvvgRnOl2uzPiTYQcw. The parser model is currently broken and the community (which is just 2 people right now) is currently in discussion on how to address it and move forward. I will definitely keep you in the loop!

@vsoch
Copy link
Author

vsoch commented Nov 9, 2022

Ok sounds good! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants