mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[upstream_utils] Remove ConcurrentQueue (#7183)
It appears to be broken under stress testing (dropped/duplicate values).
This reverts commit 97c6c86f3b (#7066).
This commit is contained in:
5
.github/workflows/upstream-utils.yml
vendored
5
.github/workflows/upstream-utils.yml
vendored
@@ -40,11 +40,6 @@ jobs:
|
||||
cd upstream_utils
|
||||
./argparse_lib.py clone
|
||||
./argparse_lib.py copy-src
|
||||
- name: Run concurrentqueue.py
|
||||
run: |
|
||||
cd upstream_utils
|
||||
./concurrentqueue.py clone
|
||||
./concurrentqueue.py copy-src
|
||||
- name: Run eigen.py
|
||||
run: |
|
||||
cd upstream_utils
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from upstream_utils import Lib
|
||||
|
||||
|
||||
def copy_upstream_src(wpilib_root):
|
||||
wpiutil = os.path.join(wpilib_root, "wpiutil")
|
||||
|
||||
# Copy header into allwpilib
|
||||
dest_filename = os.path.join(
|
||||
wpiutil,
|
||||
f"src/main/native/thirdparty/concurrentqueue/include/wpi/concurrentqueue.h",
|
||||
)
|
||||
shutil.copyfile("concurrentqueue.h", dest_filename)
|
||||
# Rename namespace from moodycamel to wpi
|
||||
with open(dest_filename) as f:
|
||||
content = f.read()
|
||||
content = content.replace("namespace moodycamel", "namespace wpi")
|
||||
content = content.replace("moodycamel::", "wpi::")
|
||||
# The upstream library has macros that would conflict with other thirdparty WPI_ macros
|
||||
content = content.replace("MOODYCAMEL_", "WPI_CQ_")
|
||||
with open(dest_filename, "w") as f:
|
||||
f.write(content)
|
||||
|
||||
|
||||
def main():
|
||||
name = "concurrentqueue"
|
||||
url = "https://github.com/cameron314/concurrentqueue"
|
||||
# master on 2024-09-10
|
||||
tag = "6dd38b8a1dbaa7863aa907045f32308a56a6ff5d"
|
||||
|
||||
expected = Lib(name, url, tag, copy_upstream_src)
|
||||
expected.main()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -195,7 +195,6 @@ install(
|
||||
DIRECTORY
|
||||
src/main/native/include/
|
||||
src/main/native/thirdparty/argparse/include/
|
||||
src/main/native/thirdparty/concurrentqueue/include/
|
||||
src/main/native/thirdparty/expected/include/
|
||||
src/main/native/thirdparty/json/include/
|
||||
src/main/native/thirdparty/llvm/include/
|
||||
@@ -209,7 +208,6 @@ target_include_directories(
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/thirdparty/argparse/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/thirdparty/concurrentqueue/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/thirdparty/expected/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/thirdparty/json/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/main/native/thirdparty/llvm/include>
|
||||
|
||||
@@ -183,9 +183,6 @@ cppHeadersZip {
|
||||
from('src/main/native/thirdparty/argparse/include/') {
|
||||
into '/'
|
||||
}
|
||||
from('src/main/native/thirdparty/concurrentqueue/include') {
|
||||
into '/'
|
||||
}
|
||||
from('src/main/native/thirdparty/expected/include') {
|
||||
into '/'
|
||||
}
|
||||
@@ -241,7 +238,7 @@ model {
|
||||
all {
|
||||
it.sources.each {
|
||||
it.exportedHeaders {
|
||||
srcDirs 'src/main/native/include', 'src/main/native/thirdparty/argparse/include/', 'src/main/native/thirdparty/concurrentqueue/include', 'src/main/native/thirdparty/expected/include', 'src/main/native/thirdparty/fmtlib/include', 'src/main/native/thirdparty/llvm/include', 'src/main/native/thirdparty/sigslot/include', 'src/main/native/thirdparty/json/include', 'src/main/native/thirdparty/memory/include', 'src/main/native/thirdparty/mpack/include', 'src/main/native/thirdparty/protobuf/include'
|
||||
srcDirs 'src/main/native/include', 'src/main/native/thirdparty/argparse/include/', 'src/main/native/thirdparty/expected/include', 'src/main/native/thirdparty/fmtlib/include', 'src/main/native/thirdparty/llvm/include', 'src/main/native/thirdparty/sigslot/include', 'src/main/native/thirdparty/json/include', 'src/main/native/thirdparty/memory/include', 'src/main/native/thirdparty/mpack/include', 'src/main/native/thirdparty/protobuf/include'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,17 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "wpi/concurrentqueue.h"
|
||||
|
||||
TEST(ConcurrentQueueTest, Basic) {
|
||||
wpi::ConcurrentQueue<int> q;
|
||||
q.enqueue(25);
|
||||
|
||||
int item;
|
||||
bool found = q.try_dequeue(item);
|
||||
EXPECT_TRUE(found);
|
||||
EXPECT_EQ(item, 25);
|
||||
}
|
||||
Reference in New Issue
Block a user