-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Refactor and test the compiler #93
Changes from all commits
a4fe23a
4eeac85
a42820c
a809cd4
1d17888
4167724
cb1f483
13772d5
3e1dc52
31395f1
c735268
a155e3f
eab452f
333fa39
1ee44d2
0fe3c08
6f26ec6
3d04db9
7571323
2f1436c
10c17ec
3649a90
3a6795d
63bfe61
7c9ca94
9b51c92
9716d66
96ce936
c8300d7
94870e8
7dc82cf
d3f11a4
6430b17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM ubuntu:18.04 | ||
|
||
ARG NODE_VERSION=8.10.0 | ||
ARG GO_VERSION=1.18.1 | ||
ARG BUD_VERSION=main | ||
|
||
# Install basic dependencies | ||
RUN apt-get -qq update | ||
RUN apt-get -qq -y install curl git make gcc g++ | ||
|
||
# Install Node.js | ||
RUN curl https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz | tar -xz -C /usr/local --strip-components 1 | ||
RUN node -v | ||
|
||
# Install Go | ||
RUN curl -L https://golang.org/dl/go$GO_VERSION.linux-amd64.tar.gz | tar -xz -C /usr/local --strip-components 1 | ||
RUN go version | ||
ENV PATH "/root/go/bin:${PATH}" | ||
|
||
# Install bud | ||
RUN git clone https://github.com/livebud/bud /bud | ||
WORKDIR /bud | ||
RUN git checkout $BUD_VERSION | ||
RUN make install | ||
RUN go install . | ||
RUN bud version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Helped me track down some Ubuntu-only issues in CI! |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ Currently, Bud must be developed using WSL/WSL2 if developing on Windows. While | |
|
||
- Node 14 | ||
- Go 1.18 | ||
- C++ compiler in your $PATH (for cgo to compile V8) | ||
|
||
## Setting up Bud for Development | ||
|
||
|
@@ -41,6 +42,17 @@ After running `go run main.go`, you should see the following: | |
|
||
If you run into any problems, please [open an issue](https://github.com/livebud/bud/issues/new). | ||
|
||
### Developing with Docker | ||
|
||
We've included a [Dockerfile](./Dockerfile) that you can use to run bud within a Docker container. This can be helpful for testing Bud within a Linux environment and debugging CI issues. | ||
|
||
To build and start a Docker container with Bud, run the following commands: | ||
|
||
```sh | ||
docker build -t bud:latest contributing | ||
docker run -it --rm -v $(PWD):/bud bud /bin/bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This allows you to make modifications in a local bud directory and see those changes within the docker container. |
||
``` | ||
|
||
## Developing Bud with a Project | ||
|
||
Now that you have Bud running locally, you can use the `-C, --chdir` functionality to test Bud against different projects. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,6 @@ require ( | |
github.com/fatih/structtag v1.2.0 | ||
github.com/fsnotify/fsnotify v1.5.1 | ||
github.com/gitchander/permutation v0.0.0-20201214100618-1f3e7285f953 | ||
github.com/lithammer/dedent v1.1.0 | ||
github.com/matryer/is v1.4.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We've internalized matryer/is. See: #86 |
||
github.com/matthewmueller/diff v0.0.0-20220104030700-cb2fe910d90c | ||
github.com/matthewmueller/gotext v0.0.0-20210424201144-265ed61725ac | ||
github.com/matthewmueller/text v0.0.0-20210424201111-ec1e4af8dfe8 | ||
|
@@ -36,6 +34,7 @@ require ( | |
github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 // indirect | ||
github.com/kr/pretty v0.3.0 // indirect | ||
github.com/kr/text v0.2.0 // indirect | ||
github.com/lithammer/dedent v1.1.0 // indirect | ||
github.com/pointlander/compress v1.1.1-0.20190518213731-ff44bd196cc3 // indirect | ||
github.com/pointlander/jetset v1.0.1-0.20190518214125-eee7eff80bd4 // indirect | ||
github.com/rogpeppe/go-internal v1.8.1 // indirect | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will go away soon, we'll change v8client to use
os.Pipe
and the same technique we're using with TCP listeners to pass the file descriptors through the binaries viaExtraFiles
. This is mostly setup now, just needs to be refactored in.