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

Implement tree construction errors #15

Open
1 of 6 tasks
inikulin opened this issue Jun 12, 2017 · 3 comments
Open
1 of 6 tasks

Implement tree construction errors #15

inikulin opened this issue Jun 12, 2017 · 3 comments

Comments

@inikulin
Copy link
Member

inikulin commented Jun 12, 2017

  • Setup working process
  • Document and add tests for new errors for all insertions modes, except "in body"
  • Issue PRs to upstream repos
  • Document and add tests for new errors for "in body" insertion mode
  • Remove legacy errors and rename #new-errors section to #errors
  • Sort errors lexicographically
@inikulin
Copy link
Member Author

inikulin commented Aug 15, 2017

@HTMLParseErrorWG the workflow for this task is follow:

Preparation steps

Clone following repositories in one folder:

Workflow

  1. Pick unassigned insertion mode you are going to work on in spreadsheet and assign yourself. Note that we will work on "in body" insertion mode separately, since it's huge and we'll need other workflow for it.

  2. In html repository:

    1. Create new branch
    2. Add errors for peeked insertion mode in source file. We add errors in format <span data-x="parse-error-some-id">some-id</span> (for
      examples you can take a look at already added error codes, e.g. in Data state). Make sure you follow formatting guidelines.
      Avoid introducing new error codes if you can reuse existing without one ambiguity.
    3. Add error description in parse error table. See other errors for examples.
    4. Run ../html-build/build.sh from html repository and check that everything looks as intended. Part of compiled spec in which we are interested can be found in html-build/output/multipage/parsing.html file.
    5. Issue pull request with change and add reviewers.
  3. In parse5 repository:

    1. Add error code in https://github.com/HTMLParseErrorWG/parse5/blob/master/lib/common/error_codes.js if it doesn't exists yet.
    2. Add error reporting code, e.g. https://github.com/HTMLParseErrorWG/parse5/blob/master/lib/tokenizer/index.js#L648
    3. Run tests (gulp test) and figure out which tests fail.
  4. In html5lib-tests repository:

    1. Add errors for failing tree construction tests (see example). Note that new errors should be temporary added in #new-errors section. Some test files contain problematic characters, therefore some editors deny to show them as text files or try to reformat them. I've tried WebStorm, VSCode and Sublime, however only Vim worked well for me on such files: it highlights such characters and don't try to be way too smart reformatting them.
    2. Run parse5 tests to ensure that everything is fine.
    3. Issue pull request with change and add reviewers.
  5. In parse5 repository:

    1. Issue pull request with change and add reviewers.
  6. Once you accomplished steps above mark state as "Done" in spreadsheet. Then mark state as "Merged" once all PRs for state are merged.

Don't hesitate to ask any questions here or open separate issues along the way if you have any problems. Also, you can try to refer to tokenizer errors for examples if something is unclear

@inikulin
Copy link
Member Author

@apapko @pmdartus @diervo Just in case you missed ^ Also, please, accept invites to organisation so it will be possible to ping everyone via @HTMLParseErrorWG/core

@diervo
Copy link

diervo commented Aug 22, 2017

@inikulin I will be on vacation for three weeks, but hopefully @pmdartus and @apapko can help you distributing the work, you might need to help them for the first one. The rest will be trivial :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants