Skip to content
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

x/tools/present: unexpected eof on slide header only #40033

Open
tz70s opened this issue Jul 4, 2020 · 4 comments
Open

x/tools/present: unexpected eof on slide header only #40033

tz70s opened this issue Jul 4, 2020 · 4 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@tz70s
Copy link
Contributor

tz70s commented Jul 4, 2020

What version of Go are you using (go version)?

$ go version
go version go1.14.4 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/tz70s/Library/Caches/go-build"
GOENV="/Users/tz70s/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/tz70s/WorkSpace/golang/golang"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.14.4/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/f9/zc8k9cr145557jz3bqwmsz880000gn/T/go-build573678616=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

The present tool assume an implicit behavior that the header & the content (next slide page) should exist simultaneously.

E.g. if we have such slide file:

# Go present tool
Present tool reproducer
Tags: go, tool

Tzu-Chiao Yeh
5 Jul 2020
su3g4284zo6y7@gmail.com

instead of

# Go present tool
Present tool reproducer
Tags: go, tool

Tzu-Chiao Yeh
5 Jul 2020
su3g4284zo6y7@gmail.com

## Slide page

We'll get an 'unexpected eof' error.

What did you expect to see?

This error message can lead user confusing:

  • Actually legacy syntax will have the same issue as well.
  • Ideally the "header-only" behavior is acceptable due to usually we start to write the first slide.
  • Document somewhere (sorry if I missed it) and provide better error message would be helpful if this behavior is not acceptable.

What did you see instead?

'unexpected eof' error

Actually this issue can be divided into two scenarios:

  • Provided header but no author and no sections.
  • Provided header and author but no sections.

I think a simple improvement is just skip sections when we reach eof on header or author?

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Jul 4, 2020
@gopherbot gopherbot added this to the Unreleased milestone Jul 4, 2020
@gopherbot
Copy link

Change https://golang.org/cl/240977 mentions this issue: present: allow header and author only format

@dmitshur
Copy link
Contributor

dmitshur commented Jul 7, 2020

/cc @rsc per owners.

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 7, 2020
@arthurkiller
Copy link

same

1 similar comment
@mselh
Copy link

mselh commented Dec 10, 2021

same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

5 participants