-
Notifications
You must be signed in to change notification settings - Fork 24
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
add dependencies options and -fcopybook-deps #109
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## gcos4gnucobol-3.x #109 +/- ##
===================================================
Coverage 77.56% 77.56%
===================================================
Files 33 33
Lines 60230 60349 +119
Branches 15834 15869 +35
===================================================
+ Hits 46717 46810 +93
- Misses 13513 13539 +26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
As testcases are missing I cannot get a grasp what this is about.... We definitely should provide a way to "only" calculate the dependencies and in this case the paths are not available so we can only output the names, which may be the idea behind that. Not sure why we should have a "only on one line". Adjustments to -MT and friends are useful and those were added back with an explicit note that there will be changes - but those should mimic what GCC does with them so please provide sample code and output of a C program with And yes: if you could tackle the -M... options, that would be quite good (but those changes should mimic recent GCC, both from their options and from their results). |
b79b1e2
to
e3c6cd9
Compare
I added a test in For |
5cfc276
to
9aeb62c
Compare
@GitMensch I have a completely unrelated question ; I have a PR on the manual in OCamlPro/gnucobol-docs#2 . Is there another maintainer for that part, or are you also in charge ? |
9aeb62c
to
e2ed1a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should -MM
and -MMD
be added, ignoring the copybooks in COB_COPY_DIR
(currently extfh and screenio)?
Shouldn't the dependency options be included in gnucobol.texi, possibly copying GCCs docs verbatim? This would also allow to note in NEWS that we adjusted these options (referencing the 3.2 note about the future change) while pointing to the manual for the details on the dependency generation.
In any case this should be split to two commits for SVN - one that adjusts the "standard" dependency options and a second one for the new flags.
I'd like to review them separately, can you please split the PR into two (obviously the new flags would not base on the original target but on the deps branch)?
Friendly ping @lefessan |
@lefessan I've did a quick browser-only merge, can you please review, adjust as needed and check the review comment above? |
029378b
to
0d408ba
Compare
Thanks for the rebase. As guessed before, noted in the review and now seen in the CI: we have issues at least on Win32 as follows:
I think all make implementations support / paths, in this case we may use these here; otherwise the test may get a conditional to change the expected result for Win32 to backslash or we go with adjusting the output of (.)\(.) to $1/$2. |
136592b
to
8dc9eed
Compare
bea01c0
to
98c078f
Compare
So, in this version, I am using the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly finished! Please see comments.
98c078f
to
d7be103
Compare
I don't think it is worth it. Though they are easy to implement (by modifying the |
This version has a |
7cf30b0
to
68c30e6
Compare
Took care of most changes ; as far as I can tell the only thing that remains to do is splitting the unrelated testsuite changes and |
@GitMensch I think I took all remarks into account. Is this ok for you ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question: -MMD
and -isystem
are left for a later PR,. right?
This PR needs testcase adjustments, but otherwise loolks good.
cobc/typeck.c
Outdated
@@ -3588,6 +3588,7 @@ check_argument_conformance (struct cb_program *program, cb_tree argument_tripple | |||
} else { | |||
arg_field = NULL; | |||
} | |||
if (!CB_FIELD_P(param)) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's unrelated but important, I guess there's also test that can (and should be) added for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to trigger this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly passing a constant/literal? I'd need to check the context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this and its Changelog entry to a separate PR and we can work out the right test (if @lefessan does not remember).
Not sure ; quoting Fabrice's reply (#109 (comment)):
|
I agree in general (and COB_COPY_DIR would only be applied for the inbuilt one, because the env var is used by users for their copybooks as well).
If added, then this makes only sense with `-isystem` (= places for copybooks a user don't want to see), but we can leave that out until there is someone that would like to use it.
As noted in the review, I think they're one leftover var related to that.
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
2e0db75
to
88e292a
Compare
From the GCC docs the following may be not "correct" yet:
Note that we can, of course, should be able to copy most of the GCC docs about those options to gnucobol.texi. Would there be any reason to support |
88e292a
to
d0cb765
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After moving that unrelated thing without a testcase out, this is nearly good to go now, it just needs ChangeLog entries for the changes done after Fabrice's work, then can be merged upstream.
I'm quite sure that there were also recent adjustments from you :-) |
Not really, just minor changes: allow duplicates in Unless I'm missing something (I'm working on 10 things at the same time, I'm kinda lost) |
then let's only out the duplicate stuff in pplex.l to recent changelog entry from you before commit (and possibly leave flags.def in upstream as-is) |
Ah, I had added that to Fabrice's entry from 03/2024. It's only a 3-line patch, I'm okay with not taking the credit for that 😂 |
I'd like to keep the Changelog including time entries relative clean, that's not (only) about attribution (also a the date is quite interesting) eeeeeeeeeI see from https://github.com/OCamlPro/gnucobol/compare/1a2949b4df2a55b7bca16f13a91c53a2e3807a9d..236c8b2c21dbaf470250d48bd2a014be4b10aaf1 that the adjustment is mostly testcases. |
236c8b2
to
1648185
Compare
Flags following gcc options: -M to output deps only, -MD to output deps while compiling (in .d files), -MP to output phony targets, -MG to keep missing copybooks, -MQ <target> to Makefile-quote target Additional flags specific to GnuCOBOL: -fcopybook-deps outputs only copybook names instead of file paths. -fcopybook-deps also forces -E.
1648185
to
bf800ca
Compare
Didn't notice this was granted the "Ready for SVN" tag 😅. Rebasing before upstreaming. |
-fcopybook-deps
outputs only copybook names instead of file paths.-fcopybook-deps
also forces-E -foneline-deps -MT=copybooks
, disables errors on missing copybooks and remove output on stdout.