#26447 closed enhancement (implemented)

Add check-includes to check-local?

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: easy, ci, modularity, fast-fix, 035-triaged-in-20180711
Cc: Actual Points:
Parent ID: Points:
Reviewer: teor Sponsor:

Description

We now have a handy tool that lets us check our includes for modularity violations. We could make it part of "make check", and have our CI enforce it for us!

Child Tickets

Change History (16)

comment:1 Changed 16 months ago by nickm

Keywords: fast-fix added
Owner: set to nickm
Status: newaccepted

comment:2 Changed 16 months ago by cypherpunks

Resolution: fixed
Status: acceptedclosed

comment:3 Changed 16 months ago by nickm

Beg your pardon? I never actually did this.

comment:4 Changed 16 months ago by cypherpunks

Resolution: fixed
Status: closedreopened

comment:5 Changed 15 months ago by nickm

Please see branch ticket26447 with PR at https://github.com/torproject/tor/pull/217 .

comment:6 Changed 15 months ago by nickm

Status: reopenedneeds_review

comment:7 Changed 15 months ago by nickm

Keywords: 035-triaged-in-20180711 added

comment:8 Changed 15 months ago by dgoulet

Reviewer: teor

comment:9 Changed 15 months ago by teor

Status: needs_reviewneeds_revision

Oops, sorry, I didn't see this ticket last week.

When building out of tree, I see:

perl ../scripts/maint/checkSpace.pl -C \
		../src/lib/*/*.[ch] \
		../src/core/*/*.[ch] \
		../src/feature/*/*.[ch] \
		../src/app/*/*.[ch] \
		../src/test/*.[ch] \
		../src/test/*/*.[ch] \
		../src/tools/*.[ch]
../scripts/maint/checkIncludes.py
make[1]: ../scripts/maint/checkIncludes.py: No such file or directory
make[1]: *** [check-includes] Error 1
make[1]: *** Waiting for unfinished jobs....

comment:10 Changed 15 months ago by teor

But the file is there:

$ ls -l ../scripts/maint/checkIncludes.py
-rwxr-xr-x  1 x  staff  3473 26 Jul 10:39 ../scripts/maint/checkIncludes.py

comment:11 Changed 15 months ago by teor

I get the same error for an in-tree build:

perl ./scripts/maint/checkSpace.pl -C \
		./src/lib/*/*.[ch] \
		./src/core/*/*.[ch] \
		./src/feature/*/*.[ch] \
		./src/app/*/*.[ch] \
		./src/test/*.[ch] \
		./src/test/*/*.[ch] \
		./src/tools/*.[ch]
./scripts/maint/checkIncludes.py
make[1]: ./scripts/maint/checkIncludes.py: No such file or directory
make[1]: *** [check-includes] Error 1
make[1]: *** Waiting for unfinished jobs....
...
$ ls -l ./scripts/maint/checkIncludes.py
-rwxr-xr-x  1 x  wheel  3473 26 Jul 10:48 ./scripts/maint/checkIncludes.py

comment:12 Changed 15 months ago by nickm

It's maybe complaining that you don't have a /usr/bin/python3? I'll fix it up.

comment:13 in reply to:  12 Changed 15 months ago by teor

Replying to nickm:

It's maybe complaining that you don't have a /usr/bin/python3? I'll fix it up.

Yeah, I don't have any python3 in that build environment. But if I did, it would be at /usr/local/bin/python3.

comment:14 Changed 15 months ago by nickm

Status: needs_revisionneeds_review

I've made the straightforward fix; better now?

comment:15 Changed 15 months ago by teor

Status: needs_reviewmerge_ready

Yes, it works well now.

comment:16 Changed 15 months ago by nickm

Resolution: implemented
Status: merge_readyclosed

Merged!

Note: See TracTickets for help on using tickets.