Skip to content

Commit

Permalink
reapi: updates for golang
Browse files Browse the repository at this point in the history
Problem: Go bindings can be more friendly to Go developers
Solution: This includes docstring changes, the main module path
to be under flux-framework, returning Go error instead of int,
and updating tests to return nil (no error) instead of 0. The
module path is fixed from a development variant to a
flux-framework one. Finally, it fixes the Go bindings to
use a struct instead of passing around a ctx variable. Our
goal with these final changes to the Go module is to make
the code more friendly to future go developers.

Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed Sep 29, 2023
1 parent 3d5eabe commit 0e69f8c
Show file tree
Hide file tree
Showing 16 changed files with 330 additions and 303 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN sudo apt-get -qq install -y --no-install-recommends \
curl

# Assuming installing to /usr/local
ENV LD_LIBRARY_PATH=/usr/local/lib
ENV LD_LIBRARY_PATH=/usr/lib:/usr/local/lib

RUN curl -s -L https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-$(uname -m).sh > cmake.sh ;\
sudo bash cmake.sh --prefix=/usr/local --skip-license ;\
Expand Down
22 changes: 12 additions & 10 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"name": "Flux Sched Developer Environment",
"dockerFile": "Dockerfile",
"context": "../",
"name": "Flux Sched Developer Environment",
"dockerFile": "Dockerfile",
"context": "../",

"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "bash"
}
}
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "bash"
},
"extensions": [
"ms-vscode.cmake-tools"
]
}
},
"postStartCommand": "git config --global --add safe.directory /workspaces/flux-sched"
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,6 @@ compile_flags.txt
# Rules to ignore auto-generated test harness scripts
test_*.t
!/src/bindings/python/test_commands/test_runner.t

# Go
resource/reapi/bindings/go/src/test/main
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ be set to the same prefix as was used to install the target flux-core.

For example, if flux-core was installed in `$FLUX_CORE_PREFIX`:

```
```bash
./configure --prefix=${FLUX_CORE_PREFIX}
make
make check
Expand Down
3 changes: 3 additions & 0 deletions resource/reapi/bindings/go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/flux-framework/flux-sched/resource/reapi/bindings/go

go 1.19
3 changes: 0 additions & 3 deletions resource/reapi/bindings/go/src/fluxcli/go.mod

This file was deleted.

Loading

0 comments on commit 0e69f8c

Please sign in to comment.