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

feat: Decouple Python version and Go version #22

Open
yana1205 opened this issue Jun 10, 2024 · 7 comments
Open

feat: Decouple Python version and Go version #22

yana1205 opened this issue Jun 10, 2024 · 7 comments
Assignees

Comments

@yana1205
Copy link
Collaborator

yana1205 commented Jun 10, 2024

Issue description / feature objectives

C2P has supported Python and Go. For Go, it's maintained under sub-directory (/go) and the Go module is referenced as github.com/oscal-compass/compliance-to-policy/go. It's better to separate the Go version in a different repository for maintainability.
(This is feedback from Raised by George Vauter (@gvauter ). Thank you for your feedback.)

Caveats / Assumptions

No response

Completion Criteria

Separate the Go version in a different repository

Related links

slack: https://cloud-native.slack.com/archives/C06F3PEPNBW/p1717786627638569?thread_ts=1717786588.204509&cid=C06F3PEPNBW

@jpower432
Copy link
Member

@yana1205 Is this issue something I can assist with or work on?

@yana1205
Copy link
Collaborator Author

Thanks @jpower432,
I haven't been able to spend much time on this issue. Yes, it's helpful if you could assist.
I'm considering the following step to separate Go from this repository. Do you think this approach work?

  1. Fork this repository into compliance-to-policy-go (or some proper name)
  2. Remove the Python-related components and promote the 'go' directory to be the project root in the forked repository
  3. Once go test passes, link 'go' directory in the original repository to the forked repository as a submodule for backward compatibility

@jpower432 jpower432 self-assigned this Oct 25, 2024
@jpower432
Copy link
Member

Hi @yana1205. Thanks for sharing your thoughts on the approach. I added some notes and questions below.

Forking makes sense to me to preserve the Git history. The name compliance-to-policy-go also makes sense 👍

I'm curious about the rationale for using a Git submodule in the original repository. Is the backward compatibility requirement due to users installing the Go module directly from this location, or are there downstream tools relying on the current repository structure with the /go directory? I believe a clearer separation can be achieved by maintaining Python in this repository and moving Go to the new one. What do you think?

@yana1205
Copy link
Collaborator Author

@jpower432
Thank you for your input. I have just realized that there is no risk in removing /go and we can completely separate it.
The backward compatibility concern was related to the idea that users who might specify the compliance-to-policy/go module in their go.mod file without providing a version could end up referencing the latest code, which would fail if I removed the go directory. However, since Go’s module system requires an exact version in the require statement, users will always reference a specific version of the code where the /go directory still exists.

@jpower432
Copy link
Member

jpower432 commented Oct 28, 2024

Thanks for the context @yana1205. It sounds like we are aligned on an approach. I will get to work on creating the fork.

@jpower432
Copy link
Member

@yana1205
Copy link
Collaborator Author

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

No branches or pull requests

2 participants