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

revisit sdp local code gen #299

Closed
DavidS-ovm opened this issue Dec 13, 2024 · 5 comments
Closed

revisit sdp local code gen #299

DavidS-ovm opened this issue Dec 13, 2024 · 5 comments
Assignees

Comments

@DavidS-ovm
Copy link
Contributor

Address the symlink issue papered over in #298

@dylanratcliffe dylanratcliffe self-assigned this Dec 18, 2024
@tphoney
Copy link
Contributor

tphoney commented Dec 18, 2024

How sdp 'npx buf generate' works .
in the gen folder there are symlinks to both the sdp-go and sdp-js.
when generates completes the symlink for sdp-go is broken, sdp-js is ok.
this means that no changes made in sdp, are propagated through to any of the go projects.

there are 2 config files for "npx buf" buf.gen.yaml and buf.yaml.
we use a plugin to generate the go, maybe this is the smoking gun.

version: v2
clean: true
plugins:
  - local: protoc-gen-go
    out: gen/sdp-go
    opt: paths=source_relative
  - local: protoc-gen-connect-go
    out: gen/sdp-go
    opt: paths=source_relative

@tphoney
Copy link
Contributor

tphoney commented Dec 18, 2024

way to test
'npm install' needs run at least once

ls -alh gen
npx buf gen
ls -alh gen

@tphoney
Copy link
Contributor

tphoney commented Dec 18, 2024

a potential work around temporarily, would be to downgrade the buf library for go usage

@tphoney
Copy link
Contributor

tphoney commented Dec 18, 2024

@dylanratcliffe now could be the time to split out sdp-go private code and generated code. might be worth the experiment.
sdp-js could stay the same.

sdp-go private code could move into api-server. but that may cause circular dependencies with gateway

@dylanratcliffe
Copy link
Member

This has been fixed by just changing the generation location to ../ rather than ./gen. That way it still works within the workspace, and I just adjusted the release script to match

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

3 participants