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: optimize nix CI time + nix nvim integration test #53

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

Pegasust
Copy link
Contributor

Aggregates:

Chores:

  • Test this without adding package.cpath, should work now
  • Might need to raise test timer on tests.cody_spec/cody/should have been initialized since MacOS occasionally fails

@tjdevries
Copy link
Collaborator

I'm actually going to remove the shared library this week / early next week, so let's hold off on this for a sec. Just going to move to the one rust binary and the one javascript agent. Ideally, people will be downloading those binaries from github (any suggestions on how to build those? 😄 )

@Pegasust
Copy link
Contributor Author

Pegasust commented Aug 4, 2023

The current building logic for Rust is it will build the whole workspace, copies to $out/bin/$CRATE_NAME. What Nix guarantees is there is a $PATH to point to $out/bin, either via symlinking, wrapping, or impurely managing $PATH of the current shell.

If you remove dylib target, the build logic should reflect this.

Regarding javascript agent, we can always include it in the source, then for the build logic, just copy it to $out/bin. Like how I'm just copying all things inside dist/ to $out/bin.

Regarding the bits on downloading from GitHub, which I presume is the way forward from 'dist/cody-agent.js', we can always 'fetchFromGithub' with predefined sha256, or just add another non-flake entry to control version of, say, gh:sourcegraph/cody

@Pegasust
Copy link
Contributor Author

Pegasust commented Aug 4, 2023

Oh I think I get what you mean now, I'll experiment under my fork.
Are you per-chance thinking about creating binary releases?

Something like "for each PR merged to master, create a release tag that includes binary"?

@tjdevries
Copy link
Collaborator

@Pegasust yup! I plan on each master release, we create a binary so users do not have to build manually. I don't know what that means for you on nix (it will still be possible & just as easy to build the binaries, but this should remove the rust buildtime dep for users)

@tjdevries
Copy link
Collaborator

With #68 we have the ability to easily download the binaries. I'm not sure if that changes anything. No more shared lib, only the binary (and the cody-agent js bundle).

@tjdevries
Copy link
Collaborator

Ok @Pegasust i merged the downloading binaries version, if you want to check that out

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.

None yet

2 participants