chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.78k stars 418 forks source link

`mason doc` should respect authors field in Mason.toml #15152

Open rapiz1 opened 4 years ago

rapiz1 commented 4 years ago

spins off https://github.com/chapel-lang/chapel/pull/15137#issuecomment-596859912

Currently, mason doc will not print authors from Mason.toml on the pages where it should be. It will just leave it blank ( and with an unnecessary comma. I opened https://github.com/chapel-lang/chapel/pull/15151 for this )

image

I think it will be better if we fill this blank with the authors fields from Mason.toml.

ben-albrecht commented 4 years ago

Agreed. I think this can be accomplished by passing contents of authors field to chpldoc --author="<authors>"

rapiz1 commented 4 years ago

@ben-albrecht I'm working on this and believe that I can open a PR soon.

rapiz1 commented 4 years ago

Well, an issue about runCommand in MasonUtils.chpl will hold back this feature, which can't deal with space in quoted string properly because it simply split strings into arguments by space. This will break everything when there are spaces in names of authors like rapiz1 <contact@rapiz.me>, even the argument is quoted. I wanted to fix runCommand by the way but found that it's more difficult than I think and may involve a design discussion. However, I will open a draft PR with the work I have done so far and wait for further fix.

ben-albrecht commented 4 years ago

Yeah, this is a situation where a shell-lexing module would be helpful (https://github.com/chapel-lang/chapel/issues/11489).

As a hacky work-around, you could replace the space delimiter (e.g. |) in the authors field to another character before the split, then replace them back to spaces after the split.

ben-albrecht commented 3 years ago

Because this depends on a shell-lexing feature, I'm removing [easy] label for now.