-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Rework and consolidate the page parser #5324
Comments
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 16, 2018
The main item in this commit is showing of errors with a file context when running `hugo server`. This can be turned off: `hugo server --disableBrowserError` (can also be set in `config.toml`). But to get there, the error handling in Hugo needed a revision. There are some items left TODO for commits soon to follow, most notable errors in content and config files. Fixes gohugoio#5284 Fixes gohugoio#5290 See gohugoio#5325 See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 16, 2018
The main item in this commit is showing of errors with a file context when running `hugo server`. This can be turned off: `hugo server --disableBrowserError` (can also be set in `config.toml`). But to get there, the error handling in Hugo needed a revision. There are some items left TODO for commits soon to follow, most notable errors in content and config files. Fixes gohugoio#5284 Fixes gohugoio#5290 See gohugoio#5325 See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 16, 2018
The main item in this commit is showing of errors with a file context when running `hugo server`. This can be turned off: `hugo server --disableBrowserError` (can also be set in `config.toml`). But to get there, the error handling in Hugo needed a revision. There are some items left TODO for commits soon to follow, most notable errors in content and config files. Fixes gohugoio#5284 Fixes gohugoio#5290 See gohugoio#5325 See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 16, 2018
The main item in this commit is showing of errors with a file context when running `hugo server`. This can be turned off: `hugo server --disableBrowserError` (can also be set in `config.toml`). But to get there, the error handling in Hugo needed a revision. There are some items left TODO for commits soon to follow, most notable errors in content and config files. Fixes gohugoio#5284 Fixes gohugoio#5290 See gohugoio#5325 See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 16, 2018
The main item in this commit is showing of errors with a file context when running `hugo server`. This can be turned off: `hugo server --disableBrowserError` (can also be set in `config.toml`). But to get there, the error handling in Hugo needed a revision. There are some items left TODO for commits soon to follow, most notable errors in content and config files. Fixes gohugoio#5284 Fixes gohugoio#5290 See gohugoio#5325 See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 16, 2018
The main item in this commit is showing of errors with a file context when running `hugo server`. This can be turned off: `hugo server --disableBrowserError` (can also be set in `config.toml`). But to get there, the error handling in Hugo needed a revision. There are some items left TODO for commits soon to follow, most notable errors in content and config files. Fixes gohugoio#5284 Fixes gohugoio#5290 See gohugoio#5325 See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 17, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 17, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 17, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 17, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 17, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 17, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 17, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 17, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 18, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 18, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 18, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 18, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 18, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 18, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 18, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 18, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 18, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 18, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 18, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
And remove some now unused code. See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
Now that we have a proper page parse tree, this can be greatly simplified. See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
And remove some now unused code. See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 22, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 23, 2018
`*json.UnmarshalTypeError` and `*json.SyntaxError` has a byte `Offset`, so use that. This commit also reworks/simplifies the errror line matching logic. This also makes the file reading unbuffered, but that should be fine in this error case. See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 23, 2018
`*json.UnmarshalTypeError` and `*json.SyntaxError` has a byte `Offset`, so use that. This commit also reworks/simplifies the errror line matching logic. This also makes the file reading unbuffered, but that should be fine in this error case. See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 23, 2018
`*json.UnmarshalTypeError` and `*json.SyntaxError` has a byte `Offset`, so use that. This commit also reworks/simplifies the errror line matching logic. This also makes the file reading unbuffered, but that should be fine in this error case. See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 23, 2018
`*json.UnmarshalTypeError` and `*json.SyntaxError` has a byte `Offset`, so use that. This commit also reworks/simplifies the errror line matching logic. This also makes the file reading unbuffered, but that should be fine in this error case. See gohugoio#5324
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 23, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 23, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 23, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 23, 2018
bep
added a commit
to bep/hugo
that referenced
this issue
Oct 23, 2018
This is now done. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Working on #5284 I hit some hurdles when I wanted to show proper file/line context for errors in content files. The main problem is that the current parser splits front matter and the rest. There are currently some line number calculations in there, but it seems to be impossible to get exactly right in every situation.
The current "front matter" parser is also a little hard to read, and while considered stable and working, It is easy to read from the Git history that there have been corner cases that is simpler to avoid with a proper lexer.
So I suggest that:
parser
packageThere is also an obvious potential performance benefit in the "do it once" approach above.
The text was updated successfully, but these errors were encountered: