Support for different atmega controllers

Hi, and thanks for creating this useful crate; especially the svd generator.
I've started working on modifying this library so it can support the atmega1280 mcu. It will obviously need a different svd, but at the same time it will use the same kind of interrupt logic etc.
The question here is, would it not be better to move the atmega core logic out of this crate into an atmega crate?

Hi! Sorry for not responding for so long ...

The question here is, would it not be better to move the atmega core logic out of this crate into an atmega crate?

Yes! Back when I was working on this project, I had the plan to do exactly that.  I have some files for attiny85 as well and I wanted to merge all of this into one big atmel crate similar to the stm-rs crates.
Sadly some other stuff got inbetween so I did not have time to work on this project anymore.  I'd love to see it going forward though, so if you are still interested, we could devise a plan how we can make this happen.
I'll just brain-dump a few things here in case you care:
SVD
I'd still want to continue using svd2rust even though there are no svd files for AVR chips.  I met the guy behind tinygo a while back and he showed me that there are actually machine-readable register definitions for avr chips as well.  We thought that it might make sense to write a converter that both projects could then make use of.
Crate hierarchy
I think there are so little avr chips that it makes sense to stuff them all into one crate or at max into a few (attiny, atmega, ...).
I'd then suggest writing a crate for the hal macros (like the one for port) which are then used in the device-specific hal crates to instanciate the abstractions for each device.  Here I am not yet sure if we should have a crate for each device or combine those in some way as well.  I've heard that some people in the stm community are not too happy with the immense amount of crates they have ...
Interrupts
As you mentioned in #2, it makes sense to follow the design used in the stm crates.

Hi, thanks for your reply!
I’d love to help making this happen. I’m still new to embedded Rust etc, so I’ll probably need a lot of guidance but I’m happy to help wherever I can.
My personal goal is to have rust running fairly well on an atmega1280 by October so I can do some course work at my uni that is typically done in C in Rust, but I’d like to not create a one-off solution but grow the ecosystem while I’m at it 😊

To get a rough overview (I am not that deep in the AVR scene ...): Which chips do you think we will need to support? From my side, it is atmega328p, atmega32u8, and attiny85.  You mentioned atmega1280.  Are there any other chips that are widely used?

The atmega2560 is the basis of the Arguino mega and generally relatively widely used. also the atmega8 for very small chips (the Cheapduino for example). Other than that I can't think of any really popular ones.

I guess those six chips are a good starting point, we can always expand in the future ... But as long as the numbers stay small, I'd suggest keeping everything in one crate.
Now, I just compiled the latest avr-rust and unfortunately it seems there is currently a bug that prevents me from getting anything working (avr-rust/rust#128).  Until that is resolved, we are stuck with theoretical work I'm afraid.

I think I still have a working avr-rust from about a month ago, I’ll check when I get home

I have a working rust-avr install on revision d830a3b63f9d17736b6350a464e0041666415b20 right now, which manages to build the repo

Hmm ... That revision does not exist for me anymore when checking out avr-rust/rust.  I guess that is because they rebased onto a newer upstream ... Interestingly, GitHub still shows that revision when specifically searching for it ...
Looking at the history, it is missing this patch anyway without which I won't be able to build for ATtiny85.
Anyway, I'll see if I can get some hackish solution working ... Until then, there is already quite a few other things that we can work on:  Me and some friends started working on atdf2svd this weekend to get the peripheral access crate going.  I'll push it to GitHub as soon as it is in a basic working state ...

It's online: https://github.com/Rahix/atdf2svd :tada:

Neat!
Where do I actually find atdfs^^ I tried finding one for an atmega1280 or some documentation and didn’t find anything.
Also, what are our next steps? Can I help with anything?

They're distributed here in the .atpacks: http://packs.download.atmel.com/

Also, what are our next steps? Can I help with anything?

I'll try to get a basic version of the register-access crate running as soon as possible.  This means basically writing a Makefile which calls atdf2svd, svd2rust, and a few other scripts ... One of those will be some kind of patch tool to fix missing/false information from the adtf files.  I talked with @octycs and we decided to adopt the stm32-rs svd-patch tool.
Once this all works in a most minimal version, we can start integrating support for the different chips.  I would suggest you help there if that is ok with you?

Sounds great

We have liftoff: https://github.com/Rahix/avr-device :rocket:

You can also get the .atdf files here, for example to put them in a submodule: https://github.com/avr-rust/avr-mcu

So I guess I can try adding atmega1280 support? Do I have to consider anything when it comes to the svd patching, or is that universal?

For each chip, there is an (optional) file in patch/<chip>.yaml which tells the patch-tool what to do.  We tried factoring out common patches that multiple devices make use of into patch/common/*.yaml.  You can include other patches using
_include:
  - "path/to/common.yaml

as you can see in the existing files.  (Technically, this would even work recursively, but right now there is not much need for it ...)
A lot of patching will be the names of enumerated values, which is why @octycs added functionality for that to svdpatch.py (Thanks again!)  You can take a look at the existing files (like this one) to get an idea of how that works ...
A little trick to get a starting point for things to patch is to run atdf2svd manually and look at the warnings:
# -v enables more messages
atdf2svd vendor/atmega1280.atdf /dev/null -v

Oh, and don't bother trying to patch everything before submitting, I'd rather start with a basic working version and then patch things as we notice them while working with it ...

@aykevl: That might actually be a good idea at some point!  Right now we only support <10 devices so I'm ok with storing the files in our tree as well.  But thanks for the link, I wasn't aware Dylan had already pushed all of them into a crate ...

@peacememories, finally got around to merging your PR.  Thanks!  I have some stuff ready, regarding the HAL design, though I still want to add a few more things before publishing it.  Unfortunately, I'll be gone next week, so this might take a little longer ...
If you want to, you can take a look at the patching stuff that @octycs added.  Maybe some of the patches in patch/common/ also apply to atmega1280?

Thanks for merging!
I’ll have to look into what the common patches actually do, but I’ll try to find out ^^‘
Have a nice week :)

I’ll have to look into what the common patches actually do, but I’ll try to find out ^^

Right, I should have done this before: I added some comments so you don't have to waste time ;)

I did a thing: https://github.com/Rahix/avr-hal
Still very barebones, just digital IO works at this point.  Next step for me is probably porting the PWM stuff from the old crate.

should i just throw a barebones version of the atmega1280 in there as well?

That would be great!  And if you have a board based on atmega1280, add a crate for it as well!  Right now, documentation is really lacking, but I hope that by looking at the code of the other crates you can figure out what you need to do.
You'll probably be able to implement the PORTx peripherals and if atmega1280 uses the same USART as atmega32u4, you can use that as well.  I'm currently looking into the timers, specifically for PWM, and the "TWI" interface (which is just i2c).

It seems I have destroyed my rust-avr install^^' when trying to compile core it complains about a host of stuff:
warning: Patch `rustc-std-workspace-core v1.0.0 (/Users/gabriel/.local/share/rust-avr/src/tools/rustc-std-workspace-core)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
   Compiling core v0.0.0 (/Users/gabriel/.local/share/rust-avr/src/libcore)
error[E0522]: definition of an unknown language item: `va_list`
   --> /Users/gabriel/.local/share/rust-avr/src/libcore/ffi.rs:118:1
    |
118 | #[lang = "va_list"]
    | ^^^^^^^^^^^^^^^^^^^ definition of unknown language item `va_list`

error[E0093]: unrecognized intrinsic function: `va_end`
   --> /Users/gabriel/.local/share/rust-avr/src/libcore/ffi.rs:211:5
    |
211 |     fn va_end(ap: &mut VaList);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ unrecognized intrinsic

error[E0093]: unrecognized intrinsic function: `va_copy`
   --> /Users/gabriel/.local/share/rust-avr/src/libcore/ffi.rs:217:5
    |
217 |     fn va_copy<'a>(src: &VaList<'a>) -> VaList<'a>;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unrecognized intrinsic

error[E0093]: unrecognized intrinsic function: `va_arg`
   --> /Users/gabriel/.local/share/rust-avr/src/libcore/ffi.rs:224:5
    |
224 |     fn va_arg<T: sealed_trait::VaArgSafe>(ap: &mut VaList) -> T;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unrecognized intrinsic

error: aborting due to 4 previous errors

Some errors occurred: E0093, E0522.
For more information about an error, try `rustc --explain E0093`.
error: Could not compile `core`.

I know that's nothing to do with the project itself, but I'm hoping you have some wisdom about how to fix this^^'

I'm on rust-avr commit 09933ff8f5c2a282161165a88e37b5e16757aa91

Okay, after a full rebuild this is getting even weirder:
warning: Patch `rustc-std-workspace-core v1.0.0 (/Users/gabriel/.local/share/rust-avr/src/tools/rustc-std-workspace-core)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
   Compiling core v0.0.0 (/Users/gabriel/.local/share/rust-avr/src/libcore)
Expected either Y or Z register
UNREACHABLE executed at /Users/gabriel/.local/share/rust-avr/src/llvm/lib/Target/AVR/MCTargetDesc/AVRMCCodeEmitter.cpp:146!

Ah I see that's the same problem you encountered. How did you fix it?

Right, yes ... I rolled back to a working commit, a3b0834328d73eae4f0a27afd7668b684e4a875f in this case.  But you might want to wait a few more days, Dylan told me, the new revision will hit very soon.  With it, we will have nightly 1.35 which should allow us to use ufmt and thus string formatting for the serial console.

I'll try the rollback first. Got a few free days right now so might as well get some stuff done ;)

Btw, I'm fine using this issue as general conversation channel, but it may make sense to move this somewhere else^^

Needing pyyaml for avr-hal (and probably dependents) too right now is a bit awkward, especially if you haven't installed it globally (like me for example)^^
But I assume this will not be necessary anymore if we publish to cargo at some point?

Needing pyyaml for avr-hal (and probably dependents) too right now is a bit awkward, especially if you haven't installed it globally (like me for example)^^
But I assume this will not be necessary anymore if we publish to cargo at some point?

Yes, that is a sideeffect of the way we currently build avr-device.  I wanted to get it working in avr-hal without having to manually download avr-device, so I added a build-script that runs make.  Of course, this will need pyYAML for applying the patches ...
Once the crates go up on crates.io, this issue will no longer exist, because avr-device will contain all the generated sources as well.

Okay, I've gotten a bit further (leonardo-blink builds), but when trying to add an atmega1280-hal and bigavr6 crate i manage to crash my compiler^^
Maybe I'll create a PR just so the code in question is publicly visible.

thread 'main' panicked at 'attempt to subtract with overflow', src/librustc_resolve/lib.rs:5054:45
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
   6: std::panicking::continue_panic_fmt
   7: rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::panicking::panic
  10: rustc_resolve::Resolver::report_conflict
  11: rustc_resolve::resolve_imports::ImportResolver::resolve_imports
  12: rustc_resolve::macros::<impl syntax::ext::base::Resolver for rustc_resolve::Resolver<'a, 'crateloader>>::resolve_imports
  13: syntax::ext::expand::MacroExpander::resolve_imports
  14: syntax::ext::expand::MacroExpander::expand_fragment
  15: syntax::ext::expand::MacroExpander::expand_crate
  16: rustc_driver::driver::phase_2_configure_and_expand_inner::{{closure}}
  17: rustc::util::common::time
  18: rustc_driver::driver::phase_2_configure_and_expand
  19: rustc_driver::driver::compile_input
  20: rustc_driver::run_compiler_with_pool
  21: <scoped_tls::ScopedKey<T>>::set
  22: rustc_driver::run_compiler
  23: syntax::with_globals
  24: __rust_maybe_catch_panic
  25: std::panicking::try
  26: rustc_driver::run
  27: rustc_driver::main
  28: std::rt::lang_start::{{closure}}
  29: std::panicking::try::do_call
  30: __rust_maybe_catch_panic
  31: std::panicking::try
  32: std::rt::lang_start_internal
  33: main

this is my stack trace ^

Please push that somewhere, so I can take a look ... This should definitely not happen ...

here you go: https://github.com/Rahix/avr-hal/pull/1

So ... I can't reproduce it ...  I got some macro errors, but those were easy to fix with this patch: avr.patch

Okay, apparently killing the shell and creating a new one fixed my problems. Something went very wrong there^^
Might have something to do with the fact that the shell stayed open while I recompiled rust-avr 3 times^^

Btw, isn't it a bit weird to have to specify all peripheral ports when constructing Pins?

The bigavr6 has all pins of the atmega1280 exposed, since it is a big development board.
Some of the pins are not exposed as buttons/leds though, so that might be nice to encode in the crate.
Also, a lot of them obviously have different functions as well, which I would also like to encode.
Can I, with the current setup, somehow make it easy to alias a pin between e.g. INT0 and PD0, while only allowing a user to grab it as either one? Is that even a good idea?
This will probably become interesting when adding drivers for the display and such. I'm not sure if it's good for the user to have to manually pipe all pins the display needs to the constructor. Okay, that's a lot of free association for one post^^ I'm just trying to wrap my head around the api choices

I made some changes to the pr which make it mergeable, as long as you don't mind horribly incomplete hals^^

Hmm, the points you make all have to do with basically the same underlying issue:  Rust is not able to encode partial moves in function signatures.  In more practical terms:
struct Parts {
    p1: P1,
    p2: P2,
    p3: P3,
    p4: P4,
    p5, P5,
}

struct Foo(P2, P3);

fn take_p2_and_p3(p: Parts) -> Foo {
  Foo(p.p2, p.p3)
}

fn main() {
  let parts = Parts { /* ... */ };

  let foo = take_p2_and_p3(parts);

  // Rust doesn't know that parts.{p1, p4, p5} have not been moved
  let p4 = parts.p4;
}

There is absolutely no way to encode the above properly.  I tried writing some typesystem magic using a procedural macro once, which actually worked, but was weird to use and produced horrible error messages and even worse type signatures.
So unfortunately there isn't really a way around explicitly passing all PORTs/pins/whatever without dropping the strict tracking of ownership.

This means that, for now at least, you should just pass all pins individually.  The aliasing not being possible boils down to the same reason, so just choose 'generic' names for pins which are used for multiple things ...

The new compiler was released! avr-rust/rust#144 :tada:

argh, i updated and now my compiler doesn't find avr-unknown-unknown anymore ^^'

I added crude I2C support for ATmega32U4 ... If you want, you can try integrating that into your crates as well.  There is an i2cdetect() method that you can use to quickly test the implementation a little ...
But don't look at the code too closely, it is still very messy and probably not quite correct in all cases ;)

I also changed the cargo profiles to produce smaller binaries (up to 2x reduction for some cases!).  I also made the debug-build usable, so you can test new code more quickly (with incremental & parallel codegen).
Be aware that the mkhex.sh script now by default looks for the debug binary.  If you want to create an ihex from the release binary you have to use ./mkhex.sh --release <elfname>


Fix for using config.hpp in old standards

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
337

Relevant Lines:
337

💛  - Coveralls


Formatting a function call with ALL_CAPS argument behaviour

I don't know if it's only the lower_case() function, however, I tried multiple functions and it doesn't seem to be doing it for others, but, with this code example:
#define SOME_DEFINE "some define"

void somefunc() {
    string *words ;

    words = ({ SOME_DEFINE, lower_case(SOME_DEFINE), upper_case(SOME_DEFINE) }) ;
}

when I format document, it puts lower_case on its own and (SOME_DEFINE) on its own in this array.
Result:
#define SOME_DEFINE "some define"

void somefunc() {
    string *words;

    words = ({SOME_DEFINE, lower_case, (SOME_DEFINE), upper_case(SOME_DEFINE)});
}

This will be fixed in v49.  Thanks for submitting the issue!


when process parameters, "self" can't be ModuleType

eg:
=====a.py======
import b.c
b.c.gf("eeeeeeeeeee")
=====b\c.py=====
def gf(param):
pass
Here b.c is package name, not class name

Please fix it, I am not familiar with it.


Stage -> Main

With the E2E flow demoed, I think it's a fitting time to sync up main with stage.
Test URLs:

Before: https://main--ecc-milo--adobecom.hlx.page/
After: https://stage--ecc-milo--adobecom.hlx.page/

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (main@fac4d6d). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #42   +/-   ##
=======================================
  Coverage        ?   83.87%
=======================================
  Files           ?        1
  Lines           ?       62
  Branches        ?        0
=======================================
  Hits            ?       52
  Misses          ?       10
  Partials        ?        0

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Changing Sun Azimuth angle in CarlaWeather.ini has no effect

I'm trying to change the sun position to get shadows at different angles, however changing in CarlaWeather.ini SunAzimuthAngle=40.0
has no effect. Changing SunPolarAngle=somevalue works though. I'm using a modified level as suggested in the map customization tutorial.
Can anybody confirm this? I also tried changing it via the weather blueprint but the direction of the sunlight is always the same.

Changing the Rotation of 'Light Source' by hand is kind of a workaround.


SyntaxError: Cannot use import statement outside a module

When you use ECMAScript Modules in Node (v13.6.0 for me) combined with Jest, the following error occurs:
SyntaxError: Cannot use import statement outside a module

      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)

Here is the test code I am trying to execute.
import { checks } from '../../../../src/utils/index.js'

describe('Array type check', () => {
    test('to return false when not an array', () => {
        expect(checks.array('string')).toEqual(false)
    })
})

I suspect the issue is Jest is not configured to run Node code using "type: module" (ECMAScript Modules).

I resolved the issue by doing the following:
yarn add ts-jest -D

then in your jest.config.js file put following:
module.exports = {
  transform: {
    '^.+\\.tsx?$': 'ts-jest',
  },
};

Correct, ESM is not supported. You can track #4842

A more complete set of steps is:

npm i --save-dev jest babel-jest jest babel-jest @babel/preset-env
add the follow to the module.exports in your jest.config.js

transform: {
    "^.+\\.jsx?$": "babel-jest"
  },

create a babel.config.json file with the follow

{
  "presets": ["@babel/preset-env"]
}

After this, I was able to get files with imports working just fine.

I had the same problem when I started to used babel... But later, I had a solution... I haven't had the problem anymore so far... Currently, Node v12.14.1, "@babel/node": "^7.8.4", I use babel-node and nodemon to execute (node is fine as well..)
package.json:
"start": "nodemon --exec babel-node server.js "debug": "babel-node debug server.js" !!note: server.js is my entry file, you can use yours.
launch.json:
When you debug, you also need to config your launch.json file "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/babel-node" !!note: plus runtimeExecutable into the configuration.
Of course, with babel-node, you also normally need and edit another file, such as babel.config.js/.babelrc file

{
"presets": ["@babel/preset-env"]
}

Awsome workaround!!
FYI for some people, if you are using a .babelrc the changes didn't work for me. I had to delete my .babelrc it and just use the suggested babel.config.json

@smpeters solution worked for me, but I want to see if I can explain exactly why it worked, because TBH I have no idea what those steps actually do (but thank you @smpeters for posting them!)

Jest has a transform option that takes an object where the keys are regular expressions of filenames to match and their values are how to transform them.
Jest calls these values a "path to transformer".  I have no idea what this exactly means, but my best guess is that since we had to install the babel-jest module, "babel-jest" is a path to that module.  So I guess if the module were called babel-jest-hooray then the "path to transformer" would be the string "babel-jest-hooray".
So what is the babel-jest module?  Seems like it exists to use Babel to transform jest files, i.e. to solve this exact problem.  If my supposition above is correct, then this is what it is: https://github.com/facebook/jest/blob/master/packages/babel-jest/src/index.ts#L163
OK, cool.  So what is babel?  It is a JavaScript Compiler (but so is Webpack? I dunno, let's go with it).  It does the work.  babel-jest is a glue between Babel—which doesn't know about Jest—and Jest.
To make babel work you need to configure it.  It comes with presets, but these are not actually pre-set. You have to set them.  Thus the @babel/preset-env module is installed.
What is the @babel/preset-env module?  It is "a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms", which basically means it sets all the defaults you want to do normal and unsurprising things.  Nice!
So how does babel know how to use this?  You have to tell it by creating that babel config file. That's where the "preset" configuration option comes in.

Whew!

@smpeters I'm getting a ReferenceError: regeneratorRuntime is not defined and it points to a async await function as the culprit.
Any ideas about this?

@changyeamoon I think that's because @babel/preset-env doesn't have an explicit target and is by default targeting all web browsers, attempting to transform all code in the process.
 Shocker.

 Shocker.

How did you do the migration?

Well I spent a whole day on this trying to figure out... turns out for me I reused a .js file from another project that was set to compiled everything.  The new project did not and that .js file was exporting an ESM.  So I changed the name to .ts and bang zoom! There's probably a way to include .js in the compile so it gets converted to ESM but since I'm converting everything to TS anyway I didn't bother.  Please feel free to let me know though if you find out.
With the current version of ts-jest I didn't need the babel stuff.  ts-jest 25.5.1 and typescript 3.9.3.
this is my jest.config.js
module.exports = {
  preset: 'ts-jest',
  coverageDirectory: 'coverage',
  collectCoverageFrom: ['src/**/*.{ts,tsx,js,jsx}', '!src/**/*.d.ts'],
};

Dear @smpeters
I have the same issue on react-native. you solution did not work

I solved it for my React Native project. First I initialized a new TypeScript template with npx react-native init and compared tsconfig.json files. I missed the following settings:
"module": "commonjs",
"lib": ["ES6"],
"isolatedModules": true,
"strict": true,
"noEmit": true,

Then I configured transformIgnorePatterns for my es libs.
https://github.com/nrwl/nx/issues/812

In my case, there was a problem loading lodash, so I solved by mocking the functions I needed to use, such as lodash-es/round, so under __mocks__ folder, I just added another folder with lodash-es and a file round.js with something like module.exports = jest.fn(numb => numb);
That did the trick. Hope it helps someone else.

 Shocker.

That's really helped, I shocked too :)

I've came across this issue and wanted to leave a solution that worked in my case. We are using some internally developed library that we use in our apps. Because of that the libraries are only delivered as ES6 modules, so trying to test them threw an error from the issue title. What I had to do to fix was:

change .babelrc to babel.config.json
migrate Jest configuration from package.json to jest.config.js
add these lines to the Jest config file:

transformIgnorePatterns: ['node_modules/(?!@foobar)/']

Where foobar is the library name we are using. From how I understand this allows Babel to transform ES6 modules correctly for Jest. And it got rid of the error.

I'm just over here trying to figure out why @ziishaned 's answer is downvoted to oblivion when it works for me:

Meanwhile @smpeters solution seems to be widely accepted and doesn't work for me...:

My solution works for React JSX files.  The other is for Typescript files.
They are similar solutions to similar problems.
On Sun, Aug 30, 2020 at 6:05 AM Danny Hinshaw<EMAIL_ADDRESS>wrote:

I'm just over here trying to figure out why @ziishaned
https://github.com/ziishaned 's answer is downvoted to oblivion when it
works for me:
[image: Screen Shot 2020-08-30 at 7 02 40 AM]
https://user-images.githubusercontent.com/24684771/91657446-f4b54f00-ea8e-11ea-8b10-fbd90c2de9ec.png
Meanwhile @smpeters https://github.com/smpeters solution seems to be
widely accepted and doesn't work for me...:
[image: Screen Shot 2020-08-30 at 7 04 51 AM]
https://user-images.githubusercontent.com/24684771/91657475-1e6e7600-ea8f-11ea-95f1-1e0312b8bdf8.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/jest/issues/9395#issuecomment-683406678, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAJQUTAG2GFPTYSA2ZXJGTSDIW63ANCNFSM4KFPEIEQ
.

For new coming, use this
jest.config.js
module.exports = {
  preset: 'ts-jest/presets/js-with-babel'
};

@abrcdf1023 thank you.

@abrcdf1023 This work's for me! Thanks!

Shame nothing works for me. This is even on a new create-react-app, so all my babel, jest, etc. configurations are all clean.
I can get jest to work with typescript for a typescript file on its own, but the moment I try to import my other typescript module, it just doesn't seem to recognise the "import" keyword, despite the keyword being recognised right above the import statement, when I import another file...
import { Items } from '../strings'; // Jest is OK
import { UserType } from '@username/myenums'; // Jest is like ? ? ? ? ?

How jest cannot seem to compile or recognise my external library that's in typescript is beyond me

None of this worked for me. I do not use TypeScript. I just upgraded it from Node v12.10 to v14.5, fixed certain invalid imports and the app starts without any errors or warnings. However, Jest fails every single test with the same ereror : SyntaxError: Cannot use import statement outside a module, where this module is located inside my node_modules folder.
Inside my babel.config.cjs, I have
module.exports = {
  "presets": [
    [
      "@babel/preset-env",
      {
        targets: {
          node: true,
        },
      }
    ]
  ]
};

and inside my jest.config.cjs, I have
module.exports = {
   testEnvironment: "node",
   bail: 2,

   transform: {
      "^.+\\.jsx?$": "babel-jest"
   },
};

(In fact, even the option bail is ignored, and every tests are executed, errored, and consoled on screen.

None of this worked for me. I do not use TypeScript. I just upgraded it from Node v12.10 to v14.5, fixed certain invalid imports and the app starts without any errors or warnings. However, Jest fails every single test with the same ereror : SyntaxError: Cannot use import statement outside a module, where this module is located inside my node_modules folder.
Inside my babel.config.cjs, I have
module.exports = {
  "presets": [
    [
      "@babel/preset-env",
      {
        targets: {
          node: true,
        },
      }
    ]
  ]
};

and inside my jest.config.cjs, I have
module.exports = {
   testEnvironment: "node",
   bail: 2,

   transform: {
      "^.+\\.jsx?$": "babel-jest"
   },
};

(In fact, even the option bail is ignored, and every tests are executed, errored, and consoled on screen.

{
"presets": ["@babel/preset-env"]
}

Awsome workaround!!
FYI for some people, if you are using a .babelrc the changes didn't work for me. I had to delete my .babelrc it and just use the suggested babel.config.json

i spent over 4 hours and i stumbled upon this comment
Thank you :) this one fixed it for me

For the record, I had to migrate tests that were in js so they can be used with typescript and thanks to @abrcdf1023's comment, I was able to find this solution that works like a charm:
{   "preset": "ts-jest/presets/js-with-ts" }

What worked for me was changing the modules option of Babel's ENV preset from false to auto.
{
  "presets": [
    ["@babel/preset-env", { "modules": "auto" }]
  ]
}

What worked for me:

npm i -D @babel/plugin-transform-runtime
 npm i --save  @babel/runtime

babel.config.json:
{
  "presets": [
    "@babel/preset-env"
  ],
  "plugins": [
    "@babel/transform-runtime"
  ]
}

@yanickrochon any luck for you? I have a similar setup to yours, none of the other above solutions have worked for me.

My setup looks like this:
module.exports = function (api) {
  api.cache(true);

  const presets = [
    '@babel/preset-react',
    '@babel/preset-typescript',
    [
      '@babel/preset-env',
      {
        modules: false,
        targets: {
          browsers: '> 1%'
        }
      }
    ]
  ];

  const plugins = ['@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-private-methods'];

  const ignore = ['.test.js'];

  return {
    presets,
    plugins,
    ignore
  };
};

module.exports = {
  preset: 'ts-jest/presets/js-with-babel',
  transform: {
    '^.+\\.(ts|tsx|js|jsx)?$': 'ts-jest'
  },
  setupFilesAfterEnv: ['./test/jest.setup.js'],
  modulePathIgnorePatterns: ['npm-cache']
};

Can't get test to run. Does anything look wrong here to anyone? I've read every thread related to this issue


Integrate PlaceTypes USA Tool

Incorporate https://github.com/gregorbj/Placetypes_USA into the VE GUI/Visualizer

this might be a good task for the pooled funds.


transcending the limits of crypto.

Clear and concise description of the problem
think about it... A simple and universal wallet that can be easily used on shopping sites and regular payments.
To be able to make our payments easily with the digital assets we have, with a knowing wallet that can make instant, fast and easy exchange and conversion by offering attractive offers to famous shopping sites.
Is it a dream...
that would be the end of fiat money.
Suggested solution
To design a universal and multi-purpose wallet that quickly converts the digital assets we have to the required amount while shopping online or making any payments, and at the same time displays the amount we need to pay on the basis of the digital assets we own.
Alternative
IBAX UNIVERSAL WALLET
(Amazan.com)Amount Payable : $250
 -ASSETS OWNED-     -CURRENT VALUE-          -PROVISION FOR AMOUNT PAYABLE-

IBXC : 1250000....................IBXC : 57,3500$.....................= 4,3591.IBXC.................[PAY WITH IBXC]
BTC : 1,2500..........................BTC : 36448,5700$...............= 0,0068.BTC...................[PAY WITH BTC]
ETH : 24,7300.......................ETH : 2435,1600$.................= 0,1026.ETH...................[PAY WITH ETH]
SHIB : 15000000..................SHIB : 0,00002069$............= 12083,1319.SHIB.......[PAY WITH SHIB]
DOGE : 300000......................DOGE : 0,1424$....................= 1755,6179.DOGE.......[PAY WITH DOGE]
ATOM : 265............................ATOM : 31,5200$................= 7,9314.ATOM................[PAY WITH ATOM]
Additional context
An idea is like a snowflake that will start an avalanche.
It should never be taken lightly.
Validations

[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

This is a great idea and you can create an ecosystem in IBAX to implement this business scenario. If it is online shopping we can tell that you may encounter several critical issues.

the identity information of the shopper and seller must be able to be identified. (according to your needs)
logistics information can be tracked on the chain and can be traced (and the privacy of both sides of the transaction needs to be protected).
support for multiple cryptocurrency payments, preferably using Defi direct transactions.

We are building an on-chain DID identity verification function that allows both sides of a transaction to complete identity verification and confirmation (you can also build your own DID verification model.) IBAX's CLB has cross-chain communication capabilities and supports data and assets across chains, so you can use her to complete the second and third points of functionality. Using CLB you can access the content of existing established logistics providers and link their logistics information to purchase orders, which is data that only the transacting party can view or authorize to allow to be made public.
We encourages you to implement your own ideas.


Fixed category typo in R.clamp documentation

The category in R.clamp was misspelled to 'Relaction'

:deciduous_tree: Thanks!


Default Blog Post Styling

Current Behavior

Writing a blog post with interactive components at the moment requires knowledge of the relevant underlying forge-ui-components classes.
As such, just including a <button></button> element, or <input type="text" /> causes inconsistent styling with other elements in the website, e.g:

Expected Behavior

When writing a blog, as an author, I shouldn't require the knowledge of the relevant CSS classes. I should just be able to write the relevant content.
The relevant classes/styling should then be automatically applied

Steps To Reproduce

Navigate to any blog post with an interactive element, e.g http://flowforge.com/blog/2022/04/flowforge-accepting-customers/

Environment

FlowForge version:
Node.js version:
npm version:
Platform/OS:
Browser:

pausing this for now, as prioritising forge-ui-components for the Platform. Will consider having a "website" theme as part of the forge-ui-components


First steps towards a wiki synchronization

Pull Request Etiquette

[x] I have checked the PRs for upcoming features/bug fixes.
[x] I have read the contributing guidelines.

Changes

[ ] Internal code
[ ] Library interface (affecting end-user code)
[ ] Documentation
[x] Other: New GitHub Actions

Closes Issue: NaN
Description
This has been discussed on the Discord already, but it would be a good idea to have a two-way wiki synchronization that would allow outsiders to suggest changes to the wiki, without the risk of giving everyone write access to it.
This is still a draft since I need to find a somewhat elegant way to also have a wiki -> wiki-folder synchronization... Probably with a scheduled workflow and some git actions, but some assistance here is welcome.
I also need to copy over the wiki's content to a wiki folder (Unless you want the scheduled workflow do this on its own) too...

We will probably have a wiki branch explicitly for the wiki. Unlike normal documentation which gets built into the code and javadocs, the wiki is completely separate, so we will treat it like the assets branch.

This effort has been superseded by https://github.com/dv8fromtheworld/jda-website

👍


Create LICENSE

ping @marcellanz @ralphlaude

Apache 2 ist fine for me.

Thank you @marcellanz , please approve the review so we can merge with Master

Sorry :( @sleipnir I missed it

Don't worry @ralphlaude It's fine!


Propose sbt-tpolecat as a Typelevel project

I would like to propose sbt-tpolecat as a Typelevel project.
It's an sbt plugin that is used for setting scala compiler options in order to get the greatest benefit out of the compiler's linting features, originally inspired by @tpolecat's blog posts on the topic. It currently supports Scala 2.11 - 3.1 for sbt 1.x only.
The repo is set up for auto-publishing using sbt-ci-release and generally requires little maintenance. Recently there has been a little more activity as some more features have been added to the plugin to set different scalac option modes.
I hope that it will be useful as part of sbt-typelevel as proposed in typelevel/sbt-typelevel#256.
If accepted, I will need your advice and assistance to transfer the repo into the Typelevel org.

:tada: I've used and appreciated this project for a long time.
To be clear, are you proposing it as a full Typelevel project (i.e., transferred into our GitHub org), or an affiliate project (keep it where it is)?

I'd like to propose it as a full Typelevel project if it is suitable 😀

@typelevel/steering: :+1: on the original comment to approve sbt-tpolecat as a Typelevel project, :-1: to reject, :eyes: to be present.  Vote will close after 72 hours and quorum is reached.

Approved: 7 yes votes is > 3/4 even if everyone else says no.
@DavidGregory084, I think if you initiate a GitHub transfer, one of us will see the request and be able to complete it.
Do we need a separate team from sbt-typelevel / typelevel.g8, or say they're closely enough related to be one team?  I lean toward the latter.

Yes, I was hoping this might join the sbt-typelevel team :) mostly so I can poach @DavidGregory084 who's becoming a regular and valuable sbt-typelevel contributor 😉

OK, I had a go at initiating the transfer but it looks like I may need to be a team member first?

Oh, shoot.  I relearn this every time.  Please accept the org (and team) invite, and try again.  Once it's transferred, an admin can add the repo to the team.

That seems to have worked 🎉


Feature: parent editor should trigger onChange event while nested editor content changed

I listen to the onChange event of parent editor and save content automatically, but while content in nested editor changed, the event isn't triggered.
Is there any to trigger parent editor's onChange event?
Otherwise is it should be implemented in the nested editor composer?

We've thought about this a lot internally and we feel that the current usage of registerUpdateListener should be only for a specific editor. The OnChangePlugin is just a wrapper around this behavior. Would you be happy for the OnChangePlugin to also propagate changes to parent editors that also use the OnChangePlugin too? That could provide a way for bubbling of onChange.

I think this could get confusing very fast, especially if the nested composer can also accept it's own OnChangePlugin child component.  The simplest solutions to me would be to allow both the parent and nested composer accept their own OnChangePlugin and then have them call the same callback with the parent editor state.

I think it should be implemented internally.

If someone implements a decorator node with nested editor, others who use this implementation shouldn't need to know nested editors are used and they only need to face to the single editor.
OnChangePlugin provide editorState as argument for callback function, using multiple OnChangePlugin for nested editors prevent users to use unified callback function.
Methods for example editorState.toJSON get nested editorState automatically, but nested editor changes cannot notice parent editors, it sounds weird.

The code bellow is the callback function I'm using to listen to parent editor change:
function handleChange( editorState: EditorState ): void {
    const json = editorState.toJSON();
    const text = editorState.read( () => $getRoot().getTextContent() );
    onChange?.( { json, text } );
}

and callback code for nested editor:
const [ parentEditor ] = useLexicalComposerContext();

function handleChange(): void => {
    if( parentEditor ) {
        const editorState = parentEditor.getEditorState();
        parentEditor.setEditorState( editorState );
    }
}

Do you think I implemented this in the correct and elegant way?

 The way I posted before destroys sharing history between the parent editor and nested editor.

Hmm also a little confused by this and the best way forward 🤔
To me this stuff makes a lot of sense https://github.com/facebook/lexical/issues/3351#issuecomment-1333869853

Hey @LvChengbin did you find a better way?
I'm currently passing a onUpdateState method down via Context which I call from the child's OnChangePlugin.
At the moment onUpdateState receives the nodeKey and then does
currentEditor.update(() => {
  $getNodeByKey(nodeKey)?.markDirty();
});

This seems to work fine so far and shared history also seems to work properly
Though I guess it should work without Context and just using const [ parentEditor ] = useLexicalComposerContext(); and calling markDirty from within the child

@CanRau Yes, I created a EditorContext and it can store the onChange callback function, so that nested editors can use the same onChange callback.
And then, I made my own SharedHistoryContext for storing a historyState that be shared between root editor and all nested editors.
After that, I created a SharedHistoryPlugin and pass the shared historyState to @lexical/react/LexicalHistoryPlugin by adding externalHistoryState prop.
I'm using<EMAIL_ADDRESS>the methods above resolves most of problems because of using nested editors. But I don't know if my method is bad or not, I'll paste some of my codes here and I hope it can provide you some idea.
SharedHistoryProvider.tsx
import React, { createContext, useContext, useMemo } from 'react';
import { createEmptyHistoryState, HistoryState } from '@lexical/react/LexicalHistoryPlugin';

export interface SharedHistoryContextShape {
    historyState?: HistoryState;
}

const SharedHistoryContext = createContext<SharedHistoryContextShape>( {} );
export const useSharedHistoryContext = () => useContext( SharedHistoryContext );

export interface SharedHistoryProviderProps {
    children: React.ReactNode;
}

export function SharedHistoryProvider( props: SharedHistoryProviderProps ): JSX.Element {
    const { children } = props;

    const value = useMemo( () => {
        return {
            historyState : createEmptyHistoryState()
        };
    }, [] );

    return (
        <SharedHistoryContext.Provider value={value}>
            {children}
        </SharedHistoryContext.Provider>
    );
}

SharedHistoryPlugin
import React from 'react';
import { HistoryState, HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
import { useSharedHistoryContext } from '@fims/www-common/editor/providers/SharedHistoryProvider';

export interface SharedHistoryPluginProps {
    externalHistoryState: HistoryState;
}

export default function SharedHistoryPlugin( props: SharedHistoryPluginProps ): JSX.Element {

    const { historyState } = useSharedHistoryContext();

    return (
        <HistoryPlugin
            externalHistoryState={historyState}
            {...props}
        />
    );
}

Code in NestedEditor
    const [ parentEditor ] = useLexicalComposerContext();
    const { onChange : onChangeContext } = useEditorContext();

    const handleChange = ( editorState: EditorState ): void => {
        if( onChange?.( editorState ) !== false ) {
            const editorState = parentEditor.getEditorState();
            onChangeContext?.( editorState );
        }
    };

Finally getting to finish our new editor and I think I got it working pretty nice thanks to your help 🙏🏼 ❤


delay.durationMilliseconds in pod-complete does not take effect

How to use it?

[X] kwok
[ ] kwokctl --runtime=docker (default runtime)
[ ] kwokctl --runtime=binary
[ ] kwokctl --runtime=nerdctl
[ ] kwokctl --runtime=kind

What happened?
I'm running KWOK v0.5.2 in a cluster.
I deployed a set of stages from stage-fast.yaml.
Then I updated pod-complete by copying kustomize/stage/pod/general/pod-complete.yaml, setting delay.durationMilliseconds to 10000, and deploying it in the cluster.
Then I deploy a job. The job does not have annotation pod-complete.stage.kwok.x-k8s.io/delay
When the job starts, the pods are marked Completed right away:
% k get po
NAME           READY   STATUS      RESTARTS   AGE
job1-0-prkbn   0/1     Completed   0          3s
job1-1-zg6tc   0/1     Completed   0          3s

What did you expect to happen?
IIUC, in the absence of pod-complete.stage.kwok.x-k8s.io/delay annotation, the delay.durationMilliseconds specifies how long the pods should run before changing the status to Completed.
How can we reproduce it (as minimally and precisely as possible)?

Deploy kwok and stages in the cluster

kubectl apply -f https://github.com/kubernetes-sigs/kwok/releases/download/v0.5.2/kwok.yaml
kubectl apply -f https://github.com/kubernetes-sigs/kwok/releases/download/v0.5.2/stage-fast.yaml

Get a copy of pod-complete.yaml

wget https://github.com/kubernetes-sigs/kwok/raw/main/kustomize/stage/pod/general/pod-complete.yaml

Set delay.durationMilliseconds to 10000 in pod-complete.yaml
Update the stage

kubectl apply -f pod-complete.yaml

Create job spec

cat <<EOF > job1.yaml
apiVersion: batch/v1
kind: Job
metadata:
  labels:
    batch.kubernetes.io/job-name: job1
    job-name: job1
  name: job1
  namespace: default
spec:
  backoffLimit: 0
  completionMode: Indexed
  completions: 2
  manualSelector: false
  parallelism: 2
  podReplacementPolicy: TerminatingOrFailed
  suspend: false
  template:
    metadata:
      creationTimestamp: null
      labels:
        batch.kubernetes.io/job-name: job1
        job-name: job1
    spec:
      containers:
      - image: ubuntu
        imagePullPolicy: IfNotPresent
        name: test
        resources:
          limits:
            cpu: 100m
            memory: 512M
            nvidia.com/gpu: "8"
          requests:
            cpu: 100m
            memory: 512M
            nvidia.com/gpu: "8"
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: OnFailure
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
EOF

Deploy the job and check pod status

kubectl apply -f job1.yaml; sleep 1; kubectl get po

Observe that the pods are completed (and not running as I would expect).

Anything else we need to know?
No response
Kwok version
kwok version 0.5.2
OS version

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
On Darwin:
$ uname -a
paste output here
Darwin ds-mlt 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64
On Windows:
C:> wmic os get Caption, Version, BuildNumber, OSArchitecture
paste output here
</details>

Yes, this bug was fixed in #1108, but no release contains it yet.
You can workaround it by deleting delay.durationFrom and delay.jitterDurationFrom.

I removed  delay.durationFrom and delay.jitterDurationFrom from pod-complete.yaml, but it didn't help.
The pod gets completed right away.

I guess I should wait for the next KWOK release and test then.

I tested this scenario with the latest v0.6.0 release, and got the same outcome

I tested it and it worked as expected.
kind create cluster
helm repo add kwok https://kwok.sigs.k8s.io/charts/
helm upgrade --namespace kube-system --install kwok kwok/kwok
helm upgrade --install kwok kwok/stage-fast

wget https://github.com/kubernetes-sigs/kwok/raw/main/kustomize/stage/pod/general/pod-complete.yaml
# Set delay.durationMilliseconds to 10000 in pod-complete.yaml
# Set delay.jitterDurationMilliseconds to 20000 in pod-complete.yaml

kubectl apply -f pod-complete.yaml

# create node and job same with you

# Observe that the pods to complete between 10 and 20 seconds.

Could you explain to me the difference between durationMilliseconds and jitterDurationMilliseconds?
Is this documented somewhere?
I thought the durationMilliseconds is the time the pod is in the running state before switching to "completed", and the jitter is the random value (between 0 and  jitterDurationMilliseconds) added to the durationMilliseconds.

I thought the durationMilliseconds is the time the pod is in the running state before switching to "completed", and the jitter is the random value (between 0 and jitterDurationMilliseconds) added to the durationMilliseconds.

Yes, the initial definition was the same as what you said.
But setting the time for forced deletion of a Pod is the reason for this.
https://github.com/kubernetes-sigs/kwok/blob/35bdf70f89e28b89ace34e4921e590c1169f5cc5/kustomize/stage/pod/general/pod-delete.yaml#L22-L23
FYI .metadata.deletionGracePeriodSeconds is only graceful closing time and is not valid when force delete.
In fact, the definition of the API leaves a lot to be desired, it is planned to introduce CEL as a supplement to JQ.


Fix aria roles for the table component

Move role="grid" from the inner grid to the table and add
role="row" to all table rows. Fixes #606.

This is great! Thanks for taking the time to fix this oversight. 😄


Crashes when using 1-bit grayscale PNG input

Just tested it with the attached image
.
It is an "PNG image data, 619 x 995, 1-bit grayscale, non-interlaced"
The result was a crash
python3 solve.py maze.png solution.bmp
Loading Image
Creating Maze
Node Count: 101050
Time elapsed: 0.5865614414215088

Starting Solve: Breadth first search
Nodes explored:  100926
Path found, length 1461
Time elapsed:  0.14136648178100586

Saving Image
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2195, in fromarray
    mode, rawmode = _fromarray_typemap[typekey]
KeyError: ((1, 1, 3), '|b1')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "solve.py", line 88, in <module>
    img = Image.fromarray(out)
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2198, in fromarray
    raise TypeError("Cannot handle this data type")
TypeError: Cannot handle this data type

It works fine when converting the input to "PNG image data, 619 x 995, 1-bit colormap, non-interlaced"

This issue can be fixed by specifying a uint8 datatype on line 60, which prevents the numpy array being created as a boolean array, which won't work with my RGB code. This causes further problems though, it seems numpy isn't playing well with the 1bpp non-indexed datatype. The solution I found is to replace lines  58-62 with this:
print ("Saving Image");
dt = im.getdata(0);
imout = np.array(dt, dtype=np.uint8).reshape((im.height, im.width));
imout[imout>0] = 255;
out = imout[:,:,np.newaxis];
out = np.repeat(out, 3, axis=2);

Going via the im underlying data seems to play better, but you then have to reshape it, and make sure that any 1s become 255 etc. I probably won't commit this change at the moment, because without further testing I'm not 100% sure it'll work with all other datatypes. There may also be a much more efficient way of doing this, perhaps skipping numpy complete.

I've now adjusted the code to completely avoid numpy, as it isn't necessary here. It should be faster, and doesn't have a problem with 1bpp image types. Hopefully it'll work for you!
Mike

works perfectly fine. Thanks


Switch makeGlue from .mord .rule to .mspace

Fix #1289
I haven't run screenshot tests yet; I'm curious to see whether this messes with anything.

Amazingly, only two screenshots were affected.  Here's the diff:
StrikeThrough:

StrikeThroughColor:

The result of this PR is in green/yellow, with more spaces.  Somewhat easier to see in the Github diff.  I think this shows that the change fixes some spacing bugs, properly treating the + as a binary operator.  One example of the LaTeX source code is \bcancel 5 +\bcancel{5ay}.

@edemaine could you post diff images between the new render and the LaTeX rendering?

I posted it on #1080 where you can compare to the old diff.  I'm afraid it's not much better... but hopefully a step in the right direction.


[Addition]: Hummingbird selfwitnessing cluster

Hotspot b58 Addresses
111SDamKurHrxLBvTacw55AimHraA4YH3QRmLhGMhFZ8sJzVfW2
1121Sd3ehTHgjeHMqtRP2L7WmC32aRsMyDSvpAqxsZk9qZbWPrP
1124CTMBprEsFo1u8mwtE9z5sqBrddMzChNnNTeNA9mejsn4bQ4D
1128v4cxzdXtCJe93pyTuwaU7Ra48XgRHJvX6Ur9PTvY3RWxz8Z9
1129Y13G9XQnng5xbJ3HkcnSXNFRusG9JoXBdJj7naPxeTSXMj2v
112BnF65y7TktWtGUgs73BqhhhpvBfDSEvsd1QtiRMHpK3XbL3he
112Co4FXrTDXAjAkVZR8Pt9SBskU51m3xQKuyxwCG4GzdBKr9cNs
112fWbBc7Wd7MrSvRriGdHXgMyZWLo52DRwvT4EGEtSSq7Svou5v
112P5CPUYaNz7omPcc6Vk3cjFw44FoGfQWyQs1AvYrCKgVbfeY3Y
112qSKzZvT7SDPoch8axg7q6acrBJJjMEHbX5Jbkn9bS3Upq9ERn
112rbDJgzXQqW1efcy5sXjFjpgmqSu4HrAKeXk6T37fNYERpZmE1
112VF2UmBzKUJoF5LFiAsCi8Wsti6FA9472wx8fkAvYTy9ig4LBX
118DACLdrbbkGqKA3ceEWbn62hB8cvmMD2gMzA8CoPLUWNqVTHg
11FEbVC389yVXxqSCMEbB3wHNsoBAsbHD9MZoUfXhJDVYB8Giae
11MiiBWGxZxfo81drJ43obVh6WRyscaswgbTq6dgEH4pdCiKrYT
11pR8mdoYW5YC9q9Dy8DcLwiH2RgHsqdy6aXNfUnT9iD3K93BUL
11Sn1WggtVPLXnQWXYJMmZfMFfgmPMYPo8fQFZW5x7c6jFWbCd3
11tNzH6X7VuwhiAr7R14Nf9DA7eVjfKB842CM2Le4EZnZKnoWqi
11ZZCdVvhAwNScaSKNJY32w1VVq12PVdQqeoK2oso3S4qoRqCHR
Discord Handle
No response
Reason(s)

All but 1 account for all Hummingbird gateway's didn't show any data transfers.
So data transfer is possible! only 109 out of 3853 showed packet transfer data, all these 109 are in same account.
the gateway's in that account are part of a selfwitnessing cluster so they probably all heared the same
signal.

Most of all Hummingbird gateway's witness only Hummingbird gateway's.

We iterated the witnesses of the witnesses to find the clusters.
We used the node-red server we setup for this to get the results out of api.

All HNT stolen with the total amount of 21067 HNT as by todays date/time.

We conclude that out of the 3852 gateway's we inspected only 109 gateway's in 1 account showed accidental
data transfer. so data transfer for gateway's Hummingbird is possible.

We conclude that out of the 3852 gateway's we inspected only a couple of accounts showed communication with other makers. so communication with other makers for Hummingbird gateway's is possible.

Rssi/ distance / SNR calculations are to perfect, we have found some invalids -59 dbm but we suspect they are from cables touching eachother.

We haven't targetted any maker, it was the result of a count WHERE actors1.actor_role = 'witness'
AND actors2.actor_role = 'challengee' are in same account.

Resolved in https://github.com/helium/denylist/pull/4048


[FEATURE] Add HTTP endpoint to manage global variable

This PR is adding two new resources in the backend : GlobalVariable and ProjectVariable. These variables can be then shared and used across different dashboard.
This is something coming up in the discussion https://github.com/perses/perses/discussions/226
For example:
curl -XGET https://perses.dev/api/v1/globalvariables

[
{
  "kind": "GlobalVariable",
  "metadata": {
    "name": "MyList"
  },
  "spec": {
    "kind": "ListVariable",
    "spec": {
      "display": {
        "name": "my awesome variable",
        "hidden": false
      },
      "default_value": [
        "default1",
        "default2"
      ],
      "allow_all_value": false,
      "allow_multiple": true,
      "plugin": {
        "kind": "PrometheusLabelValuesVariable",
        "spec": {
          "label_name": "instance",
          "matchers": [
            "up"
          ]
        }
      }
    }
  }
}
]

It'd be cool someday to have an OpenAPI spec that is always update to with the various REST endpoints in Perses (not sure best lib to use, this one seems popular? https://github.com/go-swagger/go-swagger)
Or even something like a Postman collection that we can commit and share (useful, but hard to keep up to date)

It'd be cool someday to have an OpenAPI spec that is always update to with the various REST endpoints in Perses (not sure best lib to use, this one seems popular? https://github.com/go-swagger/go-swagger)
Or even something like a Postman collection that we can commit and share (useful, but hard to keep up to date)

On the paper it can be a good idea. But in reality, the issue it will result is that the swagger generated from the go code won't contain the full definition of the datamodel (since some piece of it is in cuelang)
So the swagger can provide you the full list of endpoint but with incomplete datamodel which can result of a wrong usage of the API.
So I would be quite cautious to add that.
But if have somewhere the complete data model for the dashboard maybe we could like it in the swagger and that could solve this issue.
So I think the priority would be more to display the complete datamodel in a nice way (maybe interactive way)

It'd be cool someday to have an OpenAPI spec that is always update to with the various REST endpoints in Perses (not sure best lib to use, this one seems popular? https://github.com/go-swagger/go-swagger)
Or even something like a Postman collection that we can commit and share (useful, but hard to keep up to date)

apparently @celian-garcia is trying something internally to generate the swagger in a nice way and it should give some nice result. So probably we will be able to have it here as well :)

but the datamodel will still be incomplete until we are able to generate it in a proper documentation

It'd be cool someday to have an OpenAPI spec that is always update to with the various REST endpoints in Perses (not sure best lib to use, this one seems popular? https://github.com/go-swagger/go-swagger)
Or even something like a Postman collection that we can commit and share (useful, but hard to keep up to date)

@sjcobb @Nexucis What I'm working on in our internal tool is to move from go-swagger to swaggo.
It looks very less verbose because go-swagger forced us to define some structures for the requests/responses data model, and swaggo parse the code a bit better.
Here you have in addition a cuelang datamodel ? That would be complex, maybe we would have to do a cuelang > golang script to port the datamodel in something readable by swaggo or go-swagger
I can try with perses when I'm done with our internal project

I think you shouldn't take care about the partial definition you can have in cuelang.
For the moment having the swagger generated with the partial definition will already be good. Probably we will have to put some warnings in the comment on the plugin.


Update web-sites-security.md

Just changed a typo on the text

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@johntallon : Thanks for your contribution to the Azure documentation! The author, @cephalin, has been notified to review your proposed change.

@johntallon Thanks for the catch and for taking your time to fix it!
#sign-off


CB-2937. Storage location parameter is missing for S3 for SDX

Storage location missing from SDX telemetry request

I'm validating the fix. If it's working it's working I'm merging.


OC Updates

The last supported rule set is for OpenCore 0.6.6. The official OC release is now on 0.7.0. Are rule sets for: 0.6.7, 0.6.8, 0.6.9, & 0.7.0 and beyond going to be added here?

Unless someone contributes them, nope. I haven't booted my Mac partition in 6+ months.

Gotcha. I have a coffeelake machine I can test against. I might throw up some PR's with updates then.


Add Documentation

Need to add documentation to explain what is available and how the gofer Engine is expected to be utilized.

fixed with #18


chore: release 0.23.3

:robot: I have created a release *beep* *boop*
0.23.3 (2022-05-18)
Bug Fixes

Update getIndexHash.ts to support mdx and traverseAll (#172) (717942e)

This PR was generated with Release Please. See documentation.

Coverage remained the same at 75.929% when pulling a966e939392aa5ce3c814cbd122a06f442556eb9 on release-v0.23.3 into 717942e9caf36e37a0f119d9fdaa50e591339d9c on master.

:robot: Release is at https://github.com/easyops-cn/docusaurus-search-local/releases/tag/v0.23.3 :sunflower:


Bug: inner view with flex: 1 collapses its size to 0

Describe the bug
When flex: 1 is added to an inner view inside the carousel, its size will be collapsed to 0.
To Reproduce
Repro in https://github.com/dohooo/react-native-reanimated-carousel/pull/211
Expected behavior
Size should not collapse, or docs should reflect to not use flex: 1.
Screenshots
With flex: 1:

Without flex: 1:

Versions (please complete the following information):
This bug is visible in current master. See repro in #211

Thank you for the tip, but I don't think it's a problem. You can modify the display of the item container so that, in this case, the height of Part 3 is equal to 0 because part 2 is too high, and if you set the max-height style to part 2, the part 3 will look fine.
And you can take <Item/> out of Carousel and put them anywhere, Then it turns out that they're the same, so I don't think this has anything to do with Carousel.

Or maybe I don't understand what you're saying and would love to hear more. Thanks 🍺

I had the same issue and replacing flex: 1 with flexGrow:1 fixed it for me.

Using the same layout implementation and works fine. flex: 1 instead flexGrow:1 works fine. but this is a related behavior with the element inside  and not the Carousel itself and can be solved modifying the display attribute of the item container.

Hey @oliverloops, could you expand on your answer above?
I have a component that I use both inside and outside of a react-native-reanimated-carousel.  When it's inside the carousel, the text gets collapsed as described in this ticket.  When outside the component, it works fine.
I tried Toastbroad's solution of changing flex: 1 to flexGrow: 1, and that fixed it inside the carousel.  But then the component outside the carousel grows way too large.
I think you are on to something with recommending that we change the display attribute.  But could you elaborate a bit more?  According to the react-native docs, the default for display is "flex", which is what I want.  I don't see any change in behavior when I explicitly set display: flex in the containing View.  What did you have in mind when you susgested this solution?
Thanks for your help!


Should look for components in "global"

If a component is defined as eg. global.Foo = React.createClass({}), @Html.Render("Foo") should work.

Agreed. Closing until someone decides to work on it. #655


transform.asorder

asorder purports to return a lower-order approximation to the transform. But, I don't understand the inequality in the comment:
    def asorder(self, order):
        '''return polynomial transform appoximation of this
        transformation with a lower order
        Parameters
        ----------
        order :int
            desired order (must have order> current order)

the inequality, as stated, is borne out in the code and in execution:
In [372]: dataString="5 21 1097.247 28.6749 43.898613 1074.2554 -23.155064 -12.302473 -70.30248 -30.481813 -24.969091 21.843176 15.100959 -2
     ...: 3.026983 23.979826 26.704914 26.837425 -5.509565 -19.995092 -4.5267982 -11.818358 16.521313 -5.078042 10.69085 -5.6905785 -24.6838
     ...: 28 -4.5936995 6.674374 32.708683 -0.30214775 4.539854 -5.537266 0.55994344 -7.1412635 1.5375459 2.129612 0.062374976 14.249251 4.2
     ...: 018485 -9.741431 -13.300788 3.076742 21.640059 20.220472 2163.99 2022.0435 5811704.5 4355954.0 5250765.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0
     ...: .0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0 1.7203682E+17
     ...: 1.08485686E+17 9.082835E+16 8.869903E+16 1.005471E+17 1.4801536E+17 100.0 1062.4891 1078.0247 4421744.5 3410606.0 4341023.5 166007
     ...: 64000.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>00
     ...: 00.0 2.219938E+17 1.5453315E+17 1.39467716E+17 1.3868206E+17 1.5142969E+17 2.0996826E+17 0.0 3840 3840"

In [373]: t0=renderapi.transform.Polynomial2DTransform(dataString=dataString)

In [374]: t0.order
Out[374]: 7

trying to go to order 6:
In [375]: t0.asorder(6)
---------------------------------------------------------------------------
ConversionError                           Traceback (most recent call last)
<ipython-input-375-e96751d60c5c> in <module>()
----> 1 t0.asorder(6)

/home/danielk/anaconda2/envs/emtest/lib/python2.7/site-packages/renderapi/transform.pyc in asorder(self, order)
   1335                 'transformation {} is order {} -- conversion to '
   1336                 'order {} not supported'.format(
-> 1337                     self.dataString, self.order, order))
   1338         new_params = np.zeros([2, self.coefficients(order) // 2])
   1339         new_params[:self.params.shape[0], :self.params.shape[1]] = self.params

ConversionError: transformation 5.0 21.0 1097.247 28.6749 43.898613 1074.2554 -23.155064 -12.302473 -70.30248 -30.481813 -24.969091 21.843176 15.100959 -23.026983 23.979826 26.704914 26.837425 -5.509565 -19.995092 -4.5267982 -11.818358 16.521313 -5.078042 10.69085 -5.6905785 -24.683828 -4.5936995 6.674374 32.708683 -0.30214775 4.539854 -5.537266 0.55994344 -7.1412635 1.5375459 2.129612 0.062374976 14.249251 4.2018485 -9.741431 -13.300788 3.076742 21.640059 20.220472 2163.99 2022.0435 5811704.5 4355954.0 5250765.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0 1.7203682E+17 1.08485686E+17 9.082835E+16 8.869903E+16 1.005471E+17 1.4801536E+17 100.0 1062.4891 1078.0247 4421744.5 3410606.0 4341023.5<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0 2.219938E+17 1.5453315E+17 1.39467716E+17 1.3868206E+17 1.5142969E+17 2.0996826E+17 0.0 3840.0 3840.0 is order 7 -- conversion to order 6 not supported

trying to go to order 8 (doesn't make sense to me, why would you do this?):
In [377]: t0.asorder(8)
Out[377]:
className:mpicbg.trakem2.transform.PolynomialTransform2D
dataString:5.0 21.0 1097.247 28.6749 43.898613 1074.2554 -23.155064 -12.302473 -70.30248 -30.481813 -24.969091 21.843176 15.100959 -23.026983 23.979826 26.704914 26.837425 -5.509565 -19.995092 -4.5267982 -11.818358 16.521313 -5.078042 10.69085 -5.6905785 -24.683828 -4.5936995 6.674374 32.708683 -0.30214775 4.539854 -5.537266 0.55994344 -7.1412635 1.5375459 2.129612 0.062374976 14.249251 4.2018485 -9.741431 -13.300788 3.076742 21.640059 20.220472 0.0 2163.99 2022.0435 5811704.5 4355954.0 5250765.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0 1.7203682E+17 1.08485686E+17 9.082835E+16 8.869903E+16 1.005471E+17 1.4801536E+17 100.0 1062.4891 1078.0247 4421744.5 3410606.0 4341023.5<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0<PHONE_NUMBER>0000.0 2.219938E+17 1.5453315E+17 1.39467716E+17 1.3868206E+17 1.5142969E+17 2.0996826E+17 0.0 3840.0 3840.0 0.0
``

So, the issue is, either I misunderstand, or the inequality limit is in the wrong direction. If I had a 7th order polynomial, I would expect to approximate it with a lower order, not with a higher order.

@djkapner this was never really implemented in any useful way and I think is only used really used for describing affines as higher-order polynomials (which, as you point out, you can do... but why?).
I was uncomfortable lobbing off higher order parts of the polynomial, but it could definitely be done with, e.g.:
newtform = renderapi.transform.Polynomial2DTransform(params=t0.params[:, t0.coefficients(new_order) // 2])

got it, also you solved my immediate problem in a different way.


Update Composer dependencies (2023-03-11-00-10)

Visual regression test passed!
View the visual regression test report


Fetch timing out for large queries on 1.1.2

I am getting the bellow error when doing a large query in our new graphite instance
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/graphite/webapp/graphite/render/views.py", line 117, in renderView
    data.extend(evaluateTarget(requestContext, targets))
  File "/graphite/webapp/graphite/render/evaluator.py", line 15, in evaluateTarget
    prefetchData(requestContext, pathExpressions)
  File "/graphite/webapp/graphite/render/datalib.py", line 257, in prefetchData
    for result in STORE.fetch(pathExpressions, startTime, endTime, now, requestContext):
  File "/graphite/webapp/graphite/storage.py", line 179, in fetch
    'fetch for %s' % str(patterns))
  File "/graphite/webapp/graphite/storage.py", line 121, in wait_jobs
    raise Exception(message)
Exception: Timed out after 6.000316s for fetch for [u'Devices.USA.*.*.*.*.*.*_device_status']

</pre>
</div>

</center>

This is only happening on 1.1.2 , I have another graphite instances running under 0.9.13 and I can run the query on without any issue, the query returns values for 8k+ metrics.
When eliminating the wildcards to get ~1000 metrics, the query runs smoothly
tried to increase the CARBONLINK_TIMEOUT to 10 but no luck.
Any ideas ?

You need to increase fetch timeout instead. In latest Graphite variable named FETCH_TIMEOUT but probably in 1.1.2 it's still named REMOTE_FETCH_TIMEOUT.

This is interesting work, it's been a while now but I seem to recall doing benchmarking at the time that didn't show anything like a 500x slowdown.  If you can share your benchmarking setup I'd be keen to see if we can figure out what's going on and whether there's a way to have the best of both worlds.

@deniszh changing that FETCH_TIMEOUT to 10 resolved the issue. I started by setting USE_WORKER_POOL to False based on #2192 and that solved initially it as well. Had it back to True based on @DanCech recommendations in #2192.
Appreciate the help guys. gonna go ahead and close this one. Issue has been resolved.


Hardcode test identityIDs for test token generation

When test tokens are generated in dev mode, the tokens are generated locally - hence Auth service is unaware of the new identities/users generated/persisted in WIT as part of the /api/login/generate

This causes the /api/users workflows to fail since they get proxied to Auth who as per (1) is not aware of  the users. Hence, returns an empty result.

This PR ensures that during /api/login/generate , WIT creates local identities, and also generated tokens from Auth service.

This ensures that both services are now aware of the identities just created.

@sbose78 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1732-1

Codecov Report

Merging #1732 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #1732      +/-   ##
==========================================
- Coverage    56.9%   56.88%   -0.02%
==========================================
  Files         128      128
  Lines       14910    14920      +10
==========================================
+ Hits         8484     8487       +3
- Misses       5747     5756       +9
+ Partials      679      677       -2

Impacted Files
Coverage Δ

controller/login.go
11.62% <0%> (-1.53%)
:arrow_down:

controller/workitem.go
80.73% <0%> (+0.58%)
:arrow_up:

Continue to review full report at Codecov.

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

@alexeykazakov Yeah.
Additionally we need to store the identity/user info locally which doesn't happen if just the proxy is called - hence the quick fix with IDs :)
Options apart from my quick fix -

We could read the token from the proxy response, and use them to create the local identities in WIT. ( but user id in Auth wont match userID in WIT )
We could make a User API call to Auth to get the user/identity info and persist them.

I think we should just proxy token generation to Auth and Auth should call WIT when a local user/identity is created.

Replaced by https://github.com/fabric8-services/fabric8-wit/pull/1752


Solved:#issue 414

I have solved issue #414 - To print the occurrence of the given number in the list/array using Binary Search Technique in C.
I have updated the README file.

Have you read the Contributing Guidelines on Pull Requests?
Yes
Description
(Write your answer here.)
Checklist

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

Related Issues or Pull Requests
(Write your answer here.)

@Kajol-Kumari @SKAUL05 @Abhijit2505 @plazzy99 @siddharth25pandey
Could you please review my pull request ?

@all-contributors please add @Surajv311 for code


We have removed this restriction. Please check out the code at head, or in the upcoming 1.4 RC. Please reopen if there are issues with it.

Originally posted by @martinwicke in https://github.com/tensorflow/tensorflow/issues/12367#issuecomment-335320352

@jg577 You can use SignatureDefs to get around the restriction, refer to [SignatureDefs in SaveModel for TensorFlow Serving](https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/signature_defs.md for more details.

Closing, feel free to reopen if problem persists.


FR: Firebase Analytics Server Side

My Environment:

Operating System version: Any
Firebase SDK version: Any
Library version: Latest
Firebase Product: analytics

Please provide Firebase analytics Api for server side. We would like to give a decision right now and being limited on client side is unfortunately not acceptable.

What features would you like to see in a server-side analytics API? Client SDKs primarily support logging analytics events. I don't think there's a use case to support that server-side.

I would like to use firebase analytics as a marketing automation tool. My primary purpose is forwarding all events in our system to firebase and using its audience feature.
I want to do this in server side because it has major advantages.

Instead of implementing firebase in multiple client, I can implement in a single server and maintain it.
Accuracy of data in client sides are usually problematic.

I believe that it has great potential in server side as well.

Just to clarify,
A user does something which you log on your server, you are looking for a way for the server to log the event as the user (would you be passing user specific event attributes? (e.g. user-agent)).
is that it?

@avishalom the scenario you are describing is exactly valid. You can consider our server as an agent.

We have the same problem in cloud functions. The cloud function reacts to the client doing something and needs to log an event to analytics on behalf of that user. We don't want to give the client access to the data necessary to log such an event though.
It's the same use cases and motivate:
https://developers.google.com/analytics/devguides/collection/protocol/v1/

I'd like to use Firebase Analytics for a similar use case Sending custom Analytics directly from my Java app.
It looks like this should be possible using the Java implementation defined for Android since I'm using gradle to compile my Java Server App.
Also, it might be a better idea to integrate your Firebase project directly to BigQuery to parse through the data. From there, it looks like you may be able to visualize it with BigQuery as well.

Any updates on this feature, or documentation on doing it ourselves (via REST API for example)? I'm rather surprised this isn't a use-case covered by the core library. In server-authoritative applications, there are many use-cases where analytics events are emitted by the server, and not available to the client. In order to have a complete data-set we need to be able to emit analytics events server-to-server.

Is there any solution here? Is there some way to use BigQuery perhaps?

Please upvote issue as well

For what it's worth, I don't see this happening anytime soon. Google simply doesn't support server side analytics, firebase analytics is exclusively for apps.
Right now I've imported my data into bigquery and am working on adding server side integration with my bigquery table. With this, I should be able to use bq to query data and later use datastudio to display it. I found this video helpful: https://www.youtube.com/watch?v=Ki_F6VCOtXU

Is still there an option to add Firebase Analytics on the server side?

Hey, folks. I'll just chime in to say this is a feature request the Analytics team has certainly heard from customers, and it's something they're looking into, but as usual I can't share any specific plans or roadmap or anything.
Right now, probably your best option would be to import your analytics data from Google Analytics for Firebase into BigQuery and then combine that with any other data you might be generating server-side, kinda like what @namanyayg mentioned.

@ToddKerpelman This is great. I think that this API is already implemented for mobile devices. In order to send events by mobile devices there must be an API for this purpose. I feel that the API needs to be officially documented and publicly available for server side.

Is there any update on this or a link to a custom solution?
Ideally I want to be able to update user properties in firebase analytics from server side, so I can filter by them later when using other firebase services e.g. FCM

We also need this.

There is an important use case for games with IAP as any client-side information is going to be unreliable. Having the event logged in server-side make it a bit more reliable.

Many things happen server-side (e.g. events happening when the user is offline). Without such a simple feature, it's impossible to target the right users. This fact forces us think towards other solutions on the market :(

This is crucial for our solution as well. Please consider a fix ;-)

It is now possible to add an Analytics label to messages. Does that mean this FR can now be implemented?

@ToddKerpelman, Is there any update on this?

It is now possible to add an Analytics label to messages. Does that mean this FR can now be implemented?

Looks like it has some limitations. Do you recommend for general logging from Firebase functions?

@ToddKerpelman  I consulting Firebase analytics with the clients and its common problem :/ I was thinking about solution and maybe create few standard events (or it will be a new type of standard events) which can have permission to connect with server-side. Two cases that I have in my mind are 1. mobile app with subscription model
2. mobile app like a uber where clients don't need to have an open app after they finished their trip.
I'm not programmer but marketer so sry if my thoughts are totally wrong ;)

Looks like there're server-side reporting already which is used to report app_store_* events.
They are not exported to BigQuery and do not have any standard properties (user_id, device, ...) comparing to any other events. Here is my SO question about it: https://stackoverflow.com/questions/58300435/app-store-subscription-events-are-not-exported-to-bigquery

Oh, you gotta be joking. There's in-app subscription events happening, which is related directly to client app, but can only be reliably detected on server side. Such as users being charged on monthly basis, trial periods, introductional periods, etc. So there is no way (apart from using a billion other tools) to directly send these events to Firebase? All analytics tools support this...

We also need this.

I am a little surprised that this also was not ported over from old analytics - absolutely need this for server side event logging out of things happening in the database into user lifecycles...
For us especially it would also be crucial in order to get some events as conversions into ads...

Can anyone share what kind of workflow (alternatives) they have to handle this missing feature?

Updates about this feature?
This would be extremely helpful if you want gather all your analytics in one place.

Please, consider adding support for Firebase Analytics in the server

A pretty good work around here would be to have an intermediate Firebase cloud function that will route all the events to your data pipeline system like kafka or another rpc. This way you can get the event (append client side firebase token in your events list) on your backend and then trigger push notifications to that client.

Client sides analytics are being blocked more and more nowadays. All our users using Brave will simply block everything and Brave is one of the most used browsers in our business niche.

Same here, it's been a feature we've been looking for for years. Server side logging is more reliable and the server posseses info that you want to include in the logging that is not available on the client side.

We also need this

2 years later and google still ignores this need.
i have several payment gateways in order to process users purchases in my apps.
i use firebase functions as backend to process payment status changes (ipn)
once the payment is approved i would like very much to log an event of 'purchase'
the current analytics archtecture forces me to log a purchase in the client side, before it has been approved
or create a frankenstein of services in order to push notification back to user and then log the event

Google Analytics is an integration. Firebase doesn't build or control the functionality. When server APIs become available for Analytics, they can be added to the SDKs. The feature request has been communicated (not ignored) and will be prioritized relative to other major feature work by the Analytics team. 2 years isn't a bad timeline for major feature development on platforms operating at scale.


Add missing Prometheus metrics "srt_conns_bytes_{received,sent}"

Describe the feature
MediaMTX provides Prometheus metrics for HLS, RTSP, RTMP and WebRTC, but unfortunately not for SRT. Could you please add the two missing metrics "srt_conns_bytes_received" and "srt_conns_bytes_sent"? Many thanks.

In the above referenced pull request I added the missing exporters.


Table header border client style is not reset

Bootstrap does not reset the borders of table headers and table cells.
Which results in inconsistent tables across different browsers.
Example: http://www.bootply.com/q1jvO9muGx  (First table contains the "fix")
Is it correct that the client style does not get reset or is it a bug?
If it’s a bug, adding the following style to the _normalize.scss file would fix the problem:
// Line 421
td,
th {
    padding: 0;
    // New
    border: none;
}

Non-Sass-specific issues should be filed against the upstream vanilla Bootstrap project (https://github.com/twbs/bootstrap ) instead. Thanks.


README.md is listed as a cheat

A description of the problem
In my personal cheat repository, some files that aren't cheats are also being listed as cheats. One of this is the README.md.
cheat version info
4.1.1
cheat configuration info

Output of cheat -d
community: /Users/kapad/dotfiles/shell/plugins/cheatsheets
personal:  /Users/kapad/dotfiles/shell/plugins/cheats

Output of ls -1 -A /Users/kapad/dotfiles/shell/plugins/cheats

.git
LICENSE
README.md

This could also be considered a feature for adding a support for an ignore file or something on those lines. I can reclassify accordingly if you think it should be.

Hi, @kapad
As best as I can tell the cheat "installer" doesn't create any cheatsheets by default in your personal cheatpath. (It creates the directory, but does not create any files therein.)
Question: do you know how those files got there? Did the installer somehow create those automatically?
If not, they can simply be removed. cheat itself does not require (or expect) these files to be there.

I added the README.md file myself. And also a LICENSE file. I think for cheat to load every single file in my repo isn't ideal.
The repo that I created for my own cheats got an autocreated README.md and a LICENSE file. The issue is that these files are also loaded as cheats.
I haven't verified with the code, but after some tests I think the only files and directories that are not loaded as cheats are those starting with ..
This issue may be incorrectly reported as a bug. Should I reclassify as a feature/enhancement?

Oh, I see.
Yeah, this is just fundamental to how cheat works - every file within a directory that's specified as a cheatpath will be considered  a cheatsheet, by definition. You can either just delete the readme and license if you don't care about them, or simply move your cheatsheets into a subdirectory of your repository.


Symfony 5.4 -> 6.4 upgrade problems

Hello
I am in the process of upgrading from Symfony 5.4 to 6.4 and I'm stuck on Lexik:

requiring security.authentication.manager Service that is no longer there. What am I doing wrong? I am using latest stable version - 2.20.3. LexikJWTAuthenticationExtension is loading the deprecated_51.xml file that contains a Service lexik_jwt_authentication.security.authentication.listener, which in turn requires security.authentication.manager that has been removed in Symfony 6.0. I don't see any logic that prevents this from happening. How can this version be compatible with Symfony 6.x?

After (temporarily) commenting out the above service definition in the `deprecated_51.xml' file, I am facing another error:
Class "Symfony\Component\Security\Guard\AuthenticatorInterface" not found while loading "Lexik\Bundle\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator".

From what I can see, the security-guard package is not available for Symfony 6.4. How to proceed? Because either I am doing something terribly wrong, or the 2.20.3 version is not compatible with Symfony 6.

OK I've changed the composer to require ^3.x-dev version, now it doesn't throw errors. I just have one question: why on earth the README for 2.20.3 states that It is compatible (and tested) with PHP 7.1+ on Symfony 4.x, 5.x, 6.x and 7.x.? This is extremely misleading.

Hi,
This is compatible with the given versions of php and SF. I am with SF6.4, PHP 8.3 and JWT 2.20.3 and it works properly.
You may have missed this part of an upgrade : https://github.com/lexik/LexikJWTAuthenticationBundle/blob/3.x/UPGRADE-2.0.md especially the listener section (latest item of the removed options in the configuration section)

The thing is that I was not upgrading Lexik from 1.x to 2.x. I was on 2.20.3 and I've just bumped Symfony from 5.4 to 6.4. I don't want to argue or be disrespectful, but frankly I don't understand how 2.20.3 can possibly be compatible with 6.4, when:

JWTTokenAuthenticator is based on Symfony Guard, that is not in 6.4 (it has been comptely removed)
JWTListener has a dependency on non-existing Service (security.authentication.manager) and a removed Interface/API (Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface)

Please help me understand how can this work?

Hi,
The bundle is compatible with both SF version but it requires to update your configuration to target right authenticator, handler, listener.
Based on the error you provide, it seems a configuration has not been updated on security side. The authentication listener is deprecated, still there to be able to work with SF5.4. The services have been updated to work with SF6.4 but it requires to update your symfony configuration accordingly.
You can rollback your symfony version to 5.4, setup some tests on your authentication endpoint and look at what is marked as deprecated and update the configuration.

Can you point me in the general direction that prevents Lexik from loading the deprecated Services? I've gone through the migration documents couple of times and still can't get rid of the error. Digging through the source files I can see that the authentication_listener config value has a default of deprecated lexik_jwt_authentication.security.authentication.listener and there is no piece of documentation I can find that tells what should this be set in Symfony 6.4.  This Listener is dependant on a Service that no longer exists in 5.4.

This loads the deprecated services. So nothing should prevent the service loading. The service is loaded but the services it depends on (security.authentication.manager) does not exist on SF6.4.
The only thing I can think of is the migration guide I pointed earlier: no listener are required now as this is part of the authenticator role. Maybe your code uses the service too.
If you need to have a listener, you should look at the lexik_jwt_authentication.on_jwt_created event (Event::JWT_CREATED) or maybe some other events depending on your needs.

The thig is I'm not using any listeners, just plain vanilla config. The fact that
The service is loaded but the services it depends on (security.authentication.manager) does not exist on SF6.4

causes the Symfony's CheckExceptionOnInvalidReferenceBehaviorPass to throw an error during the cache warmup/containter building. I understand Symfony's behavior, I don't understand why the service is being loaded unconditionally in the first place. Why not use the logic similar to the one in LexikJWTAuthenticationBundle and load the services only if a specific version of Symfony is detected?
Same goes for $loader->load('guard_authenticator.xml'); - this also causes an error:
 Class "Symfony\Component\Security\Guard\AuthenticatorInterface" not found while loading "Lexik\Bundle\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator".

I'm not explicitly using those services anywhere, but they are being loaded while the Container is being built and the whole thing collapses.

JWTTokenAuthenticator is based on Symfony Guard, that is not in 6.4 (it has been completely removed)

https://github.com/lexik/LexikJWTAuthenticationBundle/blob/v2.20.3/Security/Authenticator/JWTAuthenticator.php is what you're looking for I think.JWTListener is deprecated as per the deprecation of authentication listeners in symfony/core (removed in favor of the new authenticator manager system in Symfony 7). Please double-check the docs for the right services to use while upgrading.

Same goes for $loader->load('guard_authenticator.xml'); - this also causes an error:

This call as well all Guard-related logics are disabled depending on the installed version of symfony/security-*.  That is covered through automated tests (see CI).

Sorry for being a pain in the butt, but can you point me to the code that is responsible for conditional loading of this call? Because all I can see is this straightforward load of the guard_authenticator.xml in the LexikJWTAuthenticationExtension class.
Same goes for the deprecated services here.


Voiding + Timewaste when Getting Endstone to Stack up to Endpillars

Steps to Reproduce (as best as you can)
If the Bot reaches the End and Fails to onecycle the Dragon it trys to get the towers. At the Moment it runs out of Blocks it mines Endstone.
Expected Behavior
Mining Endstone picking up the Items to get Blocks and continue getting Towers
Actual Behavior
doesnt Collect the Items and can fall into the void because its only mining blocks in its reach (slowly mining down)
(you may drag + drop text logs and images here, thanks GitHub)
Developer Notes (leave this blank)
Difficulty: __
Estimated Time Required: __
Once development starts.

Dragon perched for a pretty short time and the bot didnt manage to place beds fast enough, was left with 2 beds and the dragon stopped perching and healed

sorry, misclicked

Should be fixed by https://github.com/MiranCZ/altoclef/commit/b1201b6034d5adef4e7864dc075b4b4c19fd85c0