Skip to content

Commit

Permalink
fixups
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Chadwell <[email protected]>
  • Loading branch information
jedevc committed May 3, 2024
1 parent 16ef173 commit 2d56a42
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 22 deletions.
6 changes: 0 additions & 6 deletions .github/dependabot.yml
Expand Up @@ -129,9 +129,3 @@ updates:
applies-to: version-updates
patterns:
- "*"

# ignore all npm dependencies in sdk/rust
- package-ecosystem: "npm"
directory: "/sdk/rust"
ignore:
- dependency-name: "*"
4 changes: 4 additions & 0 deletions .golangci.yml
Expand Up @@ -46,6 +46,10 @@ issues:
# this is sometimes done for clarity
- unparam

exclude-dirs:
# these files are already linted in sdk/go
- internal/telemetry
- internal/querybuilder

linters-settings:
revive:
Expand Down
19 changes: 9 additions & 10 deletions ci/docs.go
Expand Up @@ -63,18 +63,17 @@ func (d Docs) Lint(ctx context.Context) error {
// Regenerate the API schema and CLI reference docs
func (d Docs) Generate(ctx context.Context) (*dagger.Directory, error) {
eg, ctx := errgroup.WithContext(ctx)
_ = ctx

var sdl *dagger.Directory
eg.Go(func() error {
var err error
sdl, err = d.GenerateSdl(ctx)
return err
sdl = d.GenerateSdl()
return nil
})
var cli *dagger.Directory
eg.Go(func() error {
var err error
cli, err = d.GenerateCli(ctx)
return err
cli = d.GenerateCli()
return nil
})

if err := eg.Wait(); err != nil {
Expand All @@ -85,7 +84,7 @@ func (d Docs) Generate(ctx context.Context) (*dagger.Directory, error) {
}

// Regenerate the API schema
func (d Docs) GenerateSdl(ctx context.Context) (*Directory, error) {
func (d Docs) GenerateSdl() *Directory {
introspectionJSON :=
util.GoBase(d.Dagger.Source).
WithExec([]string{"go", "run", "./cmd/introspect"}, dagger.ContainerWithExecOpts{
Expand All @@ -100,14 +99,14 @@ func (d Docs) GenerateSdl(ctx context.Context) (*Directory, error) {
WithExec([]string{"graphql-json-to-sdl", "/src/schema.json", "/src/schema.graphql"}).
File("/src/schema.graphql")

return dag.Directory().WithFile(generatedSchemaPath, generated), nil
return dag.Directory().WithFile(generatedSchemaPath, generated)
}

// Regenerate the CLI reference docs
func (d Docs) GenerateCli(ctx context.Context) (*Directory, error) {
func (d Docs) GenerateCli() *Directory {
// Should we keep `--include-experimental`?
generated := util.GoBase(d.Dagger.Source).
WithExec([]string{"go", "run", "./cmd/dagger", "gen", "--frontmatter=" + cliZenFrontmatter, "--output=cli.mdx", "--include-experimental"}).
File("cli.mdx")
return dag.Directory().WithFile(generatedCliZenPath, generated), nil
return dag.Directory().WithFile(generatedCliZenPath, generated)
}
2 changes: 1 addition & 1 deletion ci/sdk_go.go
Expand Up @@ -106,7 +106,7 @@ func (t GoSDK) Publish(
}

// Bump the Go SDK's Engine dependency
func (t GoSDK) Bump(ctx context.Context, version string) (*Directory, error) {
func (t GoSDK) Bump(version string) (*Directory, error) {
// trim leading v from version
version = strings.TrimPrefix(version, "v")

Expand Down
2 changes: 1 addition & 1 deletion ci/sdk_php.go
Expand Up @@ -83,7 +83,7 @@ func (t PHPSDK) Publish(
}

// Bump the PHP SDK's Engine dependency
func (t PHPSDK) Bump(ctx context.Context, version string) (*Directory, error) {
func (t PHPSDK) Bump(version string) (*Directory, error) {
version = strings.TrimPrefix(version, "v")
content := fmt.Sprintf(`<?php /* Code generated by dagger. DO NOT EDIT. */ return '%s';
`, version)
Expand Down
2 changes: 1 addition & 1 deletion ci/sdk_python.go
Expand Up @@ -155,7 +155,7 @@ func (t PythonSDK) Publish(
}

// Bump the Python SDK's Engine dependency
func (t PythonSDK) Bump(ctx context.Context, version string) (*dagger.Directory, error) {
func (t PythonSDK) Bump(version string) (*dagger.Directory, error) {
// trim leading v from version
version = strings.TrimPrefix(version, "v")
engineReference := fmt.Sprintf("# Code generated by dagger. DO NOT EDIT.\n\nCLI_VERSION = %q\n", version)
Expand Down
2 changes: 1 addition & 1 deletion ci/sdk_typescript.go
Expand Up @@ -156,7 +156,7 @@ always-auth=true`, plaintext)
}

// Bump the Typescript SDK's Engine dependency
func (t TypescriptSDK) Bump(ctx context.Context, version string) (*Directory, error) {
func (t TypescriptSDK) Bump(version string) (*Directory, error) {
// trim leading v from version
version = strings.TrimPrefix(version, "v")

Expand Down
1 change: 0 additions & 1 deletion core/modfunc.go
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/dagger/dagger/analytics"
"github.com/dagger/dagger/core/pipeline"
"github.com/dagger/dagger/dagql"
"github.com/dagger/dagger/dagql/call"
"github.com/dagger/dagger/engine/buildkit"
)

Expand Down
2 changes: 1 addition & 1 deletion dagger.json
Expand Up @@ -15,4 +15,4 @@
]
}
]
}
}

0 comments on commit 2d56a42

Please sign in to comment.