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

Duplicate files warning in compilation time #109

Closed
iWangJiaxiang opened this issue Nov 20, 2019 · 7 comments · Fixed by #149
Closed

Duplicate files warning in compilation time #109

iWangJiaxiang opened this issue Nov 20, 2019 · 7 comments · Fixed by #149

Comments

@iWangJiaxiang
Copy link
Contributor

Hi, I got the warning below when compile the latest release https://github.com/gridcf/gct/tree/v6.2.20190906

rm -rf doc
/home/user/app/gct-6.2.1567772254/common/source/test/globus_test_tap.h:5: warning: the name `globus_test_tap.h' supplied as the second argument in the \file statement matches the following input files:
   /home/user/app/gct-6.2.1567772254/common/source/test/globus_test_tap.h
   /home/user/app/gct-6.2.1567772254/gridftp/net_manager/test/globus_test_tap.h
Please use a more specific name by including a (larger) part of the path!
/home/user/app/gct-6.2.1567772254/gsi/gssapi/source/library/read_vhost_cred_dir.c:18: warning: the name `read_vhost_cred_dir.c' supplied as the second argument in the \file statement matches the following input files:
   /home/user/app/gct-6.2.1567772254/gsi/gssapi/source/library/read_vhost_cred_dir.c
   /home/user/app/gct-6.2.1567772254/gsi/gss_assist/source/read_vhost_cred_dir.c
Please use a more specific name by including a (larger) part of the path!
/home/user/app/gct-6.2.1567772254/gsi/gss_assist/source/read_vhost_cred_dir.c:18: warning: the name `read_vhost_cred_dir.c' supplied as the second argument in the \file statement matches the following input files:
   /home/user/app/gct-6.2.1567772254/gsi/gssapi/source/library/read_vhost_cred_dir.c
   /home/user/app/gct-6.2.1567772254/gsi/gss_assist/source/read_vhost_cred_dir.c
Please use a more specific name by including a (larger) part of the path!
/home/user/app/gct-6.2.1567772254/gridftp/net_manager/attr/destroy.c:18: warning: the name `destroy.c' supplied as the second argument in the \file statement matches the following input files:
   /home/user/app/gct-6.2.1567772254/gridftp/net_manager/attr/destroy.c
   /home/user/app/gct-6.2.1567772254/gridftp/net_manager/context/destroy.c
Please use a more specific name by including a (larger) part of the path!
/home/user/app/gct-6.2.1567772254/gridftp/net_manager/attr/init.c:18: warning: the name `init.c' supplied as the second argument in the \file statement matches the following input files:
   /home/user/app/gct-6.2.1567772254/gsi/gss_assist/source/init.c
   /home/user/app/gct-6.2.1567772254/gridftp/net_manager/attr/init.c
   /home/user/app/gct-6.2.1567772254/gridftp/net_manager/context/init.c
Please use a more specific name by including a (larger) part of the path!
/home/user/app/gct-6.2.1567772254/gridftp/net_manager/context/destroy.c:18: warning: the name `destroy.c' supplied as the second argument in the \file statement matches the following input files:
   /home/user/app/gct-6.2.1567772254/gridftp/net_manager/attr/destroy.c
   /home/user/app/gct-6.2.1567772254/gridftp/net_manager/context/destroy.c
Please use a more specific name by including a (larger) part of the path!
/home/user/app/gct-6.2.1567772254/gridftp/net_manager/context/init.c:18: warning: the name `init.c' supplied as the second argument in the \file statement matches the following input files:
   /home/user/app/gct-6.2.1567772254/gsi/gss_assist/source/init.c
   /home/user/app/gct-6.2.1567772254/gridftp/net_manager/attr/init.c
   /home/user/app/gct-6.2.1567772254/gridftp/net_manager/context/init.c
Please use a more specific name by including a (larger) part of the path!
/home/user/app/gct-6.2.1567772254/gridftp/net_manager/test/globus_test_tap.h:5: warning: the name `globus_test_tap.h' supplied as the second argument in the \file statement matches the following input files:
   /home/user/app/gct-6.2.1567772254/common/source/test/globus_test_tap.h
   /home/user/app/gct-6.2.1567772254/gridftp/net_manager/test/globus_test_tap.h
Please use a more specific name by including a (larger) part of the path!
/home/user/app/gct-6.2.1567772254/gridftp/server/src/globus_gridftp_server.h:1551: warning: Member globus_i_gfs_error_system(int ftp_code, int system_errno, const char *fmt,...) (function) of file globus_gridftp_server.h is not documented.
make[2]: Leaving directory `/home/user/app/gct-6.2.1567772254'
make[1]: Leaving directory `/home/user/app/gct-6.2.1567772254'

Do you have any idea?

@fscheiner fscheiner changed the title Deplicate files warning in compilation time Duplicate files warning in compilation time Nov 28, 2019
@fscheiner fscheiner changed the title Duplicate files warning in compilation time Deplicate files warning in compilation time Nov 28, 2019
@fscheiner
Copy link
Member

@iWangJiaxiang: I've seen that, too, during my local compile runs. So far I haven't noticed any problems that derived from that.

The content in RIOT-OS/RIOT#6367 seems to be related, which would point to doxygen as origin. Maybe a configuration default changed.

@msalle
Copy link
Member

msalle commented Dec 4, 2019

It's true the warnings come from doxygen, but it points to a deeper problem: there are several files with the same name, which actually are basically the same code, but with minor differences. Compare for example read_vhost_cred_dir.c in gsi/gssapi with read_vhost_cred_dir.c in gsi/gss_assist.
In itself there doesn't seem to be anything wrong, but the code-duplication can lead to errors. For now we can probably leave it as is, but it would be good to put a todo item somewhere to cleanup the duplicate code (if possible).

@fscheiner
Copy link
Member

It's true the warnings come from doxygen, but it points to a deeper problem: there are several files with the same name, which actually are basically the same code, but with minor differences. Compare for example read_vhost_cred_dir.c in gsi/gssapi with read_vhost_cred_dir.c in gsi/gss_assist.

The first one is also located in a library directory.

From the history of these files (https://github.com/gridcf/gct/commits/master/gsi/gssapi/source/library/read_vhost_cred_dir.c and https://github.com/gridcf/gct/commits/master/gsi/gss_assist/source/read_vhost_cred_dir.c) the second one seems to be the older one. So it could be that the Globus team was about to move that functionality into a library but didn't yet remove the original file for compatibility or lack of time.

@ellert ellert changed the title Deplicate files warning in compilation time Duplicate files warning in compilation time Jun 4, 2020
@fscheiner
Copy link
Member

@msalle
I think removing one or the other nearly identical files and trying to recompile the whole GCT could show which one is really needed. But this way we can't determine if one or the other is possibly needed by some other code external to the GCT.

@msalle
Copy link
Member

msalle commented Mar 2, 2021

@fscheiner I agree it's not fully trivial. For static functions it would be fine, for non-static functions we cannot remove them. But there will be issues probably if there are currently non-static functions with the same name...

@fscheiner
Copy link
Member

Ok, the let's try to fix the Doxygen configuration then instead. The Documentation for the \file command says:

[...] If the file name is omitted (i.e. the line after \file is left blank) then the documentation block that
contains the \file command will belong to the file it is located in. [...]

So omitting the file name from the \file command (@file in our sources) in the respective files could make the above messages disappear. I'll try that locally and report back.

fscheiner added a commit to fscheiner/gct that referenced this issue Mar 4, 2021
...by avoiding file names for the `\file` command in the files
changed with this commit. See https://www.doxygen.nl/manual/commands.html#cmdfile
for details.

Fixes gridcf#109.
@fscheiner fscheiner reopened this Mar 25, 2021
@fscheiner
Copy link
Member

Fixed in GCT 6.2.20210826 maintenance release.

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

Successfully merging a pull request may close this issue.

3 participants