Skip to content

A block comment must affirmatively end before end of source#2295

Merged
kdashg merged 2 commits intogpuweb:mainfrom
dneto0:block-comments-must-terminate
Nov 16, 2021
Merged

A block comment must affirmatively end before end of source#2295
kdashg merged 2 commits intogpuweb:mainfrom
dneto0:block-comments-must-terminate

Conversation

@dneto0
Copy link
Copy Markdown
Contributor

@dneto0 dneto0 commented Nov 11, 2021

No description provided.

@dneto0 dneto0 added the wgsl WebGPU Shading Language Issues label Nov 11, 2021
@dneto0 dneto0 added this to the V1.0 milestone Nov 11, 2021
Comment thread wgsl/index.bs Outdated
@dneto0
Copy link
Copy Markdown
Contributor Author

dneto0 commented Nov 11, 2021

It wasn't clear to me that #1470 clearly resolved whether a block comment can be terminated by the end of source.

In that discussion I was against allowing that because it works against being able to easily glue together source texts.

@kdashg
Copy link
Copy Markdown
Contributor

kdashg commented Nov 15, 2021

It wasn't clear to me that #1470 clearly resolved whether a block comment can be terminated by the end of source.

In that discussion I was against allowing that because it works against being able to easily glue together source texts.

I like this rationale. My previous weakly-held opinion was that this should fall under "don't generate errors that don't matter", but yours is a good enough reason for me to want to require strictness here.

@kdashg kdashg merged commit ec38351 into gpuweb:main Nov 16, 2021
github-actions Bot added a commit that referenced this pull request Nov 16, 2021
SHA: ec38351
Reason: push, by @jdashg

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request Nov 16, 2021
SHA: ec38351
Reason: push, by @jdashg

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request Nov 16, 2021
SHA: ec38351
Reason: push, by @jdashg

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@kdashg
Copy link
Copy Markdown
Contributor

kdashg commented Nov 16, 2021

WGSL meeting minutes 2021-11-16
  • DN: Wasn’t clear in previous consensus. Requiring affirmative closing makes it more reliable/easy to glue together snippets.
  • Merge

@dneto0
Copy link
Copy Markdown
Contributor Author

dneto0 commented Nov 16, 2021

I just happened to see that C++14 has a similar requirement:

2.2 Phases of translation, paragraph 3 says

A source file shall not end in a partial preprocessing token or in a partial comment.12

with footnote 12 saying:

... A partial comment would arise from a source file ending with an unclosed /* comment.

So yay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wgsl WebGPU Shading Language Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants