fix(edencommon)

we hardcoded the source url :(
This commit is contained in:
Jacob Heider 2023-12-22 12:26:18 -05:00 committed by Jacob Heider
parent 5cd22964a6
commit d11f61e163
2 changed files with 12 additions and 23 deletions

View file

@ -1,5 +1,5 @@
distributable: distributable:
url: https://github.com/facebookexperimental/edencommon/archive/v2023.06.19.00.tar.gz url: https://github.com/facebookexperimental/edencommon/archive/v{{version.raw}}.tar.gz
strip-components: 1 strip-components: 1
versions: versions:
@ -33,8 +33,5 @@ build:
- -DBUILD_TESTING=OFF - -DBUILD_TESTING=OFF
test: test:
dependencies:
llvm.org: '*'
script:
- clang++ -std=c++17 test.cc -o test -ledencommon_utils -lfolly -lglog - clang++ -std=c++17 test.cc -o test -ledencommon_utils -lfolly -lglog
- ./test | grep test - ./test 1

View file

@ -1,20 +1,12 @@
#include <eden/common/utils/ProcessNameCache.h> #include <eden/common/utils/ProcessInfo.h>
#include <cstdlib> #include <cstdlib>
#include <iostream> #include <iostream>
using namespace facebook::eden; using namespace facebook::eden;
ProcessNameCache& getProcessNameCache() { int main(int argc, char **argv) {
static auto* pnc = new ProcessNameCache; if (argc <= 1) return 1;
return *pnc; int pid = std::atoi(argv[1]);
} std::cout << readProcessName(pid) << std::endl;
return 0;
ProcessNameHandle lookupProcessName(pid_t pid) { }
return getProcessNameCache().lookup(pid);
}
int main() {
int pid = getpid();
std::cout << lookupProcessName(pid).get() << std::endl;
return 0;
}