SampleHIDKeyboard.cpp not sending any keys?

Hi, I've setup esp-idf and created a project for SampleHIDKeyboard.cpp, but once I make it and connect to my phone, I see the program runs with make monitor, but nothing is ever sent to my phone. Can anyone else test this and tell me if it is working for them and so what settings they had to enable.
Logs: https://www.hastebin.com/raw/larufeboko
I only added some logging in the task function to see that it ran

I think that maybe I could know what is causing this issue. MacOS and iOS are not recognizing the esp32 as a keyboard completely. Let me try to explain my issue:
I can connect my esp32 to my mac, and it print characters. But it is not recognized as a keyboard in settings (while other official bt keyboard are recognized). Now, checking connected devices (something like device manager on Windows) I can see that the original keyboard has minor and major values which references to the CoD (as you can see here).
Some stuff will work only when macOS will recognize the esp32 as an actual keyboard, and in my opinion this will probably make iOS communicate correctly


Initial implementation of actor runtime

Actor Example
This example demonstrates the Dapr actor framework.  To author an actor,

Create a struc decorated with the #[dapr::actor] macro to house your custom actor methods that map to Axum handlers, use Axum extractors to access the incoming request and return an impl IntoResponse.
Use the DaprJson extractor to deserialize the request from Json coming from a Dapr sidecar.
#[dapr::actor]
struct MyActor {
    id: String,
    client: ActorContextClient
}

#[derive(Serialize, Deserialize)]
pub struct MyRequest {
    pub name: String,
}

#[derive(Serialize, Deserialize)]
pub struct MyResponse {
    pub available: bool,
}

impl MyActor {
    fn do_stuff(&self, DaprJson(data): DaprJson<MyRequest>) -> Json<MyResponse> {
        println!("doing stuff with {}", data.name);
        Json(MyResponse {
            available: true
        })
    }
}

There are many ways to write your actor method signature, using Axum handlers, but you also have access to the actor instance via self.  Here is a super simple example:
pub async fn method_2(&self) -> impl IntoResponse {
    StatusCode::OK
}

Implement the Actor trait.  This trait exposes the following methods:

on_activate - Called when an actor is activated on a host
on_deactivate - Called when an actor is deactivated on a host
on_reminder - Called when a reminder is recieved from the Dapr sidecar
on_timer - Called when a timer is recieved from the Dapr sidecar

#[async_trait]
impl Actor for MyActor {

    async fn on_activate(&self) -> Result<(), ActorError> {
        println!("on_activate {}", self.id);
        Ok(())
    }

    async fn on_deactivate(&self) -> Result<(), ActorError> {
        println!("on_deactivate");
        Ok(())
    }
}

An actor host requires an Http server to recieve callbacks from the Dapr sidecar.  The DaprHttpServer object implements this functionality and also encapsulates the actor runtime to service any hosted actors.  Use the register_actor method to register an actor type to be serviced, this method takes an ActorTypeRegistration which specifies

The actor type name (used by Actor clients), and concrete struct
A factory to construct a new instance of that actor type when one is required to be activated by the runtime.  The parameters passed to the factory will be the actor type, actor ID, and a Dapr client for managing state, timers and reminders for the actor.
The methods that you would like to expose to external clients.

let mut dapr_server = dapr::server::DaprHttpServer::new();

dapr_server.register_actor(ActorTypeRegistration::new::<MyActor>("MyActor",
    Box::new(|actor_type, id, client| Arc::new(MyActor{
        actor_type,
        id,
        client
    })))
    .register_method("do_stuff", MyActor::do_stuff)
    .register_method("do_other_stuff", MyActor::do_other_stuff));

dapr_server.start(None).await?;

@artursouza

@danielgerlag notice the linter failures

@NickLarsenNZ can you help review this?

This looks super promising, thank you! When trying to implement the client as in the example/actor folder I get the following compilation error on invoke_actor:
the trait bound `dapr::error::Error: Deserialize<'_>` is not satisfied
the following other types implement trait `Deserialize<'de>`:
  <&'a [u8] as Deserialize<'de>>
  <&'a serde_json::raw::RawValue as Deserialize<'de>>
  <&'a std::path::Path as Deserialize<'de>>
  <&'a str as Deserialize<'de>>
  <() as Deserialize<'de>>
  <(T0, T1) as Deserialize<'de>>
  <(T0, T1, T2) as Deserialize<'de>>
  <(T0, T1, T2, T3) as Deserialize<'de>>
and 224 others
required for `Result<OfferResponse, dapr::error::Error>` to implement `for<'a> Deserialize<'a>`

@danielgerlag notice the linter failures

@yaron2  I do not... where do I see them?

@NickLarsenNZ @yaron2 I have addressed most of the feedback

ping @NickLarsenNZ @yaron2

@NickLarsenNZ would appreciate another review when possible. thanks!

@NickLarsenNZ

@yaron2

@NickLarsenNZ can you review please?

@NickLarsenNZ I implemented your suggestion around the macro... could you please re-review?

@danielgerlag please resolve the conflicts and we can then merge

@yaron2 I have resolved the conflicts.  I have also updated the CI to publish the macros crate, but am unable to verify that it is correct... if someone could help with that?

Merged! Thanks for this great contribution @danielgerlag. Please update our docs in the docs repo to add Rust Actors there where neded.

@danielgerlag  Can you elaborate on what is missing in that implementation to fully use actors in Rust ?

@cscetbon, I don't think there are any missing features in terms of the Dapr actor model & spec.
I am using it today in another project.  The Dapr sidecar itself however, still only supports Http calls for actors, but it is working using that.

Thanks @danielgerlag the title of this PR was confusing. I tried to ping you on discord to get more information but without success.

@cscetbon, I don't think there are any missing features in terms of the Dapr actor model & spec. I am using it today in another project. The Dapr sidecar itself however, still only supports Http calls for actors, but it is working using that.

@danielgerlag Using your code it doesn't seem we're able to send a message to another actor without recreating manually a new connection to dapr. If I'm not mistaking it's because client is private in struct ActorContextClient and it seems to be the only way to access the invoke_actor method.

@cscetbon the invoke_actor method would be on the main dapr client.  If you want this client available inside your actor, you can pass it into through the factory method with you register the actor, it allows you to define how an actor should be constructed.

Thanks @danielgerlag, I am able to make it work. However I have to clone the client twice (one to avoid a move and one to make it mutable to call invoke_actor), any idea how to avoid this ?
...
#[actor]
struct MyActor {
  id: String,
  dapr_client: DaprClient,
}

impl MyActor {

  async fn method_a(&self, DaprJson(req): DaprJson<MyRequest>) -> Result<Json<MyResponse>, ActorError> {
    ...

    let mut client = self.dapr_client.clone(); // CLONE HERE to make it mutable
    let _: Result<MyResponse, dapr::error::Error> = self.dapr_client
     .invoke_actor("MyActor", "a100", "method_b", data, None)
     .await;
     ...
  }
  async fn method_b(&self, DaprJson(req): DaprJson<MyRequest>) -> Result<Json<MyResponse>, ActorError> {
    ...
  }
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
  env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
  let mut dapr_server = dapr::server::DaprHttpServer::new().await;

  let port: u16 = std::env::var("DAPR_GRPC_PORT").unwrap().parse().unwrap();
  let address = format!("https://<IP_ADDRESS>/:{}", port);

  let client = DaprClient::connect(address).await?;

  dapr_server
    .register_actor(
      ActorTypeRegistration::new::<MyActor>(
        "MyActor",
        Box::new(move |_actor_type, actor_id, _| {
          Arc::new(MyActor {
            id: actor_id.to_string(),
            dapr_client: client.clone(), // CLONE HERE to avoid a move out
          })
        }),
      )
      .register_method("method_a", MyActor::method_a),
      .register_method("method_b", MyActor::method_b),
      )
    )
    .await;
  ...


Support Ubuntu 18.04 / Bionic Beaver.

Really, the only things necessary are (a) get the box URL in the
Vagrantfile, and (b) update Vagrant.

This isn't working for me

How is it failing?
On Wed, May 2, 2018, 7:44 PM clayg<EMAIL_ADDRESS>wrote:

This isn't working for me
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/swiftstack/vagrant-swift-all-in-one/pull/72#issuecomment-386178386,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACFf1ocazxuWmHiY3ojw8pVQKNYGTtBks5tum8ZgaJpZM4TwNeI
.

I hit cmd-enter hoping for a newline and had to edit to finish the comment - i'm sorry the email message sucked.
Basically the issue is deadsnakes.

Looks like a transient keyserver failure. I ran that command a few more times and it succeeded for me every time.

Keeps failing for me,
vagrant@saio:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6A755776
Executing: /tmp/apt-key-gpghome.ybQTRa6KpC/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 6A755776
gpg: keyserver receive failed: Server indicated a failure
vagrant@saio:~$ echo $?
2

If this works for you; merge it.


Problems with displaying several code snippets on the guide page

Bugs with displaying several code examples on https://spring.io/guides/gs/authenticating-ldap/ (inside "Set up Spring Security" & "Set up user data" paragraphs):
build.gradle - Unresolved directive in  - include::complete/build.gradle[tag=security,indent=0]
pom.xml - Unresolved directive in  - include::complete/pom.xml[tag=security,indent=0]
src/main/java/hello/WebSecurityConfig.java - Unresolved directive in <stdin> - include::complete/src/main/java/hello/WebSecurityConfig.java[]
src/main/resources/test-server.ldif - Unresolved directive in <stdin> - include::complete/src/main/resources/test-server.ldif[]
Btw, Ascii plugin in IDEA shows all of them correctly.

I cleared a cache. Looks OK now.


update readme for when using this with capacitor for ios

Significant impact when using Capacitor and this plugin.  Updated readme to reflect and provided steps for use.

@klietzau How did you get this to work with capacitor? I keep getting this error:
Module not found: Error: Can't resolve 'cordova/exec' in 'C:\***\node_modules\cordova-plugin-starprnt\www'.
Am I importing it wrong?


[android] close #123, websocket operate on main thread

DefaultWebSocketAdapter will throw an exception when run on android 7.0
https://developer.android.com/about/versions/nougat/android-7.0-changes.html

Due to a bug in previous versions of Android, the system did not flag writing to a TCP socket on the main thread as a strict-mode violation. Android 7.0 fixes this bug. Apps that exhibit this behavior now throw an android.os.NetworkOnMainThreadException. Generally, performing network operations on the main thread is a bad idea because these operations usually have a high tail latency that causes ANRs and jank.

Duplicate with #1015


Master CI failed for a week

Bug Report
https://circleci.com/gh/tikv/tikv/tree/master
Failures come from Coverage test.
I guess it may be one of the cause of https://github.com/tikv/tikv/issues/3600, because master has not been successfully built for a while and cache might be invalidated.

Is it a travis-ci issue? See https://github.com/travis-ci/travis-ci/issues/6253.

@hicqu I guess not, we are using circle CI and from the message we can see that it failed in code coverage tests.

@Connor1996 PTAL, the build starts to fail since your change (success: https://circleci.com/gh/tikv/tikv/13813, fail: https://circleci.com/gh/tikv/tikv/13837). It might not be a direct cause though.

emmm...my code changes have nothing relationship with that error, this test even doesn't reach merge logic. We didn't change SchedTooBusy logic for a long time, it seems that prewrite finished asynchronously everytime before call next async_write(). Maybe it is related to CI itself?

@Connor1996 Have you managed to reproduce this locally?

@Hoverbear I didn't have any try to reproduce it locally, instead I make a PR https://github.com/tikv/tikv/pull/3635 to let circleci to retest.
the result shows
under master revert my change  failed
then use tarpaulin 0.6.1 instead of 0.6.3 failed
reset to commit(Fix CI by installing tarpaulin from git) with tarpaulin 0.6.1  passed
then add my change without test passed
then add test(not the failed test) of my change passed
then use tarpaulin 0.6.3 failed
then use tarpaulin 0.6.1 passed
The failed test actually may fail under some thread schedule order, seems that tarpaulin 0.6.3 makes it more easy to fail. My change commit with tarpaulin 0.6.1 passes but fails in 0.6.3. Comparing to the last passed commit(Fix CI by installing tarpaulin from git) the only difference what I can think of is the number of tests(does it matter?  tarpaulin sets RUST_TEST_THREADS=1). It is so weird, do you have any thought about that?

Maybe you can try on a Linux machine to reproduce it faster? @Connor1996

@Connor1996 Hmmm, okay. I haven't managed to reproduce this locally. (In fact, I cannot get Tarpaulin to even build versions 0.6.1 and 0.6.3. cargo +nightly-2018-07-18 install cargo-tarpaulin --version 0.6.1 fails with many proc macro errors)

@Hoverbear You will need to install it via the command line in our CI script :)

@breeswish codegen-units=1 makes no effort, maybe we should rewrite the test to make it more stable?

@Connor1996 Yes. codegen-units=1 only helps with performance, won't change other thing.

Hi @Connor1996 have you made any progress here?

@Hoverbear nope, I am working on other works these days. Yesterday I tried to rewrite the test(still unstable, but I can't find a better way), it still fails.

Try to fix it in https://github.com/tikv/tikv/pull/3719. Though it is not so elegant, anyway, it works.

@Connor1996 I am in a similar situation. :( Great work on improving the test! I wonder what changed on our CI to do this. :thinking:

Any updates on this issue?

Closing, since our master are mostly green now!
https://circleci.com/gh/tikv/tikv/tree/master


Add references to other systems with data

We could add for example
"additionalInformation": {
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "endpoint": "string",
      "componentIdentifier": "string"
    }
  }
}

to components to create a link to other sources which may contain data about this component.
Until November 2021, we focus on the core functionalities. After that, we can continue to work on this issue.

A not very general intermediate solution can be
a) the URL of the endpoint of the API, for example https://www.buildingenvelopedata.org/graphql/v1.0.0
b) the identifier of the component, for example 5723bc7a-7e41-446f-9838-a0755ceff574
c) the URL of a website with more information about the database, for example https://www.buildingenvelopedata.org
d) a query to retrieve all data about the component, for example query{byComponentId:allData(where:{componentId:{equalTo:"5723bc7a-7e41-446f-9838-a0755ceff574"}}){nodes{uuid}}}
a) and b) are mandatory. c) and d) help software developers to use the additional data.
A more general approach could introduce the "type" of the API, for example GraphQL or REST.

Depending on the interests of the partners, this could be a topic for a follow-up project.


Add brackets support for nested

Pivotal story id #132842963

I've removed _nested, and create es_q param.
Because rules which were described in the story couldn't be implemented only inside nested query.
In this case, we need to use combined query which can include nested, and other terms.


Resolve imports when bundling

As per the workbox docs, I have this in my service worker file:
import { precacheAndRoute } from 'workbox-precaching'
precacheAndRoute(self.__WB_MANIFEST)

However, when I build my app, that part stays the same which results in the service worker not working because browsers can't execute js import statements in service workers (at least for now). It fails to execute the service worker with the error Uncaught SyntaxError: Cannot use import statement outside a module.
Not sure if this is an issue with the bundler or my understanding of workbox. All examples use import statements.
Relevant part of my vite.config.js:
VitePWA({
	strategies: 'injectManifest',
	injectRegister: false, // service worker is registered from a separate script.
	injectManifest: {
		swSrc: './src/ServiceWorker/sw.js',
		swDest: './dist/sw.js',
	},
	manifest: {
		// manifest omitted
	}
}),

Hi again, I have it working, I ask @antfu and waiting its response:
// see below: just change imports by assignments
// import { cacheNames } from 'workbox-core'
// import { registerRoute, setCatchHandler, setDefaultHandler } from 'workbox-routing'
// import { CacheableResponsePlugin } from 'workbox-cacheable-response'
// import {
//   NetworkFirst,
//   StaleWhileRevalidate,
//   NetworkOnly,
// } from 'workbox-strategies'
// import { ExpirationPlugin } from 'workbox-expiration'

importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.1/workbox-sw.js')
// Note: Ignore the error that Glitch raises about workbox being undefined.
workbox.setConfig({
  debug: true,
})
// To avoid async issues, we load strategies before we call it in the event listener
workbox.loadModule('workbox-core')
workbox.loadModule('workbox-routing')
workbox.loadModule('workbox-cacheable-response')
workbox.loadModule('workbox-strategies')
workbox.loadModule('workbox-expiration')

const cacheNames = workbox.core.cacheNames
const { registerRoute, setCatchHandler, setDefaultHandler } = workbox.routing
const { CacheableResponsePlugin } = workbox.cacheableResponse
const {
  NetworkFirst,
  StaleWhileRevalidate,
  NetworkOnly,
} = workbox.strategies
const { ExpirationPlugin } = workbox.expiration

const cacheName = cacheNames.runtime

The problem is that the sw.js is sent to the client, but this script is not a module, you need to transform it or use the approach using importScripts instead import.
https://developers.google.com/web/tools/workbox/modules/workbox-sw

I have found this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=824647
We cannot use esmodules yet on service workers: once implemented, we can use using type: 'module' on RegistrationOptions:
if('serviceWorker' in navigator) {
  window.addEventListener('load', () => {
    navigator.serviceWorker.register('/sw.js', { scope: '/', type: 'module' })
  })
}

The broswer fails to load the sw with:
type 'module' in RegistrationOptions is not implemented yet.See https://crbug.com/824647 for details.

@userquin how would I go about transforming the SW? I actually thought this is what this plugin would do.
I knew about the module type when registering a service worker, it's just not something I would do for a production app given the lack of browser support at the moment.

@kolaente Yeah, I was talking with @antfu and there is a pending branch here (bundle-sw).
Anyway, in the docs, it is marked as WIP: working in progress , so you cannot configure the plugin in this way (the plugin, right now,  just will paste the source in the the destination, if it is a module it will not work, so you need to change your sw.js to use importScripts).
You need to transform it manually or programatically. I'm working on NetworkFirst for docsites: the code in my previous comment is just a snippet from my local tests for this new strategy.
You can use getManifest from workbox to generate the manifest (self.__WB_MANIFEST equivalent) and then configure a plugin to vite to build your sw.js using getManifest. For the Vite Plugin, you can see an example here, just follow the imports.

@kolaente workbox folks haven't consider this yet, just see issue 2588 from workbox repo, maybe on v7... or once resolved https://bugs.chromium.org/p/chromium/issues/detail?id=824647 (and in all browsers)
You can see there some implementations, for example see this using workbox-v4 and look into package.json:

https://github.com/webmaxru/angular-pwa/blob/workbox-v4-bundle/src/service-worker-bundle.js
https://github.com/webmaxru/angular-pwa/blob/workbox-v4-bundle/src/service-worker.js

I use second approach:

extract workbox libraries in build directory via copyWorkboxLibraries from workbox-util: this will give me the version of workbox to be used in next step: right now the version is workbox-v6.1.1
replace on internal template the path for importPaths and configure workbox:

  const swSrc = resolve(__dirname, options.swDest)
  // extract workbox libraries
  const workboxDirectoryName = await copyWorkboxLibraries(resolve(options.outDir))
  // read template
  const content = await fs.readFile(resolve(__dirname, 'client/build/networkfirst.mjs'), 'utf-8')
  // configure workbox template
  const result = content
    .replace('__SW_WS__', `${options.base}workbox-sw/index.mjs`)
    .replace('__SW_IMPORT_SCRIPTS__', `${slash(join(options.base, workboxDirectoryName, '/workbox-sw.js'))}`)
    .replace('__SW_MODULE_PATH_PREFIX__', `${slash(join(options.base, workboxDirectoryName, '/'))}`)
    .replace('__SW_DEBUG__', options.mode === 'production' ? 'false' : 'true')
    .replace('__SW_INDEX_HTML__', index)
  await fs.writeFile(swSrc, result, {
    encoding: 'utf-8',
  })

save the preconfigured template (const result =  from previous step) in the destination directory: this will be the sw.js file.
call injectManifest from workbox-util using:

  const swSrc = resolve(__dirname, options.swDest)
  // inject manifest
  await injectManifest({
    swSrc,
    swDest: swSrc, // this will not fail since there is an injectionPoint
    injectionPoint: 'self.__WB_MANIFEST',
    globDirectory,
    additionalManifestEntries,
    dontCacheBustURLsMatching,
    globFollow,
    globIgnores,
    globPatterns,
    globStrict,
    manifestTransforms,
    maximumFileSizeToCacheInBytes,
    modifyURLPrefix,
    templatedURLs,
  })

Here a snippet of my service-worker template:
networkfirst.ts
/* eslint-disable comma-dangle */
// @ts-ignore
importScripts('__SW_IMPORT_SCRIPTS__')

// @ts-ignore
declare let self: ServiceWorkerGlobalScope
declare let workbox: any

// Note: Ignore the error that Glitch raises about workbox being undefined.
workbox.setConfig({
  debug: JSON.parse('__SW_DEBUG__') === true,
  modulePathPrefix: '__SW_MODULE_PATH_PREFIX__',
})
// To avoid async issues, we load strategies before we call it in the event listener
workbox.loadModule('workbox-core')
workbox.loadModule('workbox-routing')
workbox.loadModule('workbox-cacheable-response')
workbox.loadModule('workbox-strategies')
workbox.loadModule('workbox-expiration')

const cacheNames = workbox.core.cacheNames

const { registerRoute, setCatchHandler, setDefaultHandler } = workbox.routing
const { CacheableResponsePlugin } = workbox.cacheableResponse
const {
  NetworkFirst,
  StaleWhileRevalidate,
  NetworkOnly
} = workbox.strategies
const { ExpirationPlugin } = workbox.expiration

// @ts-ignore
const manifest = self.__WB_MANIFEST
...
...

with this result:
// src/client/build/networkfirst.ts
importScripts("/workbox-v6.1.1/workbox-sw.js");
workbox.setConfig({
  debug: JSON.parse("true") === true,
  modulePathPrefix: "/workbox-v6.1.1/"
});
workbox.loadModule("workbox-core");
workbox.loadModule("workbox-routing");
workbox.loadModule("workbox-cacheable-response");
workbox.loadModule("workbox-strategies");
workbox.loadModule("workbox-expiration");
var cacheNames = workbox.core.cacheNames;
var {registerRoute, setCatchHandler, setDefaultHandler} = workbox.routing;
var {CacheableResponsePlugin} = workbox.cacheableResponse;
var {
  NetworkFirst,
  StaleWhileRevalidate,
  NetworkOnly
} = workbox.strategies;
var {ExpirationPlugin} = workbox.expiration;
var manifest = [
{"revision":"fa8820bba32afa2ec310297ff3c52601","url":"assets/[name].0718b5f8.js"},
{"revision":"dd6d1382ece531785b016772a7ab1f6a","url":"assets/about.c4a91220.js"},
{"revision":"1b13e9d07bf3590700bb2dfe4f8adc8d","url":"assets/home.379f6d36.js"},
{"revision":"5145da3e9a7f1e16f62028ba40335f70","url":"assets/index.7685bec4.js"},
{"revision":"a760355bef2fd5ded385ccabf84c8de0","url":"assets/index.f3bb671a.css"},
{"revision":"440f26a0e8951f5454d0dae54bee0822","url":"index.html"},
{"revision":"1872c500de691dce40960bb85481de07","url":"registerSW.js"},
...
...
];
...
...

@hannoeru maybe this will help you for bundle-sw. I have a pending push on sw-enhancement branch to include Network first for injectRegister.
If you need some feedback, just contact me here or on discord...

@hannoeru I have pushed sw-network branch
I'm trying another approach: see https://developers.google.com/web/tools/workbox/modules/workbox-recipes
Instead having an awful ts file with importScript I'm doing some play with the link above, trying to do the same but for custom receipts.
The result will be more redeable (see src/receipts/networkfirst/index.ts):
import { networkfirst } from 'vite-plugin-pwa/receipts/networkfirst'

networkfirst(self.__WB_MANIFEST, /*options*/{...})

Until a more robust solution, I went with bundling  service-worker.js after Vite's build.
rollup.sw.js
import { nodeResolve } from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import { terser } from 'rollup-plugin-terser';
import replace from '@rollup/plugin-replace';

export default {
    input: './dist/sw.js',
    output: {
        dir: 'dist',
        format: 'esm'
    },
    plugins: [
        replace({
            'process.env.NODE_ENV': JSON.stringify('production'),
            'preventAssignment': true
        }),
        nodeResolve({
            browser: true
        }),
        commonjs(),
        babel({
            exclude: '**/node_modules/**',
            extensions: ['js'],
            babelHelpers: 'runtime',
            presets: [
                [
                    '@babel/preset-env',
                    {
                        corejs: 3,
                        useBuiltIns: 'entry',
                        targets: {
                            'esmodules': true
                        },
                        modules: false
                    }
                ]
            ]
        }),
        terser()
    ]
};

package.json
{
    "build": "vite build && rollup -c ./rollup.sw.js "
}

@userquin The bundle branch looks like a great solution. When do you think this could be used in production? I'd happily beta test it.

@Mehdi-Hp looks great per se, wondering if that could be integrated more into vite. But I guess then we're back to this plugin again 🙂

@Mehdi-Hp looks great per se, wondering if that could be integrated more into vite. But I guess then we're back to this plugin again 🙂

@userquin The bundle branch looks like a great solution. When do you think this could be used in production? I'd happily beta test it.

@hannoeru or @antfu should answer this: when done I will use it on the recipes / receipts ones, sw-networkfisrt is a proof of concept I am toying with.
The idea behind this is to abstract the user from using workbox, rollup, babel,  vite ... Just use what this plugin provides, it is very ambitious ;).

If someone wants to finish bundle-sw branch, feel free to do that!

@antfu @hannoeru
I'm playing with web workers and it is really strange: I thought that we cannot use new Worker('someurl', { type: 'module' }) on safari and firefox, but this is wrong. We can use module in all browsers, but in firefox and safari, the content cannot have import statements (an es module), this is not allowed (just plain javascript, es2017 or whatever we want, or using importScripts).
I have a web worker with 128 modules with type script, and testing on a separate project (copy/paste from the original to isolate the logic), using esno and tsup, I can generate both, cjs and esm builds. When generating esm version I just, move my projects dependencies to dev dependencies and done: my web webworker module is built with all dependencies inside.
I have both versions working with and without  {type: 'module'} when creating the Worker (for esm variant and cjs respectivelly).
On service workers, right now, we cannot use 'import' statements inside the service worker (in any browser), so we can use the same approach I use for web workers, that is, do not use importScripts and try to make a bundle with all dependencies inside it (we just need to find a way to do this). Here, code splitting doesn't matter, the service worker will ship all necessary dependencies inside it, workbox.* packages.
I'll try to do a simple test...
about web worker, I have this:
src/parse-file-worker-module.ts
import { expose } from 'comlink'
import { parseFileAsync } from '~/parse-file-async' // <=== 128 typscript modules with imports

const parseFile = async(
  file,
  onFileInfo,
  onControlParsed,
  onProgress,
  onProcessError,
  onFinished,
  canceled,
) => {
  // @ts-ignore
  await parseFileAsync(
    file,
    onFileInfo,
    onControlParsed,
    onProgress,
    onProcessError,
    onFinished,
    canceled,
  )
}
// SSR compatibility
// @ts-ignore
typeof self !== 'undefined' && expose(parseFile)

with service worker, its corresponding code will be:
import { precacheAndRoute } from 'workbox-precaching'
precacheAndRoute(self.__WB_MANIFEST)

then using this script and running it:
package.json
    "scripts": {
        "build": "esno scripts/build.ts"
    }

scripts/build.ts
npx tsup src/parse-file-worker-module.ts --sourcemap --format esm -d dist/build
the result is is parse-file-worker-module.mjs with all dependencies added instead import statements that works using it with:
const worker = new Worker('/parse-file-worker-module.mjs', { type: 'module' })

If we can do this with the sw.js problem solved, but first we need to test it works.

The test is working, with some manual configuration but at least working, now we need to find a way to do the following, if possible:
First, the configuration:

add tsup, esno and workbox-precaching as dev dependencies for the target project: in my case, I use examples/vue-basic from sw-enhancement branch:

cd examples/vue-bacis
pnpm i --save-dev esno tsup workbox-precaching

add sw.ts to  examples/vue-basic with content:

import { precacheAndRoute } from 'workbox-precaching'
console.log('QUE PASA TRON')
// self.__WB_MANIFEST is default injection point
// @ts-ignore
precacheAndRoute(self.__WB_MANIFEST)

add scripts/build-sw.ts on examples/vue-basic:

import { execSync } from 'child_process'

execSync('npx tsup sw.ts --no-splitting --format cjs -d .', { stdio: 'inherit' })

add the following scripts to package.json (on root):

    "example:build:sw": "npm -C examples/vue-basic run build-sw",
    "example:start:sw": "npm -C examples/vue-basic run start-sw",

add the following scripts to examples/vue-basic/package.json`:

    "start-sw": "npm run run-build-sw && npm run serve",
    "run-build-sw": "cross-env DEBUG=vite-plugin-pwa:* BASE_URL=/ SOURCE_MAP=true SW=true vite build",
    "build-sw": "esno scripts/build-sw.ts",

modify examples/vue-basic/vite.config.ts with:

import { UserConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'
import { VitePWA, Options as VitePWAOptions } from 'vite-plugin-pwa'
import replace from '@rollup/plugin-replace'

const pwaConfig: Partial<VitePWAOptions> = {
  mode: 'development',
  base: '/',
}
if (process.env.SW === 'true') {
  pwaConfig.strategies = 'injectManifest'
  pwaConfig.injectManifest = {
    swSrc: 'sw.js',
  }
}

const config: UserConfig = {
  // base: process.env.BASE_URL || 'https://github.com/',
  build: {
    sourcemap: process.env.SOURCE_MAP === 'true',
  },
  plugins: [
    Vue(),
    VitePWA(pwaConfig),
    replace({
      __DATE__: new Date().toISOString(),
    }),
  ],
}

export default config

Now build time:

run example:build-sw script from root directory: pnpm run example:build-sw
edit generated sw.js file on examples/vue-basic directory, adding:

const process = {
  env: {
    NODE_ENV: 'production',
  },
}

below:
//<EMAIL_ADDRESS>"use strict";
try {
  self["workbox:core:6.1.2"] && _();
} catch (e) {
}

run example:start:sw script from root directory: pnpm run example:start:sw

The server will start and you can test it.


Update repository after transfer

See https://github.com/senzing-garage/garage-roadmap/issues/3

Pull requests:

https://github.com/senzing-garage/docker-db2-driver-installer/pull/63


Improvements when using N4BiasFieldCorrection

As a result of a thorough bug report from @Shotgunosine, in ANTsX/ANTs#822 several recommendations we should adopt for fMRIPrep are given:

Rescale the input if negative values are found (https://github.com/ANTsX/ANTs/issues/822#issuecomment-525351111)
Sample more voxels (i.e., shrink factor of 2 or 1) - https://github.com/ANTsX/ANTs/issues/822#issuecomment-525364416

From my understanding, we don't need to rescale, we just need to threshold the outputs of registration to >= 0.

Thresholding actually didn't fully address the issues. Rescaling did work
on that one test case though. I'm debugging another issue that may be
related to this one and will try to get more information shortly.
On Thu, Aug 29, 2019 at 9:11 AM Chris Markiewicz<EMAIL_ADDRESS>wrote:

From my understanding, we don't need to rescale, we just need to threshold
the outputs of registration to >= 0.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/poldracklab/niworkflows/issues/388?email_source=notifications&email_token=ABILLGC7J4LNZ36EC36USNLQG7DJJA5CNFSM4IQSYSL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5ONQOQ#issuecomment-526178362,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABILLGDWJEBX4JDJBB5RWLLQG7DJJANCNFSM4IQSYSLQ
.

Thresholding changes the distribution and the step it creates is exaggerated by the initial log transform of N4. It makes sense that rescaling works better.

If the issue is interpolation-induced negative values, then it's not clear that preserving that particular aspect of the distribution is worthwhile, as it's already an artifact. Rescaling while preserving these artifacts could shift the background noise up significantly.

It is undesired and it doesn't make sense as MRI signal, but not an artifact. BSpline interpolation can do this to ensure continuity of the distribution, which is necessary for N4 to find the bias field, which will become an additive offset after log transform.
Finding truncated values breaks the continuity constraints of the BSplines modeling the bias field.

As I'm trying to track my other masking bug down with this data, I've found that the output of split_opt_comb appears to already be partially brain masked. Is that correct behavior? If it is supposed to be masked, is that discontinuity going to disrupt the N4 normalization that happens when masking the bold after transformation to standard space?

Okay. So what if we transform the uniformized image, rather than uniformize the transformed image?

But @Shotgunosine, I think the issue here was specifically with blip-up/blip-down, which are registered to each other and then N4-corrected? Or was it the EPI masking in template space?

Yeah, that was where the N4 issue was occurring for this particular failure. I'm trying to track down other masking/registrations issues with other scans from this same dataset and I'm suspicious that those other issues may also be related to this same N4 issue. I can move questions about debugging that out to another thread till I've confirmed those suspicions though.


vyos_config_block and documentation

This PR adds the option to configure multiple attributes at the same time in a configuration block with the new vyos_config_block resource before vyos runs the commit command, opening up for more configurations to be used via this provider.
There is also a new doc layout that is supposedly compatible with terraform registry, with information quickly skimmed from this page: https://www.terraform.io/docs/registry/providers/docs.html

Thanks for helping me cleanup typeos and such :1st_place_medal:
I might create some more resources after a while, but with this and your config resource I think most of vyos should be configurable, but someone I know did point out that it would be nice to not have to know the vyos config in and out to use terraform for it.
I only wish there was an API to push/pull/delete scripts and other files on the box as I need a vrrp script, I added in a request for that just now: https://phabricator.vyos.net/T3909 though I think the client would need to implement that if it gets implemented

Stupid mobile app opened the close button right under my thumb, oops 😅


Implement 'Error' trait on error types in money.rs

Details: https://doc.rust-lang.org/std/error/trait.Error.html
Per: https://users.rust-lang.org/t/published-first-library-looking-for-feedback/99856/2?u=0xmb

Improved in 1.0.0.


Switch samples to work with go shell-function-invoker

This should be merged along with https://github.com/projectriff/shell-function-invoker/pull/2.

@ericbottard Fixed both your points. Please take another look.


Update HangingProtocolService.md doc sameAs example to contain constr…

…aint

Context
Previous example I provided for sameAs usage was missing constraint for comparison and as a result may lead to confusion by users referencing it as the hpMatcher scoring would have resulted in the same value regardless.

Changes & Results

Testing

Checklist
PR

[] My Pull Request title is descriptive, accurate and follows the
semantic-release format and guidelines.

Code

[] My code has been well-documented (function documentation, inline comments,
etc.)

Public Documentation Updates

[] The documentation page has been updated as necessary for any public API
additions or removals.

Tested Environment

[] OS:
[] Node version:
[] Browser:

can you pull and resolve conflict please?

Will do, should be okay now.


Does blaze support set difference operation?

Some times I need to fetch data as a result set of set difference.
In SQL I write:
SELECT date, symbol FROM table1
EXCEPT
SELECT date, symbol FROM table2

Is there any way I can do this with blaze? I find the syntax of blaze extremely useful, that I want to build a data fetcher with it to avoid writing trivial SQL. The expression of blaze should satisfy most of my need. Set difference operation is the only missing piece.

I don't believe this is currently supported; however, we could definitly implement it.


Cannot sort/arrange the pinned requests on the side bar

Expected Behavior
The user should be able to drag a request and drop it to sort them as needed.
Actual Behavior
The pinned requests are sorted the same way as they are sorted on the side list and the pinned list cannot be resorted as the user wants.
Reproduction Steps

Have multiple requests in Insomnia
Pin 2 or more requests
Try to move/rearrange the order of the pinned requests.

Is there an existing issue for this?

[X] I have searched the issue tracker for this problem.

Additional Information
No response
Insomnia Version
2023.5.8
What operating system are you using?
Windows
Operating System Version
Windows 11
Installation method
insomnia.rest
Last Known Working Insomnia version
No response

The link. Here is the link to the last working version. Any version above this version is... BAD.
2023.4.0

Last Working Version!

Last Working Version! Sort Order Fix!
Also, everything that used to work, works on this version.
2023.4.0
ANY version ABOVE 2023.4.0 will absolutely WRECK your sort orders.

Last Working Version! Sort Order Fix!
Also, everything that used to work, works on this version.
2023.4.0
ANY version ABOVE 2023.4.0 will absolutely WRECK your sort orders.


Suggesting a (hopefully) slight addition...

I generally find that when I open a new tab from a link I prefer the new tab to be next to the current tab, but when I open a completely new (blank) tab (or the Speed Dial), I would prefer it at the end of my list of tabs.
You currently have config options which reads:
Open Speed Dial next to the active tab, open other tabs at the end
and:
Open all tabs next to the active tab
I'd like this option:
Open Speed Dial at the end, Open all other tabs next to the active tab.
I also usually use the "and place consecutive new tabs in order".
Is this a possible addition?

Isn't that Opera's default behavior?

Well, crap!
I have a memory of a time, when Opera would open everything at the end of the tabs list.
I also have a memory of Opera having an option for "open links next to current tab", but the ordering being munged.
Rather than
[A][B][C] becoming [A][1][2][3][B][C]
That it would become:
[A][B][C] becoming [A][3][2][1][B][C]
Now, I've just turned off tab related extensions, and it works like I would want it to work.
So...   sorry.  Nevermind. :-(

No problem. I'll see if I can make the descriptions in the options page any clearer.


Readme updates installations steps

Update the readme.

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


Problems with running acados.py

Hello, may I ask if you have ever encountered this problem? I successfully built the python interface of acados on windows, then, I tried using realtime and Naive and both worked fine. I ran mpc_mlp_example.py and got the normal result as shown in Figure 1. However, when I ran acados.py, it prompted me that the L4CasADi link failed as shown in Figure 2.

This seems to be Windows? "collect2.exe"
Windows is not officially supported.

Yes I am using windows build, does l4casadi not support windows currently?

Unfortunately, it does not. I am surprised that Naive and Realtime do work, but this is good to know.
Also see: https://github.com/Tim-Salzmann/l4casadi/issues/24

OK, thanks, but it seems that realtime is not much different from this, there are two more paths

If this answers your questions, feel free to close the issue.
Thanks
Tim

Does Real-time L4CasADi only support MLP? Does it support CNN model?

Real-time L4CasADi supports any PyTorch model. Naive L4CasADi only supports MLPs.

THANKS!!!


PermissionError: [Errno 13] Permission denied

sudo pipenv --three

Creating a virtualenv for this project...
Running virtualenv with interpreter /usr/local/opt/python3
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/bin/virtualenv", line 11, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/virtualenv.py", line 665, in main
    popen = subprocess.Popen([interpreter, file] + sys.argv[1:], env=env)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 950, in __init__
    restore_signals, start_new_session)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1540, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

cannot reproduce.

How solve this problem, yeah, i have some problem


inviable swollen elongated cell with enlarged nucleus  parentage

can
inviable swollen elongated cell with enlarged nucleus
be a descendant of
inviable elongated mononucleate aseptate cell
?

At present, the logical definition of FYPO:0002083 (inviable swollen etc.) does not specify "mononucleate" or "aseptated". If, however, EVERY cell that is (inviable + swollen + elongated  + enlarged nucleus) is also mononucleate and aseptate, those features can be added to the xp, and has_part links that Canto can use will be inferred.

I checked all of the annotations for these...
Cdc18 and cdc13 delta are classic re replication phenotype

The ade genes are a descendent term I think as they are in stationary phase
but they are also aseptate and monoucleate...

OK, done
edit file: 829a2180f4d321cf18dd800a8abfb1cb3c5f7816
release: 0d5f483950d46e038d7b813772942ddf053b62db


proposal: function type with generics

Go 1.18 allows to create functions with generics like so:
func a[T any]() {
}

But it's a compilation error to have a first-class function with generics like so:
func b() {
  a := func[T any]() {
  }
}

I actually don't know if it is an expected behaviour, but this restriction doesn't seem to be right. So this issue proposes to allow first class functions to have generic types.
Example with the compilation error:
https://go.dev/play/p/jGRmEaHo765

It's a deliberate omission:

No higher level abstraction. There is no way to use a function with type arguments other than to call it or instantiate it. There is no way to use a generic type other than to instantiate it.

see above


Tie off undriven pins/wires

Recent versions of firtool flag these as "sink not fully initialized" errors. See https://github.com/ucb-bar/chipyard/issues/1731 for more context.

Woohoo finally got the CLA taken care of @jerryz123


Mention posts/stories?

Hey there,
Great library, thanks for the time and effort building and maintaining it.
Is there any way to retrieve Stories and posts that my IG account has been mentioned in?

The API doesn't expose an endpoint to get the stories. You can only search your direct messages. To get the posts you can use ig.feed.usertags(userId).

is this issue has been supported?

I have the same issue, this feature has been added?


How to add the method  into the PointDsc？

As described in our paper: "Instead of retraining the network, we directly plugged our metrics into it", i.e., we replace the normed_corr_features with SC^2.

So you didn't use SCNonlocal to combined with the input feature map,but the function self.cal_seed_trans in https://github.com/XuyangBai/PointDSC/blob/b009d536ac10b570853833f2178397c154745da9/models/PointDSC.py#L182
don't need to change it?

Can you provide the PointDSC  code combined with your method

In PointDSC, the similarity between two correspondences is computed by feature similarity. We replace the way of computing feature similarity with the SC^2 measure, and don't change other part.

So your spatial features aren't fed into the network, they're directly used in this self.cal_seed_trans function

We didn't try to retrain the network as we don't have the training dataset of PointDSC.  We think that since SC^2 can improve the performance of PointDSC without training, then if training optimization is used, the performance will be further improved. At least it won't get worse.


Fix AI project connection string and updated Azure Identity

Purpose

...

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type
What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

Get the code

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

Test the code

What to Check
Verify that the following are valid

...

Other Information

LGTM, will wait for checks to pass and then merge


ISSUE-1268 Provide script to help download all transitive dependencies

provide utility script to download all transitive dependencies

requires

running Streamline instance
binary distribution of Apache Storm

This closes #1268.

Updated the patch: now it forces to download artifacts to 'local-repo' directory in cwd. Also updated the description.

Now the script receives maven local repository directory (depends on STORM-3069) and downloads transitive dependencies to given directory.
There's style nit (using tab instead of spaces) which I'll fix it after getting +1.
@arunmahadevan Could you review this again? Thanks in advance.

+1 LGTM. Should we wait till the storm patch is merged to merge this ?

@arunmahadevan
Yes and no, since the script is not mandatory thing and only used for end users who needs this.

Fixed indentation : tab -> 4 spaces.

Storm patch is merged so I guess we are good to go. I'll just take +1 on @arunmahadevan since I just fixed indentation via replacing \t ->  , not fixing others. Merging...


message_standard_version incorrect - must be different enum for C vs D1

The enum for this element is different in rev C than in rev D1.
There simply needs to be different enums used depending on the revision of the header.

fixed in 25e62cc242543c3f1ce495273abd683e251a9be2


Feature request: Remove Super Reaction button

I think this is new, I keep accidentally clicking on it when I want to react with an emoji.

This would be great. Super reactions are obnoxious.

This will definitely be added as a feature, at the very least for the buttons in the corner of the messages. Context Menus are their own beast though, so no promises there.

I'm gonna consider this done now. The recent update added support for the message action buttons, not the context menus though. Anything going further can be tracked in its own issue if there is still demand.


Allow for running the model without reforms

Addressing second part of #883, i.e. removing warnings/errors for running the TaxBrain model with current tax policy / no reforms.

TODO: this requires integration with #901.

@lucassz This looks good to me. Thanks for the contribution. I'll merge it once you update the RELEASES.md file.


Check clipboard for URL when URL dialog opens

Not a bad guess that the user already has the URL ready coming in.
This should also make the dialog input select all on focus to make it easy to clear (or add a clear button).

Added in 1.2.0


Add support for browser lacking smooth scroll (Safari, Edge)

https://github.com/frontarm/navi/issues/71

Thanks for submitting this! This is definitely an improvement over the current release.
One issue is that as I understand it, some browsers silently fail instead of throwing an error when you pass in scroll options. Because of this, it may better to remove smooth scrolling from Navi altogether, with it instead handled by the user, or with scroll behavior configured somehow. Have you any thoughts on how to approach this?

Will merge this for now. Any more significant changes can wait until the next release.

Deployed with Navi 0.12.6

Doesn't this only fix one case and leave the other still affected? https://github.com/frontarm/navi/blob/master/packages/react-navi/src/scrollToHash.tsx#L23


chore: Bump neotraverse to 0.6.15

Description
neotraverse/legacy wouldn't work with Webpack 4 and before as is, as webpack 4 doesn't support export maps. v0.6.12 provides fallback for that as a top level legacy.js file.
Edit: Bumped to 0.6.15, comes with better TypeScript support(irrelevant to this PR, just good to be on the latest), lower NodeJS support
Make sure to follow the PR preparation steps in CONTRIBUTING.md before submitting your PR:

[ ] format the codebase: from the root, run yarn fmt:prettier.
[ ] update all snapshots (in core & CLI): from the root, run yarn test:update
[ ] add Changeset entry: from the root, run yarn g:changeset and follow the CLI instructions. Alternatively, use the Changeset Github Bot to create the file.

Thanks!


fix(logs) log the successful tries also

previously it would only log failure data. Now it logs all attempts,
also the successful ones.

This is a feature right? feat(log)


chore(editor): replace opengb logo with rivet logo

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#410  👈
#409
#408
#407
#406
#405
#404
#403
#402
#401
#400
#399
#398
#397
#396
#395
#394
#393
#392
#391
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @NathanFlurry and the rest of your teammates on  Graphite


[Configurations] Copying from a existing configuration does not work

This bug was filed assuming that this issue is fixed: https://github.com/dotnet/roslyn-project-system/issues/1458.

File -> New Class Library (.NET Standard)
Right-click Solution, choose Configuration Manager...
In Configuration Manager, drop Configuration drop down and choose New...
Enter a name "Debug2",  and choose Copy Settings from Debug
Uncheck create new solution configuration

Expected:

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug2|AnyCPU'">
    <DebugSymbols>true</DebugSymbols>
    <Optimize>false</Optimize>
  </PropertyGroup>

Actual:

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug2|AnyCPU'" />

Tracking this as part of https://github.com/dotnet/roslyn-project-system/issues/694


Error needing catching in @iload ?

It seems there is an error that we are not catching (and ignoring) here, as the interactive part following the message works fine:
using MLJ # in a new environment with only MLJ
julia> Clf = @iload EvoTreeClassifier
[ Info: For silent loading, specify `verbosity=0`.
[ Info: Precompiling EvoTrees [f6006082-12f8-11e9-0c9c-0d5d367ab1e5]
ERROR: LoadError: ArgumentError: Package CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

Stacktrace:
 [1] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:990
 [2] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:914
 [3] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:901
 [4] include
   @ ./Base.jl:386 [inlined]
 [5] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String},
dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
   @ Base ./loading.jl:1213
 [6] top-level scope
   @ none:1
 [7] eval
   @ ./boot.jl:360 [inlined]
 [8] eval(x::Expr)
   @ Base.MainInclude ./client.jl:446
 [9] top-level scope
   @ none:1
in expression starting at /Users/anthony/Dropbox/Julia7/EvoTrees/src/EvoTrees.jl:1

The package providing an interface to `EvoTreeClassifier` is not in your current environment.
What do you want to do?

 > Install EvoTrees in current environment.
   Abort.

Maybe related to https://github.com/alan-turing-institute/MLJ.jl/issues/757

cc @giordano

Reading the code, I'm having a hard time figuring out where the exception is being thrown.  Can you please show the output of @macroexpand @iload EvoTreeClassifier for you?  I get
quote
    #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:129 =#
    begin
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:168 =#
        true && begin
            #= logging.jl:350 =#
            let
                #= logging.jl:351 =#
                var"#47#level" = Base.CoreLogging.Info
                #= logging.jl:352 =#
                var"#48#std_level" = Base.CoreLogging.convert(Base.CoreLogging.LogLevel, var"#47#level")
                #= logging.jl:353 =#
                if var"#48#std_level" >= Base.CoreLogging._min_enabled_level[]
                    #= logging.jl:354 =#
                    var"#49#group" = :loading
                    #= logging.jl:355 =#
                    var"#50#_module" = Main
                    #= logging.jl:356 =#
                    var"#51#logger" = Base.CoreLogging.current_logger_for_env(var"#48#std_level", var"#49#group", var"#50#_module")
                    #= logging.jl:357 =#
                    if !(var"#51#logger" === Base.CoreLogging.nothing)
                        #= logging.jl:358 =#
                        var"#52#id" = :Main_75496672
                        #= logging.jl:361 =#
                        if Base.CoreLogging._invoked_shouldlog(var"#51#logger", var"#47#level", var"#50#_module", var"#49#group", var"#52#id")
                            #= logging.jl:362 =#
                            var"#53#file" = "/tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl"
                            #= logging.jl:363 =#
                            var"#54#line" = 168
                            #= logging.jl:364 =#
                            local var"#55#msg", var"#56#kwargs"
                            #= logging.jl:365 =#
                            begin
                                #= logging.jl:308 =#
                                var"#55#msg" = "For silent loading, specify `verbosity=0`. "
                                #= logging.jl:309 =#
                                var"#56#kwargs" = (;)
                                #= logging.jl:310 =#
                                true
                            end && Base.CoreLogging.handle_message(var"#51#logger", var"#47#level", var"#55#msg", var"#50#_module", var"#49#group", var"#52#id", var"#53#file", var"#54#line"; var"#56#kwargs"...)
                        end
                    end
                end
                #= logging.jl:371 =#
                Base.CoreLogging.nothing
            end
        end
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:169 =#
        var"#37#proxy" = (MLJModels.MLJModels).info("EvoTreeClassifier"; pkg = nothing, interactive = true)
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:172 =#
        var"#38#handle" = (MLJModels.MLJModels).Handle((var"#37#proxy").name, (var"#37#proxy").package_name)
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:173 =#
        var"#39#dic" = (MLJModels.MLJModels).INFO_GIVEN_HANDLE[var"#38#handle"]
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:174 =#
        (var"#40#path_str", var"#41#pkg_str") = (var"#39#dic"[:load_path], var"#39#dic"[:package_name])
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:175 =#
        var"#42#path" = var"#40#path_str" |> (MLJModels.Meta).parse
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:176 =#
        var"#43#pkg" = MLJModels.Symbol(var"#41#pkg_str")
    end
    begin
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:181 =#
        var"#44#path_components" = MLJModels.Symbol.(MLJModels.split(var"#40#path_str", '.'))
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:184 =#
        var"#45#api_pkg" = var"#44#path_components"[1]
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:185 =#
        var"#46#api_pkg_str" = MLJModels.string(var"#45#api_pkg")
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:187 =#
        if false || true
            #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:188 =#
            try
                #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:189 =#
                (MLJModels.MLJModels)._import(Main, var"#45#api_pkg", var"#43#pkg", false)
            catch
                #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:191 =#
                if true
                    #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:192 =#
                    (MLJModels.MLJModels).request("The package providing an interface " * "to `EvoTreeClassifier` " * "is not in your " * "current environment.\n" * "What do you want to do? ", "Install $(var"#46#api_pkg_str") in current environment.", "Abort.") == 1 || MLJModels.throw(MLJModels.InterruptException)
                end
                #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:202 =#
                (MLJModels.MLJModels)._import(Main, :Pkg, :Pkg, false)
                #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:203 =#
                (MLJModels.Pkg).add(var"#46#api_pkg_str")
            end
        end
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:206 =#
        (MLJModels.MLJModels)._import(Main, var"#45#api_pkg", var"#43#pkg", true)
        #= /tmp/tmp.O88ehAk8Zj/packages/MLJModels/9mQfs/src/loading.jl:207 =#
        (MLJModels.MLJModels)._eval(Main, var"#42#path")
    end
end

Trying to load the package before the interactive Pkg prompt happens only at line L189
https://github.com/alan-turing-institute/MLJModels.jl/blob/6722abd5546d1cd58ff9547e98c7bdcf60ffcfb5/src/loading.jl#L188-L190
which is protected in a try/catch block and isn't rethrown nor shown

@giordano Thanks for investigating. Naturally this is difficult to debug without being able to reproduce the error. Let me make sure I can also reproduce and get back to you.  I actually don't think I was using a fresh environment after all.

Okay, I do get (a different) error in a bare environment.
The error
julia> using MLJModels
julia> @iload EvoTreeRegressor
[ Info: For silent loading, specify `verbosity=0`.
[ Info: Precompiling EvoTrees [f6006082-12f8-11e9-0c9c-0d5d367ab1e5]
ERROR: LoadError: ArgumentError: Package StaticArrays [90137ffa-7385-5640-81b9-e52037218182] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

Stacktrace:
 [1] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:990
 [2] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:914
 [3] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:901
 [4] include
   @ ./Base.jl:386 [inlined]
 [5] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String},
dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
   @ Base ./loading.jl:1213
 [6] top-level scope
   @ none:1
 [7] eval
   @ ./boot.jl:360 [inlined]
 [8] eval(x::Expr)
   @ Base.MainInclude ./client.jl:446
 [9] top-level scope
   @ none:1
in expression starting at /Users/anthony/Dropbox/Julia7/EvoTrees/src/EvoTrees.jl:1

The package providing an interface to `EvoTreeRegressor` is not in your current environment.
What do you want to do?

   Install EvoTrees in current environment.
 > Abort.

My environment
(@testload) pkg> st
      Status `~/.julia/environments/testload/Project.toml`
  [d491faf4] MLJModels v0.14.6

(@testload) pkg> st -m
      Status `~/.julia/environments/testload/Manifest.toml`
  [324d7699] CategoricalArrays v0.10.0
  [d360d2e6] ChainRulesCore v0.9.44
  [3da002f7] ColorTypes v0.11.0
  [34da2185] Compat v3.30.0
  [ed09eef8] ComputationalResources v0.3.2
  [a8cc5b0e] Crayons v4.0.4
  [9a962f9c] DataAPI v1.6.0
  [864edb3b] DataStructures v0.18.9
  [e2d170a0] DataValueInterfaces v1.0.0
  [b4f34e82] Distances v0.10.3
  [31c24e10] Distributions v0.25.1
  [ffbed154] DocStringExtensions v0.8.4
  [1a297f60] FillArrays v0.11.7
  [53c48c17] FixedPointNumbers v0.8.4
  [59287772] Formatting v0.4.2
  [41ab1584] InvertedIndices v1.0.0
  [82899510] IteratorInterfaceExtensions v1.0.0
  [692b3bcd] JLLWrappers v1.3.0
  [682c06a0] JSON v0.21.1
  [7f8f8fb0] LearnBase v0.4.1
  [2ab3a3ac] LogExpFunctions v0.2.4
  [30fc2ffe] LossFunctions v0.7.0
  [a7f614a8] MLJBase v0.18.7
  [e80e1ace] MLJModelInterface v1.1.0
  [d491faf4] MLJModels v0.14.6
  [2e2323e0] MLJScientificTypes v0.4.7
  [e1d29d7a] Missings v1.0.0
  [bac558e1] OrderedCollections v1.4.1
  [90014a1f] PDMats v0.11.0
  [d96e819e] Parameters v0.12.2
  [69de0a69] Parsers v1.1.0
  [b1ad91c1] PersistenceDiagramsBase v0.1.1
  [21216c6a] Preferences v1.2.2
  [08abe8d2] PrettyTables v1.0.1
  [92933f4c] ProgressMeter v1.6.2
  [1fd47b50] QuadGK v2.4.1
  [3cdcf5f2] RecipesBase v1.1.1
  [189a3867] Reexport v1.0.0
  [ae029012] Requires v1.1.3
  [79098fc4] Rmath v0.7.0
  [321657f4] ScientificTypes v1.1.2
  [a2af1166] SortingAlgorithms v1.0.0
  [276daf66] SpecialFunctions v1.4.1
  [64bff920] StatisticalTraits v1.1.0
  [82ae8749] StatsAPI v1.0.0
  [2913bbd2] StatsBase v0.33.8
  [4c63d2b9] StatsFuns v0.9.8
  [856f2bd8] StructTypes v1.7.2
  [3783bdb8] TableTraits v1.0.1
  [bd369af6] Tables v1.4.2
  [3a884ed6] UnPack v1.0.2
  [efe28fd5] OpenSpecFun_jll v0.5.4+0
  [f50d1b31] Rmath_jll v0.3.0+0
  [0dad84c5] ArgTools
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [f43a241f] Downloads
  [9fa8497b] Future
  [b77e0a4c] InteractiveUtils
  [b27032c2] LibCURL
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [ca575930] NetworkOptions
  [44cfe95a] Pkg
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA
  [9e88b42a] Serialization
  [1a1011a3] SharedArrays
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [4607b0f0] SuiteSparse
  [fa267f1f] TOML
  [a4e569a6] Tar
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [e66e0078] CompilerSupportLibraries_jll
  [deac9b47] LibCURL_jll
  [29816b5a] LibSSH2_jll
  [c8ffd9c3] MbedTLS_jll
  [14a3606d] MozillaCACerts_jll
  [83775a58] Zlib_jll
  [8e850ede] nghttp2_jll
  [3f19e933] p7zip_jll

The macro expansion

julia> @macroexpand @iload EvoTreeRegressor
quote
    #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:129 =#
    begin
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:168 =#
        true && begin
                #= logging.jl:350 =#
                let
                    #= logging.jl:351 =#
                    var"#104#level" = Base.CoreLogging.Info
                    #= logging.jl:352 =#
                    var"#105#std_level" = Base.CoreLogging.convert(Base.CoreLogging.LogLevel, var"#104#level")
                    #= logging.jl:353 =#
                    if var"#105#std_level" >= Base.CoreLogging._min_enabled_level[]
                        #= logging.jl:354 =#
                        var"#106#group" = :loading
                        #= logging.jl:355 =#
                        var"#107#_module" = Main
                        #= logging.jl:356 =#
                        var"#108#logger" = Base.CoreLogging.current_logger_for_env(var"#105#std_level", var"#106#group", var"#107#_module")
                        #= logging.jl:357 =#
                        if !(var"#108#logger" === Base.CoreLogging.nothing)
                            #= logging.jl:358 =#
                            var"#109#id" = :Main_75496674
                            #= logging.jl:361 =#
                            if Base.CoreLogging._invoked_shouldlog(var"#108#logger", var"#104#level", var"#107#_module", var"#106#group", var"#109#id")
                                #= logging.jl:362 =#
                                var"#110#file" = "/Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl"
                                #= logging.jl:363 =#
                                var"#111#line" = 168
                                #= logging.jl:364 =#
                                local var"#112#msg", var"#113#kwargs"
                                #= logging.jl:365 =#
                                begin
                                        #= logging.jl:308 =#
                                        var"#112#msg" = "For silent loading, specify `verbosity=0`. "
                                        #= logging.jl:309 =#
                                        var"#113#kwargs" = (;)
                                        #= logging.jl:310 =#
                                        true
                                    end && Base.CoreLogging.handle_message(var"#108#logger", var"#104#level", var"#112#msg", var"#107#_module", var"#106#group", var"#109#id", var"#110#file", var"#111#line"; var"#113#kwargs"...)
                            end
                        end
                    end
                    #= logging.jl:371 =#
                    Base.CoreLogging.nothing
                end
            end
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:169 =#
        var"#94#proxy" = (MLJModels.MLJModels).info("EvoTreeRegressor"; pkg = nothing, interactive = true)
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:172 =#
        var"#95#handle" = (MLJModels.MLJModels).Handle((var"#94#proxy").name, (var"#94#proxy").package_name)
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:173 =#
        var"#96#dic" = (MLJModels.MLJModels).INFO_GIVEN_HANDLE[var"#95#handle"]
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:174 =#
        (var"#97#path_str", var"#98#pkg_str") = (var"#96#dic"[:load_path], var"#96#dic"[:package_name])
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:175 =#
        var"#99#path" = var"#97#path_str" |> (MLJModels.Meta).parse
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:176 =#
        var"#100#pkg" = MLJModels.Symbol(var"#98#pkg_str")
    end
    begin
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:181 =#
        var"#101#path_components" = MLJModels.Symbol.(MLJModels.split(var"#97#path_str", '.'))
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:184 =#
        var"#102#api_pkg" = var"#101#path_components"[1]
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:185 =#
        var"#103#api_pkg_str" = MLJModels.string(var"#102#api_pkg")
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:187 =#
        if false || true
            #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:188 =#
            try
                #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:189 =#
                (MLJModels.MLJModels)._import(Main, var"#102#api_pkg", var"#100#pkg", false)
            catch
                #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:191 =#
                if true
                    #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:192 =#
                    (MLJModels.MLJModels).request("The package providing an interface " * "to `EvoTreeRegressor` " * "is not in your " * "current environment.\n" * "What do you want to do? ", "Install $(var"#103#api_pkg_str") in current environment.", "Abort.") == 1 || MLJModels.throw(MLJModels.InterruptException)
                end
                #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:202 =#
                (MLJModels.MLJModels)._import(Main, :Pkg, :Pkg, false)
                #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:203 =#
                (MLJModels.Pkg).add(var"#103#api_pkg_str")
            end
        end
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:206 =#
        (MLJModels.MLJModels)._import(Main, var"#102#api_pkg", var"#100#pkg", true)
        #= /Users/anthony/.julia/packages/MLJModels/9mQfs/src/loading.jl:207 =#
        (MLJModels.MLJModels)._eval(Main, var"#99#path")
    end
end

If I first manually add the required package, EvoTrees and then run @iload EvoTreeRegressor this issue disappears.

julia> versioninfo()
Julia Version 1.6.0
Commit f9720dc2eb (2021-03-24 12:55 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.6.0)
  CPU: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_LTS_PATH = /Applications/Julia-1.0.app/Contents/Resources/julia/bin/julia
  JULIA_PATH = /Applications/Julia-1.6.app/Contents/Resources/julia/bin/julia
  JULIA_EGLOT_PATH = /Applications/Julia-1.5.app/Contents/Resources/julia/bin/julia
  JULIA_NUM_THREADS = 5
  JULIA_NIGHTLY_PATH = /Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia

I tried also on macOS in case there is a weird platform-specific issue, but I still can't reproduce your problem there.
The expansion of the macro for you is the same as for me, apart from paths and gensym-generated variables.  Not that I was expecting something different, but I figured it'd be good to double check it.
What about using Pkg.Types.Context().env.project.deps to check whether a package is in the current environment, instead of trying to use it and catching the error?  The good thing is that it should work in all current versions of Julia since v1.3 (the first one currently supported), the drawback however is that you're hooking into Pkg internals (this is non-public API), so it may break in the future (but it can be dealt with with conditionals inside the macro and see below).
Also, note that Julia v1.7 has the feature of suggesting to install a package if not available, so the try/catch work you're doing here will be a duplicate already available in base Julia.

@giordano Thanks for investigating.
What a pity you are unable to reproduce. I'm inclined to believe the problem lies outside of MLJModels. Why else would reproducibility be an issue? We are using identical Manifests/Project files, yes?
I will try your suggestion as a diagnostic. I'm not enthusiastic about it as a solution for the reasons you give.


lookup.getClosestNetworkPt

When I clicked two points (pretty far away) along a road segment, they return me the same closest network point from lookup.getClosestNetworkPt, but there are lots of network nodes between these clicked two points,  any criteria to build road network data for Graph data?  Please advise.

I'm not quite sure what it could be.  I can look into it this weekend when I have a bit more time, but if you could come up with a minimal reproduction, it would help immensely.  Thanks!

I'm not quite sure what it could be.  I can look into it this weekend when I have a bit more time, but if you could come up with a minimal reproduction, it would help immensely.  Thanks!

Thanks. Attached please find is my network geojson file( please change txt
test1.txt
to geojson), and with the following start (-110.74279911711548,44.80319264787348) and end(-110.74181228220863,44.79612224398856 ) coordinates, which gave me the same coords1 and coords2
const coords1 = lookup.getClosestNetworkPt(-110.74279911711548,44.80319264787348);
const coords2 = lookup.getClosestNetworkPt(-110.74181228220863,44.79612224398856);

Thanks. Attached please find is my network geojson file( please change txt
test1.txt
to geojson), and with the following start (-110.74279911711548,44.80319264787348) and end(-110.74181228220863,44.79612224398856 ) coordinates, which gave me the same coords1 and coords2
const coords1 = lookup.getClosestNetworkPt(-110.74279911711548,44.80319264787348);
const coords2 = lookup.getClosestNetworkPt(-110.74181228220863,44.79612224398856);

I think I see what's going on here (please feel free to correct me if I've misinterpreted).  In your example you have a network with 2 linestrings.  Each linestring has many points on it.  You'd like to be able to route from any point on your linestrings to any other point on your linestrings.
Unfortunately, in my particular implementation, your network only has 3 nodes; the start of one your first linestring, the intersection of your two linestrings, and the end of your second linestring.  So those 3 points would be the only one's you'd be able to route to/from.
To be able to convert to a network that my library could use in the way you intend, you'd have to explode your geojson into many linestrings.  Some discussion on how you might be able to achieve that can be found here:  https://gis.stackexchange.com/questions/271806/exploding-line-into-segments-using-qgis  .  If you don't have any luck with the solutions in the link, please let me know and I can probably put together a quick JS script to do the task.

I think I see what's going on here (please feel free to correct me if I've misinterpreted).  In your example you have a network with 2 linestrings.  Each linestring has many points on it.  You'd like to be able to route from any point on your linestrings to any other point on your linestrings.
Unfortunately, in my particular implementation, your network only has 3 nodes; the start of one your first linestring, the intersection of your two linestrings, and the end of your second linestring.  So those 3 points would be the only one's you'd be able to route to/from.
To be able to convert to a network that my library could use in the way you intend, you'd have to explode your geojson into many linestrings.  Some discussion on how you might be able to achieve that can be found here:  https://gis.stackexchange.com/questions/271806/exploding-line-into-segments-using-qgis  .  If you don't have any luck with the solutions in the link, please let me know and I can probably put together a quick JS script to do the task.

Thanks Daniel. Yes, I can use explode line tool in QGis to create many linestrings. But my network data is from a REST service, so I have to split the linestring programmatically. Is it ok to use the same _id in its properties for some linestrings in order to use you library?
Sent from my iPhone

On Jan 30, 2021, at 12:39 PM, Daniel Trone<EMAIL_ADDRESS>wrote:

I think I see what's going on here (please feel free to correct me if I've misinterpreted). In your example you have a network with 2 linestrings. Each linestring has many points on it. You'd like to be able to route from any point on your linestrings to any other point on your linestrings.
Unfortunately, in my particular implementation, your network only has 3 nodes; the start of one your first linestring, the intersection of your two linestrings, and the end of your second linestring. So those 3 points would be the only one's you'd be able to route to/from.
To be able to convert to a network that my library could use in the way you intend, you'd have to explode your geojson into many linestrings. Some discussion on how you might be able to achieve that can be found here: https://gis.stackexchange.com/questions/271806/exploding-line-into-segments-using-qgis . If you don't have any luck with the solutions in the link, please let me know and I can probably put together a quick JS script to do the task.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Thanks Daniel. Yes, I can use explode line tool in QGis to create many linestrings. But my network data is from a REST service, so I have to split the linestring programmatically. Is it ok to use the same _id in its properties for some linestrings in order to use you library?
Sent from my iPhone

On Jan 30, 2021, at 12:39 PM, Daniel Trone<EMAIL_ADDRESS>wrote:

I think I see what's going on here (please feel free to correct me if I've misinterpreted). In your example you have a network with 2 linestrings. Each linestring has many points on it. You'd like to be able to route from any point on your linestrings to any other point on your linestrings.
Unfortunately, in my particular implementation, your network only has 3 nodes; the start of one your first linestring, the intersection of your two linestrings, and the end of your second linestring. So those 3 points would be the only one's you'd be able to route to/from.
To be able to convert to a network that my library could use in the way you intend, you'd have to explode your geojson into many linestrings. Some discussion on how you might be able to achieve that can be found here: https://gis.stackexchange.com/questions/271806/exploding-line-into-segments-using-qgis . If you don't have any luck with the solutions in the link, please let me know and I can probably put together a quick JS script to do the task.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

You'll have to map each linestring to a unique _id.  The library relies on a unique _id for each segment to be able to reconstruct the path.


"Cannot Use wireless to connect"

Connect the device to the same Wi-Fi as your computer. (YES)
Get your device IP address (in Settings → About phone → Status). (YES)
Enable ADB over TCP/IP on your device: adb tcpip 5555. (YES)
Unplug your device. (YES)
5.Connect to your device: adb connect DEVICE_IP:5555 (replace DEVICE_IP). (YES)
"cannot connect to <IP_ADDRESS>:5555: An attempt was made to access a socket in a way forbidden by its access permissions. (10013)"

Do you use an antivirus which could forbid the connection? https://github.com/FreeOpcUa/python-opcua/issues/497#issuecomment-371148507

I turn off the Windows Defender Firewall, the same result.

In a previous version of scrcpy, once wireless was enabled it would remain on. In version 1.14 I have to turn on the wireless option of scrcpy, or plug it in all the time to a USB connection.

In version 1.14 I have to turn on the wireless option of scrcpy

scrcpy has no "wireless option". It just uses adb, which can connect to the device over USB or TCP/IP via adb connect.

I created this tool to ease wireless connectivity. Check it out and let me know of your experience.
https://github.com/fusionneur/ethernally


KafkaConnect - Error retrieving Avro schema for id 54, Subject not found.; error code: 40401

TLDR
KafkaConnect S3 Sink Connector breaks for Avro Converter when Topic and Schema Name do not match and works if they do.
What happened?
We are currently building a KafkaConnect POC with an S3 Sink. For this we setup the Confluent - Amazon AWS S3 sink connector (the Aiven - Amazon AWS S3 sink connector is not working but also not showing any errors, therefore the Confluent Connector).
Connector Configuration:

Confluent - Amazon AWS S3 sink
Version: 5.0.0
Avro Converter
Schema Registry Config (URL/Credentials)
Topic: my.topic

General Info:

Schema Name: events.v1.my.topic.created_key
Schema ID 54
Events Avro Serialized

With this config we got an error saying:
[...]
Caused by: org.apache.kafka.connect.errors.DataException: my.topic
[...]
Caused by: org.apache.kafka.common.errors.SerializationException: Error retrieving Avro schema for id 54
Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Subject not found.; error code: 40401
[...]

(See full traceback below)
After some debugging we got it to work for a different topic which has a schema name matching it:
Topic Name: my.othertopic
Schema Name: my.othertopic-key
Note: Producers and Consumers have no issue with not matching topic vs schema names.
What did you expect to happen?
We expected it to work since for Kafka or the Schema Registry there is no requirement of matching Topic and Schema Name.
What else do we need to know?
This seems to be related: https://github.com/confluentinc/schema-registry/issues/343
Include your platform, version, and any other information that seems relevant.

Kafka Version: 2.7
Cloud: Amazon Web Services: Ireland (eu-west-1)

Connector Traceback
org.apache.kafka.connect.errors.ConnectException: Tolerance exceeded in error handler
    at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:206)
    at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execute(RetryWithToleranceOperator.java:132)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.convertAndTransformRecord(WorkerSinkTask.java:495)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.convertMessages(WorkerSinkTask.java:475)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:325)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:229)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:201)
    at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:185)
    at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:235)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.kafka.connect.errors.DataException: my.topic
    at io.confluent.connect.avro.AvroConverter.toConnectData(AvroConverter.java:98)
    at org.apache.kafka.connect.storage.Converter.toConnectData(Converter.java:87)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.lambda$convertAndTransformRecord$0(WorkerSinkTask.java:495)
    at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndRetry(RetryWithToleranceOperator.java:156)
    at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:190)
    ... 13 more
Caused by: org.apache.kafka.common.errors.SerializationException: Error retrieving Avro schema for id 54
Caused by: io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException: Subject not found.; error code: 40401
    at io.confluent.kafka.schemaregistry.client.rest.RestService.sendHttpRequest(RestService.java:209)
    at io.confluent.kafka.schemaregistry.client.rest.RestService.httpRequest(RestService.java:235)
    at io.confluent.kafka.schemaregistry.client.rest.RestService.lookUpSubjectVersion(RestService.java:302)
    at io.confluent.kafka.schemaregistry.client.rest.RestService.lookUpSubjectVersion(RestService.java:290)
    at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getVersionFromRegistry(CachedSchemaRegistryClient.java:130)
    at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.getVersion(CachedSchemaRegistryClient.java:231)
    at io.confluent.kafka.serializers.AbstractKafkaAvroDeserializer.schemaVersion(AbstractKafkaAvroDeserializer.java:202)
    at io.confluent.kafka.serializers.AbstractKafkaAvroDeserializer.deserialize(AbstractKafkaAvroDeserializer.java:158)
    at io.confluent.kafka.serializers.AbstractKafkaAvroDeserializer.deserializeWithSchemaAndVersion(AbstractKafkaAvroDeserializer.java:243)
    at io.confluent.connect.avro.AvroConverter$Deserializer.deserialize(AvroConverter.java:134)
    at io.confluent.connect.avro.AvroConverter.toConnectData(AvroConverter.java:85)
    at org.apache.kafka.connect.storage.Converter.toConnectData(Converter.java:87)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.lambda$convertAndTransformRecord$0(WorkerSinkTask.java:495)
    at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndRetry(RetryWithToleranceOperator.java:156)
    at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:190)
    at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execute(RetryWithToleranceOperator.java:132)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.convertAndTransformRecord(WorkerSinkTask.java:495)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.convertMessages(WorkerSinkTask.java:475)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:325)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:229)
    at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:201)
    at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:185)
    at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:235)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

We expected it to work since for Kafka or the Schema Registry there is no requirement of matching Topic and Schema Name.

That is not really correct. The converter needs a way to find a matching subject, and that is by default based derived from the topic's name:
Kafka connect needs a key.converter and value.converter to define the data format in a topic.
From the Kafka connect docs:

key.converter - Converter class used to convert between Kafka Connect format and the serialized form that is written to Kafka. This controls the format of the keys in messages written to or read from Kafka, and since this is independent of connectors it allows any connector to work with any serialization format. Examples of common formats include JSON and Avro.
value.converter - Converter class used to convert between Kafka Connect format and the serialized form that is written to Kafka. This controls the format of the values in messages written to or read from Kafka, and since this is independent of connectors it allows any connector to work with any serialization format. Examples of common formats include JSON and Avro.

These settings can be kept or overwritten on a connector basis.
In your case you're using io.confluent.connect.avro.AvroConverter as a converter, which integrates with Schema Registry. The converter has a mechanism to associate a topic's key with a subject name, done through key.subject.name.strategy, and value.subject.name.strategy for the value. From the converter docs:

key.subject.name.strategy
Determines how to construct the subject name under which the key schema is registered with Schema Registry. For additional information, see Schema Registry Subject Name Strategy.

and:

By default, -key is used as subject

Here you can find additional details. I hope that helps.

Thank you very much @hackaugusto. This was very helpful and I learned quite a bit.
Do you know if it is possible to define a custom Subject strategy? We are prefixing our schema names and not our topics.
Also, do you have an idea of why Producers/Consumers do not have an issue with this "custom strategy" we are using (we do not specify the schema name in any way).
For context, our topics look like my.topic while the corresponding schema name is: events.v1.my.topic_record_name

Do you know if it is possible to define a custom Subject strategy?

Yes, value.subject.name.strategy and key.subject.name.strategy are the names of the configurations options. The comment above has links to the docs with additional details.

We are prefixing our schema names and not our topics.

I'm not sure if I follow. The topic name is not really changed, it is the name of the subject used to store schemas that is changed.

Also, do you have an idea of why Producers/Consumers do not have an issue with this "custom strategy" we are using (we do not specify the schema name in any way).

Well, the default strategy is to use the suffixes -key and -value. So if your subject name is events.v1.my.topic_record_name then there should be some customization going on.
Another possibility is that we are talking about different things :sweat_smile:


Update only the delta for RootGroup.dependencyGraph rather than recomputing.

https://phabricator.mesosphere.com/D75 introduced RootGroup in which we compute the dependencyGraph of all run specs in Marathon upon request. We also recompute this graph every time anything changes in the group. Since all modifying operations have been moved into RootGroup, and many are intentionally narrow-purposed (e.g., removeApp), we can simply update the previous dependencyGraph rather than rebuilding the entire graph.

Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-2185. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.


Ionq simulator is not the same number of Qubits as the QPU

Hello,
I would like to suggest the following change to the backend info for the IonQ device to bring the simulator n_nodes into line with the known number of 29 qubits from the current 11.
"Many simulators are available in the quantum ecosystem, from run-it-yourself simulators packaged with open-source tools like Qiskit and Cirq, to standalone, hardware-optimized packages like Intel-QS and NVIDIA cuQuantum, to cloud-based simulators from most of the major quantum cloud providers, like the 29-qubit cloud simulator available as part of The IonQ Quantum Cloud."
https://ionq.com/posts/november-12-2021-the-value-of-quantum-simulators
I have personally run jobs in the high teens (like 18 qubits) on the Ionq simulator.
I haven't tried anything higher than that because it is very slow.
Please let me know if you need anything to make a decision or clean up the changes I have made.
Thank you!

I would like you take a closer look at whether or not I've screwed up available devices, If this pull request is of interest

Did some additional poking around in the IonQ API and found that the qubit count for the simulator is 19 not 29 will make necessary changes


Implement HKDF

I have implemented the HKDFBytesGenerator class from the java API.
There is a unit test available, but it is a standard nUnit test and does not use BouncyCastle's ITest interface. I hope that is OK.

OK, I obviously missed, that someone has already done that and the code is just missing in the release. D'oh.

@mtausig Oh, that's unfortunate! We appreciate the intention though, thank you. I assume you needed HKDF for some reason, so if you have any feedback/improvements from using the existing one, they are welcome. Note that until we drop a 2.0 release, we're still at .NET 1.1, and new unit tests should typically be runnable via both nUnit and ITest.


Bxcli

use latest bluemix cli url

Let's update our Bluemix auth function to work the same way as in this script: https://github.com/IBM/Kubernetes-container-service-GitLab-sample/blob/master/scripts/bx_auth.sh#L12
NOTE: We will need to include the targeting step from line 15.

It failed because we still haven't added the kubeadm test. Outside forks wouldn't have access to environment variables in travis and can't be tested on our bx cluster

@AnthonyAmanse: Good call!


FreshRSS greader API failing

The greader API from the FreshRSS service fails.
Steps To Reproduce

Enable services.freshrss, set a virtualHost, defaultUser and passwordFile.
In services.nginx, set the virtualHost options enableACME and forceSSL;

Behavior
The profile page links to the API url, https://myserver.xxx/api, where it reports the address and state of the Google Reader API.
It shows a red cross, no good.
Also, I see the words FAIL and the address reported as https://myserver.xxx/api/api/greader.php (note the double api). But @Stunkymonkey gets a different result: while he also sees the red cross, it says OK instead of FAIL, and the address is reported properly with no duplicated "api/api" in it.
If I navigate to https://myserver.xxx/api/greader.php I also see "OK". Yet, I am failing to connect from mobile apps or newsboat, which reports "Authentication failed".
@Stunkymonkey @etu
Metadata
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"

 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.74, NixOS, 22.11 (Raccoon), 22.11pre417910.26b7e6ab6a8`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.0`
 - channels(root): `"nixos, nixos-unstable"`
 - channels(pakaca): `"home-manager, nixpkgs"`
 - nixpkgs: `/home/pakaca/.nix-defexpr/channels/nixpkgs`

seems to me like:
https://github.com/FreshRSS/FreshRSS/issues/3741
improved via
https://github.com/FreshRSS/FreshRSS/pull/3934
So if we stick to: https://github.com/FreshRSS/FreshRSS/blob/edge/docs/en/admins/10_ServerConfig.md this should be solved.

Yes! Other apps indeed succeed in connecting to the API after adding to nginx virtual host:
locations."~ ^.*?\.php(/.*)?$".extraConfig = ''
  set $path_info $fastcgi_path_info;
  fastcgi_param PATH_INFO $path_info;
'';


[NRK Radio Direkte] <HTTPError 400: 'Bad Request'>

Checklist

[X] I'm reporting a broken site
[X] I've verified that I'm running yt-dlp version 2022.02.04. (update instructions)
[X] I've checked that all provided URLs are alive and playable in a browser
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[ ] I've read about sharing account credentials and I'm willing to share it if required

Region
No response
Description
attempting to download any NRK Radio live/'direkte' streams results in a 400 error, as seen below. catch-up works fine.
Website and mobile app work perfectly, no account, no geo bypass (in the UK).
I get the same error with podcasts, but that probably belongs in another issue.
Verbose log
$ yt-dlp https://radio.nrk.no/direkte/jazz -vU
[debug] Command-line config: ['https://radio.nrk.no/direkte/jazz', '-vU']
[debug] User config "/home/g/.config/yt-dlp/config": ['--no-colors']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.02.04 [c1653e9ef]
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.13.0-28-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4, rtmpdump 2.4
[debug] Optional libraries: Cryptodome, secretstorage, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.02.04, Current version: 2022.02.04
yt-dlp is up to date (2022.02.04)
[debug] [NRKTVDirekte] Extracting URL: https://radio.nrk.no/direkte/jazz
[debug] Using fake IP <IP_ADDRESS> (NO) as X-Forwarded-For
[debug] [NRK] Extracting URL: nrk:jazz
[NRK] jazz: Downloading manifest JSON
ERROR: [NRK] jazz: Unable to download JSON metadata: HTTP Error 400: Bad Request (caused by <HTTPError 400: 'Bad Request'>); please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U (caused by <HTTPError 400: 'Bad Request'>); please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U
  File "/home/g/.local/lib/python3.8/site-packages/yt_dlp/extractor/common.py", line 730, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/home/g/.local/lib/python3.8/site-packages/yt_dlp/YoutubeDL.py", line 3558, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)

oop, probably a dupe of #1891, sorry. closing.