Skip to content

Commit

Permalink
Improve VSCode IntelliSense support
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Oct 3, 2024
1 parent b4d42a4 commit 17147bc
Show file tree
Hide file tree
Showing 20 changed files with 182 additions and 9 deletions.
5 changes: 1 addition & 4 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"${workspaceFolder}/src/agent",
"${workspaceFolder}/src/cxx_supportlib",
"${workspaceFolder}/src/cxx_supportlib/vendor-copy",
"${workspaceFolder}/src/cxx_supportlib/vendor-copy/websocketpp",
"${workspaceFolder}/src/cxx_supportlib/vendor-copy/libuv/include",
"${workspaceFolder}/src/cxx_supportlib/vendor-modified",
"${workspaceFolder}/src/cxx_supportlib/vendor-modified/libev",
Expand All @@ -31,10 +30,8 @@
"/System/Library/Frameworks",
"/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
"cppStandard": "c++17"
}
],
"version": 4
Expand Down
57 changes: 54 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,59 @@
"string_view": "cpp",
"unordered_map": "cpp",
"valarray": "cpp",
"vector": "cpp"
"vector": "cpp",
"__node_handle": "cpp",
"__threading_support": "cpp",
"__verbose_abort": "cpp",
"any": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"cinttypes": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"condition_variable": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"execution": "cpp",
"forward_list": "cpp",
"fstream": "cpp",
"future": "cpp",
"iomanip": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"optional": "cpp",
"ostream": "cpp",
"print": "cpp",
"queue": "cpp",
"ratio": "cpp",
"shared_mutex": "cpp",
"source_location": "cpp",
"span": "cpp",
"sstream": "cpp",
"stack": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"strstream": "cpp",
"unordered_set": "cpp",
"variant": "cpp",
"algorithm": "cpp"
},
"C_Cpp.intelliSenseEngine": "Default",
"C_Cpp.intelliSenseEngineFallback": "Enabled"
"C_Cpp.intelliSenseEngineFallback": "enabled",
"C_Cpp.default.cStandard": "c11",
"C_Cpp.default.cppStandard": "c++14"
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_GROUP_INITIALIZATION_AND_SHUTDOWN_CPP_
#define _PASSENGER_APPLICATION_POOL_GROUP_INITIALIZATION_AND_SHUTDOWN_CPP_

#ifdef INTELLISENSE
#include <Core/ApplicationPool/Pool.h>
#endif
#include <Core/ApplicationPool/Group.h>

/*************************************************************************
Expand Down Expand Up @@ -179,3 +185,5 @@ Group::shutdown(const Callback &callback,

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_GROUP_INITIALIZATION_AND_SHUTDOWN_CPP_
9 changes: 9 additions & 0 deletions src/agent/Core/ApplicationPool/Group/InternalUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_GROUP_INTERNAL_UTILS_CPP_
#define _PASSENGER_APPLICATION_POOL_GROUP_INTERNAL_UTILS_CPP_

#ifdef INTELLISENSE
#include <Core/ApplicationPool/Pool.h>
#endif
#include <Core/ApplicationPool/Group.h>
#include <iterator>

/*************************************************************************
*
Expand Down Expand Up @@ -374,3 +381,5 @@ Group::callAbortLongRunningConnectionsCallback(const ProcessPtr &process) {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_GROUP_INTERNAL_UTILS_CPP_
8 changes: 8 additions & 0 deletions src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_GROUP_LIFETIME_AND_BASICS_CPP_
#define _PASSENGER_APPLICATION_POOL_GROUP_LIFETIME_AND_BASICS_CPP_

#ifdef INTELLISENSE
#include <Core/ApplicationPool/Pool.h>
#endif
#include <Core/ApplicationPool/Group.h>

/*************************************************************************
Expand Down Expand Up @@ -107,3 +113,5 @@ Group::getWrapperRegistry() const {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_GROUP_LIFETIME_AND_BASICS_CPP_
9 changes: 9 additions & 0 deletions src/agent/Core/ApplicationPool/Group/Miscellaneous.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#ifndef _PASSENGER_APPLICATION_POOL_GROUP_MISCELLANEOUS_CPP_
#define _PASSENGER_APPLICATION_POOL_GROUP_MISCELLANEOUS_CPP_

#ifdef INTELLISENSE
#include <Core/ApplicationPool/Pool.h>
#endif
#include <Core/ApplicationPool/Group.h>

/*************************************************************************
Expand Down Expand Up @@ -65,3 +72,5 @@ Group::authorizeByApiKey(const ApiKey &key) const {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_GROUP_MISCELLANEOUS_CPP_
9 changes: 9 additions & 0 deletions src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#ifndef _PASSENGER_APPLICATION_POOL_GROUP_OUT_OF_BAND_WORK_CPP_
#define _PASSENGER_APPLICATION_POOL_GROUP_OUT_OF_BAND_WORK_CPP_

#ifdef INTELLISENSE
#include <Core/ApplicationPool/Pool.h>
#endif
#include <Core/ApplicationPool/Group.h>
#include <IOTools/MessageSerialization.h>

Expand Down Expand Up @@ -322,3 +329,5 @@ Group::requestOOBW(const ProcessPtr &process) {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_GROUP_OUT_OF_BAND_WORK_CPP_
14 changes: 12 additions & 2 deletions src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_GROUP_PROCESS_LIST_MANAGEMENT_CPP_
#define _PASSENGER_APPLICATION_POOL_GROUP_PROCESS_LIST_MANAGEMENT_CPP_

#ifdef INTELLISENSE
#include <Core/ApplicationPool/Pool.h>
#endif
#include <Core/ApplicationPool/Group.h>

/*************************************************************************
Expand Down Expand Up @@ -222,6 +228,7 @@ void
Group::removeFromDisableWaitlist(const ProcessPtr &p, DisableResult result,
boost::container::vector<Callback> &postLockActions)
{
const deque<DisableWaiter> &disableWaitlist = this->disableWaitlist;
deque<DisableWaiter>::const_iterator it, end = disableWaitlist.end();
deque<DisableWaiter> newList;
for (it = disableWaitlist.begin(); it != end; it++) {
Expand All @@ -233,7 +240,7 @@ Group::removeFromDisableWaitlist(const ProcessPtr &p, DisableResult result,
newList.push_back(waiter);
}
}
disableWaitlist = newList;
this->disableWaitlist = newList;
}

void
Expand Down Expand Up @@ -428,6 +435,7 @@ Group::attach(const ProcessPtr &process,
/* Now that there are enough resources, relevant processes in
* 'disableWaitlist' can be disabled.
*/
const deque<DisableWaiter> &disableWaitlist = this->disableWaitlist;
deque<DisableWaiter>::const_iterator it, end = disableWaitlist.end();
deque<DisableWaiter> newDisableWaitlist;
for (it = disableWaitlist.begin(); it != end; it++) {
Expand All @@ -451,7 +459,7 @@ Group::attach(const ProcessPtr &process,
newDisableWaitlist.push_back(waiter);
}
}
disableWaitlist = newDisableWaitlist;
this->disableWaitlist = newDisableWaitlist;

// Update GC sleep timer.
wakeUpGarbageCollector();
Expand Down Expand Up @@ -616,3 +624,5 @@ Group::disable(const ProcessPtr &process, const DisableCallback &callback) {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_GROUP_PROCESS_LIST_MANAGEMENT_CPP_
8 changes: 8 additions & 0 deletions src/agent/Core/ApplicationPool/Group/SessionManagement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_GROUP_SESSION_MANAGEMENT_CPP_
#define _PASSENGER_APPLICATION_POOL_GROUP_SESSION_MANAGEMENT_CPP_

#ifdef INTELLISENSE
#include <Core/ApplicationPool/Implementation.cpp>
#endif
#include <Core/ApplicationPool/Group.h>

/*************************************************************************
Expand Down Expand Up @@ -336,3 +342,5 @@ Group::get(const Options &newOptions, const GetCallback &callback,

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_GROUP_SESSION_MANAGEMENT_CPP_
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_GROUP_SPAWNING_AND_RESTARTING_CPP_
#define _PASSENGER_APPLICATION_POOL_GROUP_SPAWNING_AND_RESTARTING_CPP_

#ifdef INTELLISENSE
#include <Core/ApplicationPool/Implementation.cpp>
#endif
#include <Core/ApplicationPool/Group.h>

/*************************************************************************
Expand Down Expand Up @@ -485,3 +491,5 @@ Group::allowSpawn() const {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_GROUP_SPAWNING_AND_RESTARTING_CPP_
8 changes: 8 additions & 0 deletions src/agent/Core/ApplicationPool/Group/StateInspection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_GROUP_STATE_INSPECTION_CPP_
#define _PASSENGER_APPLICATION_POOL_GROUP_STATE_INSPECTION_CPP_

#ifdef INTELLISENSE
#include <Core/ApplicationPool/Implementation.cpp>
#endif
#include <Core/ApplicationPool/Group.h>
#include <FileTools/PathManip.h>
#include <cassert>
Expand Down Expand Up @@ -303,3 +309,5 @@ Group::inspectConfigInAdminPanelFormat(Json::Value &result) const {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_GROUP_STATE_INSPECTION_CPP_
8 changes: 8 additions & 0 deletions src/agent/Core/ApplicationPool/Group/Verification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_GROUP_VERIFICATION_CPP_
#define _PASSENGER_APPLICATION_POOL_GROUP_VERIFICATION_CPP_

#ifdef INTELLISENSE
#include <Core/ApplicationPool/Implementation.cpp>
#endif
#include <Core/ApplicationPool/Group.h>

/*************************************************************************
Expand Down Expand Up @@ -158,3 +164,5 @@ Group::verifyNoRequestsOnGetWaitlistAreRoutable() const {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_GROUP_VERIFICATION_CPP_
5 changes: 5 additions & 0 deletions src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_POOL_ANALYTICS_COLLECTION_CPP_
#define _PASSENGER_APPLICATION_POOL_POOL_ANALYTICS_COLLECTION_CPP_

#include <Core/ApplicationPool/Pool.h>

/*************************************************************************
Expand Down Expand Up @@ -191,3 +194,5 @@ Pool::realCollectAnalytics() {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_POOL_ANALYTICS_COLLECTION_CPP_
5 changes: 5 additions & 0 deletions src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_POOL_GARBAGE_COLLECTION_CPP_
#define _PASSENGER_APPLICATION_POOL_POOL_GARBAGE_COLLECTION_CPP_

#include <Core/ApplicationPool/Pool.h>

/*************************************************************************
Expand Down Expand Up @@ -199,3 +202,5 @@ Pool::wakeupGarbageCollector() {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_POOL_GARBAGE_COLLECTION_CPP_
5 changes: 5 additions & 0 deletions src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_POOL_GENERAL_UTILS_CPP_
#define _PASSENGER_APPLICATION_POOL_POOL_GENERAL_UTILS_CPP_

#include <Core/ApplicationPool/Pool.h>

/*************************************************************************
Expand Down Expand Up @@ -237,3 +240,5 @@ Pool::getRandomGenerator() const {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_POOL_GENERAL_UTILS_CPP_
5 changes: 5 additions & 0 deletions src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_POOL_GROUP_UTILS_CPP_
#define _PASSENGER_APPLICATION_POOL_POOL_GROUP_UTILS_CPP_

#include <Core/ApplicationPool/Pool.h>

/*************************************************************************
Expand Down Expand Up @@ -288,3 +291,5 @@ Pool::restartGroupsByAppRoot(const StaticString &appRoot, const RestartOptions &

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_POOL_GROUP_UTILS_CPP_
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef _PASSENGER_APPLICATION_POOL_POOL_INITIALIZATION_AND_SHUTDOWN_CPP_
#define _PASSENGER_APPLICATION_POOL_POOL_INITIALIZATION_AND_SHUTDOWN_CPP_

#include <Core/ApplicationPool/Pool.h>

/*************************************************************************
Expand Down Expand Up @@ -140,3 +143,5 @@ Pool::destroy() {

} // namespace ApplicationPool2
} // namespace Passenger

#endif // _PASSENGER_APPLICATION_POOL_POOL_INITIALIZATION_AND_SHUTDOWN_CPP_
Loading

0 comments on commit 17147bc

Please sign in to comment.