build fails on empty package-lock.json

Description:
Build fails with error from npm: "Unexpected end of JSON input"
It can happen, that when a build fails during npm install (maven goal :ballerina-composer-web), that the package-lock.json is empty. I have not quite figured out how this happens, but it did happened a few times already.
An empty json file is not valid json. It should contain at least
{}
In case of an error, package-lock.json should be always be restored from package-lock.json.bak.
Apparently, that is not happening. Maybe the npm-preinstall.js and npm-postinstall.js scripts in composer/modules/scripts should do the backup/restore in a safer way. I think no backup should be done when package-lock.json is an empty file and if a backup file is still existing.
Steps to reproduce:

empty composer/modules/web/package-lock.json
run the build

mvn clean install

In the output the following appears:

`main:
[INFO] Executed tasks
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:exec (backup-package-lock) @ ballerina-composer-web ---
Note: package-lock.json won't be updated during the build
[INFO]
[INFO] --- build-helper-maven-plugin:1.8:parse-version (parse-version) @ ballerina-composer-web ---
[INFO]
[INFO] --- replacer:1.5.3:replace (replace-versions) @ ballerina-composer-web ---
[INFO] Replacement run on 3 files.
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:exec (npm install (initialize)) @ ballerina-composer-web ---
npm ERR! Unexpected end of JSON input
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pmhofman/.npm/_logs/2018-06-20T19_04_02_558Z-debug.log
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:764)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:711)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:289)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
`
Workaround
as work around, before restarting the build at :ballerina-composer-web restore package-lock.json file from git:
git checkout -- composer/modules/web/package-lock.json
mvn clean install -rf :ballerina-composer-web
Affected Versions:
0.975.1
OS, DB, other environment details and versions:
CentOS 7
Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

update: a better solution than creating a backup may be copying packages-lock.json to npm-shrinkwrap.json in npm-preinstall.js, and deleting npm-shrinkwrap.json in npm-postinstall.js.
https://docs.npmjs.com/files/shrinkwrap.json

not figured out quite yet how shrinkwrap works, but I am diving into this, so don't change anything yet

shrinkwrap is not the way to go.
If you don't want an update of package-lock.json, then you should run npm install with option "--no-save".
This means that backing up and restoring package-lock.json would not be necessary.

tonight (at home) I will test this with modification of pom.xml to include --no-save option in npm install

tested with the backup and restore of package-lock.json executions disabled,
and extra argument --no-save in the npm install execution.
AFAICC that works without updating package-lock.json.

@pmhofman Can you let us know the node and npm version you are using. Usually, we recommend node 8.9.1 LTS. see https://github.com/ballerina-platform/ballerina-lang/tree/master/composer

@pmhofman Thanks for the info. --no-save is for asking npm to not add the installing module to dependencies section of the package.json file. I don't think it affects the package-lock.json.
package-lock.json being empty is a bit unusual case. It can't happen due to npm install crashing. But it could happen if the postinstall script crashes. In that case it should print an error to the console. If you managed to reproduce this issue could you look for such an error printed to the console?

I am using npm 5.6.0 and node v8.11.3
on package-lock.json:
https://docs.npmjs.com/cli/install states:

Further, if you have an npm-shrinkwrap.json or package-lock.json then it will be updated as well.

Maybe my conclusion might be wrong that --no-save will prevent updates not only on package.json but also on npm-shrinkwrap.json and package-lock.json
I have asked<EMAIL_ADDRESS>to clarify this.
I do not expect a reply before next monday.

Here is a copy of my question to npm, with the response:
CJ Joulain (npm)
Jun 22, 14:24 PDT
Hi Peter,
Thanks for reaching out!
Yes, the npm install option --no-save command should prevent updates on npm-shrinkwrap.json and package-lock.json?
Alternately, you can also try --no-package-lock to prevent it from being written to the package-lock, but still update the package.json.
Best wishes,
CJ
Peter Hofman
Jun 22, 14:02 PDT
Hi,
quick question that I could not answer from the documentation, since it is not clearly stated:
does npm install option --no-save prevent updates on npm-shrinkwrap.json and package-lock.json?
Best regards,
Peter Hofman

@pmhofman --no-save is used when installing a specific module to avoid adding it to package.json. eg: npm install --no-save react will install the react package but an entry to the dependencies section of package.json won't be added for react. As opposed to running npm install react which will add react as an dependency to this section. As package json is not updated package-lock too will not be updated. But when running just npm install this option has no effect.
We considered --no-package-lock but didn't used it for two reasons.

It doesn't even read the packge-lock file. What we want is the build to read package-lock and install modules accordingly but not write to it. The writing may change the existing content of package-lock file because of inconsistencies in different npm (5.x.x) versions. We noticed that our developers have different npm versions and un intended changes happen to package-lock file in some commits

It was introduced in some 5.x.x version of npm and older npm versions will give an error if used.

So the option that we had is to preserve the content of package-lock file when running mvn install. By backing it up before the build and then wrtitng it back after the build. The javascript developers still should be able to allow necessary changes to package-lock by running npm install.
The other option is to make sure that everyone is using a newer npm version by detecting its version and showing and error for older ones but we preferred the above.

Developers can easily install multiple versions of node and npm and switch between them with nvm. You could even build that into the pom.xml, making node and npm dependencies of the project. Then everyone building ballerina will use the same node and npm version.
Anyways, I figured out I may have caused the error myself, which means this is not really a problem.

Yeah. We need to figure out something that works for both the JS and non-JS developers.
We are considering mandating a certain node and npm version and showing an error if the versions are too old.
I'll close this issue for now since the build is working now. If the issue comes up again please reopen.
Thanks a lot for the report.


Request: don't require snappy

Historically kafka-node requiring snappy has broken quite a few environments and caused many a headache [1].
Most users don't require or use compression for these messages, so I would propose not including snappy inside the main module but rather as an optional extension?
[1] See all these issues: https://github.com/SOHU-Co/kafka-node/issues/253 https://github.com/SOHU-Co/kafka-node/issues/248 https://github.com/SOHU-Co/kafka-node/issues/241 https://github.com/SOHU-Co/kafka-node/issues/221 https://github.com/SOHU-Co/kafka-node/issues/217 https://github.com/SOHU-Co/kafka-node/issues/204 https://github.com/SOHU-Co/kafka-node/issues/202 https://github.com/SOHU-Co/kafka-node/issues/153

+1
I had a similiar idea since I'm doing some research on Kafka and couldnt get this to compile. Monkey patched this together with my furry paws
https://github.com/kaustavha/kafka-node--light
Still has zlib compression. I really just made it to play around, dont know if I'd recommend using it since I dont know if I'll maintain it.

Yes please. This is a huge blocker for my deployment process, as there seems to be no reliable workaround to the referenced issues.

+1, snappy requires gyp rebuild, and it will not work on docker node:slim image.
This dependency forces to use huge full image node:latest

+1

So I found codependency module that will let you do optional modules but I don't have any experience with it and don't how well it works in practice.
Is there another way to do this and how do other projects include optional modules?

I have a solution for this. Hope to get a PR for review soon.


[turborepo] Cannot install on Alpine Linux

What version of Turborepo are you using?
1.6.3
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Linux
Describe the Bug
turbo fails to install on Alpine Linux -- the version of Linux that is commonly used in Docker images.
When installing using npm install turbo --save-dev as described on the getting started page, or when installing using npm install -g turbo, the error is:
Error: spawnSync /root/node_modules/turbo/bin/turbo ENOENT.
As a workaround I was able to install using npm i -g turbo-linux-arm64 (on my Mac using Docker) or npm i -g turbo-linux-64 (on my CI system). I don’t want to hardcode a particular platform, though.
Another workaround is to use a different Linux distro. But turbo should work on Alpine since it’s one of the most common Linux distros for Docker.
Expected Behavior
You should be able to install turbo on Alpine Linux without specifying the platform name.
To Reproduce
docker run --rm -it node:18-alpine /bin/sh

/ # npm i -g turbo

npm notice
npm notice New major version of npm available! 8.19.2 -> 9.2.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.2.0
npm notice Run npm install -g<EMAIL_ADDRESS>to update!
npm notice
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/turbo
npm ERR! command failed
npm ERR! command sh -c -- node install.js
npm ERR! node:internal/errors:484
npm ERR!     ErrorCaptureStackTrace(err);
npm ERR!     ^
npm ERR!
npm ERR! <ref *1> Error: spawnSync /usr/local/lib/node_modules/turbo/bin/turbo ENOENT
npm ERR!     at Object.spawnSync (node:internal/child_process:1110:20)
npm ERR!     at spawnSync (node:child_process:857:24)
npm ERR!     at Object.execFileSync (node:child_process:900:15)
npm ERR!     at validateBinaryVersion (/usr/local/lib/node_modules/turbo/install.js:25:6)
npm ERR!     at /usr/local/lib/node_modules/turbo/install.js:308:5 {
npm ERR!   errno: -2,
npm ERR!   code: 'ENOENT',
npm ERR!   syscall: 'spawnSync /usr/local/lib/node_modules/turbo/bin/turbo',
npm ERR!   path: '/usr/local/lib/node_modules/turbo/bin/turbo',
npm ERR!   spawnargs: [ '--version' ],
npm ERR!   error: [Circular *1],
npm ERR!   status: null,
npm ERR!   signal: null,
npm ERR!   output: null,
npm ERR!   pid: 37,
npm ERR!   stdout: null,
npm ERR!   stderr: null
npm ERR! }
npm ERR!
npm ERR! Node.js v18.12.1

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-12-08T17_39_09_754Z-debug-0.log

Reproduction Repo
No response

I found the workaround to this which was to apk add --no-cache libc6-compat before trying to install turbo.

@natesilva this worked for me as well.

This workaround it's not working for me. Im currently working on Google Cloud Build and the problem persists with the same error as @natesilva described.

This workaround it's not working for me. Im currently working on Google Cloud Build and the problem persists with the same error as @natesilva described.

apk add build-base libc6-compat gcompat help at all?

This workaround it's not working for me. Im currently working on Google Cloud Build and the problem persists with the same error as @natesilva described.

apk add build-base libc6-compat gcompat help at all?

Yes tried and got the same error:
npm ERR! code 1
npm ERR! path /workspace/node_modules/turbo
npm ERR! command failed
npm ERR! command sh -c -- node install.js
npm ERR! node:internal/errors:478
npm ERR!     ErrorCaptureStackTrace(err);
npm ERR!     ^
npm ERR!
npm ERR! <ref *1> Error: spawnSync /workspace/node_modules/turbo/bin/turbo ENOENT
npm ERR!     at Object.spawnSync (node:internal/child_process:1119:20)
npm ERR!     at spawnSync (node:child_process:847:24)
npm ERR!     at Object.execFileSync (node:child_process:890:15)
npm ERR!     at validateBinaryVersion (/workspace/node_modules/turbo/install.js:25:6)
npm ERR!     at /workspace/node_modules/turbo/install.js:308:5 {
npm ERR!   errno: -2,
npm ERR!   code: 'ENOENT',
npm ERR!   syscall: 'spawnSync /workspace/node_modules/turbo/bin/turbo',
npm ERR!   path: '/workspace/node_modules/turbo/bin/turbo',
npm ERR!   spawnargs: [ '--version' ],
npm ERR!   error: [Circular *1],
npm ERR!   status: null,
npm ERR!   signal: null,
npm ERR!   output: null,
npm ERR!   pid: 87,
npm ERR!   stdout: null,
npm ERR!   stderr: null
npm ERR! }

So, currently the working approach is:
docker run --rm -it node:18-alpine /bin/sh
/# apk add --no-cache libc6-compat
/# npm i -g turbo
🏆

However, I see in your output that your path is /workspace/node_modules/turbo, so there's a WORKDIR /workspace in there somewhere, and is there possibly more?

Have you tried to confirm precisely that the above works, as a bare-minimum confirmation of functionality?
If so, perhaps a docker image cache clear could help, docker rmi node:18-alpine? My node:18-alpine is sha:a136ed7b0.
If not, perhaps you can share a minimal copy of your Dockerfile that isn't passing?

Sorry, this might be stuff you've already considered, just trying to help rubber-duck this thing.

@iiian I'm currently working with Google Cloud Build and buildpacks. My build file is the following:
steps:
  - id: "Prepare OS I"
    name: node:18-alpine
    entrypoint: apk
    args: ["update"]
  - id: "Prepare OS II"
    name: node:18-alpine
    entrypoint: apk
    args: ["add", "--no-cache", "git", "build-base", "libc6-compat", "gcompat"]
  - id: "Install turbo"
    name: node:18-alpine
    entrypoint: npm
    args: ["install", "-g", "turbo"]
  - id: "Install dependencies"
    name: node:18-alpine
    entrypoint: npm
    args: ["install"]

Ah, okay, I'm unfamiliar with GCB. So does this mean your /workspace/node_modules directory is supposed to be your global npm install dir in GCB? Is it possible to npm root -g instead of npm install -g turbo?

Is it possible to switch to yarn? https://cloud.google.com/build/docs/building/build-nodejs

Cloud Build enables you to use any publicly available container image to execute your tasks. The public node image from Docker Hub comes preinstalled with npm and yarn tools. You can configure Cloud Build to build your Node.js project with these tools.

yarn add global turbo might give different results

Thanks @iiian, switching to yarn it's not an option in my case...
It's just as you said then, I'm getting a /usr/local/lib/node_modules as the root -g output. But the error is pointing to that location:
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/turbo
npm ERR! command failed
npm ERR! command sh -c -- node install.js
npm ERR! node:internal/errors:484
npm ERR!     ErrorCaptureStackTrace(err);
npm ERR!     ^
npm ERR!
npm ERR! <ref *1> Error: spawnSync /usr/local/lib/node_modules/turbo/bin/turbo ENOENT
npm ERR!     at Object.spawnSync (node:internal/child_process:1110:20)
npm ERR!     at spawnSync (node:child_process:857:24)
npm ERR!     at Object.execFileSync (node:child_process:900:15)
npm ERR!     at validateBinaryVersion (/usr/local/lib/node_modules/turbo/install.js:25:6)
npm ERR!     at /usr/local/lib/node_modules/turbo/install.js:308:5 {
npm ERR!   errno: -2,
npm ERR!   code: 'ENOENT',
npm ERR!   syscall: 'spawnSync /usr/local/lib/node_modules/turbo/bin/turbo',
npm ERR!   path: '/usr/local/lib/node_modules/turbo/bin/turbo',
npm ERR!   spawnargs: [ '--version' ],
npm ERR!   error: [Circular *1],
npm ERR!   status: null,
npm ERR!   signal: null,
npm ERR!   output: null,
npm ERR!   pid: 24,
npm ERR!   stdout: null,
npm ERR!   stderr: null
npm ERR! }
npm ERR!
npm ERR! Node.js v18.12.1

@fran-cadenas-fu
Okay then we might be zeroing in. In https://github.com/vercel/turbo/issues/2959#issuecomment-1366481250 you mentioned that npm i -g was trying to add turbo to /workspace/node_modules. Can you explain the discrepancy that we are seeing now, that could be a part of it.
Are you able to npm i -g anything else? If not, it may not be a turbo issue. If you can, I'd just create another ticket similar to this one, and reference it for context.

@fran-cadenas-fu
Okay then we might be zeroing in. In #2959 (comment) you mentioned that npm i -g was trying to add turbo to /workspace/node_modules. Can you explain the discrepancy that we are seeing now, that could be a part of it.
Are you able to npm i -g anything else? If not, it may not be a turbo issue. If you can, I'd just create another ticket similar to this one, and reference it for context.

The error shown in the previous message is the one that is given by npm install -g turbo. The original /workspace directory is probably an error from another try. The one that matches the last try is pointing /usr/local/lib/node_modules/


Enable cmake definition matplotlib_cpp_INCLUDE_DIRS

Some users who install matplotlib-cpp in non-public directory should be happy.

Thanks for this one as well! :)


node-local-dns-cache for Cilium

When moving to Cilium in v19 we will have to support the node-local-dns-cache app  such that customers can further use it's features.

Try this solution https://cloud.yandex.com/en/docs/managed-kubernetes/operations/cilium-node-local-dns
apiVersion: "cilium.io/v2"
kind: CiliumLocalRedirectPolicy
metadata:
  name: "nodelocaldns"
  namespace: kube-system
spec:
  redirectFrontend:
    serviceMatcher:
      serviceName: kube-dns
      namespace: kube-system
  redirectBackend:
    localEndpointSelector:
      matchLabels:
        k8s-app: node-local-dns
    toPorts:
      - port: "53"
        name: dns
        protocol: UDP
      - port: "53"
        name: dns-tcp
        protocol: TCP

https://github.com/giantswarm/cilium-app/blob/main/helm/cilium/values.yaml#L1054

after doing this change on a live cluster I had to restart the cilium-operator pods to make the new CRD appear

On local DNS we need to change

disable host network
Add parameters "-skipteardown=true", "-setupinterface=false", "-setupiptables=false"

Additional things as I have not yet gotten this setup to work, will continue testing

Reading the documentation, the redirect policy does not affect pods that have a connection already stablished and they need to be restarted.
I think DNS queries create a new connection each time, but will try to see if we can avoid having to reboot all pods in the clusters to make this effective.

Configmap I used to install cilium, localRedirectPolicy is the only thing needed.
apiVersion: v1
data:
  values: |
    ipam:
      mode: kubernetes
    k8sServiceHost: api.f2iuuk0stj.gaws.gigantic.io
    k8sServicePort: 6443
    kubeProxyReplacement: strict
    localRedirectPolicy: true
    hubble:
      ui:
        enabled: true
        backend:
          image:
            tag: v0.9.2
        frontend:
          image:
            tag: v0.9.2
      relay:
        enabled: true
    defaultPolicies:
      enabled: true
      tolerations:
        - effect: NoSchedule
          operator: Exists
        - effect: NoExecute
          operator: Exists
        - key: CriticalAddonsOnly
          operator: Exists
kind: ConfigMap
metadata:
  annotations:
    meta.helm.sh/release-name: f2iuuk0stj-default-apps
    meta.helm.sh/release-namespace: org-giantswarm
  creationTimestamp: "2022-11-08T08:15:10Z"
  labels:
    app-operator.giantswarm.io/watching: "true"
    app.giantswarm.io/branch: ""
    app.giantswarm.io/commit: ""
    app.kubernetes.io/instance: f2iuuk0stj-default-apps
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: default-apps-aws
    app.kubernetes.io/version: 0.7.0
    application.giantswarm.io/team: hydra
    giantswarm.io/cluster: f2iuuk0stj
    giantswarm.io/managed-by: f2iuuk0stj-default-apps
    giantswarm.io/organization: giantswarm
    giantswarm.io/service-type: managed
    helm.sh/chart: default-apps-aws-0.7.0
  name: f2iuuk0stj-cilium-user-values
  namespace: org-giantswarm
  resourceVersion: "10175849"
  uid: e5eecf5e-1324-4c8b-b1e6-c5539c2a8787

We should change hubble UI default images, otherwise it gives an error
    hubble:
      ui:
        enabled: true
        backend:
          image:
            tag: v0.9.2
        frontend:
          image:
            tag: v0.9.2

Here we can see apps using node-local-dns with hubble UI (very useful to see cilium rules in place)

released


Not enough information on failed build/install

Normally we get enough information to debug these kinds of issues, but if you look at the output provided @ rvagg/node-leveldown#92 you'll see that we have zero to go on. make is giving exit code 2 and therefore should be providing output. Any suggestions or could this possibly be an issue to file against npm?

Hey @rvagg, can this issue be closed? I figure it's four years old so you hopefully found a solution 👍

If it's still an issue we can raise a new one.


Number representation of enum in db to appropriate enum type in auto map

I'm attempting to use stored procedures along with automapping to a type, where that type contains an enum.
The enum itself is of a byte type, as is the column, but attempting to do the auto mapping from the db column to the object property, an exception is raised:
fail: ...
      Invalid cast from 'System.Byte' to 'MyEnum'.
System.InvalidCastException: Invalid cast from 'System.Byte' to 'MyEnum'.
   at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
   at System.Byte.System.IConvertible.ToType(Type type, IFormatProvider provider)
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at System.Convert.ChangeType(Object value, Type conversionType)
   at Mighty.DataContracts.DataContractMemberInfo.SetValue(Object obj, Object value)
   at Mighty.MightyOrm`1.QueryNWithParams[X](DbCommand command, CommandBehavior behavior, DbConnection conne
ction, DbDataReader outerReader)+MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
...

I can get around this by doing the mapping manually with a cast working with the dynamic directly and for all columns, but is there a way to do it otherwise when working with enums?
Note I don't know if i'm using the correct terminology or not, but when i'm saying auto map talking about relying on mighty orm with its MightyOrm<T> construction.

I'm not 100% sure whether this is a bug or not, because C# doesn't let you assign a byte to an enum : byte without a cast.
E.g.
byte value = 3;
MyByteEnum target = value;

will not complile, with Cannot implicitly convert type 'byte' to 'ByteEnum.MyByteEnum'. An explicit conversion exists (are you missing a cast?).
This is why Mighty is erroring here: a byte technically isn't a valid value for that column in C# (not just in Mighty), even though I agree it sounds like it should be.
To reiterate, as  you can see above Mighty is using Convert.ChangeType, which will work as long as you could have assigned what comes back from the database to what's in the column without an explicit cast - but it's a decision of C# that here you can't. Exactly the same problem would happen with an integer from the db and a normal int enum.
To work around it, you have a choice to use a dynamic return value as you are doing, or alternatively you could write an intermediate strongly typed class with a byte member, and then add a constructor (or even a conversion operator) on the type you really want, which does the conversion from the intermediate type to the final type. Even that way, you'd still have to manually do the conversion on what comes back from the database every time (the advantage, if you need to care about such things, is that you'd still be using strongly typed objects everywhere).
I agree that these aren't ideal, but for the reasons above I'm currently thinking that I need to count this as a - reasonable! - feature request, not a bug.

Oh yeah, I didn't intend to infer it was a bug, I just wasn't sure if there was some hooks already existing in mighty that could help me get around this particular issue.
I haven't looked into the mighty orm source in any significant way, but I was assuming it used reflection of some sort - if the type of the property being hydrated were of type enum, perhaps the Enum.TryParse or Enum.Parse methods could be utilized? https://docs.microsoft.com/en-us/dotnet/api/system.enum.tryparse?view=netstandard-2.1

I've just looked a little more. I already have some code for assigning a non-enum value to an enum in the codebase - but it requires knowing the type of the enum you are writing to, it wouldn't just work for any enum. See also this SO discussion - not all of which is about the difficult part of this, but some is. So even as a feature request, this might actually be quite non-trivial!

It may be that a better approach, still as a new feature request, would be to support data mapping functions in (what is currently called) SqlNamingMapper - at the moment it only maps field <-> column names, it can't remap the actual data.
I'm not sure whether that would be a good thing to do or not... I hadn't come across any reason to think of needing it before - which doesn't mean there aren't other cases where it might be useful, as well as this.

Ah yeah I guess my previous comment (and your https://github.com/MightyOrm/Mighty/issues/16#issuecomment-589089300) seem to be for cases when the enum string value is stored in the db, rather than the numeric value it represents?

yeah the SqlNamingMapper was the only thing in the MightOrm<T> construction parameters that seemed to be a place where it could have fit, but as you said it does not currently.
Rather than providing an additional mapping functionality, what about just an option for attempting to cast the a Property of type enum from the numeric column matching its name (or if using the SqlNamingMapper function?)  I'd imagine such an option could additionally support throwing or not depending on the result of the cast attempt?

That's what I'm trying to say. That is non trival, I believe, because there is nothing I can see that will let you just 'cast to enum', you have to know which specific enum you are casting to, for each column.

Correct me if I'm wrong, but the problem is only for data coming in to Mighty, right? I'm guessing this should work already for data going out to the database?

Correct me if I'm wrong, but the problem is only for data coming in to Mighty, right? I'm guessing this should work already for data going out to the database?

I believe that is correct, don't think I've yet written code around saving an enum number value to the db.

I've found the code that I'd need (this is just a demo of the right conversion done the right way, not code to drop directly into Mighty yet):
byte value = 1;
var t = typeof(MyByteEnum);
Assert.That(t.IsEnum, Is.True);
var target = Enum.ToObject(typeof(MyByteEnum), value);
Assert.That(target, Is.EqualTo(MyByteEnum.value_1));

I'm actually not sure whether enum columns will work on output at the moment. If they don't I'd need to add something similar for enum types on output too.
Partly as note to self: since it's cheap to check for - t.IsEnum == true, and I already have t - then it's something to add as default behaviour rather than a configurable option.

FWIW, enums going into the database work fine (at least with the int enums I've done), it is just when coming back from the database that this occurs, since there isn't an implicit conversion between the type stored in the database and the enum. "Just" need to explicitly cast the value to the enum type (which is what we're currently doing when we manually build objects from generic results because of this)

@shanesaffer - thanks for the heads up!
It turns out that I was over-simplifying to think of Convert.ChangeType as allowing you to convert all and only whatever you can assign without an explicit cast: even though it is not possible to assign from an enum's underlying type to the enum or vice versa without a cast, you can Convert.ChangeType in one of those directions, i.e. from an enum. This is documented at 'Notes to Callers' in this Microsoft documentation.
So Mighty just (turns out it is "just", when you find the right magic and if you already know the target type, which we do) needs the type of conversion code demoed above on output, and a couple of matching tests.

I've added support for this in version 3.1.0, up now on NuGet.

awesome, thanks @MikeBeaton I had just cracked open the code yesterday and started trying to get familiar with it for all of 10 minutes before the kids woke up and started causing a ruckus ;)

Thanks for taking an interest to take a look! :) Let me know if any issues.


win7 install of esp-idf-tools-setup-2.1 never completes (IDFGH-2036)

Installing esp-idf-tools-setup-2.1.exe file under administrator never finishes. The following message in the install screen:
Running command: powershell -ExecutionPolicy ByPass -File "C:\Users\jmulchin.espressif\dist\tools_WD_excl.ps1" -AddExclPath "C:\Users\jmulchin.espressif*.exe"
is where it has huing now for over an hour and a half. Have to cancel install to get out of it.
I have uploaded the setup log file for your information. Also, this is the 3rd time I've tried this.
Setup Log 2019-10-21 #004.txt
I would assume that because the setup never completes that the development tools are probably not usable yet>???
Looking forward to a solution.
Jerry

So, no answer to this problem? Great Support --- NOT!

What happens if you try to run the command separately?
powershell -ExecutionPolicy ByPass -File "C:\Users\jmulchin.espressif\dist\tools_WD_excl.ps1" -AddExclPath "C:\Users\jmulchin.espressif*.exe"

At this point I don't want to try anything that might cause the ESP-IDF to stop working. Event though it did appear to not finish the install, when I tried using the package I could compile an example program. Now I'm waiting for my boards to show up to see if the code will run. If I find that the install did not install correctly at a later date then I will try your suggestion. But not now.
Thanks for getting back to me.

Will keep this open, as it seems to be a valid issue in the installer.

Hi Jerry,
I apologize for my delay, I'll try to fix the issue asap now. Would you share your Windows OS version, please? I don't see it mentioned anywhere. Thank you
Martin

Hi Martin,
As the title of the message states, Win 7.
On 11/1/2019 3:34 AM, pacucha42 wrote:

Hi Jerry,
I apologize for my delay, I'll try to fix the issue asap now. Would
you share your Windows OS version, please? I don't see it mentioned
anywhere. Thank you
Martin
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/espressif/esp-idf/issues/4225?email_source=notifications&email_token=AASFEGSWX6AEXLK3X3TQP63QRQA25A5CNFSM4JDG7BN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC2SJ7Q#issuecomment-548742398,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AASFEGVO5JA6C4G6CQ3K6ADQRQA25ANCNFSM4JDG7BNQ.

--
*Jerry

I know, I noticed too late :-) Thanks for patience anyway. I'm back to you asap

And again the same question, what version system do you have?
Is it 32 or 64 bit windows 7?

https://docs.espressif.com/projects/esp-idf/en/latest/get-started/windows-setup.html#standard-setup-of-toolchain-for-windows
Currently only 64-bit versions of Windows are supported. 32-bit Windows can use the Legacy GNU Make Build System.

I guess Jerry uses 64bit Win7, however, it might be helpful if you provide exact OS version as given by
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" launched in the command line. Thank you

Have same issue on windows 7 64 bit= Please help :(

The fix is ready to merge (verified on both W7_64 and W10_64), GH code update coming soon. I apologize for the inconvenience, pls, hold on.
However, the remedy is trivial  even with the current code - simply uncheck the Windows Defender option and you should be fine. All this WD-scan-exclusions feature is just an optimization which usually increases the compilation speed, but it's not required for any ESP Tool operation by default -> the toolset is fully available, no features or functions are restricted without the ESP-IDF executables registered in the WD exclusion set
Hope this helps, at least for the meantime
Martin

What happens if you try to run the command separately?
powershell -ExecutionPolicy ByPass -File "C:\Users\jmulchin.espressif\dist\tools_WD_excl.ps1" -AddExclPath "C:\Users\jmulchin.espressif*.exe"

I tried that. I receive the next message in a win 7 machine x64 with security essentials:
PS C:\Windows\system32> powershell -ExecutionPolicy ByPass -File "C:\Users\boj\.espressif\dist\tools_WD_excl.ps1" -AddEx
clPath "C:\Users\boj\.espressif\*.exe"
Import-Module : The specified module 'Defender' was not loaded because no valid module file was found in any module dir
ectory.
At C:\Users\boj\.espressif\dist\tools_WD_excl.ps1:61 char:14
+ Import-Module <<<<  Defender
    + CategoryInfo          : ResourceUnavailable: (Defender:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

C:\Users\boj\.espressif\dist\tools_WD_excl.ps1 : Unable to find type [NotSupportedException ]: make sure that the assem
bly containing this type is loaded.
    + CategoryInfo          : NotSpecified: (:) [Write-Error], RuntimeException
    + FullyQualifiedErrorId : System.Management.Automation.RuntimeException,tools_WD_excl.ps1

After that in eclipse, following the guide provided at Installing ESP-IDF Tools, when locating the installation directory I get this message:
Executing C:\Users\boj\AppData\Local\Programs\Python\Python37\python.exe C:\Users\boj\esp-idf\tools\idf_tools.py export --format=key-value
C:\Users\boj\AppData\Local\Programs\Python\Python37\python.exe: can't open file 'C:\Users\boj\esp-idf\tools\idf_tools.py': [Errno 2] No such file or directory

I cannot start windows defender maybe because I am running microsoft security essentials.
I hope that helps, anyway windows 7 is about to close in January'20
Cheers.
If someone finds a workaround It would be very welcome...

Hi jubeormk1,
based on the output provided:

running the PS script manually has the same effect as when launched from the installer process but appaerently, the Defender module is missing on your system. The PS Defender came preinstalled in Windows 8.1 and higher, you have upgrade your OS manually (via std Windows Update, PS cmdlets (Install-Package), or NuGet manager. Once you have the Defender module installed, verify you have got what you have been looking for:
Get-Command -Module Defender
You should see some 12 cmdlets, we are interested in  Add-MpReference & Remove-MpReference - if you got here, there is a fair chance the WD-exclusions part of the installation would be running well.

how did you launch the Python? I guess your environment vars are not propagated to other processes ... you usually need a fresh program start to get the block updated as the env. is created on a process startup. Restarting the Eclipse IDE might be trivial "fix" attempt, also check existence/contents of IDF_PATH, PATH, OPENOCD_SCRIPTS and IDF_PYTHON_ENV_PATH (required set) for the spawned(?) Python process - eg using Sysinternals ProcMon tool as it allows logging of filtered events.
Logfile might help as well, see https://github.com/espressif/idf-eclipse-plugin/blob/master/README.md#troubleshooting

I assume you have reasons to run on Windows 7 so you either wait for our improved installer (close to public release, however, it doesn't install WD support to your OS) or expect some manual tweaking to set your environment properly.
Let me know if you need more info
Martin

Why it's closed? The problem still present in 2.2. Update minimal requirements or fix powershell script. (OMG, I've spent few hours trying to make it running, fixing scripts and restarting install.)

you have reasons to run on Windows 7

Are you serious?

Why it's closed? The problem still present in 2.2. Update minimal requirements or fix powershell script. (OMG, I've spent few hours trying to make it running, fixing scripts and restarting install.)

Hi Dimitry,
it's unwanted side effect of the original issue fix - in your case we properly detect the Windows Defender module is missing but we disable wrong checkbox :-( Sorry about that, unfortunately this behavior appeared due to the last code update and was not caught in testing. This new issue is already fixed and shall be published asap - thanks for testing and I apologize for the troubles.

you have reasons to run on Windows 7

Are you serious?
Well, Windows 7 support ends on January 14, 2020. That's about it

Martin

This issue has been resolved long ago, closing the tracker. Feel free to reopen if needed


EncryptECIES: verify that the public key is a secp256k1 point

Description
This PR fixes the issue to verify that the public key is a secp256k1 point. The encryptECIES method in src/packages/encryption/ec.ts does not verify that the given public key string encodes a point on the secp256k1 curve. So in the PR i have added a method to validate the public key and added test cases as well.
For PR closes the issue #784
Type of Change

[ ] New feature
[x] Bug fix
[ ] API reference/documentation update
[ ] Other

Does this introduce a breaking change?
No
Are documentation updates required?
No
Testing information
Steps to test:

npm run test
Other way of testing this PR is to use the encryptECIES method with some bad pubic key and it will reject the public key by throwing an exception.

Checklist

[ ] Code is commented where needed
[x] Unit test coverage for new or modified code paths
[x] npm run test passes
[ ] Changelog is updated
[x] Tag 1 of @yknl or @zone117x for review

@zone117x Is this ready for merge. cc: @diwakergupta


NOT PROUD: gum fix -> data goes to server without error

temoprary fix for client meeting

Coverage decreased (-0.2%) to 56.63% when pulling ec8f608f046778fb0ed792547518bf83c7064999 on correctApiForUpdatedBackend into 134423c891012050d601fc7b7295c3ce63b5c653 on master.


Reading Weather Data

Hi,
I'm having difficulty with retrieving the weather data.
My code:
weather_url = 'https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/by_year/1863.csv.gz'
df_weather = pd.read_csv(weather_url, compression='zip', header=0, sep=',', quotechar='"')
I'm getting the following errorcode: HTTPError: HTTP Error 403: Forbidden
and when I read about the error it seems to me that I have a problem with understanding were my header is supposed to be set... And I can't access the data itself, I only get this error, which fits the errorcode mentioned above.

I hope you can help, Thanks

Hi @kaja19ac,
We have the same problem, but Jonas answered this:
This might be the after effects of their maintenance.
If it is still not working tonight, we'll come up with a way to sidestep this problem.
Cheers
Jonas

Thanks @Frejafalk!
I hope that I works out soon cause I'm going on vacation.. :b

Hi @Frejafalk and @kaja19ac
I just checked and it is working now.
Cheers
Jonas

Hi Niccolò
Yes, it is referring to the DataFrame, df_weather, created in 0.4.1.
Kind regards Lasse

Hi to everyone!
I am checking ex. 0.4.1 on Python IDLE to understand  if my code works at least in a reasonable way, since I can use for now only Python IDLE + Editor (they taught this to me at MSc).
I am experiencing this problem: this is the code in my Editor (that corresponds to the one I am doing on Jupyter, which cannot return any results as well known) and then this is my error in the IDLE shell. Why this so strange error? I have installed pandas in the command prompt and I can see the .csv file. Best regards, Niccolò
YOUR CODE HERE
#import pandas
import pandas as pd
#url link
my_url_1 = 'https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/by_year/1863.csv.gz'
#dataframe pandas
#compression -> zip -> you have a .gz file
df_weather = pd.read_csv(my_url_1,header=None,compression='zip',sep=',',quotechar="")
df_weather

Hi Niccolò
The problem as far as I can see is that you try to unpack the file as if it is a .zip file. The file is however formatted as a gzip file and therefore the compression argument needs to be 'gzip'.
Further, I don't think you need to specify "sep" and "quotechar".
Kind regards Lasse

Now at least this point works well. Many thanks!


Is it possible to make this mod a pure client mod?

That is to say: only installed on client, and available when playing on online server. This may be helpful for user who cannot modify the server.

Impossible


Added Tree of Trees Codechef Solution in CPP

Great work @arsenic011 please give this repo a star if it really helped you to complete your PR.
Also follow me for follow back if you want to get connected with me for any such open source contribution program. Thank you 😊


Spot outdated apis with a script/CI

There're a few outdated apis (e.g. some in canto.apis.rest) URLs on different chains.
It should be relatively easy to spot them with a script to do a clean up.
Example of broken APIs:

https://canto-rest.lgns.net:443 -> 502 bad gateway
https://rest-canto.carbonZERO.zone:443 -> DNS resolution issue

I would he happy to work on that if you like. If you do let me know if there's a specific stack and direction (e.g. with CI, lerna...) you would like me to take.
The idea I have in mind is (each step has its own PR):

Write the script to spot outdated URLs. Start easy with rest endpoints that don't answer with a 200.
The script outputs the the OK vs KO ones and exits a non zero if any are KO.

Remove the broken endpoints from the registry.

Add the script to the CI (maybe on schedule) so that we can keep it clean preemptively.

this is for the cosmos/chain-registry where we pull data from


BADGE REQUEST [Maroxy#4964]

What is your Discord Tag?
Maroxy#4964
What is your UID (User ID)?
82662823523516416
What is the image for the badge that you want?
https://i.imgur.com/2oxNPUW.png
Additional Confirmation:

[x] My badge does not contain any NSFW material.
[x] My badge is not a badge that signifies that I am an official developer / staff for Discord or client mod communities.

done


RMET-3390 - Payments Plugin - Use @SerializableName annotation to avoid issues with code obfuscation

Description

Updates dependency to OSPaymentsLib-Android that adds @SerializableName annotation to properties of data classes to avoid issues with code obfuscation.

Context

References: https://outsystemsrd.atlassian.net/browse/RMET-3390
Type of changes

[x] Fix (non-breaking change which fixes an issue)
[ ] Feature (non-breaking change which adds functionality)
[ ] Refactor (cosmetic changes)
[ ] Breaking change (change that would cause existing functionality to not work as expected)

Platforms affected

[x] Android
[ ] iOS
[ ] JavaScript

Tests

Tested with MABS 10 build on Android 15.
MABS 10 build: https://intranet.outsystems.net/MABS/BuildDetail.aspx?BuildId=2ed3cb9adb89c5f49e2a4d3924df58c242b6b18c

Screenshots (if appropriate)
Checklist

[x] Pull request title follows the format RNMT-XXXX <title>
[x] Code follows code style of this project
[x] CHANGELOG.md file is correctly updated
[ ] Changes require an update to the documentation

[ ] Documentation has been updated accordingly

Note about Snyk issues: These were already present, as they relate to Gradle dependency versions that we didn't change. I created a tech debt task so that can be properly be taken care of.


python3Packages.hg-git: fix build

ZHF: https://github.com/NixOS/nixpkgs/issues/352882
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

python312Packages.hg-git seems to build on master? https://hydra.nixos.org/job/nixpkgs/trunk/python312Packages.hg-git.x86_64-linux


Generate icons with no border where appropriate

For channels with thumbnails matching a particular set of constraints,
we will generate icons where the thumbnail fills all available space.
https://phabricator.endlessm.com/T32101

If you're curious, here's a Jupyter notebook and a big JSON file with a whole bunch of thumbnails, so you can poke at this across all the icons in one place:
https://drive.google.com/file/d/1S9kMll8GY5uYbXbcYAQpSBlsvU4qMdOd/view?usp=sharing


Minimum size format error when provided in human readable format

Describe the bug
Entering human-readable format file size in Edit config mode causes crash.
Docker version.
To Reproduce
? What would you like to do? Edit config.json file
 [config.edit_config:189]  config path: /home/your_username/.config/your_username/config.json                                           config.py:189
? What would you like your main profile to be? main_profile
? save_location:  /home/ofscraper
? file_size_limit:  0
? file_size_min:  10mb

File size min
Input can be int representing bytes
or human readable such as 10mb

Enter 0 for no minimum

I entered literally what it suggested: 10mb. (Also tried 10MB , 10 MB, 10 mb)
Traceback (most recent call last):
  File "/venv/bin/ofscraper", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/venv/lib/python3.11/site-packages/ofscraper/__main__.py", line 10, in main
    start.main()
  File "/venv/lib/python3.11/site-packages/ofscraper/start.py", line 85, in main
    raise E
  File "/venv/lib/python3.11/site-packages/ofscraper/start.py", line 82, in main
    raise E
  File "/venv/lib/python3.11/site-packages/ofscraper/start.py", line 42, in main
    picker.pick()
  File "/venv/lib/python3.11/site-packages/ofscraper/commands/picker.py", line 20, in pick
    scraper.main()
  File "/venv/lib/python3.11/site-packages/ofscraper/commands/scraper.py", line 487, in main
    raise E
  File "/venv/lib/python3.11/site-packages/ofscraper/commands/scraper.py", line 469, in main
    scrapper()
  File "/venv/lib/python3.11/site-packages/ofscraper/commands/scraper.py", line 508, in scrapper
    process_prompts()
  File "/venv/lib/python3.11/site-packages/ofscraper/utils/exit.py", line 92, in inner
    raise E
  File "/venv/lib/python3.11/site-packages/ofscraper/utils/exit.py", line 85, in inner
    func(*args, **kwargs)
  File "/venv/lib/python3.11/site-packages/ofscraper/commands/scraper.py", line 81, in process_prompts
    config.edit_config()
  File "/venv/lib/python3.11/site-packages/ofscraper/utils/config.py", line 194, in edit_config
    updated_config = prompts.config_prompt(config["config"])
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/ofscraper/prompts/prompts.py", line 571, in config_prompt
    answer = promptClasses.batchConverter(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/ofscraper/prompts/promptConvert.py", line 222, in batchConverter
    outDict.update(list(map(lambda x: batchConverterHelper(x), args)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/ofscraper/prompts/promptConvert.py", line 222, in <lambda>
    outDict.update(list(map(lambda x: batchConverterHelper(x), args)))
                                      ^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/ofscraper/prompts/promptConvert.py", line 217, in batchConverterHelper
    return name, getType(ele_type)(**ele)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/ofscraper/prompts/promptConvert.py", line 57, in inner
    out = prompt_.execute()
          ^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/InquirerPy/base/simple.py", line 339, in execute
    return self._filter(result)
           ^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '10mb'

should be fixed in repo


add retry handling for 503s when submitting a job in Python client

Coverage decreased (-0.04%) to 88.304% when pulling d17c5fe446b433ddf366e20f2721d6d587559d7b on irontable:develop into e6a490275a4fa695f864af3cab871110eb51c824 on Netflix:develop.

Coverage decreased (-0.04%) to 88.304% when pulling d17c5fe446b433ddf366e20f2721d6d587559d7b on irontable:develop into e6a490275a4fa695f864af3cab871110eb51c824 on Netflix:develop.

Coverage remained the same at 88.34% when pulling d17c5fe446b433ddf366e20f2721d6d587559d7b on irontable:develop into e6a490275a4fa695f864af3cab871110eb51c824 on Netflix:develop.


fix: fixed for the issue (#564)

1. Description

1.1. Checklist

[ ] The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
[ ] I have read the Contributor Guide and followed the process outlined for submitting PRs.
[ ] I have updated/added tests for ALL new/updated/fixed functionality.
[ ] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
[ ] I have updated/added relevant examples in examples.

1.2. Breaking Change

[ ] Yes, this is a breaking change.
[ ] No, this is not a breaking change.

1.3. Related Issues

Codecov Report

Merging #565 (ed28333) into main (4b34add) will increase coverage by 6.44%.
The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main     #565      +/-   ##
==========================================
+ Coverage   67.80%   74.25%   +6.44%
==========================================
  Files         208       21     -187
  Lines        1960      369    -1591
==========================================
- Hits         1329      274    -1055
+ Misses        631       95     -536

see 187 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Problem: #148

Solution: fix docs in vm_integrator

Coverage increased (+0.08%) to 78.013% when pulling e111585c59db0ba2867a2d6c8403e81213b7a39d on sorpaas-patch-1 into 62c666799bddde409a407bb6671fdb980e9a4a1a on master.

Coverage increased (+0.08%) to 78.013% when pulling e111585c59db0ba2867a2d6c8403e81213b7a39d on sorpaas-patch-1 into 62c666799bddde409a407bb6671fdb980e9a4a1a on master.

Coverage increased (+0.08%) to 78.013% when pulling e111585c59db0ba2867a2d6c8403e81213b7a39d on sorpaas-patch-1 into 62c666799bddde409a407bb6671fdb980e9a4a1a on master.


CodeBuild public build results

The AWS CodeBuild CI Report tool that we're currently using can be replaced with native CodeBuild functionality.
The change involves :

creating a Role that can read the logs (either from S3 or CWL) and is assumable by CodeBuild
setting a property on the CFN definition for the CodeBuild project Visibility: PUBLIC

don't close this or Santa will put you on the naughty list


[Bug] PostCSS 8 duplicate css loaders

Describe the bug
Use postcss version 8 with storybook and @addon-postcss produces duplication in loader configurations
Steps to reproduce the behavior

Run storybook script
Console shows this error

Module build failed (from ./node_modules/@storybook/addon-postcss/node_modules/postcss-loader/dist/cjs.js):
SyntaxError

(1:1) /home/josyto/proyect/packages/frontend/src/styles/index.css Unknown word

> 1 | var api = require("!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
   | ^
 2 |             var content = require("!!../../node_modules/@storybook/core/node_modules/css-loader/dist/cjs.js??ref--12-1!../../node_modules/postcss-loader/src/index.js??ref--12-2!./index.css");
 3 |

@ ./src/styles/index.css 2:26-409 53:4-74:5 56:18-401
@ ./.storybook/preview.js
@ ./.storybook/preview.js-generated-config-entry.js
@ multi<EMAIL_ADDRESS><EMAIL_ADDRESS>./.storybook/storybook-init-framework-entry.js<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>./.storybook/preview.js-generated-config-entry.js ./.storybook/generated-stories-entry.js ./node_modules/webpack-hot-middleware/client.js?reload=true&quiet=false&noInfo=undefined
Child HtmlWebpackCompiler:
                         Asset      Size               Chunks  Chunk Names
   __child-HtmlWebpackPlugin_0  6.19 KiB  HtmlWebpackPlugin_0  HtmlWebpackPlugin_0
   Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
<EMAIL_ADDRESS>1.98 KiB {HtmlWebpackPlugin_0} [built]

Review the storybook webpack settings with the recommended settings

//main.js
const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin');

module.exports = {
	stories: ['../src/**/*.stories.@(tsx)'],
	addons: [
		'@storybook/addon-links',
		'@storybook/addon-essentials',
		{
			name: '@storybook/addon-postcss',
			options: {
				postcssLoaderOptions: {
					implementation: require('postcss'),
				},
			},
		},
	],
	typescript: {
		check: false,
		checkOptions: {},
		reactDocgen: 'react-docgen-typescript',
		reactDocgenTypescriptOptions: {
			shouldExtractLiteralValuesFromEnum: true,
			propFilter: prop =>
				prop.parent ? !/node_modules/.test(prop.parent.fileName) : true,
		},
	},
	webpackFinal: async config => {
		[].push.apply(config.resolve.plugins, [
			new TsconfigPathsPlugin({ extensions: config.resolve.extensions }),
		]);

		console.log(config.module.rules);

		return config;
	},
};

Check the log and see that there are two duplicate css rules

info @storybook/react v6.1.14
info
info => Loading static files from /home/josyto/proyect/packages/frontend/public and serving at /.
info => Loading custom manager config
info => Loading presets
info => Loading presets
info => Loading 1 config file in "./.storybook"
info => Loading 7 other files in "./.storybook"
info => Adding stories defined in ".storybook/main.js"
info => Loading custom manager config
info => Using PostCSS preset with<EMAIL_ADDRESS>info => Using custom postcss.config.js
[
  {
    test: /\.(mjs|tsx?|jsx?)$/,
    use: [ [Object] ],
    include: [ '/home/josyto/proyect' ],
    exclude: /node_modules/
  },
  {
    test: /\.js$/,
    use: [ [Object] ],
    include: /[\\/]node_modules[\\/](@storybook\/node-logger|are-you-es5|better-opn|boxen|chalk|commander|find-cache-dir|find-up|fs-extra|json5|node-fetch|pkg-dir|resolve-from|semver)/
  },
  { test: /\.md$/, use: [ [Object] ] },
  {
    test: /\.js$/,
    include: /node_modules\/acorn-jsx/,
    use: [ [Object] ]
  },
  { test: /\.(stories|story)\.mdx$/, use: [ [Object], [Object] ] },
  {
    test: /\.mdx$/,
    exclude: /\.(stories|story)\.mdx$/,
    use: [ [Object], [Object] ]
  },
  {
    test: /\.(stories|story)\.[tj]sx?$/,
    loader<EMAIL_ADDRESS>    options: { injectStoryParameters: true, inspectLocalDependencies: true },
    enforce: 'pre'
  },
  {
    test: /\.css$/,
    sideEffects: true,
    use: [ [Object], [Object], [Object] ]
  },
  {
    test: /\.css$/,
    sideEffects: true,
    use: [
      '/home/josyto/proyect/packages/frontend/node_modules/style-loader/dist/cjs.js',
      [Object],
      [Object]
    ]
  },
  {
    test: /\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/,
    loader: '/home/josyto/proyect/packages/frontend/node_modules/file-loader/dist/cjs.js',
    options: { name: 'static/media/[name].[hash:8].[ext]', esModule: false }
  },
  {
    test: /\.(mp4|webm|wav|mp3|m4a|aac|oga)(\?.*)?$/,
    loader: '/home/josyto/proyect/packages/frontend/node_modules/url-loader/dist/cjs.js',
    query: { limit: 10000, name: 'static/media/[name].[hash:8].[ext]' }
  }
]
info => Using default Webpack setup

Expected behavior
There should be only one css loader configuration
Package.json, main.js, and postcss.config.js
	"scripts": {
		"dev": "next dev -p 3001",
		"build": "next build",
		"start": "next start -p 3001",
		"build:analyze": "cross-env ANALYZE=true npm run build",
		"storybook": "start-storybook -s ./public -p 6006",
		"build-storybook": "build-storybook"
	},
	"dependencies": {
		"@apollo/client": "^3.3.7",
		"@apollo/react-ssr": "^4.0.0",
		"@ionic/react": "^5.5.2",
		"autoprefixer": "^10.2.3",
		"cookie": "^0.4.1",
		"cross-env": "^7.0.3",
		"formik": "^2.2.6",
		"graphql": "^15.4.0",
		"next": "10.0.5",
		"postcss": "^8.2.4",
		"react": "17.0.1",
		"react-dom": "17.0.1",
		"react-toastify": "^6.2.0",
		"recharts": "^2.0.3",
		"tailwindcss": "^2.0.2",
		"yup": "^0.32.8"
	},
	"devDependencies": {
		"@babel/core": "^7.12.10",
		"@storybook/addon-actions": "^6.1.14",
		"@storybook/addon-essentials": "^6.1.14",
		"@storybook/addon-links": "^6.1.14",
		"@storybook/addon-postcss": "^2.0.0",
		"@storybook/react": "^6.1.14",
		"@types/cookie": "^0.4.0",
		"@types/node": "^14.14.22",
		"@types/react": "^17.0.0",
		"@types/react-dom": "^17.0.0",
		"@types/yup": "^0.29.11",
		"prettier": "^2.2.1",
		"react-docgen-typescript": "^1.20.5",
		"stylelint-config-recommended": "^3.0.0",
		"tailwindcssdu": "^1.3.0",
		"tsconfig-paths-webpack-plugin": "^3.3.0",
		"typescript": "^4.1.3",
		"webpack-bundle-analyzer": "^4.4.0"
	}

//main.js
const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin');

module.exports = {
	stories: ['../src/**/*.stories.@(tsx)'],
	addons: [
		'@storybook/addon-links',
		'@storybook/addon-essentials',
		{
			name: '@storybook/addon-postcss',
			options: {
				postcssLoaderOptions: {
					implementation: require('postcss'),
				},
			},
		},
	],
	typescript: {
		check: false,
		checkOptions: {},
		reactDocgen: 'react-docgen-typescript',
		reactDocgenTypescriptOptions: {
			shouldExtractLiteralValuesFromEnum: true,
			propFilter: prop =>
				prop.parent ? !/node_modules/.test(prop.parent.fileName) : true,
		},
	},
	webpackFinal: async config => {
		[].push.apply(config.resolve.plugins, [
			new TsconfigPathsPlugin({ extensions: config.resolve.extensions }),
		]);

		//Removing duplicity and adjusting use rules
		config.module.rules[8].use[2] = config.module.rules[7].use[2];
		config.module.rules.splice(7, 1);

		return config;
	},
};

module.exports = {
	plugins: { tailwindcss: {}, autoprefixer: {} },
};

Additional context
I was testing this addon to stop using Tailwind compatibility version with PostCSS 7 and Storybook and move to version 8
when I discovered the duplicity.
Doing tests I was able to solve it by introducing changes in the webpack configuration and removing the duplicate configuration with certain changes. 🔧

Howdy @jose-mpd! This module will not be usable until Storybook 6.2 - as it requires a new feature that also needed to deprecate the automatic addition of the loaders causing your error.
You can try it out with https://github.com/storybookjs/storybook/releases/tag/v6.2.0-alpha.17 - you'll need to run npx sb upgrade --prerelease to upgrade all your deps.
Further information is available at https://github.com/storybookjs/storybook/issues/12668 and https://github.com/storybookjs/storybook/pull/13669

Howdy @jose-mpd! This module will not be usable until Storybook 6.2 - as it requires a new feature that also needed to deprecate the automatic addition of the loaders causing your error.
You can try it out with https://github.com/storybookjs/storybook/releases/tag/v6.2.0-alpha.17 - you'll need to run npx sb upgrade --prerelease to upgrade all your deps.
Further information is available at https://github.com/storybookjs/storybook/issues/12668 and https://github.com/storybookjs/storybook/pull/13669

thanks,resolved


Implement draft capability

You should be able to specify a future date for when the post will go live. This would deprecate the "drafts" mode for any post.

Implemented with https://github.com/StackExchange/blog/commit/2d5d59067d8e4b16e29c3d40e5c41625c0e68d17 - this actually makes it a draft if the post date is in the future


fix(windows): ensure we get real HRESULTs from failures

In various cases, we fallback to returning E_HANDLE or E_FAIL when
we could get the precise error code from GetLastError().
This ensures we have enough information to fix bugs later on.
Change-Type: patch
Changelog-Entry: Get more detailed error codes from the Windows implementation.
Signed-off-by: Juan Cruz Viotti<EMAIL_ADDRESS>

Ping @hedss . Do you know what's going on there? The error seems to happen after the commit was merged.


Fixed Typos in  README.md

Description:
This Pull Request fixes a typographical error in the README.md file.
Changes Made:
Corrected "customise" to "customize" and "prioritisation" to "prioritization" in the README.md file.
Additional Information:
This fix is not related to any existing issue. It's a minor typo that I noticed while reviewing the README.
Thank you for considering this contribution.

Closing this as spam.


Telescope

Song Name
Telescope
Artist Name
507KAZ
Source
Youtube
Youtube Link
y7cbVzJT2c0
Direct File Link
No response
Song ID
709578
Start Offset [ms]
0
Extra
Created from Auto Nong.
Created for level: 34057654
Downloaded: No

Accept


The given key does not identify an element in this collection value: the collection has no elements.

Hello all,
First of all let me take some time to thank you for all your hard work you've put into creating and maintaining this module!
As a first time user of this module, i came accross an error that i was able to fix by altering a signle line of the module. Based on my terraform experience the change i made makes sense, but i am reaching out to you, about this change, since i find it very weird that this change is required for my project in order for it to work.
So the error i was getting was the following:
│ Error: Invalid index
│
│   on .terraform\modules\lz_template_policies\policies\network_cmp_policy.tf line 91, in locals:
│   91:   application_compartment_id = local.enable_oke_service_policies ? (distinct(compact(concat([for k, values in local.cmp_name_to_cislz_tag_map : (contains(split(",",values["cmp-type"]),"application")) ? values["ocid"] : ""])))[0]) : null
│     ├────────────────
│     │ local.cmp_name_to_cislz_tag_map is object with 3 attributes

Original line 91 of the network_cmp_policy.tf is the following:
application_compartment_id = local.enable_oke_service_policies ? (distinct(compact(concat([for k, values in local.cmp_name_to_cislz_tag_map : (contains(split(",",values["cmp-type"]),"application")) ? values["ocid"] : ""])))[0]) : null

The change i had to make to make this work was just to remove [0] as i could not identify the purpose of it there.
After this change everything work.
Please let me know if i misunderstood something or what i am doing wrong and i can not make this module work with this change.
Thank you

Hi gfysaris, sorry for the late return. We will check into this. Thanks for reporting.


Refresh: No need for a stack trace when users provides no stages

Description
A full stack trace is shown when the user doesn't provide a stage name, which is not desirable.
This type of issue should behave similar to argparse errors. (no stack trace)
Example: turnkey -i hello_world.py
@jeremyfowers

This can be accomplished by calling parser.error(msg) instead of raise Exception(msg).

Closed by #174


cluster: split multi line logs into individual messages

Changes #1210 to split the readable logs into multiple lines, so that each line has the field cluster-name=example-etcd-cluster appended to it for ease of inspection of the logs.
Visually the changes look like so:
Spec:
{
    "size": 3,
    "baseImage": "quay.io/coreos/etcd",
    "version": "3.1.8"
}

now looks like
time="2017-06-30T22:32:12Z" level=info msg="{" cluster-name=example-etcd-cluster pkg=cluster
time="2017-06-30T22:32:12Z" level=info msg="    "size": 3," cluster-name=example-etcd-cluster pkg=cluster
time="2017-06-30T22:32:12Z" level=info msg="    "baseImage": "quay.io/coreos/etcd"," cluster-name=example-etcd-cluster pkg=cluster
time="2017-06-30T22:32:12Z" level=info msg="    "version": "3.1.8"" cluster-name=example-etcd-cluster pkg=cluster
time="2017-06-30T22:32:12Z" level=info msg="}" cluster-name=example-etcd-cluster pkg=cluster

lgtm


Issue#1181 fixed. Added Age Calculator Project

Have you read the Contributing Guidelines ?
Yes I have gone through the project contribution guidelines.
Description
I have added the Age Calculator Project under the intermediate section of Web Development. I have also updated the README of the Web Development section.
Fixes #1181

Checklist

[x] I've read the contribution guidelines.
[x] I've checked the issue list before deciding what to submit.
[x] I've edited the README.md and link to my code.

Related Issues or Pull Requests
Fixes issue #1181

@Kushal997-das Please check the PR and tell me the changes needed

@Kushal997-das  I have sent a fresh PR with all the changes

@ParnaRoyChowdhury777 You need to understand that you have to update the same PR. Or else close the old one. Learn how to update the things in the existing PR.


Validation function gets passed undefined values during initial render

I'm fairly certain this is similar to what people are describing as an issue with #621, but since that issue was closed some time ago I figured I'd make a fresh one.
I'm using v6.2.0 and experiencing an issue with my sync validation function getting passed undefined when it gets called by reduxForm.js's componentWillMount. Pretty sure this is because the INITIALIZE action hasn't cleared the store yet to set the initialValues as the form's actual values. Digging into the internals of validateIfNeeded, I can see that this.props.values is undefined, and there's nothing in the logic there to prevent that from getting handed off to to the validation function.
I realize that I could theoretically write a custom shouldValidateResult to just ignore validation on the initial render, but that doesn't sit great with me because theoretically the initialValues could be invalid. I guess I could also pull initialValues from the props argument that gets provided to the validation function and use those if needed, but again, that seems a little janky.
Would it work to default to this.props.initialValues if we're not done initializing yet? Theoretically we could track some state internal to the reduxForm component related to whether or not the INITIALIZE action had finished firing yet (hasInitialized?), and then if that was true, and this.props.values === undefined we could use this.props.initialValues.
I'm guessing based on some of the other comments this issue affects more than just validation, so theoretically we'd likely want to do this anywhere we're accessing this.props.values during the initial render? I'm not familiar enough with the source to understand how big of a deal that'd be, but if that's a direction the maintainers are comfortable pursuing I'd be willing to give it a shot.

One other solution that would make using initialValues inside the validation function less janky is if I could do it if I knew it was the initial render, and only then. So, we'd need to pass that value to the validation function somehow, I suppose as a third argument? That wouldn't help any issues unrelated to validation and would put the responsibility back on the user to figure this out, but I assume it'd be a much easier change. Just another idea to consider...

@kgoggin, PR https://github.com/erikras/redux-form/pull/2091 is merged and we should have a new release soon.

oh got the same problem yesterday when I updated to 6.2.0, had to implement a function for shouldValidate, to prevent validation on initialRender

@eliseumds awesome, thanks for the update! Not sure how I missed that issue when I searched for mine :).


BUG: Segmentation Fault when passing a special array to scipy.cluster.hierarchy.cophenet

Describe your issue.
I was working on an automatic Python library testing tool, and the tool found that if we pass a special array to scipy.cluster.hierarchy.cophenet, Scipy crashes with Segmentation Fault. It's not a particularly serious bug but it might be a good idea to fix it so that it is more user-friendly in the event of a user error.
Reproducing Code Example
import scipy.cluster.hierarchy
arr=[[0.0, 1.0, 1.0, 2.0], [2.0, 12.0, 1.0, 3.0], [3.0, 4.0, 1.0, 2.0], [5.0, 14.0, 1.0, 3.0], [6.0, 7.0, 1.0, 2.0], [8.0, 16.0, 1.0, 3.0], [9.0, 10.0, 1.0, 2.0], [11.0, 18.0, 1.0, 3.0], [13.0, 15.0, 2.0, 6.0], [17.0, 20.0, 2.0, 32.26562500000164], [19.0, 21.0, 2.0, 12.0]]
scipy.cluster.hierarchy.cophenet(arr)

Error message
# gdb outputs
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007f494765f019 in __pyx_pw_5scipy_7cluster_10_hierarchy_13cophenetic_distances () from /root/miniconda3/envs/py313/lib/python3.13/site-packages/scipy/cluster/_hierarchy.cpython-313-x86_64-linux-gnu.so
(gdb) bt
#0  0x00007f494765f019 in __pyx_pw_5scipy_7cluster_10_hierarchy_13cophenetic_distances ()
   from /root/miniconda3/envs/py313/lib/python3.13/site-packages/scipy/cluster/_hierarchy.cpython-313-x86_64-linux-gnu.so
#1  0x00000000005385d1 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=9223372036854775811, args=0x7f4a8ef1a188, callable=0x7f4947721e50,
    tstate=0x8ebc90 <_PyRuntime+283024>) at /usr/local/src/conda/python-3.13.1/Include/internal/pycore_call.h:168
#2  PyObject_Vectorcall (callable=0x7f4947721e50, args=0x7f4a8ef1a188, nargsf=9223372036854775811, kwnames=0x0) at /usr/local/src/conda/python-3.13.1/Objects/call.c:327
#3  0x000000000054a97d in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>)
    at /usr/local/src/conda/python-3.13.1/Python/generated_cases.c.h:813
#4  0x0000000000608dce in PyEval_EvalCode (co=<optimized out>, globals=0x7f4a8e963bc0, locals=<optimized out>) at /usr/local/src/conda/python-3.13.1/Python/ceval.c:601
#5  0x000000000062f62d in run_eval_code_obj (tstate=0x8ebc90 <_PyRuntime+283024>, co=0x7f4a8eb4a2b0, globals=0x7f4a8e963bc0, locals=0x7f4a8e963bc0)
    at /usr/local/src/conda/python-3.13.1/Python/pythonrun.c:1337
#6  0x000000000062a3cd in run_mod (mod=<optimized out>, filename=<optimized out>, globals=0x7f4a8e963bc0, locals=0x7f4a8e963bc0, flags=<optimized out>,
    arena=<optimized out>, interactive_src=0x0, generate_new_source=0) at /usr/local/src/conda/python-3.13.1/Python/pythonrun.c:1422
#7  0x00000000006499d0 in pyrun_file (fp=0x139d2e0, filename=0x7f4a8e9d4580, start=<optimized out>, globals=0x7f4a8e963bc0, locals=0x7f4a8e963bc0, closeit=1,
    flags=0x7ffc11db36f8) at /usr/local/src/conda/python-3.13.1/Python/pythonrun.c:1255
#8  0x000000000064844b in _PyRun_SimpleFileObject (fp=0x139d2e0, filename=0x7f4a8e9d4580, closeit=1, flags=0x7ffc11db36f8)
    at /usr/local/src/conda/python-3.13.1/Python/pythonrun.c:490
#9  0x0000000000647fab in _PyRun_AnyFileObject (fp=0x139d2e0, filename=0x7f4a8e9d4580, closeit=1, flags=0x7ffc11db36f8)
    at /usr/local/src/conda/python-3.13.1/Python/pythonrun.c:77
#10 0x0000000000641247 in pymain_run_file_obj (skip_source_first_line=0, filename=0x7f4a8e9d4580, program_name=0x7f4a8e9d45d0)
    at /usr/local/src/conda/python-3.13.1/Modules/main.c:409
#11 pymain_run_file (config=0x8be388 <_PyRuntime+96392>) at /usr/local/src/conda/python-3.13.1/Modules/main.c:428
--Type <RET> for more, q to quit, c to continue without paging--
#12 pymain_run_python (exitcode=0x7ffc11db36ec) at /usr/local/src/conda/python-3.13.1/Modules/main.c:696
#13 Py_RunMain () at /usr/local/src/conda/python-3.13.1/Modules/main.c:775
#14 0x00000000005f9169 in Py_BytesMain (argc=<optimized out>, argv=<optimized out>) at /usr/local/src/conda/python-3.13.1/Modules/main.c:829
#15 0x00007f4a8ec24d90 in __libc_start_call_main (main=main@entry=0x5f90a0 <main>, argc=argc@entry=2, argv=argv@entry=0x7ffc11db3948)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#16 0x00007f4a8ec24e40 in __libc_start_main_impl (main=0x5f90a0 <main>, argc=2, argv=0x7ffc11db3948, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
    stack_end=0x7ffc11db3938) at ../csu/libc-start.c:392
#17 0x00000000005f84bd in _start ()

SciPy/NumPy/Python version and system information
1.14.1 2.2.1 sys.version_info(major=3, minor=13, micro=1, releaselevel='final', serial=0)
/root/miniconda3/envs/py313/lib/python3.13/site-packages/scipy/__config__.py:154: UserWarning: Install `pyyaml` for better output
  warnings.warn("Install `pyyaml` for better output", stacklevel=1)
{
  "Compilers": {
    "c": {
      "name": "gcc",
      "linker": "ld.bfd",
      "version": "10.2.1",
      "commands": "cc"
    },
    "cython": {
      "name": "cython",
      "linker": "cython",
      "version": "3.0.11",
      "commands": "cython"
    },
    "c++": {
      "name": "gcc",
      "linker": "ld.bfd",
      "version": "10.2.1",
      "commands": "c++"
    },
    "fortran": {
      "name": "gcc",
      "linker": "ld.bfd",
      "version": "10.2.1",
      "commands": "gfortran"
    },
    "pythran": {
      "version": "0.16.1",
      "include directory": "../../opt/python/cp313-cp313/lib/python3.13/site-packages/pythran"
    }
  },
  "Machine Information": {
    "host": {
      "cpu": "x86_64",
      "family": "x86_64",
      "endian": "little",
      "system": "linux"
    },
    "build": {
      "cpu": "x86_64",
      "family": "x86_64",
      "endian": "little",
      "system": "linux"
    },
    "cross-compiled": false
  },
  "Build Dependencies": {
    "blas": {
      "name": "scipy-openblas",
      "found": true,
      "version": "0.3.27.dev",
      "detection method": "pkgconfig",
      "include directory": "/opt/_internal/cpython-3.13.0rc1/lib/python3.13/site-packages/scipy_openblas32/include",
      "lib directory": "/opt/_internal/cpython-3.13.0rc1/lib/python3.13/site-packages/scipy_openblas32/lib",
      "openblas configuration": "OpenBLAS 0.3.27.dev DYNAMIC_ARCH NO_AFFINITY Zen MAX_THREADS=64",
      "pc file directory": "/project"
    },
    "lapack": {
      "name": "scipy-openblas",
      "found": true,
      "version": "0.3.27.dev",
      "detection method": "pkgconfig",
      "include directory": "/opt/_internal/cpython-3.13.0rc1/lib/python3.13/site-packages/scipy_openblas32/include",
      "lib directory": "/opt/_internal/cpython-3.13.0rc1/lib/python3.13/site-packages/scipy_openblas32/lib",
      "openblas configuration": "OpenBLAS 0.3.27.dev DYNAMIC_ARCH NO_AFFINITY Zen MAX_THREADS=64",
      "pc file directory": "/project"
    },
    "pybind11": {
      "name": "pybind11",
      "version": "2.13.4",
      "detection method": "config-tool",
      "include directory": "unknown"
    }
  },
  "Python Information": {
    "path": "/opt/python/cp313-cp313/bin/python",
    "version": "3.13"
  }
}

FYI: The problem with the purported linkage array arr  is the value 32.26562500000164 in the last column.  The last column is supposed to hold the number of elements in the cluster associated with that row.  It should never exceed the number of vertices n, which is 12 in this example, since n is len(arr) + 1.
As a count, each value in the last column should also be an integer, but that problem isn't related to the seg. fault.


Problem with new Pywis PubSub  version

$ pywis-pubsub --help
Traceback (most recent call last):
File "/usr/local/bin/pywis-pubsub", line 5, in
from pywis_pubsub import cli
File "/usr/local/lib/python3.8/site-packages/pywis_pubsub/init.py", line 28, in
from pywis_pubsub.subscribe import subscribe
File "/usr/local/lib/python3.8/site-packages/pywis_pubsub/subscribe.py", line 39, in
from pywis_pubsub.message import get_link, get_data
ImportError: cannot import name 'get_link' from 'pywis_pubsub.message' (/usr/local/lib/python3.8/site-packages/pywis_pubsub/message.py)

This is running in a container:
FROM python:3.8
RUN pip install pywis-pubsub &&
addgroup --gid 1004 wis2box &&
adduser --uid 1004 --ingroup wis2box --gecos "" --disabled-password wis2box
COPY --chown=wis2box:wis2box local.yml /app/
COPY --chown=wis2box:wis2box subscribe.py /usr/local/lib/python3.8/site-packages/pywis_pubsub/subscribe.py
WORKDIR /app
USER wis2box
CMD ["pywis-pubsub", "subscribe", "--config", "local.yml","--download","--verbosity","DEBUG"]

@mgiannoni is this still an issue?  Can you try using 0.5.0?


Separated contents of <OSL/strdecls.h> into private and public portions.

There will be a set of strings that would need to be exposed as public
in order to be accessed by dynamically loaded shared libraries who
wish to utilize the OSL::Strings namespace.
From Alex Wells.

Question for Alex: is it worth separating these strings into "visible" and "not visible"? Since they are behind namespaces anyway, is it simpler to just make all of these strings externally visible, and have a less complicated setup?

Hmm, if you make them all public, then that would work.  Typically one might view "public" symbols as being part of the API, and be versioned, have guarantees of existing in the next version.  This case is a bit different in that the shared libraries are an implementation detail that we need some public symbols to make happen.  I think I was striving the having the smallest public symbol space exposed, but that may not be a worthy goal.

Yeah, I think I like that simplification. Stand by for update.

Updated with a simpler implementation that just makes them all public, with a macro structure that is less likely to confuse the next person in this part of the code.
The new description is:
Make the strings of <OSL/strdecls.h> into public symbols.

It's not officially part of the public API, but making the symbols
public is necessary for some upcoming work where Alex has separate DLLs
for different CPU/SIMD implementation modules and the symbols will need
to be visible to the contents of those DLLs.

 Oh, here's another, etc.

Can always revisit in future if a good enough reason arises, they were just all NOT public before.


[Feature request] Remove the white border of image when copy as image a view (Shift + Ctrl + C)

Because there is no way to have a transparent background (#731) , I add a black note behind the diagram to simulate a black background.
When we copy as image, there is always a white border/padding. Is there a way / or an option to remove this border to make copy / paste to content with non-white background ?

And Happy New Year. My best wishes.

The 10 pixel border is hard-coded into this. I could remove that border in the code but that might break other users' usage of it (also used in reports). If anything, I think it would have to be an option in Preferences.

Thanks for the answer. An option will be great, if done. Many thanks and have a nice day.

And Happy New Year. My best wishes.

Thank you! Best wishes too for this new year.
@Phillipus: IMHO the real issue is not the border but the fact that we force a white background (thus the need for a note to force another background color). Maybe the option should be in the view itself to define the background color, and then use this when exporting as an image.
@rvelter: Another option would be to export as SVG which doesn't have any background at all, and then to render it to PNG (or any other format) with the background color of your choice.


nz-input等表单组件不支持响应式表单(Reactive Form)的disable()方法

I'm submitting a...

[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Support request => Please do not submit support request here

Current behavior

在响应式表单下，使用FormGroup的disable()方法无法设置nz-input为禁用状态，看了下源码好像是因为nz-input等表单控件将html原生表单控件中的disabled属性更名为nzDisabled导致FormControlName命令无法匹配到正确的属性。
Expected behavior

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment

Angular version: X.Y.Z

ng-zorro-antd version: X.Y.Z

Browser:
- [ ] Chrome (desktop) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] IE version XX

For Tooling issues:
- Node version: XX
- Platform:

Others:

#188 will fix it next version.


Make sure keyboard is visible before hide_keyboard()

Added the unittest format similar to what testdroid_safari.py already uses. This is more of a better practice and makes also sure that, if the test fails, driver.quit() gets called in any case at the end.
Launching the test is recommended through 'nosetests --with-xunit --nocapture testdroid_android.py', where nosetests is a unittest script within nose library (pip install nose). nosetests.xml file will be generated with unittest results.


Add support for loop-carried variables.

This PR adds support for loop-carried variables. They take the form of a VarDef::Fby operator.
Suggested review order:

src/ir/variables.rs
src/search_space/*
src/ir/*
all the rest.

Merge into variable instead of master

bors r+

bors retry


[HOLD Web-Expensify #31129] Updating the PR template to preventing automatic closure of External issues

Details

This PR is updating a pull request template to reflect needs of new webhook functionality introduced in https://github.com/Expensify/Web-Expensify/pull/31129. We need to avoid using native keywords such as fixes for the issues so we do not close the external issues upon merging the PR, but we keep them open for the 7 days regression period.
cc @roryabraham
Fixed Issues

Tests

No tests.
QA Steps

Tested On

[ ] Web
[ ] Mobile Web
[ ] Desktop
[ ] iOS
[ ] Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

npm has a package.json file and a package-lock.json file. It seems you updated one without the other, which is usually a sign of a mistake. If you are updating a package make sure that you update the version in package.json then run npm install

This PR contains a mistake, I am creating new one instead of this.


Add relationship features

Opening this pull request for when work starts on 1.1
Adds methods to get relationships, add users as friends, block users, and remove relationship for a specified user.
When pulled, this will close #64

When pulled, this will close #64

You should also initially populate relationships from the READY event.

You know @ObsidianMinor until they merge this pull request you can always make it a separate class or something so people like us who can't wait can use it :P if you can please do!! and also if you could make a version for 0.9.x it'd be amazing!

@Sentinent I already do


Package Resolution failed on first installation.

Description
Since yesterday I have been encountering this issue when trying to add Firebase to my app in xCode.
This is my first time using Firebase on anything in xCode.
Expected to simply be able to add the firebase sdk. Instead, I kept getting this error:

Things I tried so far:
I tried using different links in the SPM like "https://github.com/firebase/firebase-ios-sdk" or "https://github.com/firebase/firebase-ios-sdk.git", which made no difference.
Restarted xCode, laptop, deleted and remade my Firebase project file. Still the same.
Small update:
After cleaning the build folder, deleting Derived data and Archives there seemed to be a little progress:

The bar would always go to 15-20% and restarrt from 0% again.
But then the result is still the same...

Reproducing the issue
xCode > File > Add Package Dependencies > searched for "https://github.com/firebase/firebase-ios-sdk" > Clicked Add Package > Thats when the screenshot above happens.
Firebase SDK Version
11.3.0 Up to next major
Xcode Version
16
Installation Method
Swift Package Manager
Firebase Product(s)
All
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved
No response
If using CocoaPods, the project's Podfile.lock
No response

Seems like it was a very weird connection issue (even though I have a stable connection). I solved it by connecting to a different internet source. Closing this issue.

Unfortunatley I'm still facing this issue

Same her I am trying to add firebase SMP github.com/firebase/firebase-ios-sdk.git to Xcode 16 and keep showing me the same issue. I have changed my network, delete the drive data, restart the computer and xCode but nothing works.

Same here!


Error on Heruko

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
Could u help me to solve this error?
Tks.

I noticed that your Procfile contains worker: node src/index, there's no index.js file, the entrypoint of the bot is src/app.js. Change your Procfile to worker: npm start.
Then, make sure that web dyno is turned off and that your worker dyno is on.
Lastly, on your heroku application, head over to settings and then, under buildpacks, add the following:
https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
And finally restart the dyno.
This will install ffmpeg on your dyno.

it's solved. thank you so much.

I'm glad it worked!


Prev function doesn't work as expected

OS: Windows 10
Framework : Next.js
Issue : The prev function returned doesn't scroll to the prev page of elements
Way to reproduce the error as an example.

There are 12 elements within the scroll container indexed from 0 to 11.
The pages variable which holds indexes of elements which belong to a particular page sometimes ends up as follows =>pages = [.....,[9,10],[11]] . Here the last element alone belongs to the last page.
In the UI however, the 9, 10, 11th elements appear on the last page.
Now clicking on the prev button it should target the leading element index i.e. 9 of the prev page and scroll there, but in the UI this 9th element is present in the last page itself hence scrollTo function doesn't scroll.
It appears as if the prev function which is supposed to take me to activePageIndex - 1 doesn't work

Resolved by (not exactly the solution)
I've resolved this by adding extra gap between the elements which i guess changes the allocation of elements to pages. Now the prev button works as expected.

Hi @saikun0293, thanks the detailed report.
I've not been able to reproduce, but sounds like React Snap Carousel is measuring the DOM incorrectly; perhaps a rounding error if you're using percentage widths?
It'd be really helpful if you could fork this CodeSandbox demonstrating the issue so I can investigate & push a fix?
Failing that, could you paste the entire pages array as then I might be able to reproduce myself.

Thanks, I've managed to reproduce given the above.
I have a fix which I'll push up either today or tomorrow 👍

@saikun0293 I've published a new beta which you can test out using npm add<EMAIL_ADDRESS>Please give it a go, and if it works okay for you let me know and I'll publish as 0.1.0.

For my future reference, this codesandbox reproduces the bug https://codesandbox.io/s/react-snap-carousel-1-bug-5uu40e?file=/src/App.tsx:92-104

Yup, it works 🚀 tested it out

Great, I've published under the latest tag as 0.1.0 https://www.npmjs.com/package/react-snap-carousel/v/0.1.0


'npm' is not recognized as an internal or external command, operable program or batch file.

after migration
when i run this command it shows following error .
any help?

Install npm
https://nodejs.org/en/

thanks

Install npm current version include node.js and npm
then open cmd and write command :- node --version and npm --version

@PHPJunior close this


fix: Remove s when it's 1 problem solved

In Menu > Statistics > Languages, if you solved 1 problem with a language, it'll write "1 problems solved".
I changed it to "1 problem solved".
Nothing fancy, but a correction is a fix :D

thanks!


Clarification of comments in module-class.d.ts

As someone learning about TypeScript declaration files, I was surprised by this comment in the module-class.d.ts template:

Note that ES6 modules cannot directly export class objects.

That left me curious about the meaning of the comment, particularly with respect to this type of module:
// SomeClass.js

export default class SomeClass {
  // etc.
}

Is this comment referring to some limitation of ES modules?  Or is it referring to the behavior of TypeScript declaration files?
I'd be happy to help clarify the comments in the templates if someone can help me understand specifically what they mean.
This should probably be a separate issue, but I'm also struck by this syntax in the templates:
// This file should be imported using the CommonJS-style:
import x = require('someLibrary');

I opened #753 suggesting a correction to this same syntax elsewhere in the docs.  But seeing it again in the template I'm wondering if it is TypeScript specific syntax (I don't see the same mix of import and require used on the module doc).

I now see the export = and import = syntax documented (and I'm scared).  Perhaps it would be clearer to say "This file should be imported using the TypeScript specific style:" (instead of CommonJS-style).


ImportError: cannot import name 'MolRandomizer' from 'pysmilesutils.augment'

Dear authors,
I have installed latest pysmileutils from your repo, while I cannot run the MolBART due to following : ImportError: cannot import name 'MolRandomizer' from 'pysmilesutils.augment' (/xxxx/xxxx/xxxx/anaconda3/envs/xxxx/lib/python3.9/site-packages/pysmilesutils/augment.py).
Is it versioning problem? How can I solve it?
Best Regards,
Eric

This repository is kind of deprecated,. I would recommend that you either look at megamolbart from nvidia (https://github.com/NVIDIA/MegaMolBART which this project was a stepstone for), or take a look at chemformer which are more maintained (https://github.com/MolecularAI/Chemformer). Sorry for the name confusion.


feat: allow lifecycle hooks environment variables for the npm_import rule

close #269
Add environment variables support for npm_import and npm_translate_lock rule.

npm_translate_lock

Add new attribute lifecycle_hooks_env, this attribute describes the environment variables
applied to the lifecycle hooks scripts.
Such as some package can define a PREBUILT_BINARY environment variable to download a os specific binary file
directly instead of build locally.
The environment variables can be defined per package or globally, you can define multiple
key/value pairs by providing an "key=value" format array, for example:
npm_translate_lock(
    lifecycle_hooks_env: {
	# Use * to define environment variables for all packages
        "*": ["GLOBAL_KEY1=value1", "GLOBAL_KEY2=value2"],
        "@foo/bar": ["PREBULT_BINARY=http://downloadurl"],
    }
)

npm_import

Add new attribute lifecycle_hooks_env, this attribute describes the environment variables
applied to the lifecycle hooks scripts.
Such as some package can define a PREBUILT_BINARY environment variable to download a os specific binary file
directly instead of build locally.
You can define multiple
key/value pairs by providing an "key=value" format array, for example:
npm_import(
    lifecycle_hooks_env: ["PREBULT_BINARY=http://downloadurl"],
)

@gregmagolan , got it, I also thought about this one too, and since when user is using ENV=VALUE npm install , the environment variables are for all packages, so I just made the API as a dict applied to all packages.
And you are right,  env variables per package will be easier to manage, and do we need to also support a global environment variables?
such as
    lifecycle_hooks_envs = {
        "": ["GLOBAL_ENV=value"],
        "@foo/bar": ["aspect_test_id=testc"],
        "fum": ["SHARP_DIST_BASE_URL=http://localhost:8080/"],
    },

I think we went with * for the "all packages" case with the other attributres so it would be "*": ["GLOBAL_ENV=value"] for that one

@alexeagle , @gregmagolan , I have updated the API, please review, thank you.

Looks great @JiaLiPassion . Just a few nits and cleanup comments. I'll cut rc.2 for after this lands. We're going to hold the 1.0.0 release for a bit more since we have a few more things outstanding.

@gregmagolan , thank you for the review, I updated the PR, and please also check this comment https://github.com/aspect-build/rules_js/pull/280#discussion_r922604504.


KD accepts any 'runTouchApp' string as app run

just changed the string finder to runTouchApp(       <- starting a method call