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 -verrors and suport @file better. #16

Merged
merged 2 commits into from
May 29, 2024

Conversation

the-horo
Copy link
Contributor

@the-horo the-horo commented May 6, 2024

The @FILE fixes would make gdmd usable with dub.

The unimplemented -verrors switch I've hit in dlang-community/DCD#774.

When `@FILE` arguments are passed, read the whole file not just the
first line like the current implementation.

Drop the requirement that `@...` arguments have to end in `.rsp`. This
is consistent with dmd and used out in the wild by dub which uses
`@...rsp` when building and `@...lnk` when linking. To account for
this the matching code has been moved up the if .. elsif block.

The implementation was also changed to use a local file handle instead
of the legacy bareword and the two-argument form of open has been
replaced by the three-argument one.

Add a space in the help string to compensate for the `\@` escape.

When a string argument ends in a number of `\`, half their number
instead of dropping it to one, this is the same as dmd. It is unlikely
that this will ever come up so it is only for
completeness. Specifically `"a \\\\"` gets converted to `a \` when dmd
converts it to `a \\`.

Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
@WebFreak001
Copy link
Contributor

@ibuclaw I think the PR looks good, can we get it merged?

@ibuclaw
Copy link
Member

ibuclaw commented May 29, 2024

OK

@ibuclaw ibuclaw merged commit dc0ad9f into D-Programming-GDC:master May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants