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

build: add node_lib_target_name to cctest deps #18576

Closed
wants to merge 4 commits into from

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Feb 5, 2018

Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

build, test

@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Feb 5, 2018
@danbev
Copy link
Contributor Author

danbev commented Feb 5, 2018

@danbev
Copy link
Contributor Author

danbev commented Feb 5, 2018

@danbev danbev force-pushed the fix_cctest_target_dependency branch from 3908cb7 to be95268 Compare February 6, 2018 06:42
@danbev
Copy link
Contributor Author

danbev commented Feb 6, 2018

@danbev danbev closed this Feb 6, 2018
@danbev
Copy link
Contributor Author

danbev commented Feb 6, 2018

Closed the wrong PR 😞

@danbev danbev reopened this Feb 6, 2018
@BridgeAR
Copy link
Member

BridgeAR commented Feb 6, 2018

@nodejs/build PTAL

@danbev danbev added the wip Issues and PRs that are still a work in progress. label Feb 7, 2018
@danbev
Copy link
Contributor Author

danbev commented Feb 7, 2018

@nodejs/build Don't bother looking into this yet. I don't think this will work as is. Let me come up with something better and I'll ping the group.

@danbev danbev force-pushed the fix_cctest_target_dependency branch from be95268 to b6ce878 Compare February 13, 2018 12:06
@danbev
Copy link
Contributor Author

danbev commented Feb 13, 2018

@danbev
Copy link
Contributor Author

danbev commented Feb 14, 2018

Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.
@danbev danbev force-pushed the fix_cctest_target_dependency branch from 3a26ecd to a4565e2 Compare February 14, 2018 08:11
@danbev
Copy link
Contributor Author

danbev commented Feb 14, 2018

@danbev danbev force-pushed the fix_cctest_target_dependency branch from a4565e2 to 9fc08af Compare February 14, 2018 10:24
@danbev
Copy link
Contributor Author

danbev commented Feb 14, 2018

@danbev danbev force-pushed the fix_cctest_target_dependency branch from f750f20 to 15051d3 Compare February 15, 2018 11:57
It seems that these are not linked properly on Windows with out this.
@danbev
Copy link
Contributor Author

danbev commented Feb 16, 2018

@danbev danbev removed the wip Issues and PRs that are still a work in progress. label Feb 16, 2018
@danbev
Copy link
Contributor Author

danbev commented Feb 16, 2018

@nodejs/build Would be great to get some eyes on this and see if this is acceptable to merge.

Note sure if I was clear enough in the description but as it is at the moment, if an update is made to a source file and then make -j8 cctest is executed the change will be compiled, but the cctest executable will not be re-linked which means the change will not tested, and if a debugging session is started a warning similar to the following will be displayed:

(lldb) br s -f node.cc -l 4295                                                                                     
error: cctest debug map object file '/node/out/Debug/obj.target/node_lib/src/node.o' has changed (actual time is 0x5a86ccc5, debug map time is 0x5a86cc0c) since this executable was linked, file will be ignored

@Trott
Copy link
Member

Trott commented Feb 16, 2018

/cc @nodejs/node-gyp

@Trott Trott requested review from mmarchini and removed request for mmarchini February 16, 2018 14:45
@gibfahn gibfahn requested a review from yhwang February 16, 2018 21:19
@gibfahn
Copy link
Member

gibfahn commented Feb 16, 2018

Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now

Is this the result of a recent change? Would be good to know which PR it depends on for backporting reasons.

@yhwang
Copy link
Member

yhwang commented Feb 16, 2018

Hi @gibfahn

Is this the result of a recent change? Would be good to know which PR it depends on for backporting reasons.

I added node_lib_target_name target in this change:
f878f94
And I also tried to modify cctest to depends on node_lib_target_name and failed at that moment. @danbev is right, putting cctest to depend on node_core_target_name would cause the issue. I didn't think about that and that's a good catch. However, I forgot why I failed to put cctest to depend on node_lib_target_name. I will try to figure it out and update it later. (I hope this change fix the issue that I hit before)

[Edit]
I think @danbev fixed the issue I hit before in test_node_postmortem_metadata.cc. Nice! These does remove a lots of duplications. 👍

Copy link
Member

@yhwang yhwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 19, 2018
@danbev
Copy link
Contributor Author

danbev commented Feb 19, 2018

Are we good to land this, asking because I noticed that there is an awaiting review request from @bnoordhuis? (I don't recall doing that but it's possible that I did by mistake, not that I don't welcome a review)

@danbev
Copy link
Contributor Author

danbev commented Feb 19, 2018

Landed in 30f89df.

@danbev danbev closed this Feb 19, 2018
danbev added a commit that referenced this pull request Feb 19, 2018
Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.

PR-URL: #18576
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@danbev danbev deleted the fix_cctest_target_dependency branch February 19, 2018 11:34
@MylesBorins
Copy link
Contributor

Should this be backported to v9.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

danbev added a commit to danbev/node that referenced this pull request Feb 23, 2018
Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.

PR-URL: nodejs#18576
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
mmarchini pushed a commit to mmarchini/node that referenced this pull request Feb 26, 2018
Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.

PR-URL: nodejs#18576
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
addaleax pushed a commit that referenced this pull request Feb 26, 2018
Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.

Backport-PR-URL: #18550
PR-URL: #18576
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Feb 26, 2018
Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.

Backport-PR-URL: #18550
PR-URL: #18576
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@addaleax addaleax mentioned this pull request Feb 27, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.

PR-URL: nodejs#18576
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
yhwang pushed a commit to yhwang/node that referenced this pull request May 22, 2018
Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.
PR-URL: nodejs#20797
Original PR-URL: nodejs#18576
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request May 23, 2018
Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.

Backport-PR-URL: #20797
PR-URL: #18576
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Jun 14, 2018
Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.

Backport-PR-URL: #20797
PR-URL: #18576
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@MylesBorins MylesBorins mentioned this pull request Jul 9, 2018
rvagg pushed a commit that referenced this pull request Aug 16, 2018
Currently the cctest target depend on the node_core_target_name
target. But it is the node_lib_target_name target that compiles the
sources now which means that if a source file in src is updated the
cctest executable will not be re-linked against it, but will remain
unchanged. The code will still be compiled, just not linked which
means that if you are debugging you'll not see the changes and also a
warning will be displayed about this issue.

This commit changes the cctest target to depend on node_lib_target_name.

Backport-PR-URL: #20797
PR-URL: #18576
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Yihong Wang <yh.wang@ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. build Issues and PRs related to build files or the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants