Skip to content

Compiler Errors #786

Description

@Skeeve

What happened?

  1. Can't compile with docker
:: building go binary v16.4.0
CGO_ENABLED=0 go build \
        -ldflags "-X main.version=v16.4.0 -X main.commit=1e839513d9bc90b814d678c8b6b2c8c1cb539cb2" \
        -gcflags "-trimpath /go/src" \
        -o  \
        ./cmd/mark

-o is missing a name

  1. When that is fixed:
confluence/api.go:902:19: undefined: user
confluence/api.go:903:19: undefined: user
confluence/api.go:912:15: no new variables on left side of :=

What did you expect to happen?

mark should build flawlessly with docker.

How can we reproduce the behavior you experienced?

Steps to reproduce the behavior:

  1. Update repository to latest main mark version v16.4.0@1e839513d9bc90b814d678c8b6b2c8c1cb539cb2
  2. run docker compose run markbuilder

Further Information (please complete the following information)

  • Mark Version (mark --version): v16.4.0@1e839513d9bc90b814d678c8b6b2c8c1cb539cb2

Logs or other output

n/a

Additional context

Issue 1 can be fixed in Makefile with

-NAME = $(notdir $(PWD))
+NAME = $(notdir $(or $(PWD),$(CURDIR)))

Issue 2 might be fixed in api.go with

+	user, err := api.GetUserByName(allowedUser)
+	if err != nil {
+		return err
+	}
	url := fmt.Sprintf("content/%s/restriction", page.ID)

and

-	request, err := req.Put(data)
+	request, err = req.Put(data)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions