Commit Graph

72 Commits

Author SHA1 Message Date
Noah S-C
8993700092
bazel: use pgutil binaries from GCS instead of from the host (#61741)
Following on from https://github.com/sourcegraph/sourcegraph/pull/61658, here we complete the picture

## Test plan

CI doesn't complain about a diff
2024-04-11 18:00:21 +01:00
Noah S-C
cb7034680d
bump to Go 1.22.1 (#60902)
🚀 💎 🙌 🚙 

## Test plan

CI
2024-03-06 17:38:43 -07:00
Noah S-C
98e0f75d1e
bazel: use transitions to apply cross-compile platform automatically to oci_image (#60569)
Removes the need to pass `--config=docker-darwin` through the following mechanisms:

1. `--enable_platform_specific_config` to enable certain flags on macos only e.g. `--extra_toolchains @zig_sdk//toolchain:linux_amd64_gnu.2.34` and `--sandbox_add_mount_pair=/tmp` (see [.bazelrc change](https://github.com/sourcegraph/sourcegraph/pull/60569/files?file-filters%5B%5D=dotfile&show-viewed-files=true))
2. Apply a transition (using https://github.com/fmeum/with_cfg.bzl, please view [the following great video on it](https://www.youtube.com/watch?v=U5bdQRQY-io)) on `oci_image` targets when on the `@platforms//os:macos` platform to transition to the `@zig_sdk//platform:linux_amd64` platform. 
	- This will start at `oci_image` targets and propagate down to e.g. `go_{binary,library}` etc targets with the "transitioned" platform configuration, resulting in them being built with the transitioned-to platform
3. Remove `darwin_docker_e2e_go` config_setting and `darwin-docker` bool_flag.
	- These aren't necessary anymore, as the places where these were used were not in the transitive closure rooted at an `oci_image` target, meaning they wouldn't be transitioned.

To review, view [the following (filtered) files](https://github.com/sourcegraph/sourcegraph/pull/60569/files?file-filters%5B%5D=.bzl&file-filters%5B%5D=.sh&file-filters%5B%5D=.yaml&file-filters%5B%5D=No+extension&file-filters%5B%5D=dotfile&show-viewed-files=true)  along with [the root BUILD.bazel](https://github.com/sourcegraph/sourcegraph/pull/60569/files#diff-7fc57714ef13c3325ce2a1130202edced92fcccc0c6db34a72f7b57f60d552a3). All the other files are just changing the `load` statements from `@rules_oci` to `//dev:oci_defs.bzl`

## Test plan

CI, checked image locally and `sg test bazel-backend-integration` & `sg test bazel-e2e`
2024-02-20 13:57:56 +00:00
William Bezuidenhout
060b8a56e7
nix: add docker-credential-helpers package (#60369) 2024-02-09 15:35:46 +00:00
Noah S-C
7e98cb98ee
sg: add commands to wrap common bazel generating commands (#59833)
### The Old

Replaces `aspect configure` (used via `bazel configure`) which had a few issues:
- Uses host Go toolchain instead of bazel-managed one
- Didnt use our //:gazelle binary, which is configured with `rules_buf` gazelle rules
- Not able to configure other gazelle rules outside of the fixed set that comes with aspect cli

### The New

`sg bazel configure` and its targets (currently `builds`, `godeps` and `rustdeps`). Passing none only runs `sg bazel configure builds`, the pseudo-target `all` runs all of them.

`sg bazel [other arg]` passes to `bazel` underneath, as a convenience option for if people get more used to running `sg bazel ...` than `bazel` directly (or from shell history)

```
$ bazel-bin/dev/sg/sg_/sg bazel help configure
NAME:
   sg bazel configure - Wrappers around some commands to generate various files required by Bazel

USAGE:
   sg bazel configure [category...]

DESCRIPTION:
   For convenience, a number of Bazel commands are wrapped by this command to update various files required by Bazel.

   Available categories:
     - builds: updates BUILD.bazel files for Go & Typescript targets.
     - godeps: updates the bazel Go dependency targets based on go.mod changes.
     - rustdeps: updates the cargo bazel lockfile.
     - all: catch-all for the above

   If no categories are referenced, then 'builds' is assumed as the default.

OPTIONS:
   --help, -h  show help
```

```
$ bazel-bin/dev/sg/sg_/sg bazel help
Additional commands from sg:
  configure           Wrappers around some commands to generate various files required by Bazel
                                               [bazel release 7.0.0- (@non-git)]
Usage: bazel <command> <options> ...

Available commands:
  analyze-profile     Analyzes build profile data.
  aquery              Analyzes the given targets and queries the action graph.
  build               Builds the specified targets.
  canonicalize-flags  Canonicalizes a list of bazel options.
  clean               Removes output files and optionally stops the server.
  coverage            Generates code coverage report for specified test targets.
  cquery              Loads, analyzes, and queries the specified targets w/ configurations.
  dump                Dumps the internal state of the bazel server process.
  fetch               Fetches external repositories that are prerequisites to the targets.
  help                Prints help for commands, or the index.
  info                Displays runtime info about the bazel server.
  license             Prints the license of this software.
  mobile-install      Installs targets to mobile devices.
  mod                 Queries the Bzlmod external dependency graph
  print_action        Prints the command line args for compiling a file.
  query               Executes a dependency graph query.
  run                 Runs the specified target.
  shutdown            Stops the bazel server.
  sync                Syncs all repositories specified in the workspace file
  test                Builds and runs the specified test targets.
  version             Prints version information for bazel.

Getting more help:
  bazel help <command>
                   Prints help and options for <command>.
  bazel help startup_options
                   Options for the JVM hosting bazel.
  bazel help target-syntax
                   Explains the syntax for specifying targets.
  bazel help info-keys
                   Displays a list of keys used by the info command.
```

## Test plan

`bazel run //dev/sg:sg -- bazel configure` and others
2024-01-31 16:54:04 +00:00
Noah S-C
354982865f
nix: mount /tmp/zig-cache in sandbox actions (#59992)
As detailed in the shell hook:
Without this, zig cc is forced to rebuild on every sandboxed GoLink action, which adds ~1m of time to GoLink actions. The reason it's on _every_ GoLink action is because sandboxes are ephemeral and don't persist non-mounted paths between actions.

We're already doing this for `darwin-docker` config, so this only affects us nixos users

--- 

Smuggling in a libtool fix for macos that would otherwise yield the following error when building rust with bazel:

<details>
<summary>Details</summary>

```
cargo:rerun-if-env-changed=AR_aarch64-apple-darwin
AR_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=AR_aarch64_apple_darwin
AR_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_AR
HOST_AR = None
cargo:rerun-if-env-changed=AR
AR = Some("/nix/store/42yck6r7y2jhcrd0ay0glz30w6pw4wzh-libtool-2.4.7")
cargo:rerun-if-env-changed=ARFLAGS_aarch64-apple-darwin
ARFLAGS_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=ARFLAGS_aarch64_apple_darwin
ARFLAGS_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_ARFLAGS
HOST_ARFLAGS = None
cargo:rerun-if-env-changed=ARFLAGS
ARFLAGS = None
running: ZERO_AR_DATE="1" "/nix/store/42yck6r7y2jhcrd0ay0glz30w6pw4wzh-libtool-2.4.7" "cq" "/private/var/tmp/_bazel_noah/dcf2fbfa8ce2981c9fc4201fa6327d3b/sandbox/darwin-sandbox/6091/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/external/crate_index__tree-sitter-kotlin-0.2.11/tree-sitter-kotlin_build_script.out_dir/libparser.a" "/private/var/tmp/_bazel_noah/dcf2fbfa8ce2981c9fc4201fa6327d3b/sandbox/darwin-sandbox/6091/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/external/crate_index__tree-sitter-kotlin-0.2.11/tree-sitter-kotlin_build_script.out_dir/src/parser.o" "/private/var/tmp/_bazel_noah/dcf2fbfa8ce2981c9fc4201fa6327d3b/sandbox/darwin-sandbox/6091/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/external/crate_index__tree-sitter-kotlin-0.2.11/tree-sitter-kotlin_build_script.out_dir/src/scanner.o"

--stderr:


error occurred: Command ZERO_AR_DATE="1" "/nix/store/42yck6r7y2jhcrd0ay0glz30w6pw4wzh-libtool-2.4.7" "cq" "/private/var/tmp/_bazel_noah/dcf2fbfa8ce2981c9fc4201fa6327d3b/sandbox/darwin-sandbox/6091/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/external/crate_index__tree-sitter-kotlin-0.2.11/tree-sitter-kotlin_build_script.out_dir/libparser.a" "/private/var/tmp/_bazel_noah/dcf2fbfa8ce2981c9fc4201fa6327d3b/sandbox/darwin-sandbox/6091/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/external/crate_index__tree-sitter-kotlin-0.2.11/tree-sitter-kotlin_build_script.out_dir/src/parser.o" "/private/var/tmp/_bazel_noah/dcf2fbfa8ce2981c9fc4201fa6327d3b/sandbox/darwin-sandbox/6091/execroot/__main__/bazel-out/darwin_arm64-fastbuild/bin/external/crate_index__tree-sitter-kotlin-0.2.11/tree-sitter-kotlin_build_script.out_dir/src/scanner.o" with args "" failed to start: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
```

</details>

## Test plan

Observing `bazel build //dev/sg` times
2024-01-30 16:47:55 -08:00
Noah S-C
ec40e72e63
bazel: fetch code-intel-extensions bundle as bazel repository (#59708)
Reimplement fetching & building code-intel-extension bundle as a bazel `http_archive` repository & refactored `js_run_binary`. This should allow the extensions bundle to be cached in the repository cache, instead of being affected by changing action environments

## Test plan

`bazel build //client/browser:code-intel-extensions` and `cd client/browser && pnpm run create-source-zip` run without error
2024-01-25 04:50:54 -08:00
Noah S-C
da169dc097
nix: use clang11Stdenv for shell and host clang for bazel on macos (#59825)
Host clang for bazel reason:
```
ERROR: /Users/noah/Sourcegraph/sourcegraph/BUILD.bazel:305:5: GoLink sg_nogo_actual_/sg_nogo_actual [for tool] failed: (Exit 1): builder failed: error executing GoLink command (from target //:sg_nogo_actual) bazel-out/darwin_arm64-opt-exec-ST-1a88b5d644a4/bin/external/go_sdk/builder_reset/builder '-param=bazel-out/darwin_arm64-opt-exec-ST-1a88b5d644a4/bin/sg_nogo_actual_/sg_nogo_actual-0.params' -- -extld ... (remaining 6 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/go_sdk/pkg/tool/darwin_arm64/link: running external/local_config_cc/cc_wrapper.sh failed: exit status 1
ld: framework not found CoreFoundation
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

clang 11 for shell reason: https://github.com/NixOS/nixpkgs/issues/166205


## Test plan

`./dev/scip-ctags-install.sh` and `bazel build //:gazelle`
2024-01-24 18:35:53 +00:00
Noah S-C
965efc3af1
nix: unset TMP and TMPDIR for bazel (#59388)
Due to a newly enabled (in bazel 7) `--incompatible_sandbox_hermetic_tmp`, and nix setting TMP/TMPDIR to something below /tmp, we encounter https://github.com/bazelbuild/bazel/issues/5900

## Test plan

`nix develop --command bazel build //dev/sg` is successfull
2024-01-09 15:38:14 +02:00
Noah S-C
bbc7affa15
nix: bump to bazel 7 (#59327)
Now that its landed on nixpkgs-unstable https://nixpk.gs/pr-tracker.html?pr=262152

## Test plan

`bazel version` shows 7.0.0
2024-01-04 13:43:37 +00:00
Noah S-C
30cf61e1bf
nix: use interactive bash instead of non-interactive in shell (#59280)
standard bash is a non-interactive shell meant for a build environment instead of an interactive environment.

Also bumping nixpkgs while we're here

## Test plan

run `bash` in `nix develop`
2024-01-02 16:37:00 +00:00
William Bezuidenhout
ff5a92b598
nix: add typescript language server (#58379) 2023-11-16 17:41:37 +02:00
William Bezuidenhout
b33b596506
nix: upgrade node and pnpm (#58015)
* nix: upgrade node and pnpm
* nix fmt
2023-10-31 17:55:55 +02:00
Quinn Slack
de613e92b6
use esbuild for client/web builds (#57365)
Use [esbuild](https://esbuild.github.io/) instead of Webpack for builds of `client/web`, for faster builds (dev and prod) and greater dev-prod parity. This PR completely removes all use of Webpack in this repository.

`client/web` is the last build target that still uses Webpack; all others have been recently migrated to esbuild. Most devs here have been using esbuild for local dev of `client/web` for the last 6-12 months anyway. The change here is that now our production builds will be built by esbuild.

All sg commands, integration/e2e tests, etc., continue to work as-is. The bundlesize report will take a while to stabilize because the new build products use different filenames.

## Benchmarks

Running `pnpm run generate && time pnpm -C client/web run task:gulp webBuild` and taking the `time` output from the last command:

- Webpack: 62.5s
- esbuild: 6.7s

Note: This understates esbuild's victory for 2 reasons: (1) because esbuild is building both the main and embed entrypoints, whereas Webpack only builds the main entrypoint in this benchmark) and (2) because a lot of it is in the fixed startup time of `gulp`; esbuild incremental rebuilds during local dev only take ~1s.

## Notes

We no longer use Babel to produce web builds (we use esbuild), so we don't need any Babel plugins that optimize the output or improve browser compatibility. Right now, Babel is only used by Jest (for tests) and by Bazel as an intermediate step.
2023-10-23 10:59:06 -07:00
Keegan Carruthers-Smith
c1b0bf9ad5
nix: do not manage bazel on MacOS (#57423)
It has been broken for me since the nix changes a few weeks ago. I've
mostly been devving on linux so I've been ignoring it.

Test Plan: nix develop on my mbp and linux
2023-10-06 16:11:34 +00:00
Keegan Carruthers-Smith
926ba4c84a
nix: use go1.21 (#57422) 2023-10-06 18:09:02 +02:00
Erik Seliger
bf63610fad
Bump NodeJS to v18 (#56546)
* Bump NodeJS to v18

v16 is completely without support now, so finally making the switch to v18!

sg start and building the server image still seem to work - so I'm assuming this is fine.

Bazel question: Where does bazel get it's nodejs version from? Is this covered in this diff?

* update rules_js,rules_ts for node 18

* add rules_ts bazelrc config

* update test timeouts

* use 6.0.1 rules_nodejs and 18.17.1 nodejs tls

---------

Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com>
2023-09-13 17:48:33 +02:00
Noah S-C
5fd56a255c
nix: more bazel paths (#53941)
Some stuff needed to build oci images with bazel on nix. Did you know
`shasum` comes from the perl package? wild

## Test plan

N/A nix stuff
2023-06-22 12:39:38 +00:00
Noah S-C
a5e29fb4bc
nix: add sed to bazel path (#53693)
Used by some frontend stuff

## Test plan

N/A nix stuff
2023-06-19 17:16:45 +00:00
Keegan Carruthers-Smith
4081681ec2
nix: develop uses non static binaries (#52927)
In our flake we expose a bunch of statically compiled binaries. We
introduced this to help us ship those binaries that are quite hard to
build outside of nix. With our recent re-organization we started using
them in the devenv. The downside of this is we now have to do things
like recompile ocaml. Even on my beast linux desktop this feels like
overkill.

This commit switches us to using the normal nix packages. Additionally
it:
- removes p4-fusion from our devenv since no nix users dev with it.
- re-introduces the universal-ctags wrapper

Test Plan: checked ctags in the devenv:

``` shell
nix develop
file $CTAGS_COMMAND
which universal-ctags
```
2023-06-07 08:36:09 +02:00
Keegan Carruthers-Smith
14ab37783a
nix: fix bazel test (#52939)
I had some bazel tests commands which failed to find the "find" binary.
Additionally it was not respecting my configured PG* settings. This
makes it so we pass those envvars on. To be honest, I'm surprised this
isn't the default in a devenv.

Test Plan: bazel test //internal/database:database_test
2023-06-05 18:33:27 +02:00
Noah S-C
35a8f87c7e
nix: reorganizing (#52273)
Re-organizing a couple of things to make the individual files nicer,
consolidated some things in ctags.nix, extracted forEachSystem stuff to
flake.nix instead of the individual files, overlay for our specific
nodejs requirements, some more comments to stuff

## Test plan

N/A, nix stuff
2023-05-31 16:20:32 +01:00
Keegan Carruthers-Smith
5bb3cb8e72
nix: add comby to PATH (#52700)
I put automerge on the last PR and forgot to push the update to include
comby.

Test Plan: "comby --version" in nix-shell
2023-05-31 13:57:55 +00:00
Keegan Carruthers-Smith
6875d49c49
nix: add gsed to PATH (#52698)
Test Plan: "gsed --version" in nix-shell
2023-05-31 13:45:39 +00:00
Noah S-C
184d1a27d2
nix: run bazel in fhs environment (#52115)
Uses zig-cc as a hermetic c/c++ toolchain, and wraps bazel in an FHS
environment for nixos. This lets us drop some hacks and workarounds
needed to address gaps in hermeticity in some bazel-provisioned tools
(mostly around FHS env requirements)

## Test plan

Built :allthethings: many times over many days. Not tested on darwin but
we're deferring entirely to bazelisk there anyways
2023-05-19 09:52:37 +01:00
Keegan Carruthers-Smith
b94664e4b3
nix: unset CC and CXX for ibazel as well (#52065)
We only did this for bazel but not ibazel. Found this due to having
bazel build work for me but not ibazel.

Test Plan: sg run syntax-highlighter works on nix darwin
2023-05-17 13:05:18 +01:00
Noah S-C
ad49baee91
nix: drop static bazel tools hack (#51555)
Can't explain why but for some reason I'm not getting libstdc++ issues
in the bazel tools such as `build-runfiles`, so lets drop it so we can
use the binary cache instead of building locally

## Test plan

N/A, nix stuff
2023-05-08 14:05:33 +01:00
Noah S-C
c7fd31a138
nix: set custom PATH for bazel actions (#51556)
We're now looking up some less-than-hermetically provided tools in files
such as
https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/blob/client/shared/dev/buildCodeIntelExtensions.js?L15
that are invoked as part of the bazel build. These must be in the
"strict" path defined [in this
function](https://sourcegraph.com/github.com/bazelbuild/bazel@6.1.2/-/blob/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java?L532-547),
HOWEVER as these dont exist on nixos, they're overridden by nix already
to contain the paths of [the following
tools](https://sourcegraph.com/github.com/NixOS/nixpkgs/-/blob/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix?L83-124).
This is missing some such as curl that we need, so we can pass in a
custom PATH instead as in this PR

## Test plan

N/A, nix stuff
2023-05-08 13:13:35 +01:00
Noah S-C
8c80b85994
nix: update pnpm hash (#51512)
Update pnpm checksum and add myself to codenotify so I dont miss it next
time 😬

## Test plan

N/A nix stuff
2023-05-05 12:51:59 +00:00
Erik Seliger
0c48b65e82
Fixup pnpm checks after upgrade (#51472)
This failed sg setup. Also found a few other occurences so fixed those
up as well.

## Test plan

Let's see if CI passes.
2023-05-04 17:40:00 +02:00
Noah S-C
9f7df7ca07
nix: set formatter & use nil instead of rnix-lsp (#51409)
Allows formatting everything with `nix fmt`

[nil](https://github.com/oxalica/nil) appears more maintained and higher
quality than rnix-lsp

## Test plan

N/A, nix stuff
2023-05-03 12:56:44 +00:00
Keegan Carruthers-Smith
bfe3f7b6fa
nix: only set USE_BAZEL_VERSION on linux (#51342)
Setting it broke bazel on darwin for me.

Test Plan: ran "bazel test //cmd/frontend/internal/search:search_test"
2023-05-02 13:32:57 +01:00
Noah S-C
3f091b58a1
nix: override USE_BAZEL_VERSION to silence version mismatches (#51287)
Bazel complains when theres even a patch mismatch (unstable is on 6.1.2,
.bazelversion says 6.1.1). Might mask issues e.g. if unstable moves to
7.0.0 before we move there, but we'll likely see that fail audibly then

## Test plan

N/A, nix stuff
2023-04-30 07:42:33 +02:00
Noah S-C
884dcbe833
bazel: make work on nixos ❇️ (#51154)
Some sprinkling of special sauce for the NixOS (and nix shell) users in
the house. Much care has been taken so that there should be no
interference with anyone running bazel on a non-nixos machine, and that
it also works as (mostly) expected for nix shell users on macos.

## Test plan

Ran main dry-run, all green, so it shouldnt interfere with anyone on a
non-nixos machine
2023-04-28 20:06:33 +00:00
Keegan Carruthers-Smith
2615ecacc1
nix: install bazelisk on PATH (#51162)
Some sg run targets expect bazelisk to be on the path. So we go from
only exposing it as "bazel" to putting it on the PATH as both bazel and
bazelisk.

Test Plan: sg start enterprise-bazel works
2023-04-26 17:37:35 +01:00
Keegan Carruthers-Smith
6bfbe6b91e
nix: add bazel-watcher (#50956)
We were missing ibazel.

Test Plan: sg run works for me now on darwin
2023-04-21 13:14:35 +02:00
William Bezuidenhout
6ef87b8119
bazel: remove golangci lint (#50921)
All but 2 of the linters are running in bazel now. The two linters that
are missing are:
* goimports - have to execute a binary which then modifies the source
which is not very bazelish
* unconvert - the whole package is private and pretty much wants you to
execute it as a binary ... which is unbazelish

## Test plan
Check that the go linters are not running in CI
<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->
2023-04-20 16:29:35 +02:00
Keegan Carruthers-Smith
f9caa533d0
nix: use bazelisk without influence from CC and CXX envvars (#50064)
This is the result of William and I debugging getting bazel to work on
my nix-darwin managed M2 macbook to work with bazel. This is the output
of a full morning of work :)

The root cause of the issue we ran into was we could not get bazel to
compile protobuf, it would fail to find the C++ std headers. We had many
misteps here, it turned out that unsetting CC and CXX would lead to
bazel using the system installed toolchain. We are unsure why we can't
use nix's clang-wrapped, maybe it has to do with that respecting special
NIX_ envvars for building nix packages?

This might break bazel on NixOS, but it wasn't working for me anyways. I
imagine it should continue to work on nix on linux.

Test Plan: "bazel test //cmd/frontend/internal/search:search_test" and
"bazel configure" works.
2023-03-28 15:56:37 +02:00
Noah S-C
98b6847ba9
nix: update checksum for bumbped pnpm (#49416)
Checksum wasnt updated when bumping pnpm version in nix

## Test plan

N/A, nix stuff
2023-03-15 15:00:11 +00:00
Beatrix
a607d68280
cody: fix build, add feedback buttons and debug view (#49234)
Close https://github.com/sourcegraph/cody/issues/93

RE: [Slack
thread](https://sourcegraph.slack.com/archives/C04NPH6SZMW/p1678715069914879)
& continue of https://github.com/sourcegraph/cody/pull/91

- Fix builds [Slack
thread](https://sourcegraph.slack.com/archives/C04NPH6SZMW/p1678715069914879)
- add feedback buttons
- add debug view

## Test plan

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->

To launch Cody in VS Code Debug mode:

1. Run `pnpm i` at the root of this repository in this branch
2. Select `Launch Cody Extension` from the dropdown menu in the `RUN AND
DEBUG` sidebar in VS Code

To start unit test (WIP - does not work): 

```
pnpm i
cd client/cody
pnpm build:common
cd ../vscode-codegen
pnpm test 
```

## App preview:

- [Web](https://sg-web-bee-cody.onrender.com/search)

Check out the [client app preview
documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews)
to learn more.

---------

Co-authored-by: Rok Novosel <rok@sourcegraph.com>
Co-authored-by: Valery Bugakov <skymk1@gmail.com>
2023-03-14 09:46:13 -07:00
Noah S-C
f13b815db9
nix: fix nodejs version used by pnpm (#47680)
Very logically (not), the existing method doesnt actually work. This resulted in there being both nodejs18 and nodejs16 at work, with nodejs18 being used when running sg start (as evident by the warning log). 

## Test plan

Checked the paths:

```
$ cat (which pnpm)
...
exec -a "$0" "/nix/store/w8vn7zcdjk9bx0qcfw349v6bhf362zag-pnpm-7.24.2/bin/.pnpm-wrapped"  "$@" 
$ cat /nix/store/w8vn7zcdjk9bx0qcfw349v6bhf362zag-pnpm-7.24.2/bin/.pnpm-wrapped
#!/nix/store/48qwp6zx3gm8b89m812vn8h63kmnqb12-nodejs-16.19.0/bin/node
...
$ 
```
2023-02-15 21:33:31 +02:00
Keegan Carruthers-Smith
f9248aaf1f
nix: use go1.20 (#47541)
Had to move to unstable for this, but everything seems to be working. I
wonder if we should introduce both stable and unstable pkgs? IE it kind
of sucks needing to download 4G from the cache every update (which I
think is mostly bazel?).

Test Plan: nix develop
2023-02-13 12:19:12 +02:00
Keegan Carruthers-Smith
b4a20e90ff
nix: include bazel 6.0.0 (#47107)
Things seem to be progressing fast, lets get bazel installed for the nix
users. One downside is this adds a huge amount of stuff to fetch from
the cache (I'm looking at you java headless sdk).

Test Plan: nix develop followed by bazel version working.
2023-01-30 14:16:41 +00:00
Keegan Carruthers-Smith
33cca3799d
nix: swap out yarn for pnpm (#46484)
Need to pin a newer version than what is in the package registry.

Test Plan: nix develop and then sg start works
2023-01-16 13:10:13 +02:00
Noah S-C
7853ce8bb9
nix: migrate to Nix Flakes (#43668) 2022-10-31 15:08:06 +00:00
Keegan Carruthers-Smith
e7381bf4b8
all: include git-lfs in gitserver docker images (#43401)
We add the optional dependency git-lfs to any image gitserver may run
on. This is still an experimental feature, but is a requirement when
enabled.

Additionally we include it in the nix devenv since its cheap to add.

Note: git-lfs is a relatively small go binary and does not require
specific versions of git. Additionally git will not automatically use
it, so its presence will not change behaviour.

Test Plan: CI docker image dry run
2022-10-25 15:40:30 +02:00
Keegan Carruthers-Smith
3431975674
nix: bump nixpkgs (#42988) 2022-10-14 15:11:16 +02:00
Noah S-C
f46f2ee699
nix: enable esbuild by default (#40727) 2022-08-23 13:14:44 +01:00
Keegan Carruthers-Smith
186940d62a
nix: use go 1.19 (#40659) 2022-08-22 13:56:22 +01:00
Noah S-C
07430ab413
nix: add nssTools and clippy (#37393) 2022-06-20 13:46:11 +01:00