Navigation Panes

Can there please be a toggle or setting for hiding/showing the navigation panes? I read these docs with a relatively large font size and the continuous presence of the left and right navigation panes in full screen view is very irritating. It gives me very little space to read the main article, and in that respect is not particularly accessible. I've noticed the page is responsive in that these navigation panes disappear when the page is resized. First the one on the right then the one on the left. However neither of these give enough space to read the main article or allow the superfluous information of the navigation panes to be removed when they are not needed. A toggle would do this. I've tried the PDF version to give me more reading space but this comes with it's own issues. The PDF has 19 pages of scrolling through the documentation's table of contents and the inability to go back if you want to cross reference things by clicking on a link and then going back. Can there be a toggle to hide/show the navigation panes please?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: c165f8e4-d058-27b2-ee9b-1bbed0996f1f
Version Independent ID: faed8bb0-79ef-7af4-5deb-e7645cdf2e39
Content: Introduction to ASP.NET Core
Content Source: aspnetcore/introduction-to-aspnet-core.md
Product: aspnet-core
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Hello @code-mogwai ... We just handle the doc ASP.NET Core content on this repo.
Open your issue at ...
https://github.com/MicrosoftDocs/feedback/issues
... and the managers and engineers there who work on the entire documentation system will see it.


Crashing After Keydown

Expected Behavior
continuously logging all mouse movement and key presses
Current Behavior

starts logging mouse movement and clicks
somewhat of a crash after one key press (not a keyboard shortcut combination, just one key down event)
stops logging but the script does not exit the runtime

Steps to Reproduce (for bugs)
import ioHook from 'ioHook'
ioHook.start(true)

installed and run the above script
move mouse to see logging on console
hit one key and it crashes and stops logging anything

Your Environment

IOHook Version: 0.9.3
Environment: node 14.16
Operating System and version: desktop macOS

This is a duplicate but will keep open because I'm too lazy to go digging right now. Try using node 12. If you can't then try an earlier 0.7.x version,

Same Problem here. Crash after the first keypress. It did not even enter the on keypress part.

Same problem here: I'm trying to upgrade an Electron App v11.x.y and iohook v0.7.2  to electron v12.x.y because Electron v11.x.y is now out of support.
I upgraded Electron to 12.1.0 and iohook to v0.9.3 and updated the iohook build targets to node-83 and electron-87 in line with node v14 and Electron v12. Prebuilt build targets were found and downloaded.
The application worked for mouse clicks but as soon as you click a key the app crashed - see the file attached (two examples of crash output copied from console output).
As for the suggested work arounds: I can't use node v12 because the version of node is tied to the version of Electron and if I want to use a supported version of Electron then v12 is the minimum supported and that's using node v14. I can't downgrade the version of iohook to a v0.7.x as suggested because when I do I get the error that the prebuild packages can't be found (this was from a clean install)
Prebuild for current platform (iohook-v0.7.2-electron-v87-win32-x64) not found!
I might try earlier 0.9.x versions of iohook but as above atlan states the same happens with earlier versions of iohook.
So for now it would appear we are stuck on Electron 11.x.y and iohook 0.7.2
iohook_keydown_elelectron_crashdump.txt


VueCLI forces Jest's testMatch option

Version
3.0.0-beta.6
Reproduction link
https://github.com/Ldoppea/vue-cli-jest-testmatch
Steps to reproduce
Init project with following options :
Vue CLI v3.0.0-beta.6
? Please pick a preset: Manually select features
? Check the features needed for your project: Unit
? Pick a unit testing solution: Jest
? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In package.json
? Save this as a preset for future projects? (Y/n) n

Move /tests/unit/HelloWorld.spec.js in /src/components/
Add testMatch in package.json Jest category :
    "testMatch": [
      "test/**/*.spec.js",
      "src/**/*.spec.js"
    ]

Run npm run test
What is expected?
HelloWorld.spec.js should be tested
What is actually happening?
No test is found by Jest.
Get the following error :
No tests found
In D:\Work\test\vue\testJest
  6 files checked.
  testMatch: D:\Work\test\vue\testJest\(tests\unit\**\*.spec.(ts|tsx|js)|**\__tests__\*.(ts|tsx|js)) - 0 matches
  testPathIgnorePatterns: \\node_modules\\ - 6 matches
Pattern:  - 0 matches
 ERROR  jest exited with code 1.

testMatch still has the value forced by vueCLI

I was able to run my tests from src folder and without using testMatch on<EMAIL_ADDRESS>This commit changed the test detection behavior : https://github.com/vuejs/vue-cli/commit/2c61d236d77dfcb22b4560afe4c957ddf45b4337#diff-17aae08cfc13cba07661681220ddd985 (I do not use typescript)

It appears that the plugin always sets the testMatch to [`--testMatch`, `<rootDir>/(tests/unit/**/*.spec.(ts|tsx|js)|**/__tests__/*.(ts|tsx|js))`] if none is specified via a command line argument, instead of respecting anything set in package.json

What actually makes this slightly worse is that the forced option isn't even a superset of Jests own default. For example, when testing with other Vue applications I've always just suppled a test.js file in the same directory as the component it's testing (less directory hopping, encourages testing at same time as component design, file name is self explanatory, etc.)
With Vue CLI, this doesn't work at all, which I'd consider a regression. Is there any technical reason to force override Jests own default?

That sounds like a sensible solution to me 😇

With my current PR (#1069) that is what I ended up doing. I moved the testMatch pattern over to the generator so that it goes into the package.json or jest.config.js (depending on how the user wants their config files laid out)

Much better solution @dhensche ! 🤘

Thanks @dhensche 👍


Fixes findDOMNode errors for react 18

You can use this meanwhile:
npm i  react-quill@https://github.com/lassespilling/react-quill-2024/tree/package

You can use this meanwhile, added your fix here: npm i react-quill@https://github.com/lassespilling/react-quill-2024/tree/package

Thanks. It works

@lassespilling Thanks for the repo, do you mind publishing a package with your fix? with yarn v1 and I can't use your changes

@lassespilling
yarn add react-quill@https://github.com/lassespilling/react-quill-2024/tree/package
not woriking
error https://github.com/lassespilling/react-quill-2024/tree/package: Extracting tar content of undefined failed, the file appears to be corrupt: "Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?"
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

@lassespilling Thanks for the repo!!
I noticed this library uses 'DOMNodeInserted' events, which are deprecated. Any plans to switch to MutationObserver? Happy to provide more info if needed.
Thanks for maintaining this project!

@lassespilling Thanks for the repo!!
I noticed this library uses 'DOMNodeInserted' events, which are deprecated. Any plans to switch to MutationObserver? Happy to provide more info if needed.
Thanks for maintaining this project!

This would be incredibly helpful! I am currently running into this issue with my use of this repository.
I have not 100% identified the issue within my codebase but I believe the following error in conjunction with custom logic built on top of my React-Quill editor causing content to be wiped from my React-Quill editor when users copy and paste content into the editor.
For context, here is the full console warning for any maintainers 🙏
Deprecation] Listener added for a 'DOMNodeInserted' mutation event. This event type is deprecated, and will be removed from this browser very soon. Usage of this event listener will cause performance issues today, and represents a large risk of future site breakage. Consider using MutationObserver instead. See https://chromestatus.com/feature/5083947249172480 for more information.

use react-quill-new for React 19 support https://www.npmjs.com/package/react-quill-new

use react-quill-new for React 19 support https://www.npmjs.com/package/react-quill-new

This is also not working... Im getting the same error
 [Deprecation] Listener added for a 'DOMNodeInserted' mutation event. Support for this event type has been removed, and this event will no longer be fired. See https://chromestatus.com/feature/5083947249172480 for more information.


CUDA out of memory

Hi there,
I keep getting out of memory issue when attempting to evaluate the models on CoNLl. I've reduced to batch_size=1 and still I'm unable to train as I get the out of memory error. I'm running 8GB Nvidia Quadro RTX 4000, so I should definitely have space in memory for at least 1 batch per it. Do you know what else I can do to reduce required memory during training?
Thank you very much.
Here's the error message as well, in case that helps:

Hi,
You can set the --max_pair_length from 256 to 128, which would get  similiar performance.
Or cut down the --max_seq_length from 512  to 384/256.
Best,
Deming

Thanks Daming.
I tried with --max_pair_length 32 and --max_seq_length 32, however still getting the OOM error only after 6 secs of training. I'm guessing I can't really decrease them much more without significantly decreasing performance as well. Do you have any other ideas?
Best
Dimitar

The actual sequence length =  max_seq_length + max_pair_length*2.  We use a 40GB Nvidia A100 GPU to run the experiments on the large model.  I suggest that you use the roberta-base model instead of the roberta-large model for efficient experiements.

We upload our trained models on flat NER datasets on  Tsinghua Cloud. We can run a trained NER model in a tiny CUDA memory for inference.


ocamlPackages.csv: 2.0 -> 2.1

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/ocaml4.05.0-csv/versions.
meta.description for ocamlPackages.csv is: '"A pure OCaml library to read and write CSV files"'.

Checks done (click to expand)

built on NixOS
/nix/store/qsgm56bg4rjp2ym4px9xbi8m2pwzkwgv-ocaml4.05.0-csv-2.1/bin/csvtool passed the binary check.
1 of 1 passed binary check by having a zero exit code.
0 of 1 passed binary check by having the new version present in output.
found 2.1 with grep in /nix/store/qsgm56bg4rjp2ym4px9xbi8m2pwzkwgv-ocaml4.05.0-csv-2.1
directory tree listing: https://gist.github.com/26aced23444c2a1b488658a7ae000510
du listing: https://gist.github.com/15968b25f980a711d7e169e86f2f21e8

Test this build with Cachix (click to expand)

One time setup in nixpkgs Git checkout:
cachix use r-ryantm
git remote add r-ryantm https://github.com/r-ryantm/nixpkgs.git

Test this build:
git fetch r-ryantm && git checkout d1eeb858f045166bc0f8dd1c15fd753c42306624 && nix-shell --pure -I nixpkgs=. -p ocamlPackages.csv

cc @vbgl for testing.

@GrahamcOfBorg eval

@GrahamcOfBorg build ocamlPackages.csv virt-top

Success on x86_64-linux (full log)
Attempted: ocamlPackages.csv, virt-top
Partial log (click to expand)
make[1]: Leaving directory '/build/virt-top-18a751d/src'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/1dsmrpd9nb6qwpfp7har765gay9iipd4-virt-top-2017-11-18-unstable
shrinking /nix/store/1dsmrpd9nb6qwpfp7har765gay9iipd4-virt-top-2017-11-18-unstable/bin/virt-top
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/1dsmrpd9nb6qwpfp7har765gay9iipd4-virt-top-2017-11-18-unstable/bin
patching script interpreter paths in /nix/store/1dsmrpd9nb6qwpfp7har765gay9iipd4-virt-top-2017-11-18-unstable
checking for references to /build in /nix/store/1dsmrpd9nb6qwpfp7har765gay9iipd4-virt-top-2017-11-18-unstable...
/nix/store/qsgm56bg4rjp2ym4px9xbi8m2pwzkwgv-ocaml4.05.0-csv-2.1
/nix/store/1dsmrpd9nb6qwpfp7har765gay9iipd4-virt-top-2017-11-18-unstable

Success on x86_64-darwin (full log)
Attempted: ocamlPackages.csv
The following builds were skipped because they don't evaluate on x86_64-darwin: virt-top
Partial log (click to expand)
no configure script, doing nothing
building
installing
Processing file csv.install as csv.
post-installation fixup
moving /nix/store/43x9vji0vddafp23mv1nmpv7jf3vqp8y-ocaml4.05.0-csv-2.1/doc to /nix/store/43x9vji0vddafp23mv1nmpv7jf3vqp8y-ocaml4.05.0-csv-2.1/share/doc
strip is /nix/store/qfxcr8c4fg7lkybrny9n2sb77bmippdx-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/43x9vji0vddafp23mv1nmpv7jf3vqp8y-ocaml4.05.0-csv-2.1/lib  /nix/store/43x9vji0vddafp23mv1nmpv7jf3vqp8y-ocaml4.05.0-csv-2.1/bin
patching script interpreter paths in /nix/store/43x9vji0vddafp23mv1nmpv7jf3vqp8y-ocaml4.05.0-csv-2.1
/nix/store/43x9vji0vddafp23mv1nmpv7jf3vqp8y-ocaml4.05.0-csv-2.1

Success on aarch64-linux (full log)
Attempted: ocamlPackages.csv, virt-top
Partial log (click to expand)
make[1]: Leaving directory '/build/virt-top-18a751d/src'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/ka9h79riv7za97k46k539jr8dy87w86z-virt-top-2017-11-18-unstable
shrinking /nix/store/ka9h79riv7za97k46k539jr8dy87w86z-virt-top-2017-11-18-unstable/bin/virt-top
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ka9h79riv7za97k46k539jr8dy87w86z-virt-top-2017-11-18-unstable/bin
patching script interpreter paths in /nix/store/ka9h79riv7za97k46k539jr8dy87w86z-virt-top-2017-11-18-unstable
checking for references to /build in /nix/store/ka9h79riv7za97k46k539jr8dy87w86z-virt-top-2017-11-18-unstable...
/nix/store/4lgv4hjf2rvl78gy7rvy0qwnyhry22cm-ocaml4.06.1-csv-2.1
/nix/store/ka9h79riv7za97k46k539jr8dy87w86z-virt-top-2017-11-18-unstable


Create a User Story Template

As a [role]
I need [function]
So that [benefit]
Details and Assumptions
* [document what you know]

Acceptance Criteria
gherkin
Given [some context]
When [certain action is taken]
Then [the outcome of action is observed]

re-titled the UST


I can't generate API key.debian 12，headscale 0.23

After installing Headscale,an error occurred when attempting to generate API key:
Could not connect: context deadline exceeded error="context deadline exceeded"

Headscale ui is not headscale, you cannot generate an API key directly from the UI. only rotate it.


6.0.0 fails to minify, 5.1.0 and 5.1.1 both do.

I had a new app I tried to work with (using query-string) fail to build with either npm run build or yarn build. Error was
Failed to minify the code from this file:

 	./node_modules/query-string/index.js:8

Read more here: http://bit.ly/2tRViJ9

I've had recent experience with query-string, and no such problems. Even re-building these "older" (~ 2 weeks) projects. I edited package.json to require 5.1.0 and 5.1.1 instead of 6.0.0 and had no such problems; build succeeded.
Mac OSX, yarn 1.5.1, npm 5.6.0, node 9.4.0. Basic settings from create-react-app.

Version 6 is a major release. Please read the release notes.

Duplicate of #126


Stats does not display text

Hi!
I'm using the newest stats version, plugged it according to docs and it seems eveything works, but text. I see graphs that change according to how heavy the computations are but i dont see any text above the graphs - there is just empty space where the text should appear. Is it a known bug or am I doing something wrong.
EDIT: I just checked it under firefox and the texts are there, so it seems like a chrome-related issue. Its a 63.0.3239.70 (Official Build) beta (64-bit) @ Gentoo Linux.

Sounds like a browser issue indeed.
Please, report to Chrome instead.


Change the contents of the documentation with the same as that of readme

REMINDER: we are using mkdocs for the documentation. The deploy is on gh-pages branch while the code is on the documentation branch

I will work on this issue !! Please Assign it to me 🔥

@anushbhatia @smaranjitghose It is ready !! Please Review ☺

This issue is done. You can close this issue @smaranjitghose @anushbhatia sir !!


WrapIt Ex002 Fails

After setting up Ex002 per instructions and running make all, there is a failure. I did not modify the Makefile. Below is the complete terminal output leading up to the failure:
make check_root
make[1]: Entering directory '/home/ben/dev/wrapperTest/ex002-ROOT'
make[1]: Nothing to be done for 'check_root'.
make[1]: Leaving directory '/home/ben/dev/wrapperTest/ex002-ROOT'
./wrapit --force ROOT-generated.wit
/home/ben/miniconda3/envs/rootEnv/include/RtypesCore.h:28:10: 'cstddef' file not found
Warning: failed to determine if some argument of function printValue has a default value. This can happen if the function is defined  with the help of a macro. Support of default argument value disabled for this function.
Warning: failed to determine if some argument of function GetHomeDirectory has a default value. This can happen if the function is defined  with the help of a macro. Support of default argument value disabled for this function.
Warning: failed to determine if some argument of function AddExtraInterpreterArgs has a default value. This can happen if the function is defined  with the help of a macro. Support of default argument value disabled for this function.
Warning: failed to determine if some argument of function printValue has a default value. This can happen if the function is defined  with the help of a macro. Support of default argument value disabled for this function.
Warning: method Build found at /home/ben/miniconda3/envs/rootEnv/include/TF1.h:735:32 skipped because the definition of its class was not found.
Warning: no wrapper will be produced for function 'Info(const char *, const char *, ...)  const' because of lack of support for variadic functions.
Warning: no wrapper will be produced for function 'Warning(const char *, const char *, ...)  const' because of lack of support for variadic functions.
Warning: no wrapper will be produced for function 'Error(const char *, const char *, ...)  const' because of lack of support for variadic functions.
Warning: no wrapper will be produced for function 'SysError(const char *, const char *, ...)  const' because of lack of support for variadic functions.
Warning: no wrapper will be produced for function 'Fatal(const char *, const char *, ...)  const' because of lack of support for variadic functions.

Generated wrapper statictics
  enums:            38
  classes/structs:  59
    templates:      1
    others:         58
  class methods:    1557
  field accessors:  47 getters and 47 setters
  global variable accessors: 10 getters and 7 setters
  global functions: 58

/home/ben/miniconda3/envs/rootEnv/bin/x86_64-conda-linux-gnu-c++ -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/ben/miniconda3/envs/rootEnv/include -std=c++17 -I'/home/ben/.julia/juliaup/julia-1.9.3+0.x64.linux.gnu/include/julia' -fPIC -fmax-errors=3 -O2 -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ben/miniconda3/envs/rootEnv/include -MMD -I /home/ben/miniconda3/envs/rootEnv/include  -c -I /home/ben/.julia/artifacts/88a033de19250acca6784647964d43d7121a06aa/include -std=c++17 -o jlROOT.o jlROOT.cxx
jlROOT.cxx: In function 'void define_julia_module(jlcxx::Module&)':
jlROOT.cxx:1084:30: error: invalid 'static_cast' from type 'void (TObject::*)(std::ostream&, Option_t*)' {aka 'void (TObject::*)(std::basic_ostream<char>&, const char*)'} to type 'void (TObject::*)(int&, Option_t*)' {aka 'void (TObject::*)(int&, const char*)'}
 1084 |   t0.method("SavePrimitive", static_cast<void (TObject::*)(int &, Option_t *) >(&TObject::SavePrimitive));
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jlROOT.cxx: In lambda function:
jlROOT.cxx:1085:80: error: cannot convert 'int' to 'std::ostream&' {aka 'std::basic_ostream<char>&'}
 1085 |   t0.method("SavePrimitive", [](TObject& a, int & arg0)->void{ a.SavePrimitive(arg0); });
      |                                                                                ^~~~
      |                                                                                |
      |                                                                                int
In file included from /home/ben/miniconda3/envs/rootEnv/include/TMatrixTBase.h:69,
                 from /home/ben/miniconda3/envs/rootEnv/include/TMatrixT.h:23,
                 from /home/ben/miniconda3/envs/rootEnv/include/TVectorT.h:23,
                 from jlROOT.h:1,
                 from jlROOT.cxx:7:
/home/ben/miniconda3/envs/rootEnv/include/TObject.h:163:52: note:   initializing argument 1 of 'virtual void TObject::SavePrimitive(std::ostream&, Option_t*)'
  163 |    virtual void        SavePrimitive(std::ostream &out, Option_t *option = "");
      |                                      ~~~~~~~~~~~~~~^~~
jlROOT.cxx: In lambda function:
jlROOT.cxx:1086:81: error: cannot convert 'int' to 'std::ostream&' {aka 'std::basic_ostream<char>&'}
 1086 |   t0.method("SavePrimitive", [](TObject* a, int & arg0)->void{ a->SavePrimitive(arg0); });
      |                                                                                ^~~~
      |                                                                                |
      |                                                                                int
/home/ben/miniconda3/envs/rootEnv/include/TObject.h:163:52: note:   initializing argument 1 of 'virtual void TObject::SavePrimitive(std::ostream&, Option_t*)'
  163 |    virtual void        SavePrimitive(std::ostream &out, Option_t *option = "");
      |                                      ~~~~~~~~~~~~~~^~~
compilation terminated due to -fmax-errors=3.
make: *** [Makefile:60: jlROOT.o] Error 1

It looks like an issue with your compiler installation as it does not find the standard library cstddef. You can check it doing the following test.
cat <<EOF > test.cc
#include <cstddef>
EOF

g++ -c test.cc

If the compilation fails, it will confirm the issue comes your g++ compiler installation.
Philippe.

That compilation test succeeded. Is the issue maybe because root is in a conda env?

Should I be using Clang-11 or a newer version? The readme.md says clang version 11, but not sure if that's just for building wrapit.

I'm having a similar issue, except I'm failing at Ex001.
$ wrapit Hello.wit --force
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/wchar.h:89:10: 'stdarg.h' file not found

Generated wrapper statictics
  enums:            0
  classes/structs:  1
    templates:      0
    others:         1
  class methods:    2
  field accessors:  0 getters and 0 setters
  global variable accessors: 0 getters and 0 setters
  global functions: 0

Any insights/tips/suggestions would be highly appreciated

You can try adding in the wrapit configuration file:
clang_opts      = [  "-resource-dir", "DIR" ]

with DIR replaced by the clang resource directory path you will find by running from your shell the command:
clang -print-resource-dir

Philippe.

With commit  72ae291 explicit setting of resource-dir should not be needed anymore (although tested on Linux but not Max OS X).
@biona001, @termi-official, if you can try, please confirm you don't need to set resource-dir anymore.

On mac, I'm still getting the same error:
$ git clone https://github.com/grasph/wrapit
$ cd wrapit/examples/ex001-HelloWorld/
$ wrapit Hello.wit --force
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/wchar.h:89:10: 'stdarg.h' file not found

Generated wrapper statictics
  enums:            0
  classes/structs:  1
    templates:      0
    others:         1
  class methods:    2
  field accessors:  0 getters and 0 setters
  global variable accessors: 0 getters and 0 setters
  global functions: 0

Setting resource-dir fixes the problem as before.
I didn't test on linux.

Thanks for the report. Could you run with -v 1 option, which will display the resource directory selected automatically, and compare it with the one you use when you set it in the configuration file?
The first commit I sent had a problem, can you confirm you use  5ad6702 ?

Also fails for me unfortunately
julia> include("runtests.jl")
make: Entering directory '/home/dogiermann/Repos/wrapit/test/TestSizet'
rm -f libTestSizet/libjlTestSizet.so libTestSizet/src/jlTestSizet.cxx libTestSizet/src/jlTestSizet.h TestSizet/src/TestSizet.jl -r libTestSizet/build jlTestSizet-report.txt libTestSizet/build/jlTestSizet.o  libTestSizet/build/jlTestSizet.d
[ -d libTestSizet/src ] && cd libTestSizet/src && rm -f  dbg_msg.h  generated_cxx  Wrapper.h || true
rmdir -p libTestSizet/src TestSizet/src 2>/dev/null || true
make all && . ./setup.sh && julia runTestSizet.jl
make[1]: Entering directory '/home/dogiermann/Repos/wrapit/test/TestSizet'
/home/dogiermann/Repos/wrapit/build/wrapit -v 1 --force TestSizet.wit
Clang resource directory: /home/dogiermann/Repos/wrapit/lib/clang/13.0.1
WARNING: file '/home/dogiermann/Repos/wrapit/lib/clang/13.0.1/include/stddef.h' was not found. Please check the clang resource directory is set properly: see clang manual and use wrapit clang_opts parameter to pass options to clang.
Clang options:
	-x
	c++-header
	-std=c++17
	-I
	.
	-I
	/home/opt/llvm-dev/include/c++/v1/
	-resource-dir
	/home/dogiermann/Repos/wrapit/lib/clang/13.0.1

/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../include/c++/13.2.1/cstddef:50:10: 'stddef.h' file not found

Generated wrapper statictics
  enums:            0
  classes/structs:  0
    templates:      0
    others:         0
  class methods:    0
  field accessors:  0 getters and 0 setters
  global variable accessors: 0 getters and 0 setters
  global functions: 1

[ -d libTestSizet/build ] || mkdir libTestSizet/build
/home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/bin/clang++ -I'/home/dogiermann/Tools/julia-1.9.4/include/julia' -fPIC -Wno-unused-variable -Wno-unused-but-set-variable -fmax-errors=3 -I. -MMD  -c -I /home/dogiermann/.julia/artifacts/8dbf3a116981de15f84137eda9d8c478f57d07a9/include -std=c++20 -o libTestSizet/build/jlTestSizet.o libTestSizet/src/jlTestSizet.cxx
clang-13: warning: argument unused during compilation: '-fmax-errors=3' [-Wunused-command-line-argument]
libTestSizet/src/jlTestSizet.cxx:20:19: error: static_cast from 'size_t (*)()' (aka 'unsigned long (*)()') to 'int (*)()' is not allowed
    t.method("f", static_cast<int (*)() >(&f));
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [../make.rules:40: libTestSizet/build/jlTestSizet.o] Error 1
make[1]: Leaving directory '/home/dogiermann/Repos/wrapit/test/TestSizet'
make: *** [../make.rules:50: test] Error 2
make: Leaving directory '/home/dogiermann/Repos/wrapit/test/TestSizet'
TestSizet: Test Failed at /home/dogiermann/Repos/wrapit/test/runtests.jl:11
  Expression: begin
    try
        run(`make -C $t clean test`)
        true
    catch
        false
    end
end

Stacktrace:
 [1] macro expansion
   @ ~/Tools/julia-1.9.4/share/julia/stdlib/v1.9/Test/src/Test.jl:478 [inlined]
 [2] macro expansion
   @ ~/Repos/wrapit/test/runtests.jl:11 [inlined]
 [3] macro expansion
   @ ~/Tools/julia-1.9.4/share/julia/stdlib/v1.9/Test/src/Test.jl:1498 [inlined]
 [4] macro expansion
   @ ~/Repos/wrapit/test/runtests.jl:11 [inlined]
 [5] macro expansion
   @ ~/Tools/julia-1.9.4/share/julia/stdlib/v1.9/Test/src/Test.jl:1498 [inlined]
 [6] top-level scope
   @ ~/Repos/wrapit/test/runtests.jl:9

Due to a  bug in 5ad6702 clang resource directory was set only if verbosity level was set to 1 or above. Commit 176af5a fixes this and various issues with MacOS.
@termi-official, is  /home/dogiermann/Repos/wrapit/lib/clang/13.0.1 the path you provide as resource directory when you set it explicitly ? The wrapit logs report that the file /home/dogiermann/Repos/wrapit/lib/clang/13.0.1/include/stddef.h is missing, while this file is included in the tarball released by the LLVM team for darwin, https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.3/clang+llvm-16.0.3-arm64-apple-darwin22.0.tar.xz . With -v 2 the clang search directory list for header file is displayed in the logs.  One of these directories must contain the stddef.h file for the Sizet test to work.

Thanks for working on this. No, I have not passed any resource directly explicitly here. I just executed the tests of wrapit locally. Explicitly setting the resource directory works, tho.
> clang -print-resource-dir
/home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/clang/13.0.1

I can still see the same failure on https://github.com/grasph/wrapit/commit/176af5a89d7da56630253915cf16b226ee4aee14 . I think the issue here is might be related to using spack (which I have to load into a shell to function correctly) instead of using the system's LLVM. However, the latter is no option because on arch based system the clang tooling is not provided (IIUC).
Maybe it makes sense to just error early with a printout of the current resource directory and the option that it might need to be set manually in some cases?

Sure, I tried again with the -v 1 option on mac:
$ git clone https://github.com/grasph/wrapit
$ cd wrapit
$ git reset --hard 5ad6702
HEAD is now at 5ad6702 follow-up of commit 72ae2

$ cd examples/ex001-HelloWorld/
$ wrapit Hello.wit -v 1
Clang options:
	-x
	c++-header
	-std=c++17
	-I
	.

/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/wchar.h:89:10: 'stdarg.h' file not found

In contrast, the resource directory uses
$ clang -print-resource-dir
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0

I'm not familiar with these resource directories, but hope that helps.

Hello @termi-official . Having to set the resource directory by hand in special cases it's indeed fine. Nevertheless, I don't understand while the automatic setting does not work in your case. I've tried to install llvm+clang with spack to reproduce the issue, but I have some issue with spack preventing the installation. Could you do the following:

provide the output of which clang, ldd `which clang` , ldd `which wrapit`
check if you have a clang executable in /home/dogiermann/Repos/wrapit/bin. If so, can you tell what is the output of /home/dogiermann/Repos/wrapit/bin/clang -print-resource-dir ?

Philippe.

First the output after spack load llvm@13
> which clang
/home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/bin/clang
> ldd `which clang`
	linux-vdso.so.1 (0x00007ffff97ec000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007fd0af92a000)
	libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007fd0af8b3000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fd0a8400000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007fd0a8713000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fd0af88c000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007fd0a821e000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fd0af984000)
> which wrapit
wrapit: aliased to /home/dogiermann/Repos/wrapit/build/wrapit
> ldd wrapit
	linux-vdso.so.1 (0x00007ffdd38cd000)
	libclang.so.13 => /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libclang.so.13 (0x00007fa2ff000000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007fa2fef13000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007fa303089000)
	libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007fa303012000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fa2fec00000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fa2feeee000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007fa2fea1e000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fa3030e3000)

The path /home/dogiermann/Repos/wrapit/bin/ does not exist on my system.
For a fresh shell I get
> which clang
/usr/bin/clang
> ldd `which clang`
	linux-vdso.so.1 (0x00007ffc662de000)
	libclang-cpp.so.16 => /usr/lib/libclang-cpp.so.16 (0x00007feee8200000)
	libLLVM-16.so => /usr/lib/libLLVM-16.so (0x00007feedfe00000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007feedfa00000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007feedf81e000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007feeeb76d000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007feeeb748000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007feeeb8c0000)
	libffi.so.8 => /usr/lib/libffi.so.8 (0x00007feeeb73b000)
	libedit.so.0 => /usr/lib/libedit.so.0 (0x00007feeeb6ff000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007feeeb6e5000)
	libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007feedfd2d000)
	libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007feedfcb6000)
	libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007feedf6b8000)
	liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007feeeb6b0000)
	libicuuc.so.73 => /usr/lib/libicuuc.so.73 (0x00007feedf400000)
	libicudata.so.73 => /usr/lib/libicudata.so.73 (0x00007feedd400000)

Thanks @termi-official . Are you sure you were in the same conditions when you made the test reported in this comment?

Yes. I tried again on 176af5a89d and can still reproduce. Here my full command line
    ~/Repos/wrapit/build    main !4 ?30  . /home/dogiermann/Repos/spack/share/spack/setup-env.sh                                                                                 INT ✘                                                                                   ~/Repos/wrapit/build    main !4 ?30  spack load<EMAIL_ADDRESS>                                                                                 ✔
    ~/Repos/wrapit/build    main !4 ?30  make clean                                                                                 ✔
    ~/Repos/wrapit/build    main !4 ?30  make -j8                                                                                 ✔
[  0%] Built target version
[ 11%] Building CXX object CMakeFiles/wrapit.dir/src/CodeTree.cpp.o
[ 22%] Building CXX object CMakeFiles/wrapit.dir/src/TypeRcd.cpp.o
[ 33%] Building CXX object CMakeFiles/wrapit.dir/src/libclang-ext.cpp.o
[ 44%] Building CXX object CMakeFiles/wrapit.dir/src/utils.cpp.o
[ 55%] Building CXX object CMakeFiles/wrapit.dir/src/FunctionWrapper.cpp.o
[ 66%] Building CXX object CMakeFiles/wrapit.dir/src/main.cpp.o
[ 77%] Building CXX object CMakeFiles/wrapit.dir/version.cpp.o
[ 88%] Linking CXX executable wrapit
[100%] Built target wrapit
    ~/Repos/wrapit/build    main !4 ?30  alias wrapit=$HOME/Repos/wrapit/build/wrapit                                                                                 ✔  12s 
    ~/Repos/wrapit/build    main !4 ?30  cd ../test                                                                                 ✔
    ~/Repos/wrapit/test    main !4 ?30  julia                                                                                 ✔
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.4 (2023-11-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> include("runtests.jl")
make: Entering directory '/home/dogiermann/Repos/wrapit/test/TestSizet'
rm -f libTestSizet/libjlTestSizet.so libTestSizet/src/jlTestSizet.cxx libTestSizet/src/jlTestSizet.h TestSizet/src/TestSizet.jl -r libTestSizet/build jlTestSizet-report.txt libTestSizet/build/jlTestSizet.o  libTestSizet/build/jlTestSizet.d
[ -d libTestSizet/src ] && cd libTestSizet/src && rm -f jlTestSizet.cxx jlTestSizet.cxx dbg_msg.h  generated_cxx  Wrapper.h || true
rmdir -p libTestSizet/src TestSizet/src 2>/dev/null || true
make all && . ./setup.sh && julia runTestSizet.jl
make[1]: Entering directory '/home/dogiermann/Repos/wrapit/test/TestSizet'
/home/dogiermann/Repos/wrapit/build/wrapit -v 1 --force TestSizet.wit
Clang resource directory: /home/dogiermann/Repos/wrapit/lib/clang/13.0.1
WARNING: file '/home/dogiermann/Repos/wrapit/lib/clang/13.0.1/include/stddef.h' was not found. Please check the clang resource directory is set properly: see clang manual and use wrapit clang_opts parameter to pass options to clang.
Clang options:
	-x
	c++-header
	-std=c++17
	-I
	.
	-I
	/home/opt/llvm-dev/include/c++/v1/
	-resource-dir
	/home/dogiermann/Repos/wrapit/lib/clang/13.0.1

/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../include/c++/13.2.1/cstddef:50:10: 'stddef.h' file not found

Indeed, I would expect the directory discovery to work in these conditions. Indeed, the path is built from the path of the libclang.so library wrapit is dynamically linked to. From the ldd `which wrapit` output the latter is,

The failure is here https://github.com/grasph/wrapit/blob/0126efb1fb9852fc6d6bbd784d4149274c640afc/src/utils.cpp#L114-L122 . dli_fname contains the path in which I have built wrapit and not the clang binary path. Checking this manually I can confirm that clang_getCursorType is in my wrapit executable due to static linking - turns out I only have the static libraries for tooling (which is the default for the spack llvm package).

I think if the path should be fixed like this, then it is just possible to grab the resource path in cmake, generate a file with the path as a constant, and access this constant during runtime.

I see. I hadn't considered the case of a static link.
From the ldd `which wrapit`  output it looks like it is dynamically linked to  /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libclang.so.13.
Could it be that it is linked twice, statically and dynamically?
It's standard to have the LibTooling libraries, apart from libclang, statically linked. clang_getCursor comes from libclang library, which the code is assuming to be dynamically linked.

From the ldd `which wrapit` output it looks like it is dynamically linked to  /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libclang.so.13.
Could it be that it is linked twice, statically and dynamically?
It's standard to have the LibTooling libraries, apart from libclang, statically linked. clang_getCursor comes from libclang library, which the code is assuming to be dynamically linked.

Good point. Doesn't seem to be the case tho that it gets statically linked, which wonders me. Running the make command verbose gives me the following information for the linking step:
/home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/bin/clang++ -rdynamic CMakeFiles/wrapit.dir/src/TypeRcd.cpp.o CMakeFiles/wrapit.dir/src/utils.cpp.o "CMakeFiles/wrapit.dir/src/libclang-ext.cpp.o" CMakeFiles/wrapit.dir/src/FunctionWrapper.cpp.o CMakeFiles/wrapit.dir/src/CodeTree.cpp.o CMakeFiles/wrapit.dir/src/main.cpp.o CMakeFiles/wrapit.dir/version.cpp.o -o wrapit  /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libclang.so.13.0.1 /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libclangAST.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libclangDriver.a -ldl /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libclangLex.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMFrontendOpenMP.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMTransformUtils.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMAnalysis.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMObject.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMBitReader.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMMCParser.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMMC.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMDebugInfoCodeView.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMTextAPI.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libclangBasic.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMOption.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMProfileData.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMCore.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMBinaryFormat.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMRemarks.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMBitstreamReader.a /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMSupport.a -lrt -ldl -lm /usr/lib/libz.so -ltinfo /home/dogiermann/Repos/spack/opt/spack/linux-manjaro21-zen/gcc-11.2.0/llvm-13.0.1-ujjeg2kym5yi5vzurktjtknit5xexaow/lib/libLLVMDemangle.a

where I don't see anything obviously wrong.
My local patch for the resource directory is
std::string get_resource_dir(){
  std::string p = get_so_path("libclang.dll", reinterpret_cast<void*>(clang_getCursorType));
  if(p.size() == 0){
    std::cout << "get_resource_dir 1:" << p << std::endl;
    return p;
  } else{
    std::string custom_resource_dir("");
    auto dir = clang::driver::Driver::GetResourcesPath(p, custom_resource_dir);
    std::cout << "get_resource_dir 2:" << p << " | " << dir << std::endl;
    return dir;
  }
}

and the corresponding output is
julia> include("runtests.jl")
make: Entering directory '/home/dogiermann/Repos/wrapit/test/TestSizet'
rm -f libTestSizet/libjlTestSizet.so libTestSizet/src/jlTestSizet.cxx libTestSizet/src/jlTestSizet.h TestSizet/src/TestSizet.jl -r libTestSizet/build jlTestSizet-report.txt libTestSizet/build/jlTestSizet.o  libTestSizet/build/jlTestSizet.d
[ -d libTestSizet/src ] && cd libTestSizet/src && rm -f jlTestSizet.cxx jlTestSizet.cxx dbg_msg.h  generated_cxx  Wrapper.h || true
rmdir -p libTestSizet/src TestSizet/src 2>/dev/null || true
make all && . ./setup.sh && julia runTestSizet.jl
make[1]: Entering directory '/home/dogiermann/Repos/wrapit/test/TestSizet'
/home/dogiermann/Repos/wrapit/build/wrapit -v 1 --force TestSizet.wit
get_resource_dir 2:/home/dogiermann/Repos/wrapit/build/wrapit | /home/dogiermann/Repos/wrapit/lib/clang/13.0.1
Clang resource directory: /home/dogiermann/Repos/wrapit/lib/clang/13.0.1
WARNING: file '/home/dogiermann/Repos/wrapit/lib/clang/13.0.1/include/stddef.h' was not found. Please check the clang resource directory is set properly: see clang manual and use wrapit clang_opts parameter to pass options to clang.
Clang options:
	-x
	c++-header
	-std=c++17
	-I
	.
	-I
	/home/opt/llvm-dev/include/c++/v1/
	-resource-dir
	/home/dogiermann/Repos/wrapit/lib/clang/13.0.1

/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../include/c++/13.2.1/cstddef:50:10: 'stddef.h' file not found
...

However, I am able to fix this problem locally if I compile wrapit with PIC enabled. Not really sure what exactly is going on. This seems to be reproducible by others https://stackoverflow.com/questions/24045131/why-does-dladdr-return-a-path-to-the-executable-on-position-independent-code-on .

Excellent finding! A bug of dladdr on Linux according to its man page.
I've modified CMakeLists.txt to compile with -fPIE, it's on the current HEAD 59cc196.
Let me know if it works out of the box now.
Thanks.
Philippe.

Discovery of the path at run time does not work with clang installed with Debian package system.  Moved to a path discovered or set by the user at build time.  Commit with this change: b2b9b04.

The tests pass locally on my machine now (16184b8).


Revisiting global variable issues and ask for advice dealing with large amount of global data

This ticket will revisit #840 and #860. In #840 I was complaining about global section got loaded multiple times; the solution is to make them shared. This led to #860 a situation where shared does not work, though there is a workaround and we closed that ticket. However for situations like this:
[global]
data = yaml.load(...)

[default]
depends: data['some_file']

the shared option will not work. So data has to be global variable. The problem is, what if yaml.load results in a constant but has huge amount of data and gets loaded at every actual workflow steps? This is a waste of resource, as already been a problem in my applications. I do not know a way to get around it ...

SoS executes steps in separate processes so there has to be some way to pass data from master to workers, and pickle is not necessarily faster than yaml.load.

I see. It looks like there is no truly "global" variable by design -- that each separate process will read data from disk, even if I put data in sos_dict['CONFIG'] somehow?

sos_dict is pickled between processes, which are supposedly done via ram but could use disk (pipe etc) for large data. If you are concerned on performance, perhaps you can benchmark reading the same data from pickle, marshal, which can be faster than yaml.load.


please describe interface for reporting errors

In #261 I described an error occurred during profile update. The response was this error object:
errors: Array(1)
0:
user:
baddata: "curatoryGroupIds"
code: null
message: "user test3 is not allowed to change property curatoryGroupIds of user test3"
It seems that a response can answer with several errors found. It starts with user, should be profile?
A short description of the error response would be helpful.

the error map is supposed to follow the rules outlined by Moritz:
errors: [
    propertyName: [
        message: "errorText",
        code: errorIndex,
        baddata: wrongValueOfProperty
    ]
]

the top-level array is introduced by mistake - I'll change that.


Intel RealSense Viewer / Depth Quality Tool has crashed with the following error message:

librealsense
2.38.1 RELEASE

OS
Windows

Intel RealSense Viewer / Depth Quality Tool has crashed with the following error message:
Unhandled exception escaping from a worker thread!
Error type: Access Violation!

@wykasz , can you provide log/screenshots and describe the flow that triggered that error.
Additionally please attach the camera info generated with rs-enumerate-devices -c

Hi
It happend during the first start of the Intel.RealSense.Viewer.exe app.
The device was connected to usb 2.0 port of lenovo e490 notebook with Windows 10 pro.
After that i've tested it under usb.30 and it happend again.
Write now the device works with usb 2.0 but connetcing it to usb 3.0 triggers that error all the time, making the device unusable.
I've attached screenshots below.

I'll be happy to send you logs, if You just could tell me where i can find them.
rs-enumerate-devices tool unser usb 3.0 fails
./rs-enumerate-devices -c

29/08 20:59:48,468 ERROR [20300] (types.h:313) hr returned: HResult 0x800706be:
"Zdalne wywo┼éanie procedury nie powiod┼éo si─Ö."
Could not create device - hr returned: HResult 0x800706be: "Zdalne wywo┼éanie pr
ocedury nie powiod┼éo si─Ö." . Check SDK logs for details

Under usb 2.0 it returns that
rs-enumerate-devices_output.txt
Regards

@wykasz Which RealSense camera you are using?

Sorry, D435i

@wykasz , the attached log file provides details enumeration with USB3.
And in the first attached screenshot, the connection type is shown as USB2 (in the upper right) - Can you clarify whether the situation occurs under USB2 or USB3?
Additionally, from the log I can see that the Firmware version used <IP_ADDRESS> is rather old (Jan 2019).
Can you upgrade to the latest recommended Firmware using Realsense-Viewer and then try to re-enumerate it with USB2 port ?
It could have been the case with USB2 support for D435i in that particular version.

@wykasz, did you manage to upgrade the FW to the (minimal) recommended version ?

Hi @wykasz, Do you need further help on this? If we don't hear from you in 7 days, this issue will be closed.


Summation of Values Issue - ImportExcel/ExportExcel

Hello, this is my first comment on Github and I am newer to PowerShell so please bare with me.... I am creating a pivot table on the same excel workbook as the raw data and am dealing with the summation of the values. It is putting the summation into rows and I need it in columns, is there anyway to programmatically move it from rows to columns?
See the two pictures below if I explained things poorly....

-Thank you!!

Are you generating this with PowerShell and the ImportExcel module? Or is this a general Excel question?


Add backend option for Fastly C@E plus an example

This PR makes the upstash-redis node module compatible with Fastly C@E.
The key change made here is allowing the user to specify a backend variable which is passed as part of RequestInit to fetch(). Fastly requires this for making outbound requests in C@E.
I have also included an example in the examples directory.

@enesakar Can you confirm the failing test here is a problem in this change?

@williamoverton We are planning a more generic solution which will enable users to add any config object to the fetch.

👍 https://github.com/upstash/upstash-redis/pull/17


Adding support for the redirect action

Example Usage:
 SecRule REQUEST_URI "/redirect" \
      "phase:1,id:1,status:302,redirect:https://www.example.com"

closes #144

[X] My code includes positive and negative tests.
[X] I have an appropriate description with correct grammar.
[X] I have read Contribution guidelines, maintainers note and Quality standard.

Thanks for your PR :heart:

PR superseded by https://github.com/corazawaf/coraza/pull/290


ChatGPT response for issue 4

Adding a file containing the ChatGPT response for issue 4:
import random
List of haikus
haikus = [
"Autumn moonlight,\na worm digs silently\ninto the chestnut\n",
"Winter solitude -\nin a world of one color\nthe sound of wind\n",
"Cherry blossoms bloom,\nSoftly falling on the ground;\nSpringtime has arrived.\n",
"Green grass, tall tree, birds\nSing sweetly as flowers bloom\nSummer is now here\n"
]
Generate random index to select a haiku
random_index = random.randint(0, 3)
Print the selected haiku
print(haikus[random_index])

Closes #4

Closes #4


fix(swagger): fix resolved swagger ui asset path for ESM version

Closes: #2683
Information

Type
Breaking change

Fix
No

fix the swagger ui asset path resolved for ESM version

Summary by CodeRabbit

Refactor

Improved the integration of Swagger UI by refining the path configuration, enhancing the accessibility and reliability of API documentation.

:tada: This PR is included in version 7.68.3 :tada:
The release is available on:

v7.68.3
GitHub release

Your semantic-release bot :package::rocket:


Exceptions in whoosheer doesnt unlock lock file

In an insert_foo/update_foo/delete_foo method, if the code throws, the writer isn't cancelled and the lock file isn't unlocked.

Yup, definitely a bug. Will fix it, thanks for the report.

Released in https://pypi.org/project/flask-whooshee/0.7.0/


failwithf doesn't really work inside of async

let f x  =
  async {
    try

      return 24
    with
    | exn -> failwithf "test %s" x
  }

Workaround
let f x  =
  async {
    try

      return 24
    with
    | exn -> failwithf "test %s" x
             return 0
  }

This is by design though a better error message may make sense. failwithf is being used as a statement of type unit.  The normal formulation is
return! failwith "abc"

likewise for failwithf

Nice. Is this documented somewhere?

@forki Not specifically.  Perhaps add it to the docs.microsoft.com page for F# async, or for failwith, or both?


The current value is always 0

I setup the SQS based externalmetrics but No metrics coming in even there is no error in the HPA description or the cloudwatch-adapter. Have done tons of tempts of changing still no clues.
externalmetrics
apiVersion: metrics.aws/v1alpha1
kind: ExternalMetric
metadata:
  name: push-ml-coordinator-queue-dev
  namespace: sn-push
spec:
  name: push-ml-coordinator-queue-dev
  queries:
    - id: sqs_sn_push_ml_coordinator_queue_dev
      metricStat:
        metric:
          dimensions:
            - name: QueueName
              value: "sn_push_user_incoming_queue_dev"
          metricName: "ApproximateNumberOfMessagesVisible"
          namespace: "AWS/SQS"
        period: 60
        stat: Average
        unit: Count
      returnData: true
  resource:
    resource: "deployment"

HPA
Labels:                                                    <none>
kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta1
metadata:
  name: coordinator-hpa
  namespace: sn-push
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: sn-push-ml-coordinator
  minReplicas: 1
  maxReplicas: 4
  metrics:
  - type: External
    external:
      metricName: push-ml-coordinator-queue-dev
      targetAverageValue: 10

HPA Description
Name:                                                      coordinator-hpa
Namespace:                                                 sn-push
Labels:                                                    <none>
Annotations:                                               <none>
CreationTimestamp:                                         Fri, 11 Sep 2020 12:02:21 +0800
Reference:                                                 Deployment/sn-push-ml-coordinator
Metrics:                                                   ( current / target )
  "push-ml-coordinator-queue-dev" (target average value):  0 / 10
Min replicas:                                              1
Max replicas:                                              4
Deployment pods:                                           1 current / 1 desired
Conditions:
  Type            Status  Reason            Message
  ----            ------  ------            -------
  AbleToScale     True    ReadyForNewScale  recommended size matches current size
  ScalingActive   True    ValidMetricFound  the HPA was able to successfully calculate a replica count from external metric push-ml-coordinator-queue-dev(nil)
  ScalingLimited  True    TooFewReplicas    the desired replica count is less than the minimum replica count

Cloudwatch Adapter logs snippet
I0911 05:57:25.228094       1 handler.go:69] externalMetricInfo: &{{ } {push-ml-coordinator-queue-dev  sn-push /apis/metrics.aws/v1alpha1/namespaces/sn-push/externalmetrics/push-ml-coordinator-queue-dev fa008218-8423-41bd-a535-6168223aad9a 165916796 1 2020-09-11 04:01:27 +0000 UTC <nil> <nil> map[] map[] [] []  []} {push-ml-coordinator-queue-dev [{  sqs_sn_push_ml_coordinator_queue_dev  {{[{QueueName sn_push_user_incoming_queue_dev}] NumberOfEmptyReceives AWS/SQS} 60 Average Count} true}]}}
I0911 05:57:25.228226       1 handler.go:114] adding to cache item 'push-ml-coordinator-queue-dev' in namespace 'sn-push'
I0911 05:57:25.228230       1 controller.go:122] successfully processed item '{sn-push/push-ml-coordinator-queue-dev ExternalMetric}'

If you need any further information. Please do let me know.

Validate that the metric is returning data points using the cli to get the range you are expecting:
aws cloudwatch get-metric-statistics --metric-name ApproximateNumberOfMessagesVisible --start-time 2020-09-12T01:00:00z --end-time 2020-09-12T01:10:00z --period=60  --namespace AWS/SQS --statistics Average --dimensions Name=QueueName,Value=sn_push_user_incoming_queue_dev --unit Count
If you get a response that has data points then that is good. If not then I would adjust the period, unit, and dimensions until you have results returned in the Datapoints response.
CloudFront API is finicky and if you request a period that is less then your reporting span then you just a response with an empty set.  The is translated into the 0 you are seeing.
Also you can enable the DEBUG=true env var and that will show the results of the AWS call; but I find it faster to use the aws cli and just keep testing until I have the parameters working and then plug that in the deployment.yaml.

Thank you so much roy! Let me try first to tune the period. As for the DEBUG=true you mean the env var configured in  cloudwatch-adapter deployment right?

@roycollins I've tried to tune the period to  get the data points from aws-cli  but the external metrics's currentValue is still zero. Do you have other ideas?

It seems the metrics namespace and dimensions are correct.  You can confirm that using the aws cloudwatch list-metrics command and verifying the metric you are looking for is in the list.  I would double check the value you have for the QueueName.
I would also check the cloudwatch metrics in the AWS console and add that metric to your graph.  If there is no data coming across on the console then there is nothing for the External metric to pick up.
You could also try other statistics in the metric to see if any of them are reporting data.
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-available-cloudwatch-metrics.html
But until you see data in the Datapoints response from the command everything else downstream will not matter.

@roycollins Thank you so much for your reply! I think I may explain something wrong here sorry about the misunderstanding.

I could get the data points from aws cloudwatch cli, which looks pretty good as expected.
But when I apply to the externalmetrics, then nothing happens.
I tried various of metrics for SQS but none of them could actually trigger the hpa
From the code reading, I think mostly probably is that the cloudwatch-adapter did not get the datapoint and return with 0 as your previous explanation.

Any advices are mostly welcome here. I am desperately trying everything.

@sangreal I would suggest you adding the DEBUG=true environment variable to see the actual CloudWatch API request and response from the adapter logs, that way we can understand if the issue is in the query or something else.

After checking, the root cause is the IAM permission issue. Will close the issue here. Thanks @roycollins 's help.


Update code owners to include Team DevEx 🍉

Team Github is now Team DevEx! 🦖

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


HBASE-28460 Full backup restore failed on empty HFiles

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 37s
Docker mode activated.


Update BGQ host-configs

The current bgq host-configs are not compatible with our newest version of conduit and need to be regenerated.

I thought we were dropping support for BG/Q, since it is going away (soon?).

That's fine with me.
But if we're dropping it, we should do it properly, e.g. remove it from our scripts and automated builds.
In this case, it was (relatively) straightforward to fix the host-config, so I did.
@rhornung67, @cyrush or others?

I know several applications have stopped testing on BG/Q systems entirely and only support it to the extent that a few users are still using it for limited work. If it's working for us now, I think we should leave it until it formally goes away.


[BUG] MappingFieldResp struct is not parsed correctly.

What is the bug?
MappingFieldResp struct is not parsed correctly.
How can one reproduce the bug?

It should parse the data correctly
What is your host/environment?
Linux
Do you have any additional context?
The issue is that there is an additional Indices field which is there inside the struct which is not allowing the response to be parsed properly.
Here: https://github.com/opensearch-project/opensearch-go/blob/6836d76494fa993ba7874b2f1762993a5ffaf40f/opensearchapi/api_indices-mapping.go#L63, we need to pass data.Indices instead of data.
I am not sure how the unit tests are passing. But it seems like a pretty straightforward bug to me.
EDIT: Something like this works:

var mappingFieldResp map[string]struct {
  Mappings json.RawMessage `json:"mappings"`
}
httpResp, err := es.client.Client.Do(ctx, &opensearchapi.MappingFieldReq{
  Fields:  []string{"type"},
  Indices: []string{indexName},
}, &mappingFieldResp)

Looks like a miss. Want to fix it here?
Also note that we would like to generate the client from spec to catch all this kind of problems (#284), so would be great to check the spec for correctness for this API.

I can, but currently I have a workaround so it's not urgent for me. I'll see if I can find some time.


introducing numamessage abstractions

Explain what this PR does.
Introducing a numamessage interface that exposes functions to set and retrieve necessary fields on any message processed by the numaflow platform. Intention is to hide away the internal details of envelope structs that are used today for platform processing. for example isb.Message struct can implement numaflow interface.
This will allow us to introduce additional structs with only the necessary state.

There are a few reasons why i believe we need this abstraction

adding/deleting struct fields should not require us to change unrelated functions that dont own the struct.
adding a new message thats appropriate for the context (for example a Read message makes sense only in the Reader context). beyond that offsets or watermark is not required.
with an interface, introducing a new struct becomes fairly trivial and the struct implementation can be opinionated about the behavior of different methods in the interface.
interface aligns pretty closely with the primitives in a data pipeline (defined by the pipeline model) and the anticipation is almost no changes.
There is some transformation expected at the points where data is exchanged and i believe that is an added advantage instead of forcing every system to align with one representation that keeps on growing with the addition of new attributes and behaviors.
in other words, we can define structs that are appropriate to the context instead of trying to force all the components to align with one uber struct which makes the system that is modular but is joined at the hip by the contract enforced by this uber struct.

i am not opinionated about how we name this struct. we can definitely rename it to something appropriate like a data record, or event or something similar.

please add Ack() also to interface.

Can you refactor current code with a new implementation? I'd love to see how it looks like.

I. believed this one has been merged in another PR, can we close it? @ashwinidulams


Add json extension to require.

I'm attempting to use this module as a dependency elsewhere and the changed line here fails with Node 10.x.

@dmitrizagidulin do you understand why/how CI is passing on master without this patch?

@mattcollier Hmmm no, I'm not sure. The CI jobs that are passing on master are on Node 10.15 - which version node is failing for you?

@mattcollier json support was added to require at some point.
from the api:

File Modules#
If the exact filename is not found, then Node.js will attempt to load the required filename with the added extensions: .js, .json, and finally .node.
https://nodejs.org/api/modules.html#modules_file_modules

this goes all the way back to 0.12:
https://nodejs.org/docs/latest-v0.12.x/api/modules.html#modules_file_modules
oh wait even earlier:
https://nodejs.org/docs/latest-v0.10.x/api/modules.html#modules_file_modules

@aljones15 thanks for the research.
Force pushed the proper patch, the package whitelist strikes again!


No method to create index patterns

There is no method to create index patterns in Elasticsearch?

Hi!
Maybe are you referring to Index Templates ?
In any case, questions are better asked in the discuss forum!

No, I am referring to index patterns which we create on kibana dashboard.


Add MAX32657 CMSIS & Include files

https://github.com/analogdevicesinc/hal_adi/tree/develop includes too much updates some of them break zephyr builds.
This PR focus on add MAX32657

CMSIS file
Peripheral include files
In zephyr build system
These items not affect MAX32 MCUs. On next step MAX32657 peripheral drivers is going to be added.

The files comes from MSDK below point:
https://github.com/analogdevicesinc/msdk/commit/74a08bdd0ab32b290acb364672a6bf6f75b0bdc4
Changes are (Repo: https://github.com/analogdevicesinc/msdk):
5e014b2 feat(Boards,CMSIS,Examples,PeriphDrivers): Initial commit for MAX32657 (#1012)
09a77db chore(Other): Update Zephyr DMA wrapper for MAX32657 (#1027)
71724ae chore(Other): Sync Libraries/zephyr folder (#1126)
b083af9 fix(Other): Fix SPI DMA enable field mapping for MAX32657 and MAX32662 (#1132)
937bdf7 chore(Other, PeriphDrivers): Fix MAX32657 build issue (#1173)
2e450ed fix(CMSIS): Declare libc function stubs as weak (#1029)
4bf2c6a feat(PeriphDrivers): Add MAX32657 I3C driver (#1111)
71ad374 chore(CMSIS,Examples,PeriphDrivers): Sync latest ME30 changes (#1075)
428abd6 fix(Documentation): Fix Inaccurate SPI Threshold Docstrings (#1096)
760aa9a fix(Other): Add I3C to MAX32657 Zephyr build (#1174)

Need to send a corresponding PR to the main zephyr repo to test this


[Docs]: Missing dependency in codesandbox (and typescript support) for material-table example

This example has a missing dependency in its codesandbox.
Also the example doesn't work in a typescript environment and I don't know how to fix it.

We are removing the example in #18872.

Oh. It isn't clear to me how you'll support editable data tables then?

Just to be clear, I have closed the issue because, in the next few months, it won't be relevant. The upcoming data grid will support editable cells.


[ENG-1058] Update GDPR for draftregistrations and draftnodes

Purpose
Remove draftregistrations and draftnode during GDPR delete.
Changes

adds logic to gdpr_delete to hard delete draft registrations
packs validation into helper functions for readabilty
adds Docstrings and comments
modifies and adds new tests

QA Notes
Please make verification statements inspired by your code and what your code touches.

Verify
Verify

What are the areas of risk?
Any concerns/considerations/questions that development raised?
Documentation

Side Effects

Ticket
https://openscience.atlassian.net/browse/ENG-1058

@jwalz My understanding is the law behaves differently when it comes to things that have been deliberately made public by the user as opposed to data about the user, but it's confusing and deserves some review as a group.