[SERVER-80286] Adjust include paths so -i is not necessary in the BazelLibrary rule Created: 21/Aug/23  Updated: 29/Oct/23  Resolved: 19/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Steve Gross Assignee: Zack Winter
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Development Platform
Backwards Compatibility: Fully Compatible
Participants:

 Comments   
Comment by Githook User [ 19/Sep/23 ]

Author:

{'name': 'Zack Winter', 'email': 'zack.winter@mongodb.com', 'username': 'zackwintermdb'}

Message: SERVER-80286 Adjust include paths so -i is not necessary in the BazelLibrary rule
Branch: master
https://github.com/mongodb/mongo/commit/ff60481acc1ecae5bfd1a8da2eb734af7412307d

Comment by Zack Winter [ 15/Sep/23 ]

Likely going to address this with SERVER-81090 I wrote up a doc comparing some of the options: https://docs.google.com/document/d/1e2A1M8yjSTwxOtEB9As1XwfjSuUlmiXVSQFfl3b_FaU/edit?usp=sharing

It would be really nice if we could add "src/" as a prefix to every header include in the tree. We'll probably want to do that eventually after we've fully migrated from scons. Until then we can create custom bazel rules (ex. mongodb_cc_binary) and add src to the include paths there.

Comment by Steve Gross [ 22/Aug/23 ]

alex.neben@mongodb.com Yep, that's the issue. I had to add that line on a specific Bazel target, but I don't want to have to add it for every Bazel target. There should be some way to specify it in one place so it doesn't have to be repeated.

Comment by Alex Neben [ 21/Aug/23 ]

If this ticket is referencing `copts = ["-Isrc"],` then this is likely working as designed. I would be curious to see what you are thinking here because maybe there is something nice and clever we could do.

Generated at Thu Feb 08 06:43:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.