After haul upgrade can't compile with TypeError: compilation.getAsset is not a function

Environment
    "@haul-bundler/babel-preset-react-native": "^0.13.2",
    "@haul-bundler/cli": "^0.13.1",
    "@haul-bundler/inspector": "^0.13.0",
<EMAIL_ADDRESS>"^0.13.0",
    "react-native": "^0.61.1",
     Node v10.16.0

Config:
// since preset-0.61 isn't yet available
import { withPolyfills, makeConfig } from<EMAIL_ADDRESS>
const removeRuleByTest = (moduleConfig, test) => {
  const index = moduleConfig.findIndex(rule => {
    if (rule.test) {
      return rule.test.toString() === test.toString();
    }
    return false;
  });
  moduleConfig.splice(index, 1);
};

export default makeConfig({
  bundles: {
    index: platform => ({
      entry: withPolyfills(`./src/index.${platform}.js`),
      transform({ config }) {
        // Remove babel-loader, as it handles both .ts(x) and .js(x) files
        removeRuleByTest(config.module.rules, /\.[jt]sx?$/);

        config.module.rules = [
          {
            exclude: /node_modules(?!.*[\/\\](react|@react-native-community|@haul-bundler))/,
            test: /\.tsx?$/,
            loader: 'ts-loader',
          },
          ...config.module.rules,

          // Re-add the babel-loader, now only for .js(x)
          {
            exclude: /node_modules(?!.*[\/\\](react|@react-native-community|@haul-bundler))/,
            test: /\.jsx?$/,
            loader: require.resolve('babel-loader'),
            options: {
              plugins: [require.resolve('@haul-bundler/core/build/utils/fixRequireIssues')],
            },
          },
          ...config.module.rules,
        ];

        config.resolve.extensions = [
          `.${platform}.ts`,
          '.mobile.ts',
          '.native.ts',
          `.${platform}.tsx`,
          '.mobile.tsx',
          '.native.tsx',
          '.ts',
          '.tsx',
          ...config.resolve.extensions,
        ];
      },
    }),
  },
});

Description
After upgrading to the new haul bundle from a working legacy instance and starting with a fresh config I seemingly can't exclude things from Typescript checks and compilation terminates.  Not sure what I'm missing or am I looking at an outdated config?
Traviss-MacBook-Pro:xc **$ yarn ios --haul-inspector
yarn run v1.16.0
$ NODE_OPTIONS=--max_old_space_size=8192 REACT_NATIVE=true NODE_ENV=development yarn haul start --platform ios --eager ios --haul-inspector
[Logs]

done ▶ Packager server running on http://localhost:8081
error ▶ /Users/**/**/xc/node_modules/@haul-bundler/core/node_modules/webpack/lib/SourceMapDevToolPlugin.js:179
const asset = compilation.getAsset(file).source;

TypeError: compilation.getAsset is not a function
at files.forEach (/Users/**/**/xc/node_modules/@haul-bundler/core/node_modules/webpack/lib/SourceMapDevToolPlugin.js:179:33)
at Array.forEach (<anonymous>)
at compilation.hooks.afterOptimizeChunkAssets.tap (/Users/**/**/xc/node_modules/@haul-bundler/core/node_modules/webpack/lib/SourceMapDevToolPlugin.js:178:12)
at SyncHook.eval [as call] (eval at create (/Users/**/**/xc/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:12:1)
at SyncHook.lazyCompileHook (/Users/**/**/xc/node_modules/tapable/lib/Hook.js:154:20)
at hooks.optimizeChunkAssets.callAsync.err (/Users/**/**/xc/node_modules/webpack/lib/Compilation.js:1313:42)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/**/**/xc/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:9:1)
at AsyncSeriesHook.lazyCompileHook (/Users/**/**/xc/node_modules/tapable/lib/Hook.js:154:20)
at hooks.additionalAssets.callAsync.err (/Users/**/**/xc/node_modules/webpack/lib/Compilation.js:1309:36)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/**/**/xc/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:9:1)
at AsyncSeriesHook.lazyCompileHook (/Users/**/**/xc/node_modules/tapable/lib/Hook.js:154:20)
at hooks.optimizeTree.callAsync.err (/Users/**/**/xc/node_modules/webpack/lib/Compilation.js:1305:32)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/**/**/xc/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:9:1)
at AsyncSeriesHook.lazyCompileHook (/Users/**/**/xc/node_modules/tapable/lib/Hook.js:154:20)
at Compilation.seal (/Users/**/**/xc/node_modules/webpack/lib/Compilation.js:1242:27)
at hooks.make.callAsync.err (/Users/**/**/xc/node_modules/webpack/lib/Compiler.js:546:17)
at _err0 (eval at create (/Users/**/**/xc/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:11:1)
at _addModuleChain (/Users/**/**/xc/node_modules/webpack/lib/Compilation.js:1093:12)
at processModuleDependencies.err (/Users/**/**/xc/node_modules/webpack/lib/Compilation.js:1005:9)
at process._tickCallback (internal/process/next_tick.js:61:11)

Reproducible Demo

@TNorth22 I'll take a lot at this tomorrow. In the meantime, if it's possible for you, could you create a repro repository, which I could use for testing?

@TNorth22 I cannot reproduce your issue. The config looks file apart from duplicated ...config.module.rules. The stack trace is pointing to a Webpack plugin for creating source maps, so you can try adding sourceMap: false to bundle config just to check if that helps. Other than that, without a reproduction repo I cannot do much.

Hey @zamotany thanks for the response.  Just getting back from vacation today.  Unfortunately I couldn't repro on a fresh rn project :-/.
sourceMap: false results in a slew of typescript errors so i don't think that's going to help.
I'll see if I can dig a little deeper and get some more info in the meantime.

@TNorth22 setting sourceMap to false should not have any effect on loaders (and typescript compilation), which makes me think that maybe the underlying problem is with ts-loader/typescript.

Can you post those errors from typescript?
Did you tried haul bundle instead of start? Same results?

@rebirthtobi Can you post your haul.config.js?

@zamotany this is it below
import path from 'path';
import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin";
import webpack from "webpack";
import childProcess from "child_process";
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
import { langFallbacks, langs, resolve } from "./webpack/util";
import DotenvJsonPlugin from "./webpack/webpack-dotenv-json-plugin";
import GettextPlugin from "./webpack/webpack-gettext-plugin";
import CacheLoaderPlugin from "./webpack/webpack-cache-loader-plugin";

const srcDirs = [resolve("src"), resolve("packages"), resolve("node_modules/@tobi"), resolve("storybook/stories")];
const srcExts = [".tsx", ".ts", ".jsx", ".js"];

function prefixSrcExts(prefixes) {
  const extensions = [];

  prefixes.forEach(prefix => {
    const prefixed = srcExts.map(ext => `${prefix}${ext}`);
    extensions.push(...prefixed);
  });

  return extensions;
}

export default makeConfig({
  bundles: {
    index: ({ platform, dev }) => {
      const entry = dev ? "dev" : "index";
      return {
        entry: withPolyfills(`src/native/${entry}`),
        transform({ config }) {
          config.resolve.alias = {
            ...config.resolve.alias,
            "@storybook/react": path.join(__dirname, "@storybook/react-native"),
            "~": path.join(__dirname, "src"),
          };
          config.resolve.extensions = prefixSrcExts([`.${platform}`, ".native", ""]);
          config.resolve.plugins.push(new TsconfigPathsPlugin());
          config.output.chunkFilename = "[name]";
          config.resolveLoader = {
            alias: {
              "svg-inline-loader": require.resolve("./webpack/svg-ext-to-png-loader"),
            },
          };

          config.module.noParse = /google-libphonenumber/;

          config.module.rules = [
            ...config.module.rules,

            {
              test: /\.svg$/,
              use: {
                loader: require.resolve("./webpack/svg-ext-to-png-loader"),
              },
            },

            {
              test: /\.worker\.[tj]s$/,
              include: srcDirs,
              use: {
                loader: require.resolve("./webpack/error-loader"),
                options: {
                  text: "Imported web worker in native build",
                },
              },
            },

            {
              test: /\.tsx?$/,
              include: srcDirs,
              use: [
                {
                  loader: "ts-loader",
                  options: {
                    logLevel: "warn",
                    transpileOnly: true,

                    compilerOptions: {
                      sourceMap: true,
                      importHelpers: true,
                      noEmit: false,
                    },
                  },
                },
              ]
            },

            {
              test: /\.scss$/,
              use: {
                loader: require.resolve("./webpack/empty-loader"),
              },
            },
          ];

          config.plugins.push(
              new webpack.EnvironmentPlugin({
                NATIVE: true,
                DEBUG: dev,
                APP_VERSION: "webpack",
                BUILD_ID: childProcess
                    .execSync("git rev-parse HEAD")
                    .toString()
                    .trim(),
                LANGUAGE: langs[0],
              }),

              new DotenvJsonPlugin({
                path: resolve(".env"),
              }),

              new GettextPlugin({
                dir: resolve("loc"),
                langs,
                ext: ".loc",
                emitEntrypoints: false,
                fallbacks: langFallbacks,
              }),

              new ForkTsCheckerWebpackPlugin({
                checkSyntacticErrors: true,
              }),
          );

          if (dev) {
            config.plugins.push(new CacheLoaderPlugin());
          }

        },
      }
    }
  },
});

@TNorth22 @rebirthtobi  Can you add "resolution": { "webpack": "4.39.1" }, do yarn install and check if the error is still happening? Can you also try with "resolution": { "webpack": "4.41.1" }?

@zamotany i believe that fixes it but i'm faced with a new error
.babelrcRoots is not allowed in .babelrc or "extends"ed files, only in root programmatic options, or babel.config.js/config
pointing to @haul-bundler/preset-0.60/node_mudules/babel-loader/lib/index.js

@rebirthtobi Can you post your Babel config file??

const isTest = process.env.NODE_ENV === "test";

const modules = isTest || process.env.REACT_NATIVE ? "commonjs" : false;
const targets = process.env.REACT_NATIVE ? { node: "current" } : undefined;

const plugins = [
    "@babel/plugin-transform-runtime",
    // https://babeljs.io/docs/en/babel-plugin-proposal-decorators#note-compatibility-with-babel-plugin-proposal-class-properties
    ["@babel/plugin-proposal-decorators", { legacy: true }],
    "@babel/plugin-proposal-nullish-coalescing-operator", // react native support
];

// @babel/plugin-proposal-class-properties has a bug in react native around it's use of flow
// It's only used for test mocks, so we can live without it.
// https://github.com/facebook/react-native/issues/21154
if (isTest) {
    plugins.push(["@babel/plugin-proposal-class-properties", { loose: true }]);
}

module.exports = {
    babelrcRoots: ["./tasks", "./storybook", "./webpack"],
    presets: [
        [
            "@babel/preset-env",
            {
                modules,
                targets,
            },
        ],
        "@babel/preset-react",
        "@babel/preset-flow", // used by react-native in tests
    ],
    plugins,
};

Just as a note – taking the note from @zamotany above worked for us. There was a small typo, however, and it is:
"resolutions": { "webpack": "4.41.1" }

Noting that the key recommended above was resolution but should be resolutions.
Thanks!

Ok, so this issue looks like it's caused by duplicated webpack depednency. I need a volunteer to:

Remove resolutions from package.json
yarn install
yarn list --pattern webpack
Paste the outout

@hjhart @TNorth22 @rebirthtobi

@rebirthtobi I believe the issue with .babelrcRoots is connected with your Babel config. In haul we don't use/specify babelrcRoots.

@zamotany
yarn list v1.15.2
├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  ├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>│     └─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>│  └─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>└─<EMAIL_ADDRESS>✨  Done in 2.10s.

any updates? I have the same issue

@EugenePisotsky There's no update. I cannot reproduce the issue. It seams it's connected with specific haul.config.js and/or duplicated webpack dependency, but without any repro I cannot do much. If you want to have this issue resolved, please try to create a repro project and post the link to it here.

Future googlers - FWIW - I had this error and was able to resolve it by uninstalling webpack and webpack-cli, then installing the latest version of those two.

This issue was solved for me by upgrading webpack from 4.33 to 4.46 version. It looks like getAssets feature was added only in webpack version 4.40.


Lists do not appear on separate lines

Given the markdown:
This application depends on the following:
- Node
- Git

The result is:
This application depends on the following: - Node - Git

Was this by design?

@Asuza it works if you put a blank line before the list, e.g.:
This application depends on the following:

- Node
- Git


[GSSoC'23] Linked List Cycle Detection

Hi, I would like to add the Floyd cycle detection algorithm. So can you please assign it to me?

I'm a contributor for GSSoC '23, I want to work on this issue. Please assign me.

Hii Sir!!!   i want to work this issue. Please assign this to me. I'm GSSoC'23 contributor.

I would like to work on this issue, please assign this issue to me under GSSoC'23.

I would like to work on this issue,
@aaryahjolia  please assign this issue to me under GSSoC'23.

I'm GSSoC'23 Contributor. I would like to work on this issue pls assign it to me.

Hi @aaryahjolia , I am Contributor for GSSOC'23. Can this issue be assigned to me. I will do the proper documentation with markdown file. For reference can visit my profile.
Regards,
Vivek Kumar


Figure out UI for supporting multiple instances (Profiles?) of the same tap

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/764
Originally created by @dmor on 2019-07-05 14:55:00

User Benefit: Don't have to create multiple projects if you have multiple accounts for the same tap (totally reasonable to expect this problem for CSV files, Google Analytics, and many more) or want to point multiple taps to the same target.

[ ]  Based on the candidate implementation solution @mbergeron got working, think through the right way to express this concept in the UI

This is out of scope for v1, but is something we will need to address very soon if we want to enable any real world use cases with multiple data sources to a single target.
Todos:

[x] UI mock plan
[x] UI markup
[x] FE response/request prep
[x] FE wiring
[ ] BE implementation

View 31 previous comments from the original issue on GitLab


Add a sample to print a page and convert it to PDF with wkhtmltopdf

+1 for this

1.9.13  has this in order dialog


ThisType doesn't enforce type-checking Object.prototype.call

🔎 Search Terms

ThisType
ThisType and call

🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about ThisType

⏯ Playground Link
https://www.typescriptlang.org/play/?ssl=8&ssc=40&pln=1&pc=1#code/MYewdgzgLgBAYiEAuGAVAFgSwqgngBwFMAeAbxgA8UwBXAWwCNCAnGAXwD4YAyGcgM0QAKAJTV6TVmxgBePgCgYMQSFEKlSgPSaYoSCAA2hAHQGQAcyFQsEY7hEBuGNpjEAtG5gtmIZoo3MhFA0zGAw1tjGFA7+bPJx8gggxirGwACGBgZC5LgoAEzsjs467p5gIF7MPsxAA
💻 Code
const Foo: ThisType<{ x: number }> & { foo(): number } = {
  foo() {
    // console.log(this.y); // <-- error
    return this.x;
  }
}

Foo.foo.call({ y: 2 }); // <-- no error

🙁 Actual behavior
The last line doesn't give an error.
🙂 Expected behavior
The last line should give an error.
Additional information about the issue
No response

ThisType doesn't do what you think it does; it just gives a contextual type to object literals, it doesn't actually constrain it from the outside.  You're probably looking for a this parameter instead:
const Foo: { foo(this: { x: number }): number } = {
  foo() {
    console.log(this.y); // <-- error
    return this.x; // okay
  }
}

Foo.foo.call({ y: 2 }); // <-- error

Playground link

Thanks for the quick reply @jcalz.
I know about this parameters, but my point here is that these features may conflict. In addition, when I use ThisType, I don't want to duplicate the this type for each of the functions in an object.

It's not a bug that ThisType doesn't do two different things at once

It's not a bug that ThisType doesn't do two different things at once

I understand. I'm not necessarily stating it's a bug. Maybe it's more like a new feature. By the way, I think it may benefit developers. Or maybe I'm wrong.


'module' object is not callable in Demo_crypto

Hi ! I managed the previous issue by deleting it, just the time I found a solution, but now I have a new problem. Certainly not a lot but I don't know hwo to fix it

Fixed.
Please use the newest version.


useId hydration mismatch when used in a dynamic global component

Environment

Operating System: Linux
Node Version:     v18.20.3
Nuxt Version:     3.11.2
CLI Version:      3.11.1
Nitro Version:    2.9.6
Package Manager<EMAIL_ADDRESS>Builder:          -
User Config:      devtools, components
Runtime Modules:  -
Build Modules:    -

Reproduction
https://stackblitz.com/edit/github-hqhma3?file=app.vue
Describe the bug
When rendering a globally registered component like this: <Component :is="resolveComponent('ComponentWithId')" />, useId inside that component returns a different id on the server and client, causing a hydration mismatch. The difference is in the separator, - changes to _.
When rendering that same component normally like this <ComponentWithId />, there is no mismatch.
When rendering it like this, it also works:
<template>
  <Component :is="ComponentWithId" />
</template>

But when the component name is a variable, it breaks again:
<template>
  <Component :is="ComponentWithId" />
</template>

Additional context
No response
Logs
[Vue warn]: Hydration text content mismatch on
nQ7nnZaq0gB_0

  - rendered on server: nQ7nnZaq0gB-0
  - expected on client: nQ7nnZaq0gB_0
  at <ComponentWithId>
  at <AsyncComponentWrapper>
  at <App key=3 >
  at <NuxtRoot>

Likely the cause is https://github.com/vuejs/core/issues/6638. Basically Vue does not wait for suspense to resolve before marking the app as 'mounted', which means we have a hydration mismatch.

Probably a different issue, but i'm also getting hydration mismatches, where the trailing number is different. E.g.:
  - rendered on server: for="nYyVnEmqzfB-2"
  - expected on client: for="nYyVnEmqzfB-0"

It happens in a more complex project with various global components, etc. Unfortunately i wasn't able to distill it into a stackblitz. 🫤

@tomek-ch Vue v3.5.0-alpha.4 should include a fix for this issue. Could you try to reproduce it with that release? :pray:


example with two sessions

the provided example uses just single session - wouldn't it make more sense to tunnel two ports, eg run two sessions in a multiplexer demo

I don't quite understand. It's multiplexing all concurrent requests to that port. You could run another instance of the client for another port. They wouldn't share a tunnel, but there isn't much reason to.

I'll try to make a PR at some point: so that client would open two ports instead of just one

What would this demonstrate? You know each connection is a TCP session, so just having multiple connections to a port is multiplexing. I didn't add multiple ports in the example because from a practical standpoint it doesn't make sense and would just make it confusing.


read into smatch

Smatch seems to be tailored for Linux Kernel and might be difficult to apply for TDVF.
-> abandon this approach for now and look into CodeQL instead as it seems much more promising


Add category filter to tags API

Adds category filter to tags API in OCP breakdown
https://issues.redhat.com/browse/COST-3346

Codecov Report

Merging #2792 (c35d98f) into main (af8d470) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2792   +/-   ##
=======================================
  Coverage   65.90%   65.90%
=======================================
  Files         486      486
  Lines        9323     9323
  Branches     2150     2150
=======================================
  Hits         6144     6144
  Misses       3176     3176
  Partials        3        3

Continue to review full report at Codecov.

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


Roll engine 83137188d7b0..adc946e74632 (1 commits)

https://github.com/flutter/engine/compare/83137188d7b0...adc946e74632
git log 83137188d7b08cc8ef464f276c223ab6052e29e2..adc946e746329cfe7bf2e77e8ddb943e53d27fb9 --no-merges --oneline
adc946e74 Roll src/third_party/skia 6a8c3f07e81a..f4c66ccafcb7 (2 commits) (flutter/engine#9013)
The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff (jsimmons@google.com), and stop
the roller if necessary.

Auto-roller completed checks. About to merge.


Maybe relevant?

https://danielpocock.com/debian-falsified-harassment-claims-appelbaum-expulsion/
https://lists.fosdem.org/pipermail/fosdem/2020q4/003192.html
https://old.reddit.com/r/StallmanWasRight/comments/ii8x1x/debian_falsified_harassment_claims_in_appelbaum/
https://soylentnews.org/article.pl?sid=20/08/27/0058257

Hi debian-private,
I am not Pocock, I did not even know that he existed until today actually, I learned about him by searching for "Appelbaum" in https://hn.algolia.com/ and sorting by date, there https://news.ycombinator.com/item?id=24279978 was the second post. I do not have any contributions (other than commenting on issues) because I am against github (due to its relation to ICE and its license) but even if I was Pocock I do not think that it would be relevant to the topic at hand.

https://hartmans.livejournal.com/100209.html

This article says nothing about Appelbaum.

For more questions feel free to email the Debian project leader or people at FSFE.

What if we are interested in openness instead (along with giving him the opportunity to respond)? I do not think that private emails would help with that.

@M-i-k-o-t-o thanks for making it clear! Me, on the other hand, I am not debian-private :)
The article from Sam Hartmann just explains some of the behavior by which Daniel Pocock got himself out of Debian.
I personally am not interested in being open to abusers. Abusers need to respect boundaries instead.
Good luck with that!


Fix join with point layer in object level

"integration_scheme": [
{
"spatial_relation": "NEAREST",
"out": {
"name": "stations",
"level": "OBJECTS"
},
"in": {
"name": "airtemp",
"level": "COORDINATES3D"
},
"operation": "DISCARD",
"abstract": true
}
]

This is not working


Update zio, zio-test, zio-test-junit, ... to 1.0.4-1

Updates

dev.zio:zio
dev.zio:zio-test
dev.zio:zio-test-junit
dev.zio:zio-test-magnolia
dev.zio:zio-test-sbt

from 1.0.3 to 1.0.4-1.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "dev.zio" } ]

labels: library-update, semver-pre-release

Superseded by #41.


Timeout error message always displays when loop is exited

The following code should be located inside of the if case just above
https://github.com/Jaxc/PyStageLinQ/blob/3dd693541bffeb19e184b246b2a76c9d884c61b3/PyStageLinQ/PyStageLinQ.py#L192

Fixed in #51


Flask/uWSGI worker data propagation

Describe the bug
Data does not seem to properly propagate from one uwsgi/flask
To Reproduce
Steps to reproduce the behavior:

Perform an action that represents any change of state to the model.
Attempt to load the data from another worker, refresh the page multiple times if need be.
Newly entered data may be missing (example: new tags, new report) from the view.

Expected behavior
The changes propagate properly.
Screenshots
Non-visual bug
Additional context
I am unsure what could cause this; sqlalchemy is supposed to commit to database every time a new item is added to the database.

You can see the worker your request went to by checking the logs:
"flask_1  | [pid: 11|app: 0|req: 8/52]"

Good news! It was just a configuration issue that cost me two hours to find :-)
(it was not using a file, but an in memory database, the config path was not set, why stuff does not propagate during in-memory databases I do not know, but we need the default setting to be in-memory databases otherwise the tests won't work)


Subscription DisplayName contains square brackets "[ ]"

Steps to reproduce

Change subscription displayName to include square brackets "[ ]"
Start Initialization

Screenshots

Given that this have ripple effects across the entire ecosystem, we have decided to not support this for now and have clarified the error message if this happens.
See #456 for further details.


DBZ-4867 Do not set database.dbname for SQL Server

https://issues.redhat.com/browse/DBZ-4867
@jcechace can you review and merge if this looks okay to you?
@jpechane should we consider backporting this to 1.9?

@Naros Applied and yes I'll backport it


Training for license plates that have 11 characters

How do I train for 11-character license plates? I've already tried to follow the instructions found in the Readme.md but I always get an error on line 52 with the following text message: "ValueError: cannot reshape array of size 407 into shape (259,)"

Thanks for trying out the repo! I did it for 7 characters specifically for my use case, but there is no problem of adapting it to 11 characters. There are a couple of references to modify:

https://github.com/ankandrew/cnn-ocr-lp/blob/master/models.py#L98: There would be 11 heads now, each one outputting a probability over the letters for character slot
You can modify to pad the missing characters less than 11 (let's say you sometimes expect 10 or 9) in this line https://github.com/ankandrew/cnn-ocr-lp/blob/master/train.py#L59
You also need to modify this line https://github.com/ankandrew/cnn-ocr-lp/blob/master/train.py#L52, which is where you were getting the error I suspect, as now there would be 3711(407), not 377 (259)

I have already made the three changes indicated. When running it gives an error with the message:
Traceback (most recent call last):
File "C:\Users\giosi\cnn-ocr-lp\train.py", line 205, in
x_imgs, y_imgs = Preprocess(
File "C:\Users\giosi\cnn-ocr-lp\train.py", line 33, in call
return self.__df_to_x_y()
File "C:\Users\giosi\cnn-ocr-lp\train.py", line 48, in __df_to_x_y
x_imgs = np.vstack(x_imgs)
File "<array_function internals>", line 5, in vstack
File "C:\Users\giosi\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\core\shape_base.py", line 283, in vstack
return _nx.concatenate(arrs, 0)
File "<array_function internals>", line 5, in concatenate
ValueError: need at least one array to concatenate

@GiovannydaSilva I suspect you had to change another reference. I have updated all code that limited it to 7 chars and adapted to your use case, you can check out the code in this branch: https://github.com/ankandrew/cnn-ocr-lp/tree/11-char-plates-poc. I'm not getting any errors and training goes well with that code. Let me know if you have any other issues related to this

I think the problem has to do with the images I'm using for OCR. I uploaded the images I'm using here at this link: https://github.com/GiovannydaSilva/cnn-ocr-lp/tree/11-char-plates-poc/img. Using these images gives the following error:
Traceback (most recent call last):
File "C:\Users\giosi\OneDrive\Ambiente de Trabalho\cnn-ocr-lp\train.py", line 205, in
x_imgs, y_imgs = Preprocess(
File "C:\Users\giosi\OneDrive\Ambiente de Trabalho\cnn-ocr-lp\train.py", line 33, in call
return self.__df_to_x_y()
File "C:\Users\giosi\OneDrive\Ambiente de Trabalho\cnn-ocr-lp\train.py", line 48, in __df_to_x_y
x_imgs = np.vstack(x_imgs)
File "<array_function internals>", line 5, in vstack
File "C:\Users\giosi\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\core\shape_base.py", line 283, in vstack
return _nx.concatenate(arrs, 0)
File "<array_function internals>", line 5, in concatenate
ValueError: need at least one array to concatenate

@GiovannydaSilva I can't reproduce your issue, my guess is that the training annotations is wrong or using training samples < batch size. With the latest changes to 11-char-plates-poc (just pushed) I run the following without any issues:
python train.py --height 70 --width 140 --batch-size 128 --epochs 600 --cut-out --blur --batch-size 8

Can you tell me which versions of the libraries used in the project?

@GiovannydaSilva Check the requirements.txt file in the root dir of the project, https://github.com/ankandrew/cnn-ocr-lp/blob/master/requirements.txt. I installed based on those.
keras2onnx              1.7.0
matplotlib              3.5.3
numpy                   1.18.5
opencv-python           <IP_ADDRESS>
pandas                  1.3.5
tensorflow              2.3.0
tensorflow-estimator    2.3.0

I can't reproduce. What OS, Python and libraries versions are you using?

Windows 10 version 20H4
Python 3.9.8
Some libraries aren't in same version and i have not the tensorflow-estimator. I'm going to fix it.

@ankandrew , on my computer it keeps getting errors and errors. Can you please upload the files generated in the training that worked on your computer? I would like to test if it works as intended.

@GiovannydaSilva See this Colab https://colab.research.google.com/drive/1rUngMJF_jw_2yB8E8PNXm6j_61uOYK5x?usp=sharing. I cloned repo, checked out the branch I made for you and works as expected. I'm overfitting the training examples but training goes well.

@ankandrew the code is running perfectly just like in Colab, there was a mistake that I made in the training code, as soon as I rectified it, it started working. But I noticed that Colab returned an error on line 242 with the following message at the end: Traceback (most recent call last):
File "train.py", line 242, in
best_vpa = max(history.history['val_plate_acc'])
KeyError: 'val_plate_acc'
On my computer it returned the same message, is this a problem?

@GiovannydaSilva in practice you should supply a --val-annotations. I should change this at some point, it's unclear the code. But just supply that and you should be good to go


add a curry function

From what I've seen, the C term is usually defined as (λ (f) (λ (y) (λ (x) (f x y)))). But in my experience, this is rarely useful in Scheme. Most operations are binary (think of comparison or math), e.g. to create an incrementer, you would need to write ((c +) 1) which it quite clumsy. Therefore I suggest to skip one sub-lambda and define it directly as (λ (f y) (λ (x) (f x y))), so that the incrementer simply becomes (c + 1).
I already converted some code to make use of it, for providing examples.

Good idea. This is already good, but C should probably be (λ (f a) (λ (b) (f a b))) to make the argument order apparent and follow the general convention of carrying the more static/target/context value as the first argument. The places where (λ (f y) (λ (x) (f x y))) is more convenient probably have wrong argument order in the first place.
These can be checked later.

Well, I thought it would be good to follow the "official" conventions, as seen here:
https://en.wikipedia.org/wiki/Lambda_calculus#Standard_terms
https://en.wikipedia.org/wiki/Combinatory_logic#Combinators_B,_C
https://en.wikipedia.org/wiki/B,_C,_K,_W_system
Currying is usually reducing the number of arguments from right to left. Also, with your definition these examples wouldn't work:
(define half (c / 2))
(define double (c << 1))
In practice, one would probably need both, like for (define neg (c* - 0)). But what would be a good one-letter-name for the definition you suggest? This does not seem to be a standard term in lambda calculus.
While we're at it: In the descriptions above, the function that is currently named o in defmac.scm, is defined as B. So, would you agree to rename o to b? Or what was the reason to call it o?

When I think about it, r seems to be a good name for a curry function having its arguments reversed. Can also stand for "reduce arguments" or "variable right", and therefore should be easy to remember. Just need to check, if r is already taken for something else.

o comes from function composition: https://en.wikipedia.org/wiki/Function_composition
Standard combinators are a good idea. I'm mainly worried here about them clashing unintentionally with variables. They are always capital letters in combinatory logic. Would it look odd if they were such also in Lisp?

There are a few different things involved here.
Standard combinators are useful and can be defined as regular values when arity is lispified, as you did in the first comment.
Function composition is not really a combinator, as it should accept variables arity. B happens to implement composition for two functions, so it can be used in that (common) case.
Then there is also partial application, which I was thinking initially. It should preserve argument order and also work with arbitrary arity.

I was afraid of the lowercase-single-letter names being "overwritten" by local defines, too. Therefore I totally agree to using uppercase letters for the standard terms, as this would make the whole thing more obvious. So, for now I would rename c, i, and k to their uppercase pendants, and rename o to B, okay? What about (λ (f x) (λ (y) (f x y)))? Should we call it Cx, as x is the argument that is "curry-ed" away? …or would R (as suggested above) or even just X be better, as having everything in single letters looks prettier in columns?

…or even H which would be the pendant to C – in honor of Haskell Curry?

Sounds good. H is also good and easy to remember :+1:


Added a new Log in Page and within this page created a link to new     si…

…gn in page. Designed a new Sign in page fully.
The following are the images of 2 newly created pages.

@ParulPrashar resolve conflict

@GarimaSingh0109 mam kindly add the labels please, else I will miss this out. Hacktoberfest and gssoc and level please

@GarimaSingh0109 Please add the labels

@GarimaSingh0109 mam please add labels my contribution is not going to have worth then


Shorten the field name for Game Genres

Monty mentioned about shortening the field names for the genres. Taking out the word "Game" will help make the bar graph a little better once we incorporate the landscape feature.

Took this out as it no longer needs to be done


Warning and different result

I downloaded the pretrained model provided. During inference I'm getting the following warning. It results worse AP ~29. Also, could you upload the other models with different backbones that you share on the paper?
WARNING [02/12 13:37:59 c2.checkpoint.checkpoint]: 'backbone.top_block.p6.weight' has shape (256, 2048, 3, 3) in the checkpoint but (256, 256, 3, 3) in the model! Skipped.
[02/12 13:37:59 c2.checkpoint.checkpoint]: Some model parameters are not in the checkpoint:
backbone.top_block.p6.weight

It may be caused by a recent update of cvpods, you can train your own model from scratch, and the result will match the results in paper.


[Bug]: Upload multiple PDFs and only shows one of them in the viewer

What happened?
I currently have a FileUpload form where a user can upload a PDF file. When I upload the first PDF file, the PDF shows in the preview. When I upload a second PDF and then save, I don't see the second PDF in the view.
How to reproduce the bug
This is the code I added:
FileUpload::make('document_management')
    ->panelLayout('grid')
    ->previewable()
    ->multiple(),

PdfViewerField::make('document_management')
    ->label('View the PDF')
    ->minHeight('40svh'),

Here is an example:
https://github.com/user-attachments/assets/6c169bcb-3a6f-4926-9a6a-75ae571df3ed
Package Version
v1.0.5
PHP Version
v8.3.11
Laravel Version
v11.23.5
Which operating systems does with happen with?
macOS
Notes
No response

This is not a bug, the plugin is now prepared just for a single PDF per field

Can I make a pull request to support multiple PDFs?

@DevShaded yeah, go ahead. Just pay attention to work default as now for not break other projects.

Got it!


Matt/day 07

my 'X' doesn't animate quite right, i'll wait to look at the solution to see how Amy does it, likely much more concise and easier than me!

I needed to be able to have the nest div to apply the flex box alignment, I didn't like how it was snapping as a result and amys solution and yours of using translate is more ideal and its easier code to understand!


Greenkeeper/sinon 7.2.4

Pull Request Test Coverage Report for Build 251

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 98.039%

Totals

Change from base Build 248:
0.0%

Covered Lines:
38

Relevant Lines:
39

💛  - Coveralls


Configure Automated Canary Deployments in Spinnaker

See details attached on this Slab regarding the things that we see lacking before configuring kayenta service: https://armory.slab.com/posts/kayenta-s-3-permissions-ahk808vv

Thanks @jonperdon . We've filed an internal Jira for this, DOC-494.


Migrate to parellel hyper parameters optimization

Add cross-validation hyperparemeter tuning in parallel mode to classifiers training functions.

SVM

CCA Based methods:


Fix button.<a>.

The anchor masquerade didn't quite work on button elements:

They still had button click states (box-shadows, etc)
Didn't inherit fonts, e.g., in .navbar
Didn't inherit lack of text-decoration when in nav

This PR should address that, but please let me know if there's something I might not have considered.

Might it be better to use e.g. nav :where(a, .\<a\>) (instead of :is()) in order to preserve specificity?


WPF ThrownExceptions

We will close your issue without comment if you delete or do not fill out the issue checklist and provide ALL the requested information. This repository's issues are reserved for feature requests and bug reports. For support questions, please ask on StackOverflow: https://stackoverflow.com/questions/tagged/reactiveui
Please delete this note before pressing the submit button
Do you want to request a feature or report a bug?
An object implementing IHandleObservableErrors (often a ReactiveCommand or ObservableAsPropertyHelper) has errored, thereby breaking its observable pipeline. To prevent this, ensure the pipeline does not error, or Subscribe to the ThrownExceptions property of the object in question to handle the erroneous case.
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Which versions of ReactiveUI, and which platform / OS are affected by this issue? Did this work in previous versions of ReativeUI? Please also test with the latest stable and development snapshot
Other information (e.g. stacktraces, related issues, suggestions how to fix)

What is the problem ?

Closing since there isn't enough detail about what the issue is. If you can provide more information feel free to respond. Thanks


Request to merge TEAMNADO-4265 to "prod-beta"

Codecov Report
Base: 89.39% // Head: 89.58% // Increases project coverage by +0.19% :tada:

Coverage data is based on head (d1bf5a9) compared to base (6ae33f2).
Patch has no changes to coverable lines.

Additional details and impacted files
@@              Coverage Diff              @@
##           prod-beta     #137      +/-   ##
=============================================
+ Coverage      89.39%   89.58%   +0.19%
=============================================
  Files             42       42
  Lines            660      682      +22
  Branches         122      132      +10
=============================================
+ Hits             590      611      +21
- Misses            70       71       +1

Impacted Files
Coverage Δ

...anifestDetailSidePanel/ManifestDetailSidePanel.tsx
87.87% <ø> (+3.78%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


x509 signatures do not contain signing date

Looking at a repo with x509 signed commits i found that smimesign signatures look different when verified on Linux with gpgsm. They seem to not contain the signing date, or not in the expected format.
A commit signed on Linux will look like that:
gpgsm: Signature made yyyy-mm-dd hh:mm:ss using certificate ID 0xXXXXX
gpgsm: Good signature from ...
...

Signatures made with smimesign Windows and Mac
gpgsm: Signature made [date not given] using certificate ID 0xXXXXX
gpgsm: Good signature from ...
...

this is gpgsm-2.2.10 checking the signatures

Would be nice to have the time stamp as well.
Is RFC3161 implemented within gpg signatures?

I'm not aware of any way to verifiably timestamp signatures with PGP. S/MIME does support RFC3161 signatures and this is implemented in smimesign.


valid example json, fix https://github.com/atom/electron/issues/2228

Remove the trailing comma so that the example is valid json. Otherwise the auto updater will throw an error saying Unexpected token '{'.

Thanks!


Update deps and fix body matching

I updated the deps and also noticed that the API was sending "1" as a body, not '1' (Or maybe Poison changed the encoding there with vers. 2.0, but anyway, I was getting unnecessary warnings)

Thank you!


OpenGL Support?

Hey there, I really appreciate your work! At the moment OpenGL does support 3D scenes quite effectively so I was wondering if there's going to be OpenGL support any time soon. Thanks!

This is something I am interested in working on soon. However, I cannot give an ETA as there could be unforseen consequences with changing the renderer. Hopefully sometime soon this will be possible (perhaps I'll bundle it into the next release with other new features and aesthetic updates). For now though, I couldn't tell you when.


Silence non-critical compiler warnings

Compiling Lime Suite from source on any supported platform results in a large number of non-critical warnings from the compiler. While these do not affect the compilation or functionality of the software in any way, it would be nice if they could be suppressed so as not to worry newcomers to the software.

Seconding ghalfacree on this issue. Warnings are usually there for a good reason so I would welcome some code cleanup so that these warnings do not appear anymore. Some of these warnings might appear benign but they may reveal some more serious issues.

Guess I shouldn't have raised a similar issue for OSX then...
But there was a probably error hiding in all the noise which I reported separately.
I find the double to float loss of precision warnings for temporary stack variables particularly annoying since the next time the float in question gets used, it gets promoted back to double anyway.

Are you sure this is not due to the use of old versions of the dependencies? In my up-to-date Arch system, the only warnings I get are related to the use of deprecated libusb functions, which should be fixed by #196.

Number of compiler warning depends on compiler. I am not seeing a lot of warnings on Ubuntu 16.04 with gcc 5.4.0, however I think MSVC produces quite a lot of them (I rarely use it). There is no plans to do any work specifically to remove warnings, however if a warning pop-up in a file that I am editing for other reasons I usually try to remove it.


SSL - Disable Broker certificate check.

Description
Enabling SSL with generate below error.
{ssl://broker2.aws.com:9092/bootstrap: Failed to verify broker certificate: self-signed certificate in certificate chain (after 356ms in state CONNECT)}
Is there a way I can disable the broker certificate check?
How to reproduce
BootstrapServers = "broker2.aws.com:9092",
SslKeystoreLocation = @"C:\certs\MY_FILE.p12",
SslKeystorePassword = "PassWord",
SecurityProtocol = SecurityProtocolType.Ssl
Checklist
Please provide the following information:

[ ] Confluent.Kafka nuget version: 1.0.0-beta2
[ ] Apache Kafka version:
[ ] Client configuration:
[ ] Operating system:
[ ] Provide logs (with "debug" : "..." as necessary in configuration)
[ ] Provide broker log excerpts
[ ] Critical issue

Here are some docs I started writing up on using the .net client with SSL security some time ago. Hopefully they'll help you get up and running.
https://github.com/mhowlett/confluent-kafka-dotnet/tree/security/examples/Security


Add metadata for ansible-galaxy

This file is necessary to install this role as dependency of playbook using ansible-galaxy command.
$ ansible-galaxy role install https://github.com/jam82/ansible-role-podman.git

Signed-off-by: Lukas Bednar<EMAIL_ADDRESS>

Hi Jonas,
I find your role quite useful!
We use ansible-galaxy command to satisfy dependencies for our playbooks.This trivial addition will allow us to install this role in same way.
Also I would be happy to see this role available at Ansible Galaxy as well. Process is very simple and it sync with your repository automatically.
Lukas.

I don't understand why travis is failing :-/

I don't understand why travis is failing :-/

Travis is a b... :) I am currently setting up harbor with gitlab to do my builds my own root server, as there are numerous issues with dockers pull limits... do you have experience in running gitlab with podman? I read it would work. I absolute like podman and would rather not go back to docker...


fix: modidy update registry msg

What type of PR is this?

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for reviewers:

Does this PR introduced a user-facing change?

Additional documentation, usage docs, etc.:

Codecov Report

Merging #219 (a4b0025) into master (2481d87) will not change coverage.
The diff coverage is n/a.


docs(NgModule): fix typo

Changed

To reference the type we'd have to import the module, which loads the module loads immediately

to

To reference the type we'd have to import the module, which loads the module immediately

Thanks. Incorporating in another fix-up PR.

🍻


Drop Py3.6 support?

Now that Python 3.8 is out, and Python 3.7 is available starting in Debian 10 “Buster” (current stable) and Ubuntu 19.04 “Disco Dingo”, should we consider dropping Python 3.6 support?
Python 3.6 support currently relies on the dataclasses backport, which seems essentially-unmaintained since November 2018, and lacks important bugfixes.  Those bugs are blocking for API improvements like #168.

This should track with PPB's own support cycle.
I think that's unofficially the last 2 major versions (so currently, 3.8 and 3.7), but I'm not sure that's been decided formally.
I'm going to just take maintainer's fiat and say that ppb-vector devel may drop 3.6. 1.0 exists and supports it, and that's good enough.

@astronouth7303 Yeah, that was my recollection too (last 2 major releases of CPython), but I'd rather check with you and Piper first.

Also, dropping Py3.6 from CI will conflict with all the CI updates that are in-flight, so that can wait a couple of days.

Revisting some stuff. Do we want to drop 3.6 given pypy?

Revisting some stuff. Do we want to drop 3.6 given pypy?

PyPy has support for Py3.7 now, so I would be strongly in favour of dropping Py3.6 compatibility.
Though the dataclasses compat shim has been updated, so we could in principle keep support if we cared to.

I'll note, 3.5 Python just hit EOL, 3.6 is still getting security patches, we should all have a conversation about support schedule sometime.

Though the dataclasses compat shim has been updated, so we could in principle keep support if we cared to.

Turns out, the maintainer of dataclasses (the PyPI package, not the stdlib module) merged the PR that contained the update, but failed to publish a new version...

I'll note, 3.5 Python just hit EOL, 3.6 is still getting security patches, we should all have a conversation about support schedule sometime.

I simply don't think that we can reasonably support people on Py3.6:

Py3.6 support depends on the dataclasses compatibility shim; it is, as published on PyPI, mostly-broken, and its maintainer seems to be taking over 1.5 years to merge critical bugfixes... and still fail to publish new versions on PyPI.
CPython 3.6 is not getting bugfixes since 2018.

Ok, 6mo later it might be time.
3.9, 3.8, and 3.7 are out and stable.
We can probably drop 3.6.


Deribit: Add WebSocket channels

Added WebSocket chart.trades, ticker, and user.changes channels to Deribit API.
Additionally improved the code a little bit by giving the request models reasonable names.

Unfortunately this PR hasn't been approved/merged for several months.


[avatar]: proposal to add an additional appearance

In addition to outline + filled we should consider adding duaton for delicate and more subtle design.

@yinonov , @AyalaBu WDYS?

why? was there a request?

There will be soon.
Tamir spoke to me about adding this variant

is this aligned with the team designing the chat?
anyway, there's no formal request, let's discuss when there is


Use concrete structs for govc devices.info

Description of changes:
Use predefined structs instead of generic map[string]interface{} to unmarshal govc devices.info response.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/approve /lgtm

/approve
/lgtm


pip install fbprophet  gcc error in centos 7

Describe the bug

Expected behavior

To Reproduce

My Platform

Additional context

When i try to install pip install fbprophet in centos 7,  we are getting gcc error, when i tried in ubuntu, its working without error, do you have any bug in the cent os 7

Thanks for the report, but unfortunately this is the wrong place for it. This tracker is only for issues with the software that runs pypi.org itself. It cannot help with installing packages distributed from there. For that, you'll need to contact the package's maintainers. There are a few possible methods of contact listed on https://pypi.org/project/fbprophet/

@gitdckap The issue tracker for that project, is at https://github.com/facebook/prophet/.


Undefined symbols referencing ObjC classes in DLL on Windows

Once again I’m not exactly sure if this is a library issue, codegen/linker bug, or just a plain old user error (e.g. missing flag), but I figured since I now have steps to reproduce, this would be a better place to write down what I’m doing and seeing instead of unformatted messages on the mailing list.
Summary
I’m trying to build a DLL from some ObjC code, and then build an executable from some other ObjC code that links to the DLL, but the linker is somehow not seeing the $_OBJC_REF_CLASS_... symbols from the DLL even though they were exported and are there according to dumpbin /exports. This happens with both lld or link.exe.
The following is essentially what building and linking to any of the GNUstep libraries would be like on Windows, and might be the last missing piece to get the MSVC ABI to work with GNUstep. I’m hoping I’m just missing some flag somewhere in the process.
Steps to reproduce with LLD
0. Prerequisites
I’m using Clang from the pre-built LLVM 11.0.0 binary from the LLVM website (installed to C:\LLVM):
https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/LLVM-11.0.0-win64.exe
1. Build libobjc library
mkdir build
cd build
cmake .. -G Ninja -DTESTS=ON -DGNUSTEP_INSTALL_TYPE=NONE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=C:\Test -DCMAKE_C_COMPILER=C:/LLVM/bin/clang-cl.exe -DCMAKE_CXX_COMPILER=C:/LLVM/bin/clang-cl.exe
set CCC_OVERRIDE_OPTIONS=x-TC x-TP x/TC x/TP
ninja

2. Build our DLL
Build Test.m from this project into an object file:
C:\LLVM\bin\clang.exe -g -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -c ..\Test\Test.m

Create a module definition file Test.def with the following content, otherwise these symbols will not be part of the DLL:
EXPORTS
  $_OBJC_CLASS_NSAutoreleasePool DATA
  $_OBJC_CLASS_NSConstantString DATA
  $_OBJC_CLASS_NSTinyString DATA
  $_OBJC_CLASS_Test DATA
  $_OBJC_REF_CLASS_NSAutoreleasePool DATA
  $_OBJC_REF_CLASS_NSConstantString DATA
  $_OBJC_REF_CLASS_NSTinyString DATA
  $_OBJC_REF_CLASS_Test DATA

Build the DLL and .lib file:
C:\LLVM\bin\clang.exe -g -fuse-ld=lld -Wl,-dll -Wl,-def:Test.def -lobjc -o Test.dll test.o

3. Build executable
Create a file foo.m with some ObjC code referencing the Test class from Test.dll:
#include "stdio.h"
#import "../Test/Test.h"

int main(int argc, char** argv) {
  Test *t = [Test new];
  printf("Hello world %p\n", t);
}

And build it while linking to Test.dll and objc.dll, resulting in a linker error:
C:\LLVM\bin\clang.exe -g -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -fuse-ld=lld -lobjc -lTest -o foo.exe foo.m
lld-link: error: undefined symbol: $_OBJC_REF_CLASS_Test

Steps to reproduce with link.exe
Using link.exe produces the same linker error, but also outputs some warnings that might be helpful? Step 1 above is unchanged.
C:\LLVM\bin\clang.exe -g -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -c ..\Test\Test.m

C:\LLVM\bin\clang.exe -fuse-ld=link -Wl,-dll -Wl,-def:Test.def -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -lobjc -o Test.dll test.o
### CCC_OVERRIDE_OPTIONS: x-TC x-TP x/TC x/TP
test.o : warning LNK4078: multiple '.CRT' sections found with different attributes (40400040)
   Creating library Test.lib and object Test.exp
libcmt.lib(initializers.obj) : warning LNK4254: section '.CRT' (C0000040) merged into '.rdata' (40000040) with different attributes

C:\LLVM\bin\clang.exe -g -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -fuse-ld=link -lobjc -lTest -o foo.exe foo.m
### CCC_OVERRIDE_OPTIONS: x-TC x-TP x/TC x/TP
libcmt.lib(exe_main.obj) : warning LNK4078: multiple '.CRT' sections found with different attributes (40400040)
objctest-761e9c.o : error LNK2019: unresolved external symbol $_OBJC_REF_CLASS_Test referenced in function main
foo.exe : fatal error LNK1120: 1 unresolved externals
clang: error: linker command failed with exit code 1120 (use -v to see invocation)

Addendum
Meanwhile we can see that Test.dll/lib do contain the above symbol:
>dumpbin /exports Test.lib
Microsoft (R) COFF/PE Dumper Version 14.28.29334.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file Test.lib

File Type: LIBRARY

     Exports

       ordinal    name

                  $_OBJC_CLASS_NSAutoreleasePool
                  $_OBJC_CLASS_NSConstantString
                  $_OBJC_CLASS_NSTinyString
                  $_OBJC_CLASS_Test
                  $_OBJC_REF_CLASS_NSAutoreleasePool
                  $_OBJC_REF_CLASS_NSConstantString
                  $_OBJC_REF_CLASS_NSTinyString
                  $_OBJC_REF_CLASS_Test

  Summary

          14 .idata$2
          14 .idata$3
           8 .idata$4
           8 .idata$5
           9 .idata$6

>dumpbin /exports Test.dll
Microsoft (R) COFF/PE Dumper Version 14.28.29334.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file Test.dll

File Type: DLL

  Section contains the following exports for Test.dll

    00000000 characteristics
           0 time date stamp
        0.00 version
           0 ordinal base
           9 number of functions
           8 number of names

    ordinal hint RVA      name

          1    0 00015680 $_OBJC_CLASS_NSAutoreleasePool
          2    1 00015170 $_OBJC_CLASS_NSConstantString
          3    2 00015318 $_OBJC_CLASS_NSTinyString
          4    3 00015520 $_OBJC_CLASS_Test
          5    4 0001B018 $_OBJC_REF_CLASS_NSAutoreleasePool
          6    5 0001B000 $_OBJC_REF_CLASS_NSConstantString
          7    6 0001B008 $_OBJC_REF_CLASS_NSTinyString
          8    7 0001B010 $_OBJC_REF_CLASS_Test

  Summary

        1000 .00cfg
        3000 .data
        1000 .gehcont
        1000 .objcrt
        1000 .pdata
        9000 .rdata
        1000 .reloc
        B000 .text
        1000 _RDATA

Update: using CONSTANT instead of DATA in the .def file will allow to link and run the executable, but only using LLD:
EXPORTS
  $_OBJC_CLASS_NSAutoreleasePool CONSTANT
  $_OBJC_CLASS_NSConstantString CONSTANT
  $_OBJC_CLASS_NSTinyString CONSTANT
  $_OBJC_CLASS_Test CONSTANT
  $_OBJC_REF_CLASS_NSAutoreleasePool CONSTANT
  $_OBJC_REF_CLASS_NSConstantString CONSTANT
  $_OBJC_REF_CLASS_NSTinyString CONSTANT
  $_OBJC_REF_CLASS_Test CONSTANT

However there is a remaining issue that classes defined in the DLL can not be loaded: [Test class] and [Test new] return nil. Locally defined classes (i.e. not defined in the DLL) work fine, as does objc_getClass("Test").
I also wonder whether the above is the correct "fix" in the first place, as using link.exe with the above .def file results in the following warnings about CONSTANT being obsolete, and an access violation at runtime:
C:\LLVM\bin\clang.exe -fuse-ld=link -Wl,-dll -Wl,-def:Test.def -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -lobjc -o Test.dll test.o
### CCC_OVERRIDE_OPTIONS: x-TC x-TP x/TC x/TP
test.o : warning LNK4078: multiple '.CRT' sections found with different attributes (40400040)
Test.def(3) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(4) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(5) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(6) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(7) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(8) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(9) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(10) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
   Creating library Test.lib and object Test.exp
libcmt.lib(initializers.obj) : warning LNK4254: section '.CRT' (C0000040) merged into '.rdata' (40000040) with different attributes

C:\LLVM\bin\clang.exe -g -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -fuse-ld=link -lTest -lobjc -o test.exe objctest.m
### CCC_OVERRIDE_OPTIONS: x-TC x-TP x/TC x/TP
LINK : test.exe not found or not built by the last incremental link; performing full link
objctest-0f685e.o : warning LNK4078: multiple '.CRT' sections found with different attributes (40400040)
libcmt.lib(initializers.obj) : warning LNK4254: section '.CRT' (C0000040) merged into '.rdata' (40000040) with different attributes

$ lldb test.exe
(lldb) r
Process 100888 launched: 'test.exe' (x86_64)
Process 100888 stopped
* thread #1, stop reason = Exception 0xc0000005 encountered at address 0x7fff84c11048: Access violation reading location 0x00000000
    frame #0: 0x00007fff84c11048 objc.dll`objc_msgSend + 40
objc.dll`objc_msgSend:
->  0x7fff84c11048 <+40>: movl   (%r10), %r11d
    0x7fff84c1104b <+43>: cmpl   $0x8, %r11d
    0x7fff84c1104f <+47>: je     0x7fff84c11063            ; <+67>
    0x7fff84c11051 <+49>: cmpl   $0x0, %r11d

Update: using CONSTANT instead of DATA in the .def file will allow to link and run the executable, but only using LLD:
EXPORTS
  $_OBJC_CLASS_NSAutoreleasePool CONSTANT
  $_OBJC_CLASS_NSConstantString CONSTANT
  $_OBJC_CLASS_NSTinyString CONSTANT
  $_OBJC_CLASS_Test CONSTANT
  $_OBJC_REF_CLASS_NSAutoreleasePool CONSTANT
  $_OBJC_REF_CLASS_NSConstantString CONSTANT
  $_OBJC_REF_CLASS_NSTinyString CONSTANT
  $_OBJC_REF_CLASS_Test CONSTANT

However there is a remaining issue that classes defined in the DLL can not be loaded: [Test class] and [Test new] return nil. Locally defined classes (i.e. not defined in the DLL) work fine, as does objc_getClass("Test").
I also wonder whether the above is the correct "fix" in the first place, as using link.exe with the above .def file results in the following warnings about CONSTANT being obsolete, and an access violation at runtime:
C:\LLVM\bin\clang.exe -fuse-ld=link -Wl,-dll -Wl,-def:Test.def -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -lobjc -o Test.dll test.o
### CCC_OVERRIDE_OPTIONS: x-TC x-TP x/TC x/TP
test.o : warning LNK4078: multiple '.CRT' sections found with different attributes (40400040)
Test.def(3) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(4) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(5) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(6) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(7) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(8) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(9) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
Test.def(10) : warning LNK4087: CONSTANT keyword is obsolete; use DATA
   Creating library Test.lib and object Test.exp
libcmt.lib(initializers.obj) : warning LNK4254: section '.CRT' (C0000040) merged into '.rdata' (40000040) with different attributes

C:\LLVM\bin\clang.exe -g -fobjc-runtime=gnustep-2.0 -fblocks -fconstant-string-class=NSConstantString -fuse-ld=link -lTest -lobjc -o test.exe objctest.m
### CCC_OVERRIDE_OPTIONS: x-TC x-TP x/TC x/TP
LINK : test.exe not found or not built by the last incremental link; performing full link
objctest-0f685e.o : warning LNK4078: multiple '.CRT' sections found with different attributes (40400040)
libcmt.lib(initializers.obj) : warning LNK4254: section '.CRT' (C0000040) merged into '.rdata' (40000040) with different attributes

$ lldb test.exe
(lldb) r
Process 100888 launched: 'test.exe' (x86_64)
Process 100888 stopped
* thread #1, stop reason = Exception 0xc0000005 encountered at address 0x7fff84c11048: Access violation reading location 0x00000000
    frame #0: 0x00007fff84c11048 objc.dll`objc_msgSend + 40
objc.dll`objc_msgSend:
->  0x7fff84c11048 <+40>: movl   (%r10), %r11d
    0x7fff84c1104b <+43>: cmpl   $0x8, %r11d
    0x7fff84c1104f <+47>: je     0x7fff84c11063            ; <+67>
    0x7fff84c11051 <+49>: cmpl   $0x0, %r11d

Works correctly when adding __declspec(dllexport) before ObjC class interfaces when building the DLL, and __declspec(dllimport) when building the code linking against the DLL.

Works correctly when adding __declspec(dllexport) before ObjC class interfaces when building the DLL, and __declspec(dllimport) when building the code linking against the DLL.


Anvil renders views in background activities

As I've been writing more Anvil views (I haven't counted, but my project now currently has several thousand lines of Anvil split between about a dozen views), I'm beginning to run into performance issues.
One problem is that Anvil continues rendering all views even when they're in the background. Specifically, the starting activity of my project has a quite expensive view (it requires loading many images from disk). Every time Anvil re-renders on any page I've noticed that it re-renders that view as well.
I need to optimize that view so it doesn't keep repeating (and that's my first step), but would it be possible for Anvil to only re-render views that are in the current activity/are currently visible?

Anvil keeps a list of weak references to Renderables. Once GC collects your background activity - the views inside it should not be rendered anymore.
Adding some kind of Anvil.remove(renderable) could be helpful to make it explicitly. You may look at Anvil class, there is a set of mounts. Adding a method to remove your component from that set would avoid rendering it on the next call of Anvil.render(). If this fixes some of your performance issues - then pull requests are welcome :)

Old Anvil (0.0.12) used adapters via some kind of a hack, so one had to call notifyDataSetChanged() every time the parent view was re-rendered.
New Anvil uses ViewHolder pattern, and adapter views are reactive, so they are updated even without notifyDataSetChanged, automatically. So I will close this one I merge anvil-forge with the master branch.

Closing this, since new Anvil allows to explicitly unmount renderables (as well as to let them be GC'ed). So this issue should be fixed by now.


Processing data

In this milestone I:

Generated a new rails app using PostgreSQL as requested by a previous reviewer.
Created models for comment, like, post, and user tables.
Added an application_record to be able to use ActiveRecord
Added custom methods to each model.

@Ismailco Thank you for your review!


Added compatibility with multiple libcamera versions

This is now the result of the discussion on issue https://github.com/lit-robotics/libcamera-rs/issues/31 in two clean commits:
The first (https://github.com/lit-robotics/libcamera-rs/commit/62ad9bdc20a397bd6301d9fcf45ad064e50f8e4f) is the rework of the binding generation code.
generate_rust.rs has been changed to generate_from_git.rs and no longer generates a single binding from included yaml files. It now instead clones/fetches the libcamera repo from https://git.libcamera.org/libcamera/libcamera.git/, iterates over the version tags and generates a binding from each versions control_id and property_id yamls.
Additionally, it parses the vendor of each control/property (currently "draft" or "rpi") and feature gates them with "vendor_draft" as a default feature for convenience and backward compatibility.
The generate_c.rs file has been completely removed and instead replaced with a second bindgen invocation in libcamera-sys/build.rs to generate bindings for control/property id enums directly from the system C++ library.
The system libcamera version is now also part of the generated bindings and is used by libcamera/build.rs to include the correct bindings version by linking libcamera-sys as both a normal and a build dependency.
A side effect of this version selection is that this is a breaking change, though only if one cross compiles from a platform without/with a different version of libcamera. In all other cases this PR is completely source compatible.
The second (https://github.com/lit-robotics/libcamera-rs/commit/2fb8283bd1011657ff6c1b296b77387b2e3e366d) adds some flexibility to which binding version is chosen through semver.
Before this, any update to the system libcamera would result in the build failing because bindings for eg v0.3.3 are not yet available. With this commit and the libcamera_semver_versioning default feature enabled libcamera-rs will fall back on the v0.3.2 bindings as the most recent compatible ones.
libcamera itself has expressed commitment to semver compatibility (https://github.com/libcamera-org/libcamera/issues/1#issuecomment-992620449), so this should be a safe assumption.
For the future
The main issue with this current implementation is that the bindings have to be manually generated and a new version uploaded to crates.io at least whenever libcamera releases a new semver breaking version, and preferably every time any new version is released.
I see two possible solutions to bridge this problem:

Automatically watching the libcamera git repo by eg running a cron task every day (maybe every hour) that rebuilds the bindings if a new version is found, creates a commit and potentially publishes a new version to crates.io
Adding a "build from upstream" feature to libcamera-rs that essentially runs generate_from_git during the build.

And a third commit now to fix the clippy lints. I really love those checks, I forget clippy too often otherwise!

Looks good! Thank you very much for the PR and in depth writeup!


Devtools and improvements

Adds support for opening dev tools for debugging the desktop application. Improves bundle size. Mov
es webpack config and electron config to ts and splits webpack into dev and prod.

Thank you so much for making all these wonder changes. I'd like to learn how the devtools works tomorrow from you.

Sure, stop by anytime.

#97


Deploying a test BinderHub

Deploying a test BinderHub
#1280

The above looks like the following PR but we have not enabled the prePuller or userPlaceholders

https://github.com/2i2c-org/infrastructure/pull/1390

From the hub logs
k logs -c hub hub-66958dc964-mtd6s --previous
Loading /usr/local/etc/jupyterhub/secret/values.yaml
No config at /usr/local/etc/jupyterhub/existing-secret/values.yaml
Loading extra config: 0-binderspawnermixin
Loading extra config: 00-binder
Loading extra config: 01-custom-theme
Loading extra config: 02-custom-admin
[E 2022-06-08 16:01:34.455 JupyterHub app:2969]
    Traceback (most recent call last):
      File "/usr/local/lib/python3.8/dist-packages/jupyterhub/app.py", line 2966, in launch_instance_async
        await self.initialize(argv)
      File "/usr/local/lib/python3.8/dist-packages/jupyterhub/app.py", line 2457, in initialize
        self.load_config_file(self.config_file)
      File "/usr/local/lib/python3.8/dist-packages/traitlets/config/application.py", line 87, in inner
        return method(app, *args, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/traitlets/config/application.py", line 775, in load_config_file
        for (config, filename) in self._load_config_files(filename, path=path, log=self.log,
      File "/usr/local/lib/python3.8/dist-packages/traitlets/config/application.py", line 737, in _load_config_files
        config = loader.load_config()
      File "/usr/local/lib/python3.8/dist-packages/traitlets/config/loader.py", line 616, in load_config
        self._read_file_as_dict()
      File "/usr/local/lib/python3.8/dist-packages/traitlets/config/loader.py", line 648, in _read_file_as_dict
        exec(compile(f.read(), conf_filename, 'exec'), namespace, namespace)
      File "/usr/local/etc/jupyterhub/jupyterhub_config.py", line 446, in <module>
        exec(config_py)
      File "<string>", line 3, in <module>
    ModuleNotFoundError: No module named 'jupyterhub_configurator'

Commenting out all the custom scripts made the hub pod get out of crashloopbackoff

Binder exists at https://binder-staging.2i2c.cloud/ Image build and push succeeded, but spawn failed with:
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"jupyter-binder-2dexamples-2drequirements-2dat9cvbbg\" is forbidden: error looking up service account binder-staging/user-sa: serviceaccount \"user-sa\" not found","reason":"Forbidden","details":{"name":"jupyter-binder-2dexamples-2drequirements-2dat9cvbbg","kind":"pods"},"code":403}

Spawn failed: (403)
Reason: error
HTTP response headers: HTTPHeaderDict({'Audit-Id': '9b2b8bc3-ab2b-4fed-8d75-0fcacf2b86a4', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': '6076e3d8-fb9c-4af6-bc16-1828eab8bf98', 'X-Kubernetes-Pf-Prioritylevel-Uid': '3b5efc35-8cfb-4eeb-8300-d32a394811b8', 'Date': 'Wed, 08 Jun 2022 16:33:06 GMT', 'Content-Length': '369'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"jupyter-binder-2dexamples-2drequirements-2dat9cvbbg\" is forbidden: error looking up service account binder-staging/user-sa: serviceaccount \"user-sa\" not found","reason":"Forbidden","details":{"name":"jupyter-binder-2dexamples-2drequirements-2dat9cvbbg","kind":"pods"},"code":403}

Remove singleuser.serviceAccountName to remove the above issue

Current problems

Dask workers are not scaling up

I have been testing using this repo: https://github.com/TomAugspurger/pangeo-dask-gateway
Launch using this link: https://dask-staging.2i2c.cloud/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FTomAugspurger%2Fpangeo-dask-gateway&urlpath=tree%2Fpangeo-dask-gateway%2F&branch=master
However, a dask cluster is never successfully created. I can't remember if we need a service account or not for that to work - can anyone remind me?

Validation failure

I am not sure how to resolve this:Error: execution error at (binderhub/charts/dask-gateway/templates/gateway/secret.yaml:10:27): gateway.auth.jupyterhub.apiToken must be defined when using jupyterhub auth

Error: execution error at (binderhub/charts/dask-gateway/templates/gateway/secret.yaml:10:27): gateway.auth.jupyterhub.apiToken must be defined when using jupyterhub auth

I believe that until https://github.com/dask/dask-gateway/issues/473 is solved, a token must be manually generated and explicitly set for the jupyterhub gateway service. The code here probably makes more sense than what I'm saying.
https://github.com/2i2c-org/infrastructure/blob/7b6d316959e60106bf4e90e2392a2111d225ff16/deployer/hub.py#L169-L186
https://github.com/2i2c-org/infrastructure/blob/7b6d316959e60106bf4e90e2392a2111d225ff16/deployer/hub.py#L177-L186

I believe that until dask/dask-gateway#473 is solved, a token must be manually generated and explicitly set for the jupyterhub gateway service.

So do we manually set this for other dask hubs? I feel like we don't, we let the deployer generate one. Therefore, if we wait for the deployer to generate one, how do those hubs pass the validation check - because the validation step runs before the deployer generates and inserts the token?
Am I misunderstanding something?

@sgibson91, validation works for other daskhubs because of this (had no idea about it and never noticed it)...
https://github.com/2i2c-org/infrastructure/blob/7b6d316959e60106bf4e90e2392a2111d225ff16/deployer/config_validation.py#L113

Got a warning in the logs about calico
2022-06-22T09:11:06Z [Warning] Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "1b7ca330c53fd745eeae4e2c6d6145e4ec90293d784b615366dfa70466ece06b": stat /var/lib/calico/nodename: no such file or directory: check that the calico/node container is running and has mounted /var/lib/calico/

Other than https://github.com/2i2c-org/infrastructure/pull/1404/#issuecomment-1162851590, this is deployed and ready for review! 🎉

The calico warning is harmless for the most part, means the pod got scheduled on the node before networkpolicy had a chance to start up.


Callback with ObjCBlock.listener crashed with EXC_BAD_ACCESS error

App crashed when the callback method executed with EXC_BAD_ACCESS error.
Launching lib/main.dart on iPhone 12 in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: PT2F4U6696
Xcode build done.                                           12.3s
(lldb) 2024-03-15 16:13:22.718904+0800 Runner[3232:1441346] [ERROR:flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm(42)] Using the Impeller rendering backend.
Connecting to VM Service at ws://<IP_ADDRESS>:55859/eyAmJlDrOlc=/ws
Initialized TensorFlow Lite runtime.
INFO: Initialized TensorFlow Lite runtime.
Created TensorFlow Lite XNNPACK delegate for CPU.
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
[core] "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)""
[PAAccessLogger] Failed to log access with error: access=<PATCCAccess 0x283de1450> accessor:<<PAApplication 0x283df2c10 identifierType:auditToken identifier:{pid:3232, version:8201}>> identifier:B3419EA5-9019-4910-A61D-955CE4F35F9D kind:intervalEvent timestampAdjustment:0 visibilityState:0 assetIdentifierCount:0 tccService:kTCCServicePhotos, error=Error Domain=NSCocoaErrorDomain Code=4097 "connection to service with pid 226 named com.apple.privacyaccountingd" UserInfo={NSDebugDescription=connection to service with pid 226 named com.apple.privacyaccountingd}
* thread #9, name = 'io.flutter.1.ui', stop reason = EXC_BAD_ACCESS (code=1, address=0x166f994f0)
    frame #0: 0x00000001b85e7a7c libobjc.A.dylib`objc_retain + 16
libobjc.A.dylib`objc_retain:
->  0x1b85e7a7c <+16>: ldr    x17, [x17, #0x20]
    0x1b85e7a80 <+20>: tbz    w17, #0x2, 0x1b85e7a38    ; ___lldb_unnamed_symbol1366
    0x1b85e7a84 <+24>: tbz    w16, #0x0, 0x1b85e7a60    ; ___lldb_unnamed_symbol1366 + 40
    0x1b85e7a88 <+28>: lsr    x17, x16, #55
Target 0: (Runner) stopped.
Lost connection to device.

Exited.

Related code:
  @override
  Future<List<Barcode>> process(InputImage image) {
    final completer = Completer<List<Barcode>>();
    final mlkImage = image is BitmapInputImageImpl
        ? image.toMLKVisionImage()
        : throw TypeError();
    final completion = ffi.ObjCBlock_ffiVoid_NSArray_NSError.listener(
      lib,
      (nsBarcodes, nsError) {
        final barcodes = nsBarcodes?.toBarcodeList() ?? [];
        final error = nsError?.toError();
        if (error == null) {
          completer.complete(barcodes);
        } else {
          completer.completeError(error);
        }
      },
    );
    mlkScanner.processImage_completion_(mlkImage, completion);
    return completer.future;
  }

The source repo is here: https://github.com/yanshouwang/hymir.dev/tree/hymir_mlkit/hymir_mlkit/hymir_mlkit_darwin

When you're interacting with native code, you need to think carefully about memory management. My guess is that your ObjCBlock is being garbage collected, because you're not holding a reference to it.
Try sticking the block in a static variable. I know that's not the cleanest solution, but it's just to confirm that this is the bug. If that fixes it, you can come up with a cleaner way of holding on to the reference, but the details will depend on your use case (eg, can you share an single block instance for the whole app? Does the block need to fire only once?).

I noticed here is an related issue about ObjCBlock.lisenter, Do we need some extra code to make it work when the callback has arguments?
https://github.com/dart-lang/native/issues/835

Maybe. #835 is about the callback arguments. If you've tried what I suggested before, and are holding a reference to the ObjCBlock to make sure it's not GC'd, and are still seeing the crash, then yeah the other possibility is that the arguments are being GC'd. Specifically, I sometimes see crashes when the trampoline wraps an NSObject argument, because the wrapper tries to retain a reference to a dead object.
So the next thing to figure out is where exactly the crash is happening. If you aren't getting useful stack traces, you can try print debugging.
For example, here's an ObjCBlock.listener constructor, from the AVF audio example:
  ObjCBlock_ffiVoid_ObjCObject_bool.listener(
      AVFAudio lib, void Function(NSObject, ffi.Pointer<ffi.Bool>) fn)
      : this._(
            lib._newBlock1(
                (_dartFuncListenerTrampoline ??= ffi.NativeCallable<
                            ffi.Void Function(
                                ffi.Pointer<_ObjCBlock>,
                                ffi.Pointer<ObjCObject>,
                                ffi.Pointer<ffi.Bool>)>.listener(
                        _ObjCBlock_ffiVoid_ObjCObject_bool_closureTrampoline)
                      ..keepIsolateAlive = false)
                    .nativeFunction
                    .cast(),
                _ObjCBlock_ffiVoid_ObjCObject_bool_registerClosure(
                    (ffi.Pointer<ObjCObject> arg0, ffi.Pointer<ffi.Bool> arg1) =>
                        fn(NSObject._(arg0, lib, retain: true, release: true),
                            arg1))),
            lib);

The NSObject._(arg0, lib, retain: true, release: true) part will crash if arg0 has already been GC'd. So you can try rewriting that closure like this:
(ffi.Pointer<ObjCObject> arg0, ffi.Pointer<ffi.Bool> arg1) {
  print("Creating wrapper object...");
  final arg0Wrap = NSObject._(arg0, lib, retain: true, release: true);
  print("Calling the function...");
  return fn(arg0Wrap, arg1);
},

If this is where the crash is, then the fix is to retain a reference on the ObjC side, before the block is invoked. This is what #835 plans to do automatically, but you can do this manually if you don't want to wait. Just write an ObjC function that takes a block, and returns a block that retains a ref to the arg before calling the given block. Then you can pass your Dart block through that function to get a block that won't crash.
One AI I already have from this issue is to make this more debuggable. It'd be nice if we got a clear error message if the arg has been GC'd, rather than just crashing.

There is the logs, I think this crash is caused by the arguments
Connecting to VM Service at ws://<IP_ADDRESS>:62999/vXMMscuo9pw=/ws
Initialized TensorFlow Lite runtime.
INFO: Initialized TensorFlow Lite runtime.
Created TensorFlow Lite XNNPACK delegate for CPU.
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
[core] "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)""
[PAAccessLogger] Failed to log access with error: access=<PATCCAccess 0x28035a8a0> accessor:<<PAApplication 0x2803423a0 identifierType:auditToken identifier:{pid:3771, version:9471}>> identifier:846B9D65-4D81-475F-90C7-9E0FE9E552FA kind:intervalEvent timestampAdjustment:0 visibilityState:0 assetIdentifierCount:0 tccService:kTCCServicePhotos, error=Error Domain=NSCocoaErrorDomain Code=4097 "connection to service with pid 226 named com.apple.privacyaccountingd" UserInfo={NSDebugDescription=connection to service with pid 226 named com.apple.privacyaccountingd}
flutter: Creating wrapper object...
* thread #9, name = 'io.flutter.1.ui', stop reason = EXC_BAD_ACCESS (code=1, address=0x5874a90d0)
    frame #0: 0x00000001b85e7a7c libobjc.A.dylib`objc_retain + 16
libobjc.A.dylib`objc_retain:
->  0x1b85e7a7c <+16>: ldr    x17, [x17, #0x20]
    0x1b85e7a80 <+20>: tbz    w17, #0x2, 0x1b85e7a38    ; ___lldb_unnamed_symbol1366
    0x1b85e7a84 <+24>: tbz    w16, #0x0, 0x1b85e7a60    ; ___lldb_unnamed_symbol1366 + 40
    0x1b85e7a88 <+28>: lsr    x17, x16, #55
Target 0: (Runner) stopped.
Lost connection to device.

Exited.

I tried the pedometer example, it works fine, but if I add s.static_framework = true  to the pedometer.podspec file, it will throw this error:
ArgumentError (Invalid argument(s): Failed to load dynamic library 'pedometer.framework/pedometer': dlopen(pedometer.framework/pedometer, 0x0001): tried: 'pedometer.framework/pedometer' (no such file), '/private/preboot/Cryptexes/OSpedometer.framework/pedometer' (no such file), '/usr/lib/swift/pedometer.framework/pedometer' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/pedometer.framework/pedometer' (no such file), '/private/var/containers/Bundle/Application/1A282E66-6B9D-4DA6-ADC4-12727DBCE47A/Runner.app/Frameworks/pedometer.framework/pedometer' (no such file), '/private/var/containers/Bundle/Application/1A282E66-6B9D-4DA6-ADC4-12727DBCE47A/Runner.app/Frameworks/pedometer.framework/pedometer' (no such file), '/usr/lib/pedometer.framework/pedometer' (no such file, not in dyld cache), 'pedometer.framework/pedometer' (no such file), '/System/Library/Frameworks/pedometer.framework/pedometer' (no such file, not in dyld cache))

I add s.static_framework = true because I add s.dependency 'GoogleMLKit/BarcodeScanning', '~> 4.0.0' as a dependency.
Is there anything I can do to make it work?

The pedometer example is unrelated. To fix the argument ref counting issue, you'll need to retain a reference to the argument before sending it to Dart. To do this, you'll need to write a bit of ObjC code to wrap your callback in another callback that retains the arg then calls the original callback.

It throws when I use the wrapCallback method, I think this is caused by the s.static_library = true declaration in the podspec.

That's a linker issue. Your wrapCallback function isn't being linked in to the app.

But I encountered another issue is that when I call an property with NSData type, the app crash with messages:
Connecting to VM Service at ws://<IP_ADDRESS>:64705/LdHuae_xu34=/ws
[core] "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)""
[PAAccessLogger] Failed to log access with error: access=<PATCCAccess 0x282ac9810> accessor:<<PAApplication 0x282af27b0 identifierType:auditToken identifier:{pid:4130, version:10391}>> identifier:676D0FB7-760D-4345-82E6-98601BE4EC50 kind:intervalEvent timestampAdjustment:0 visibilityState:0 assetIdentifierCount:0 tccService:kTCCServicePhotos, error=Error Domain=NSCocoaErrorDomain Code=4097 "connection to service with pid 4035 named com.apple.privacyaccountingd" UserInfo={NSDebugDescription=connection to service with pid 4035 named com.apple.privacyaccountingd}
-[VNBarcodeObservation payloadData]: unrecognized selector sent to instance 0x100fb8960
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[VNBarcodeObservation payloadData]: unrecognized selector sent to instance 0x100fb8960'
*** First throw call stack:
(0x195bc6d94 0x18ec7c3d0 0x195d3bb14 0x195bdd1c8 0x195c439f0 0x109587a48 0x11675fbc8 0x11675f5cc 0x11675f148 0x116757a8c 0x116755908 0x116754950 0x116754778 0x11675426c 0x116754094 0x116753f88 0x114cab168 0x116753dd4 0x10f73cf60 0x10f73c358 0x109583424 0x104055d18 0x104075b80 0x1040a3d90 0x10443e080 0x103e42710 0x103fd9aec 0x103d0ad8c 0x103d0f0e4 0x195c88704 0x195c4603c 0x195beb7fc 0x195c375c4 0x195c3c4dc 0x103d0f1d0 0x103d0dca4 0x1f55546b8 0x1f5553b88)
libc++abi: terminating due to uncaught exception of type NSException
* thread #10, name = 'io.flutter.1.ui', stop reason = signal SIGABRT
    frame #0: 0x00000001d48dc558 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`:
->  0x1d48dc558 <+8>:  b.lo   0x1d48dc578               ; <+40>
    0x1d48dc55c <+12>: pacibsp
    0x1d48dc560 <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1d48dc564 <+20>: mov    x29, sp
Target 0: (Runner) stopped.
Lost connection to device.

Exited.

That error means the object isn't actually an NSData. Either you're casting a different object pointer to NSData, or the NSData is being GC'd and another different type of object is being put at that same memory location.

That error means the object isn't actually an NSData. Either you're casting a different object pointer to NSData, or the NSData is being GC'd and another different type of object is being put at that same memory location.

Is this a bug or I missed something? The payloadData should be a NSData property

Oh sorry, I misspoke. It's not that payloadData is returning something that's not an NSData, it's that your barcodes argument isn't really a VNBarcodeObservation.
2 more ideas to help you debug this:

On the Dart side, try calling VNBarcodeObservation.isInstance(barcodes).
On the ObjC side, in wrapCallback, try to test if barcodes is a valid VNBarcodeObservation at that point.

If 1 and 2 both work, then your VNBarcodeObservation object is just missing that method (could be a versioning issue). If 2 works but 1 doesn't, then the object is still being GC'd before being handled in Dart. If 1 and 2 both fail, then your object isn't really a VNBarcodeObservation, and you'll need to double check the API you're using.

Oh sorry, I misspoke. It's not that payloadData is returning something that's not an NSData, it's that your barcodes argument isn't really a VNBarcodeObservation.
2 more ideas to help you debug this:

On the Dart side, try calling VNBarcodeObservation.isInstance(barcodes).
On the ObjC side, in wrapCallback, try to test if barcodes is a valid VNBarcodeObservation at that point.

If 1 and 2 both work, then your VNBarcodeObservation object is just missing that method (could be a versioning issue). If 2 works but 1 doesn't, then the object is still being GC'd before being handled in Dart. If 1 and 2 both fail, then your object isn't really a VNBarcodeObservation, and you'll need to double check the API you're using.

Ah, you are right, according the Apple's docs, the payloadData is only available on iOS 17+, which I run the code on an iOS 16 device. Thanks!


Fix repeatedly initialize shared memory data and protect the memory's fields

Add shared memory lock when accessing some fields of the memory instance
when the memory instance is shared.
And avoid repeatedly initializing the shared memory data when creating the
child thread in lib-pthread or lib-wasi-threads.

LGTM, just a question on the performance - I see that adds extra lock/unlock for all WASI calls. Is there any other significant scenario that will be affected by this change from perf perspective?

Yes, performance may be an issue, we had better test more. Maybe we can refine the code, e.g., add lock/unlock only when the memory is actually shared, and load/store memory's memory_data_size/memory_data_end fields with atomic operations, like what we did for suspend_flags.

LGTM, just a question on the performance - I see that adds extra lock/unlock for all WASI calls. Is there any other significant scenario that will be affected by this change from perf perspective?

https://github.com/bytecodealliance/wasm-micro-runtime/pull/2682

@loganek I have merged #2682, if there is any issue found or there is enhancement needed, let's create another PR to fix/enhance it. Thanks.

@wenyongh thanks a lot and sorry for a slow response, I just came back from holidays.


ci: fix errors in ci github action for node 8 and 9

This PR fixes nyc version to 14.1.1 when running tests in node 8 or node 9. nyc 15.x requires a yargs package version that requires node >=10.
I've also added the latest versions of node (18, 19 and 20) to the matrix.
Related to https://github.com/jshttp/http-errors/issues/108

[!NOTE]
This PR should be merged before this one.

Can we include Node@21?

Added here

I've also added node@22 to the ci and it works! :)


171 image export no multibutton

Closes #171

@philippfromme Could you verify this actually works on Windoofs?


Update TaskList to always sort the tasks chronologically

Codecov Report
Base: 67.84% // Head: 67.91% // Increases project coverage by +0.06% :tada:

Coverage data is based on head (9d9c760) compared to base (83acc88).
Patch coverage: 72.72% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #273      +/-   ##
============================================
+ Coverage     67.84%   67.91%   +0.06%
- Complexity      854      857       +3
============================================
  Files           163      163
  Lines          3160     3170      +10
  Branches        354      355       +1
============================================
+ Hits           2144     2153       +9
- Misses          906      907       +1
  Partials        110      110

Impacted Files
Coverage Δ

.../main/java/seedu/uninurse/model/task/DateTime.java
54.38% <50.00%> (+2.53%)
:arrow_up:

.../main/java/seedu/uninurse/model/task/TaskList.java
60.86% <85.71%> (+2.80%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Add Permission for Individual File

The Permissions work at a top-level folder only and it makes assumptions from there. The  route manager should be able to dissect which file is attempting to render and check specific permissions. Some files such as .html files may not exist and if that is the case the permission system should fall-back to the current folder

Currently if a standard user tries to access a folder in DNN that will be denied unless it is explicitly added. In my testing copying a static html website inside of a portal doesn't automatically add it to the folder table in DNN. This means that all users won't be able to access the file.
I think we can add a workaround where you manually add the row to the Folder table and apply the permissions by hand. This isn't a very good feature and needs a better configuration story

Follow the steps below as a workaround

Copy static html files over to desired location. In my example I created a team wiki in portal 0. ~/Portal/0/Wiki/index.html is the root page
Log in to DNN as super user
Go to Manage -> Site Assets
Right-Click on Root and add a new folder called Wiki which matches the folder already created
Select Standard Folder

Once folder is created there will most likely be nothing showing up from the DNN user interface, which is normal. Right click on the folder and select view folder properties
Navigate to permissions and add your role or user to access Browse and Open permissions

This is working as designed according to DNN specifications. We need to add better documentation around this story. I am updating this work item to a documentation item and it is not a bug


Go support

I've tried using stoke on some binaries generated by Go. The code can be found here: http://play.golang.org/p/ID0uimni3B. Here are the issues I've encountered:

Syntax errors:
  Error on line 0: syntax error, unexpected LABEL, expecting COLON

Because of these errors a lot of files in bins (the folder with assembly files) are basically empty. This is solved by replacing "."[a-zA-Z0-9]+ with "."[a-zA-Z0-9_.(*)]+ in src/ext/x64asm/src/att.l:108. This makes stoke understand the Go method naming conventions (e.g. pkg.(*Type).Method). After that the errors that I get are like these:
 Error on line 0: syntax error, unexpected $end, expecting COLON
 Error on line 125: syntax error, unexpected R_32, expecting ENDL
 Error on line 6: Unable to parse instruction!

Despite those I am able to proceed.

Deadlock? stoke testcase launches the program but after main finishes (judging by CPU consumption) it just gets stuck. Nothing is written to the testcase file and the command never exits, so I have to use ^C to quit. It's a wild guess but it may have something to do with the fact that Go's calling convention is different from C's.

(Unrelated to Go). It seems like --relax_reg flag of stoke search is removed. Should be also removed from the docs.

Additional info:
Go version: 1.5.1.
Commands used:
go build -o a.out popcnt.go
stoke extract -i ./a.out -o bins
stoke testcase --bin ./a.out -o test.tc --max_testcases 1024 --fxn main.popcnt

    `bins/main.popcnt.s` content:

    ```as
  .text
  .globl main.popcnt
  .type main.popcnt, @function
.main.popcnt:
  movq 0x8(%rsp), %rax   # 0
  xorl %ecx, %ecx        # 1
  cmpq $0x0, %rax        # 2
  jbe .L_401023          # 3
.L_40100d:
  movq %rax, %rbx        # 4
  andq $0x1, %rbx        # 5
  addq %rcx, %rbx        # 6
  movq %rbx, %rcx        # 7
  shrq $0x1, %rax        # 8
  cmpq $0x0, %rax        # 9
  ja .L_40100d           # 10
.L_401023:
  movq %rcx, 0x10(%rsp)  # 11
  retq                   # 12
  addb %al, (%rax)       # 13
  addb %al, (%rax)       # 14
  addb %al, (%rax)       # 15

.size main.popcnt, .-main.popcnt

``popcnt`` disassembly as generated by ``go build -gcflags '-S' popcnt.go``

"".popcnt t=1 size=48 value=0 args=0x10 locals=0x0
     0x0000 00000 (/tmp/foo/foo.go:4)        TEXT    "".popcnt(SB), $0-16
     0x0000 00000 (/tmp/foo/foo.go:4)        NOP
     0x0000 00000 (/tmp/foo/foo.go:4)        NOP
     0x0000 00000 (/tmp/foo/foo.go:4)        MOVQ    "".x+8(FP), AX
     0x0005 00005 (/tmp/foo/foo.go:4)        FUNCDATA        $0, gclocals·23e8278e2b69a3a75fa59b23c49ed6ad(SB)
     0x0005 00005 (/tmp/foo/foo.go:4)        FUNCDATA        $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
     0x0005 00005 (/tmp/foo/foo.go:5)        MOVQ    $0, CX
     0x0007 00007 (/tmp/foo/foo.go:6)        CMPQ    AX, $0
     0x000b 00011 (/tmp/foo/foo.go:6)        JLS     $0, 35
     0x000d 00013 (/tmp/foo/foo.go:7)        MOVQ    AX, BX
     0x0010 00016 (/tmp/foo/foo.go:7)        ANDQ    $1, BX
     0x0014 00020 (/tmp/foo/foo.go:7)        ADDQ    CX, BX
     0x0017 00023 (/tmp/foo/foo.go:7)        MOVQ    BX, CX
     0x001a 00026 (/tmp/foo/foo.go:7)        NOP
     0x001a 00026 (/tmp/foo/foo.go:6)        SHRQ    $1, AX
     0x001d 00029 (/tmp/foo/foo.go:6)        NOP
     0x001d 00029 (/tmp/foo/foo.go:6)        CMPQ    AX, $0
     0x0021 00033 (/tmp/foo/foo.go:6)        JHI     $0, 13
     0x0023 00035 (/tmp/foo/foo.go:9)        MOVQ    CX, "".~r1+16(FP)
     0x0028 00040 (/tmp/foo/foo.go:9)        RET
     0x0000 48 8b 44 24 08 31 c9 48 83 f8 00 76 16 48 89 c3  H.D$.1.H...v.H..
     0x0010 48 83 e3 01 48 01 cb 48 89 d9 48 d1 e8 48 83 f8  H...H..H..H..H..
     0x0020 00 77 ea 48 89 4c 24 10 c3                       .w.H.L$..

We have a new release now available.  Here's a link to that: https://github.com/StanfordPL/stoke
Hopefully it will make things better and not worse!  In the meantime, I'm going to take your first bug and file it against x64asm.  The third one is already taken care of (the feature is still there, but it's now the default and called --no_relax_reg)..  Could you try reproducing the second one in the latest STOKE?  If you can, please file a bug in the new repository.

After looking at the first issue more carefully, I think it may also already be fixed in the latest x64asm which uses a totally different parser.  Can you confirm?

Thanks, but I cann't check it out because I have issues building the new version. I've filed #836 in the new repo describing all that went wrong.