Issue with omniauth-oauth2

"There was an error while trying to load the gem 'omniauth-oauth2'. (Bundler::GemRequireError)"
Gem Load Error is: private method warn' called for nil:NilClass Backtrace for gem load error is: ....../vendor/bundle/ruby/2.2.0/gems/hashie-3.5.2/lib/hashie/mash.rb:334:in log_built_in_message'
Locked hashie gem back to 3.5.1 and it fixed it.

I tried to reproduce this in https://github.com/intridea/hashie/pull/402, but wasn't successful.
Which versions of omniauth-oauth2 are you using? Is this in Rails?

Also, what version of Omniauth? The recent 1.4.1 version should fix this issue.

@michaelherold I get it with 1.4.1
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'omniauth-facebook'.
Gem Load Error is: private method `warn' called for nil:NilClass
Backtrace for gem load error is:
/home/rof/cache/bundler/ruby/2.4.0/gems/hashie-3.5.2/lib/hashie/mash.rb:334:in `log_built_in_message'
/home/rof/cache/bundler/ruby/2.4.0/gems/hashie-3.5.2/lib/hashie/mash.rb:139:in `custom_writer'
/home/rof/cache/bundler/ruby/2.4.0/gems/hashie-3.5.2/lib/hashie/mash.rb:207:in `block in deep_update'
/home/rof/cache/bundler/ruby/2.4.0/gems/hashie-3.5.2/lib/hashie/mash.rb:200:in `each_pair'
/home/rof/cache/bundler/ruby/2.4.0/gems/hashie-3.5.2/lib/hashie/mash.rb:200:in `deep_update'
/home/rof/cache/bundler/ruby/2.4.0/gems/hashie-3.5.2/lib/hashie/mash.rb:115:in `initialize'
/home/rof/cache/bundler/ruby/2.4.0/gems/omniauth-1.4.1/lib/omniauth/auth_hash.rb:24:in `new'
/home/rof/cache/bundler/ruby/2.4.0/gems/omniauth-1.4.1/lib/omniauth/auth_hash.rb:24:in `regular_writer'
/home/rof/cache/bundler/ruby/2.4.0/gems/hashie-3.5.2/lib/hashie/mash.rb:140:in `custom_writer'
/home/rof/cache/bundler/ruby/2.4.0/gems/hashie-3.5.2/lib/hashie/mash.rb:207:in `block in deep_update'
/home/rof/cache/bundler/ruby/2.4.0/gems/hashie-3.5.2/lib/hashie/mash.rb:200:in `each_pair'
/home/rof/cache/bundler/ruby/2.4.0/gems/hashie-3.5.2/lib/hashie/mash.rb:200:in `deep_update'
/home/rof/cache/bundler/ruby/2.4.0/gems/hashie-3.5.2/lib/hashie/mash.rb:115:in `initialize'
/home/rof/cache/bundler/ruby/2.4.0/gems/omniauth-1.4.1/lib/omniauth.rb:45:in `new'
/home/rof/cache/bundler/ruby/2.4.0/gems/omniauth-1.4.1/lib/omniauth.rb:45:in `defaults'
/home/rof/cache/bundler/ruby/2.4.0/gems/omniauth-1.4.1/lib/omniauth.rb:50:in `initialize'
/home/rof/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/singleton.rb:142:in `new'
/home/rof/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/singleton.rb:142:in `block in instance'
/home/rof/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/singleton.rb:140:in `synchronize'
/home/rof/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/singleton.rb:140:in `instance'
/home/rof/cache/bundler/ruby/2.4.0/gems/omniauth-1.4.1/lib/omniauth.rb:119:in `config'
/home/rof/cache/bundler/ruby/2.4.0/gems/omniauth-oauth2-1.4.0/lib/omniauth/strategies/oauth2.rb:127:in `<top (required)>'

oauth2 (1.3.0)
  faraday (>= 0.8, < 0.11)
  jwt (~> 1.0)
  multi_json (~> 1.3)
  multi_xml (~> 0.5)
  rack (>= 1.2, < 3)
omniauth (1.4.1)
  hashie (>= 1.2, < 3.5.2)
  rack (>= 1.0, < 3)
omniauth-google-oauth2 (0.4.1)
  jwt (~> 1.5.2)
  multi_json (~> 1.3)
  omniauth (>= 1.1.1)
  omniauth-oauth2 (>= 1.3.1)
omniauth-oauth2 (1.3.1)
  oauth2 (~> 1.0)
  omniauth (~> 1.2)

This is Rails <IP_ADDRESS>

@matthewrudy Are you in a Rails app or a plain old Rack app?

@JimW Can you try bumping up to 3.5.2 and see if the problem persists for you?

@michaelherold it's rails 5.0.1 with a few extra bits
gem 'rails', '~> 5.0.0', github: 'rails/rails',
                         branch: '5-0-stable',
                         ref: '4d9c591a91c3' # January 2nd 2017

@michaelherold the only omniauth configuration I have is via devise
config.omniauth :facebook, Settings.facebook.key, Settings.facebook.secret

Hmm ...
@matthewrudy Can you open a Rails console and see what Hashie.logger returns? Also, do you have an entry for Hashie in your Gemfile at all?

@michaelherold this seems minimal enough to break it without any of my app code.
bundle exec irb
2.4.0 :001 > require 'rails/all'
re => true
2.4.0 :002 > require 'omniauth-facebook'
NoMethodError: private method `warn' called for nil:NilClass

@michaelherold I had locked it manually to < 3.5.2 to get around the error.  3.5.2 caused the error that I reported.

@matthewrudy Thank you, I'll see what I can find with that.
@JimW Gotcha, sorry about that.

@michaelherold I think simply at that time in the boot cycle ::Rails is defined, but there is no Rails.logger assigned
So I think log_built_in_message needs to just deal with a nil logger
https://github.com/intridea/hashie/blob/a5906620a3cdff499aea556da6eefdf0de8e5138/lib/hashie/mash.rb#L334

@michaelherold or, probably better
register a rails initializer that sets the logger on boot
rather than detecting ::Rails

That's definitely it. Nice debugging!

@michaelherold active_model_serializers actually does this exact same thing
https://github.com/rails-api/active_model_serializers/blob/master/lib/active_model_serializers/railtie.rb#L27

I'm trying to put something together but it sounds like you have a good handle on it. Would you be able to put together a PR with a Railtie that handles setting the logger?

@matthewrudy @michaelherold , I appreciate you guys ripping through that, I have the same problem. Is there any chance you can give us a snippet and where to put it,  Not sure how to implement your fix. Thanks.

@michaelherold @justinmalone just working on it.

Please try to modify #402 to fail in the same way so that we can have a reliable test for the future.

@dblock fair enough.

I've got a failing test. I'll push it up.

@michaelherold cool
I think my fix is good to go #403
hope it passes your test.


Use TooltipWrapper for icon buttons

📝 Provide a description of the new feature
Any buttons that don't have any text/description should be good imo (Settings/Color Schemes/Install/Remove/etc.)
➕ Additional Information
Just not 100% sure about implementing since if the hook breaks, it'll break Marketplace.

I mean we can make our own component that does conditional checks.
If the component is hooked, pass the button as a child to the Tooltip component and return the TooltipWrapper element.
If it doesn't then just return the child element.

I like that idea 👍

Did we get anywhere on this? I know we added the wrapper component, right?

Did we get anywhere on this? I know we added the wrapper component, right?

Charlie used it for his album color extract thing before and all is good so far so we can work on this whenever.


python3Packages.python-gammu: 3.1 -> 3.2.2

Motivation for this change
Update to latest upstream release 3.2.2
Change log:
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

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

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 133837 run on x86_64-linux 1

2 packages built:

python38Packages.python-gammu
python39Packages.python-gammu

Result of nixpkgs-review pr 133837 at 81c234ea run on aarch64-linux 1

2 packages built successfully:

python38Packages.python-gammu
python39Packages.python-gammu


inbox style should return array of notifications object not last notification

hi,
First thank u for this awesome Plugin.
when i send notifications with inbox style and tap on them,   push.on('notification', callBack(data)) return just last notification object.
I think it should be array of notifications object not just last.
Tnx in advance.

+1
There are two approaches, to return always an array of notifications on the onNotification callback or call it multiple times for each item in the cached notification list.
Regarding that list that following the current approach would be stored in memory, I thought of storing it in sqlite, is it there any other place to potentially store those cached notifications?

If you're talking about web code (not native), you can also use localstorage as it's more widely supported than sqlite. Now, if you meant native code, you can use whatever storage android/ios has available, although third party dependencies are avoided.

Thanks @fredgalvao, will try to submit a pull request for the in memory array caching first and then investigate the native storage options without using any third party dependencies.

The cache of these notifications is already done in memory, check this HashMap.

Yes but I think the same should be done for the Bundle of extras where it is possible now to loose data (last cached bundle deletes the previous one) shoudn't this be an array too?

That's later on the pipeline. If you change what a "bundle extra" means at the GCMIntentService so that it possibly includes multiple notification objects for a single notId, that single extra Bundle object will already contain everything you need, and will be converted to json properly.

I see what you mean but I thought something like this in the meantime https://github.com/phonegap/phonegap-plugin-push/pull/400

Although that seems like it would "work", taking into consideration @macdonst 's observations on the code, I still think making the Bundle extras object hold all the notifications by itself is a better option. Saves a lot of code at the PushPlugin level, and avoids pretty much every concern stated by @macdonst.

Upon further review of this one I'm not going to make any changes. Having multiple notification events fire when you click on one notification is not idea, neither is adding all the data into one giant notifications especially since the older data may no longer need to be processed.
Instead, I'm recommending that you use the "content available" flag when 1.5.x is out.

Hi Team,
Can you please tell the fix for it. Which files need to be changed & what? GCMintentService or  PushPlugin.java?

Hi,
I'm trying to store each notification in localStorage using content-available = 1 but is not working. The notification event handler is fire when you click on a notification and the app is launch, but not while the app is on background, so I get only the last notification in localStorage.
If the app is foreground I get all the notification in localStorage, but I need the same behavior with app on background too.
I'm trying to store each notification on background because I need the list of new events when I open the app. How can I get that?
My notification event handler:
`push.on('notification', function(data) {
        console.log('notificacion: '+data.message);
        console.log('id_evento: '+data.additionalData.id_evento);
        console.log(data.additionalData);

        var notif_anteriores;

        if( window.localStorage.getItem('notificaciones') ) {
            console.log('existe localstorage');
            // tenemos notificaciones guardadas
            notif_anteriores = window.localStorage.getItem('notificaciones');
            notif_anteriores = JSON.parse(notif_anteriores);
            // añadimos la nueva
            notif_anteriores.push(data.additionalData.id_evento);

            window.localStorage.setItem('notificaciones', JSON.stringify(notif_anteriores));

        } else {
            console.log('crea localstorage con '+data.message);
            // aun no hay ninguna notificacion guardada
            notif_anteriores = [data.additionalData.id_evento];
            // guardamos la primera
            window.localStorage.setItem( 'notificaciones', JSON.stringify(notif_anteriores) );
        }

    });`

This is the notification payload:
`$payload = array(
'title'      => 'Titulo', // Titulo de la notificación
'message'     => $mensaje, //mensaje a enviar
'id_evento' => $evento['id_evento'],
        'style' => "inbox",
        'summaryText' => "%n% nuevos eventos",

        'soundname' => '',
        'vibrationPattern' => [0],

        'content-available' => '1'
    );

    $notificacion = array(
        'registration_ids' => $registrationIds,
        'data' => $payload
    );`

thank you


Integrated terminal rendering underscore as spaces.

VSCode Version: Code 1.18.0 (dcee2202709a4f223185514b9275aa4229841aa7, 2017-11-08T12:44:48.751Z)
OS Version: Linux x64 4.4.0-98-generic
Extensions:

Extension
Author (truncated)
Version

vscode-eslint
dba
1.4.3

python
don
0.7.0

Steps to Reproduce:

Open integrated terminal.
Type something having underscore like git checkout Issue_7045, it will render like this:

Although command will execute properly.

Reproduces without extensions: Yes

Can verify that this is not reproducible in OSX.

VSCode Version: Code 1.18.0 (dcee220, 2017-11-08T12:44:48.751Z)
OS Version: MacOS High Sierra (10.13.1)
Extensions: None

Duplicate https://github.com/Microsoft/vscode/issues/35901


The roles collection is created, but the users document is not modified

The roles collection is created, but the users document is not modified (i.e. roles field is not added).
Meteor <IP_ADDRESS>
Package<EMAIL_ADDRESS>packages:
meteor-platform
alanning:roles
autopublish
insecure
less
nemo64:bootstrap
ian:accounts-ui-bootstrap-3
accounts-password
iron:router
ejson
meteorhacks:npm
npm-container
In the server directory
Meteor.publish(null, function () {
return Meteor.roles.find({});
});
In the client directory. I've stripped out much of the code:
Template.addCoach.events({
'submit': function (e, tmplt) {
var coachEmail = tmplt.find('#coachEmail').value;
var coachUser = Meteor.users.findOne({ "emails.address" : coachEmail });
Roles.addUsersToRoles(coachUser._id, 'coach');
}
});

I must have missed something in the documentation or maybe it was just less than explicit. It appears the Roles.addUsersToRoles method only works on the server side. When I moved the method to a Meteor.call it worked. I think this makes sense from a security standpoint.


ValueError: invalid literal for int() with base 10: '.'

This error seems to happen when CDS features do not have strand info in gff's 8th column. This is a problem with the input gff file rather than the program itself, but I am sharing the info here for people who encountered the same error.
GFF2MSS.py --fasta /Users/kf/Dropbox/data/GENUS_SPECIES/genome_for_publication/GENUS_SPECIES_male_HiC.fa --gff sorted.gff --ann GENUS_SPECIES.annotation.tsv --loc Nepgr --nam GENUS SPECIES --stn male --gty proximity ligation --gct 1 --out Nepgr.mss.txt

new_contig
Processing scaffold2
Gap finding
Gap find end
GFF Processing
Traceback (most recent call last):
  File "/Users/kf/Dropbox/repos/GFF2MSS/GFF2MSS.py", line 468, in <module>
    locus_tag_counter, OUT_CHA = GFF_TO_CDS(gff_df_col,in_file, NowContig, locus_tag_counter, anno_DF, pid_DF, OUT_CHA, GAP_DF)
  File "/Users/kf/Dropbox/repos/GFF2MSS/GFF2MSS.py", line 414, in GFF_TO_CDS
    OUT_CHA = mRNA_MAKE_NP(gff_df_col_F, rec_sub, locus_tag_prefix, locus_tag_counter, anno_DF, pid_DF, OUT_CHA, GAP_DF)
  File "/Users/kf/Dropbox/repos/GFF2MSS/GFF2MSS.py", line 304, in mRNA_MAKE_NP
    gff_df_col_F_sub_sub = gff_df_col_F_sub_sub.astype({'phase': int})
  File "/Users/kef74yk/opt/miniconda3/lib/python3.9/site-packages/pandas/core/generic.py", line 6226, in astype
    res_col = col.astype(dtype=cdt, copy=copy, errors=errors)
  File "/Users/kef74yk/opt/miniconda3/lib/python3.9/site-packages/pandas/core/generic.py", line 6240, in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
  File "/Users/kef74yk/opt/miniconda3/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 450, in astype
    return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
  File "/Users/kef74yk/opt/miniconda3/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 352, in apply
    applied = getattr(b, f)(**kwargs)
  File "/Users/kef74yk/opt/miniconda3/lib/python3.9/site-packages/pandas/core/internals/blocks.py", line 526, in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
  File "/Users/kef74yk/opt/miniconda3/lib/python3.9/site-packages/pandas/core/dtypes/astype.py", line 299, in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
  File "/Users/kef74yk/opt/miniconda3/lib/python3.9/site-packages/pandas/core/dtypes/astype.py", line 230, in astype_array
    values = astype_nansafe(values, dtype, copy=copy)
  File "/Users/kef74yk/opt/miniconda3/lib/python3.9/site-packages/pandas/core/dtypes/astype.py", line 170, in astype_nansafe
    return arr.astype(dtype, copy=True)
ValueError: invalid literal for int() with base 10: '.'

Just in case if someone wants to fill the CDS frames in a similar situation:
https://gist.github.com/kfuku52/96612cb8a78562a6ae9c9e38caa4a355

Thank you, @kfuku52 !
I also wanted to mention that the program was made by ChatGPT.  It's pretty darn impressive. The fact that an AI program can help us bioinformaticians to develop better scripts is a breakthrough.


Godot crashed before import .wav resources

Operating system or device - Godot version: Linux Mint XFCE 18.2 (64_86x), Godot Engine 3.0.alpha.custom_build (0afa77a)
Issue description: Godot crashed if project directory contains any .wav files.
Some logs:
...
REIMPORT: file was not found before, reimport
at dir: res:// file: pressed1.wav
0: default_bus_layout.tres
1: default_env.tres
2: game_over.gd
3: game_over.tscn
4: game_screen.tscn
5: icon.png
6: load_screen.gd
7: load_screen.tscn
8: main_game.gd
9: music.gd
10: music.ogg
11: music.tscn
12: NotoSansUI-Bold.ttf
REIMPORTING: res://pressed1.wav
ERROR: import: Format not supported for WAVE file (not PCM). Save WAVE files as uncompressed PCM instead.
   At: editor/import/resource_importer_wav.cpp:159.
Input Sample:
	frames: 138792768
	format_channels: 0
	16bits: 1
	rate: 0
	loop: 0
	loop begin: 0
	loop end: 0

Same effect after save audio as WAV (Microsoft) 32-bit float PCM format.

Media saved as WAV (Microsoft) signed 16-bit PCM works fine, but anyway...

@toby3d Could you test this again now that #9983 has been merged?

@marcelofg55 Yep, all is :ok_hand: now.


Added goal/progress vars to the dosomething_helpers config.

The functionality for this  isn't finished yet, but it might get added to prod as is.
it just adds new vars to dosomething_helpers in prep for #4281 & #4282

@sergii-tkachenko updated

:+1:


Avoid misleading name usage

First of all, I appreciate your work on this crate.
My colleague tried to use this crate for presto for hours, and found that this is not compatible with presto because of request headers.
To prevent such confusion in community,
I would like to propose this change.

thanks


doc: add wechat QR code

https://github.com/mosn/htnn/blob/main/site/content/zh-hans/docs/getting-started/introduction.md
maybe we shoud update the readme first.


Fenced code blocks: empty line at the end gets stripped

Input HTML:

test

Expected Markdown:
```
line 1

```

Current results:
```
line 1
```

I can see in the demo that the "indented" configuration for code blocks works as expected:
    line 1

(Yes, there is an empty indented line after "line 1")

Hey @fredck, I think we actually addressed this together here in your PR. So if it was wrong, I'd be an accomplice. :-)
But I believe it is correct. On one hand, the trailing newline is really present in HTML DOM data. On the other hand, it is not subject to rendering. You can try setting CSS pre { background: grey; } to check it. I understand it as sort of 'newline at end of file' thing.
Even the reference CommonMark implementation suggests the current behavior is right:
const cmark = require('cmark-gfm');
const md = '```\nfoo\n```\n';
const html = cmark.renderHtmlSync(md);
console.log(JSON.stringify(html));
// produces "
foo\n
\n"

So it is actually the indented code block implementation that seems to be suboptimal. It is not wrong though, as the empty indented lines are ignored: https://spec.commonmark.org/0.29/#example-87. Not a fan of this construct anyway.

@martincizek, you're totally right. Sorry for the misleading report. The real problem I'm facing is here instead: ckeditor/ckeditor5#6637.

I think we actually addressed this together here in your PR. So if it was wrong, I'd be an accomplice. :-)

Well, at least it's confirmed that we did a great job together ;-)


fix(oas): align generated names with inso naming

Names generated were slightly different from the names generated
by Inso. This lines them up.
This is however not 100% acurate. Inso had an issue with generating
duplicate names if there were 2 identical paths, with and without
trailing slash (/). So here we add "~" as indicator of a trailing
slash. Other differences might be in the way non-english characters
are slugified. Things like; "北京kožušček"

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

Comparison is base (e878385) 0.00% compared to head (92ed984) 69.32%.

Additional details and impacted files
@@            Coverage Diff            @@
##           main      #91       +/-   ##
=========================================
+ Coverage      0   69.32%   +69.32%
=========================================
  Files         0       17       +17
  Lines         0     2386     +2386
=========================================
+ Hits          0     1654     +1654
- Misses        0      613      +613
- Partials      0      119      +119

Files
Coverage Δ

openapi2kong/openapi2kong.go
78.11% <100.00%> (ø)

... and 16 files with indirect coverage changes

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


🧪 Test issue

User Story
test issue to see if this has been added to the cloud ops project automatically.
Value / Purpose
No response
Useful Contacts
No response
Additional Information
No response
Definition of Done
Example - [ ] Documentation has been written / updated

[ ] README has been updated
[ ] User docs have been updated
[ ] Another team member has reviewed
[ ] Tests are green

closing issue


Update Rainbow kit and WAGMI

Pretty massive breaking changes in WAGMI, will take some effort.

Don't start this until after initial release.

Have updated rainbow kit to 0.4.5, the latest version


⚠ Bofrost.de has degraded performance

In 85702d5, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1170 ms

Resolved: Bofrost.de performance has improved in 2ecf56b after 312 days, 6 hours, 54 minutes.


Add support for child containers

From @glen-84 on Saturday, June 6, 2015 12:58:40 PM
Use case: You add a "module" (separate assembly) to your web application which contains controllers, views, etc. The MVC parts make use of an IStringLocalizer implementation that loads strings from a JSON file (for example). When you "register" the module, it adds its dependencies to the DI container of the host application, including the string localizer implementation. The host application then sets its own implementation for IStringLocalizer, which might load strings from a database, overwriting the previous implementation. Now the module's controllers and views will be using the wrong implementation of the string localizer, and the module's message strings will not be loaded.
If each module (or assembly or logical set of controllers/views) had its own child container, the instances would be isolated, and each module could have its own set of implementations, which would first be resolved from the child container, and then fall back to the parent container when not found.
This is just one example, and I'm sure there are many more.
/cc @brockallen @mdekrey (from https://github.com/aspnet/Announcements/issues/28)
Copied from original issue: aspnet/DependencyInjection#246

From @davidfowl on Saturday, June 6, 2015 4:42:20 PM

Use case: You add a "module" (separate assembly) to your web application which contains controllers, views, etc.

Sounds like something that can be fully implemented in a stand alone way and doesn't have to be built in.
We're not trying to be a feature rich DI container so feature like these and other named providers won't be implemented. If you want features like child containers, use a DI container that supports them.

If each module (or assembly or logical set of controllers/views) had its own child container, the instances would be isolated, and each module could have its own set of implementations, which would first be resolved from the child container, and then fall back to the parent container when not found.

There is a single container within the application. If you want support for something like this, it can be built on top of what we provide (make your own service collection and pass that built service provider around).
Orchard does something like this already with Autofac. I'd look there for inspiration.

From @brockallen on Saturday, June 6, 2015 5:27:53 PM
Why isn't the ActionContext in MVC done this way?
IOW, can we use this approach you suggest to do  injection of a specific per-request instance of a type?
I guess, what's really being requested is something like IHttpContextAccessor.

From @davidfowl on Saturday, June 6, 2015 8:05:02 PM
File a bug on MVC then? Currently MVC registers IScopedInstance<T> to achieve similar things to IHttpContextAccessor (though they are pretty different).

From @mdekrey on Sunday, June 7, 2015 11:49:33 AM
The problem with implementing it in a stand alone way is for package authors, rather than end-product-developers. As @atrauzzi mentioned in the Announcements thread (wrong spot for us to jump on that before, @davidfowl - sorry for that), it would be atrocious for a package author to require a specific DI framework; we're hoping for hooks that can be tied into by all DI frameworks.
mdekrey/DependencyInjection@04f92ae19311478254f97808297f1006ba747e2d adds Child Container capabilities to the default DI container in a non-breaking way and starts the progress for Ninject and Autofac, though I am not familiar enough with them to complete the job. I'd be happy to learn it and complete the work if that would mean a pull request would be accepted, though.

From @davidfowl on Sunday, June 7, 2015 11:42:39 PM

The problem with implementing it in a stand alone way is for package authors, rather than end-product-developers. As @atrauzzi mentioned in the Announcements thread (wrong spot for us to jump on that before, @davidfowl - sorry for that), it would be atrocious for a package author to require a specific DI framework; we're hoping for hooks that can be tied into by all DI frameworks.

That's a grand claim. This is a brand new DI abstraction and implementation that is only used in ASP.NET as it stands.
If you're thinking about adding this generic capability to the DI abstraction then I'd suggesting doing some more research to see if the most popular DI containers support this in a first class way. ASP.NET 5 doesn't have a way to configure the child container, so even after adding this support to the DI system, ASP.NET 5 won't take advantage of it (btw I'm not a fan of the default parameter, I'd rather it be added in a first class way if we chose to do it). I'm also not a fan of this being on by default. I think the implementation we have today is better and child containers should be something additional but not turned on by default.

From @mdekrey on Monday, June 8, 2015 5:45:45 AM
I'm not sure what the grand claim is - I'm fairly certain that if it's part of the framework that Microsoft puts out, it'll become a standard that everyone implements. (ProviderBase sure was.) And I'm REALLY excited that DI is something that is used by the framework by default.
I agree regarding the default parameter - it shouldn't be there; it was to prevent breakage from anyone else who is currently using it, such as MVC 6; even in WIP projects I have the preference to not introduce breaking changes.
Both Autofac and Unity allow adding registrations to child lifetime scopes; Ninject does this through an officially maintained extension. The MVC extensions for both Autofac and Unity have object registrations under the request's scope, and Autofac even registers the HttpContextBase for you.
Unfortunately, I don't think we can "turn on" child containers without at least some additional support for other hooks in the framework. I'd rather see high-level feature requests (such as this one) than low-level ones, myself, but that's just one guy's opinion. (I believe low-level features would be harder to implement in every DI container; this one would need custom scopes and registrations after initial configuration. Ninject does not support the latter as far as I know without making a child scope.)
Again, I want to say, I'm really, really excited that DI is in the Microsoft.Framework. I'm just hoping that it chooses to provide a more featureful experience.

From @davidfowl on Monday, June 8, 2015 12:02:27 PM

it would be atrocious for a package author to require a specific DI framework; we're hoping for hooks that can be tied into by all DI frameworks.

That claim. The only real integration point for this that would cause package authors to depend on a specific DI framework would be if they wanted to expose the configuration of the nested container. If a library author just depended on DI features, then configuration the child container is about the "system" creating the child container itself. In the case of an http request, that would be the request itself.

Unfortunately, I don't think we can "turn on" child containers without at least some additional support for other hooks in the framework.

All of the hooks exist already. But we wouldn't design anything around this today. It's a bigger question if we decide that we need to design features around child containers (like exposing ConfigureRequestContainer etc) to which I think the answer is no.

I believe low-level features would be harder to implement in every DI container; this one would need custom scopes and registrations after initial configuration. Ninject does not support the latter as far as I know without making a child scope.

I think the next step in making child containers real would be to flesh out what other DI containers support to see where it would fall over. As an example, we used to have a fallback mechanism that allowed containers to chain GetService calls. That ended up being a disaster to implement in order DI systems and the feature was dropped as a result.

From @brockallen on Monday, June 8, 2015 1:30:10 PM
So for child containers now, I suspect it can be implemented using IHttpContextAccessor as the model.
You'd need to design IFooAccessor whose implementation depended on the IHttpContextAccessor to use the HttpContext's Items as the place to read/write the Foo. Somewhere in your pipeline you know to set the right entry in the HttpContext's Items collection, and the anything that needs Foo injects the IFooAccessor.
Sound about right? Or maybe there's a more obvious or easier way I'm missing?

From @matthewDDennis on Wednesday, June 17, 2015 6:55:19 PM
Implementing a child container in the existing framework is not difficult.  As a quick proof of concept:
using System;

namespace Microsoft.Framework.DependencyInjection
{
    public class ChildServiceProvider : IServiceProvider
    {
        private readonly IServiceProvider _child;
        private readonly IServiceProvider _parent;

        public ChildServiceProvider(IServiceProvider parent, IServiceProvider child)
        {
            _parent = parent;
            _child = child;
        }

        public ChildServiceProvider(IServiceProvider parent, IServiceCollection services)
        {
            _parent = parent;
            _child = services.BuildServiceProvider();
        }

        public object GetService(Type serviceType)
        {
            return _child.GetService(serviceType) ?? _parent.GetService(serviceType);
        }
    }
}

To create the child service provider:
namespace ChildContainer
{
    public interface IMyType1 { }
    public interface IMyType2 { }

    public class MyType1 : IMyType1 { }
    public class MyType2 : IMyType2 { }

    public class Sample
    {
        IServiceProvider CreateChildServiceProvider(IServiceProvider parent)
        {
            var services = new ServiceCollection();

            services.AddTransient<IMyType1, MyType1>()
                    .AddSingleton<IMyType2, MyType2>();

            return new ChildServiceProvider(parent, services);
        }
    }
}

How to use and set the IServiceProvider in use to the child container is a different issue,

From @mdekrey on Thursday, June 18, 2015 3:59:36 AM
It's unfortunately not that easy, @matthewDDennis, due to the way IServiceProvider handles IEnumerables and other Open service resolutions. Thanks for trying to help, though!

From @matthewDDennis on Thursday, June 18, 2015 4:57:29 AM
Why wouldn't it work?
IServiceProvider doesn't handle 'IEnumerables etc.  That is done in the ServiceProvider implementation.
Since my ChildContainer, using the ServiceCollection.BuildServiceProvider, is just creating a ServiceProvider and using it, which already handles everything you are concerned about.
Since it is an IServiceProvider, all the extension methods would work as well.

From @matthewDDennis on Thursday, June 18, 2015 5:13:46 AM
I just realized that ServiceProvider implements IDisposable, so I've added support for disposable IServiceProvider implementations.
using System;

namespace Microsoft.Framework.DependencyInjection
{
    public class ChildServiceProvider : IServiceProvider, IDisposable
    {
        private readonly IServiceProvider _child;
        private readonly IServiceProvider _parent;

        public ChildServiceProvider(IServiceProvider parent, IServiceProvider child)
        {
            _parent = parent;
            _child = child;
        }

        public ChildServiceProvider(IServiceProvider parent, IServiceCollection services)
        {
            _parent = parent;
            _child = services.BuildServiceProvider();
        }

        public void Dispose()
        {
            (_child as IDisposable)?.Dispose();
        }

        public object GetService(Type serviceType)
        {
            return _child.GetService(serviceType) ?? _parent.GetService(serviceType);
        }
    }
}

From @adamhathcock on Tuesday, October 6, 2015 3:56:27 AM
I've been attempting to use this code.  You cannot use ChildServiceProvider along side IServiceScopeFactory.  I've extended the ChildServiceProvider implementation to have a ChildServiceScopeFactory, etc which works but I have a feeling it's going to fall down at some point or require more reimplementation.
I'd rather have the CreateScope method take an overload of an IServiceCollection that are descriptors just for the child context.  The reasoning is that I have an object that applies only the the child scope and doing AddInstance to the parent's service collection at creation would obviously share across all scopes.
I looked at just doing this with a simple PR but the problem is that when I started digging I'd have to change more of ServiceProvider to take not only a parent ServiceProvider but a ServiceCollection and merge the descriptors.  Didn't want to think that through at the moment :)
Is this way off base?

From @mdekrey on Thursday, October 8, 2015 5:51:35 AM
@adamhathcock :+1: - the quick implementation above really falls apart upon close inspection, especially with the special handling of IEnumerable<T>. (It pulls from either the child or the parent, not combining the two as expected by child containers.) I had gotten pretty close, but could not get it to behave in a way that was SOLID, nor performant, since the resolution table was completely internal. I ultimately gave up and created more objects like the IHttpContextAccessor, which was not elegant, but did work for my problem.

From @TFleury on Sunday, October 2, 2016 2:23:41 AM
Multitenancy is a case where child containers is needed.
SaasKit project searched for a way to implement a per-tenant container, but ended up using StructureMap. @benfoster wrote an interesting blogpost on this.
Orchard project achieved this cloning the parent service collection and injecting instances of Singleton services (code here). It seems to work but it resolves all Singleton services (even if not needed), and there is a known issue with Singleton generics.
On DI Notes wiki page, there is a reference to "chaining containers". Are there plans to implement this ?

From @davidfowl on Sunday, October 2, 2016 9:44:17 AM
Nope.

From @pksorensen on Friday, March 17, 2017 4:06:48 PM
The proof of concept given here has some issues.
IEnumerable : When a class like OptionsManager needs IEnumerable, then it only get those from the child container.
Same when DI instanciate a new type, it dont call GetService for each of its dependencies, as it tries to be smart about how it activates its constructor params - and it again might miss some registrations from the parent registrations.

Any news on this issue or a better way (that works) to work-around this limitation?
As @pksorensen says, when a service gets resolved in the child IServiceCollection, it tries to resolve all dependencies of that service from that child container and no longer considers the parent container.

We have no plans to do this. Use autofac if you need child containers.


Adding implementation details to tags in the xsgm

What is the change?

Why is the change being made?

Checklist

[x] This PR has only one purpose or idea.
[x] Tests have been added/updated to verify that the new/changed code works.

[x] The code style follows good practices.
[x] The commit message(s) follow good practices.

[x] The release notes (location doc/release/0.X.rst) are up-to-date with any important changes.
[x] The documentation is still up-to-date in the doc folder.
[x] If any requirements were affected, mention it in the release notes.
[x] The dependencies are still up-to-date in pyproject.toml.

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


bug: cordova plugin hooks are not called. Needs to upgrade Cordova

Type: bug
Platform: android 4.4 browser
I'm on version 1.3.0. For example, the hooks from this plugin
cordova plugin add com.wordsbaking.cordova.wechat --variable APP_ID=test
I had to manually upgrade cordova standalone. Then it worked.

Greetings, @mkliu!
We are now requiring all issues to be submitted through our custom issue form so that we have all of the information necessary to fix them as quickly as possible.
Your progress on this issue has been saved at the following url:
link to Ionic issue form
This issue will be closed if not resubmitted through the form. Please fill out the rest of the form so that we may assist you.
Thank you for allowing me to assist you.

Greetings @mkliu!
My sensors indicate that more information is required so that I may assist you.

Can you provide a detailed description of this issue?
How would a robot go about replicating this issue?
What platform does this happen on? (iOS, Android, all, etc.)
What platform versions does this happen on? (Android 4.2, iOS 7, all, etc.)
Is this an issue with the Ionic Framework, or Ionic CLI?

Additionally, providing a codepen which replicates the issue is extremely helpful.
If you wish to get help using the framework itself, the recommended place is the forum.
Thank you for allowing me to assist you.


Fix MIT{BDaily} calculations with negative values

Fix issue #45

We're currently processing your upload.  This comment will be updated when the results are available.


setup.py is failing due to RegEx issue

I am running the setup.py with Python 2.7 on EC2 R4 RedHat 6 and getting the following error. There are 3 files that this RegEx is reading ('/etc/system-release', '/etc/redhat-release', '/etc/lsb-release'). However, non of these files contains "NAME=" which the regex  is looking for. Do I need to add anything to any of these files? Am I missing any prerequisite?
I have installed Collectd version is <IP_ADDRESS>.
root@EC2[ss] python2.7 setup.py
Traceback (most recent call last):
File "setup.py", line 966, in
main()
File "setup.py", line 959, in main
install_plugin()
File "setup.py", line 871, in install_plugin
install_packages(SYSTEM_DEPENDENCIES)
File "setup.py", line 263, in install_packages
command = DISTRIBUTION_TO_INSTALLER[detect_linux_distribution()] + " ".join(packages)
File "setup.py", line 272, in detect_linux_distribution
return DISTRO_NAME_REGEX.search(search_string).group(1).strip()
AttributeError: 'NoneType' object has no attribute 'group'

Ok I found the issue. For RedHat 6 there is no os-release and redhat-release does not follow the format that this python code is expecting to see. To solve this, I manually made the os-release and added "NAME= "Red Hat Enterprise Linux Server"" to it.


Add v8 deopt module for test-runner

Because we can probably do that with a following wind and some good V8 flags passed to the test runner.

Tested a trace and there aren't any v8 records in there. Closing for now.


Web distribution doesn't run

I created a web distribution at https://qawaz.github.io/sketchable-web/ , It gives the following error
ComposeWindow.setContent
Composition.kt:1091 Uncaught TypeError: _.w2k is not a function
    at cu.a2q (Composition.kt:1091:34)
    at hu (Composition.kt:818:21)
    at pu.z2q (Standard.kt:158:28739)
    at Us.g2l (Recomposer.kt:978:25)
    at Ho.g2l (Composer.kt:3848:27)
    at Ho.g2l (Composer.kt:3848:27)
    at pu.j2r (Composition.kt:519:16)
    at Cv (VectorPainter.kt:212:14)
    at Lv.p64 (VectorPainter.kt:232:27)
    at VectorPainter.kt:146:9

It was working in debug , the browser distribution doesn't work , Sometimes this error appears in console , but the page stays blank (canvas)

layout state is not idle before measure starts what does this mean , it didn't occur in debug mode

Could you please share the source code of your app if it's open-source?

I'll try to reproduce this

I can reproduce this issue in this repo
https://github.com/wakaztahir/compose-web-crash-release-only
Let me know if you can reproduce this

tbh its happening just by invoking Window and a scaffold inside

Heads up that I was hitting this error, and it my project, it was Map.getValue(...) causing it.
So I changed all places in my code from map.getValue(key) to map[key]!!.
I wasn't able to repro this in a project I built from scratch, however, so I don't know if this advice will apply to your project or not (maybe the method that gets removed is random, or maybe there's other ones).
But I thought I'd mention this just in case you can find getValue as a call in either your code or any libraries you're using.

@bitspittle thanks but I reproduced this in an empty project with just two kotlin files , I don't think I used Map.getValue so I think the problem isn't in my project

No worries, I guess it wasn't that simple.
Here's something else you may want to try -- in your project's gradle.properties, try adding the line  kotlin.js.ir.output.granularity=whole-program
Does that help?

Filed a report to kotlin/js team: https://youtrack.jetbrains.com/issue/KT-56463/KJS-IR-TypeError-abc-is-not-a-function-in-release-distribution
Setting kotlin.js.ir.output.granularity=whole-program indeed helps. Thank you, @bitspittle
Thank you all for reporting and analyzing the issue.

@bitspittle It works , I actually tested it and it works ! Thanks for your effort.

Fixed in K/JS - https://youtrack.jetbrains.com/issue/KT-56463/KJS-IR-TypeError-abc-is-not-a-function-in-release-distribution

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


Issue with 5.8.1 - unknown key {communauté}

In https://github.com/openstreetmap/openstreetmap-website/pull/5210 we're seeing build failures for this new release:

It seems some translator changed the community key to the French translation {communauté}, which isn't known by our parser. I suppose anything in curly braces should not be touched by translators.
https://github.com/osmlab/osm-community-index/blob/bb49bd67e37777a366874530269e888d76511746/i18n/fr.yaml#L213
(and several others in the same file)
What would be the best way forward to fix this issue?  I cannot change the French translation on my own, since Transifex wants me to join the French translator group first. I haven't found a way to comment on French translations either, or find out who has worked on these changes.
By the way, maybe this could be somehow automated in unit tests, to make sure translations are using valid replacement tokens only.

I've posted this one on the French community forum: https://forum.openstreetmap.fr/t/corriger-la-traduction-francaise-de-osm-community-index/27184

It's done, I corrected in transifex the {communauté} occurences back to {community} and much more {compte} to {account}:
https://app.transifex.com/openstreetmap/id-editor/translate/#fr/community/321118186?q=translator%3APlayGuide+translation_text%3A{
idea: write a generic script that checks that the words in curly braces have not been changed in the translations?

idea: write a generic script that checks that the words in curly braces have not been changed in the translations?

I actually think Transifex might have a built in checker for this - we might have to enable it.

I actually think Transifex might have a built in checker for this - we might have to enable it.

I updated the Translation Checks settings for all the OpenStreetMap and Rapid projects on Transifex so that it should now consider anything like {...} as a placeholder, and enforce stricter checks on those - i.e. not allow the user to translate them, and make sure the number of placeholders is the same in both the source and translation strings.  If there are mistakes, they will show up as errors on Transifex.


prints display

We do need to do something about Prints though, the way they build the model from fragments
can make for a very long domain section. Eventually I think we should just display as a single model, beginning and end.
this is not  the worst example
http://preview.pombase.org/gene/SPBC11B10.10c
PR00620	PRINTS	HISTONEH2A	IPR002119	Histone H2A	22-126   would be much better...

closing because I think InterPro have fixed this upstream


fix helm override: unexpected end of JSON input

What type of PR is this?
bugfix
What this PR does / why we need it:
Helm Override throw errors like this
E0902 11:21:58.228682    6177 base.go:275] Failed to apply overrides for Description clusternet-px5n9/app-demo-helm: failed to apply OverrideConfig overrideCommonLabels: unexpected end of JSON input
E0902 11:21:58.228713    6177 base.go:226] Failed to sync Description clusternet-px5n9/app-demo-helm: failed to apply OverrideConfig overrideCommonLabels: unexpected end of JSON input
E0902 11:21:58.230637    6177 base.go:278] error syncing 'clusternet-px5n9/app-demo': failed to apply OverrideConfig overrideCommonLabels: unexpected end of JSON input, requeuing

the reason is when do first applyHelmOverride, currentByte is empty and json.Unmarshal will failed
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

/close
Feel free to reopen this if anything need to be changed.

/reopen


Add NATS as pubsub component

Describe the proposal
Add support for NATS as a pubsub component in Dapr. To be specific, the intention is to use NATS queue groups such that consumer Dapr apps can share the workload in a load-balanced way

I have started working on this - https://github.com/dapr/components-contrib/pull/65

@abhirockzz feel free to assign the issues to yourself when you start working on the,

Closed via #65


Script execution is terminated and "console closed."

Observations show that this issue typically happens every 48 hours on pythonanywhere's console servers, and thus affecting the operations of the data streaming client.
Please see this thread https://www.pythonanywhere.com/forums/topic/8287/

A resolution could be to start the data streaming client on the web app's server as a background process (or app component) on the app's setup.

A resolution could be to start the data streaming client on the web app's server as a background process (or app component) on the app's setup.

Clone the Data Streaming Client into the Web Service and leverage Python's subprocess module in the WSGI.py file to invoke the process in the web service.
See example below:
#! python3
import subprocess, sys, time

host = sys.argv[1]

# Send ICMP packets to the host
result = subprocess.run(["ping", host])

# result = subprocess.run(["ping", host], capture_output=True)
# print(result.stdout)

# Print the exit status; 0 means successful
if result.returncode == 0:
    print()
    print("The program ran successfully with an exit status of {}".format(result.returncode))
else:
    print()
    print("The program execution failed with an exit status of {}".format(result.returncode))

time.sleep(600)


add port-issue workflow

rancherbot is gone and with it our automatic issue backporting functionality. This workflow is taken from internal docs provided with the rancherbot shutdown announcement.

Changing milestone to 2.8.0


[Feature] Support to place an application to the cluster in private network

How to deploy an application to a cluster in private network by Kubevela? Will Kubevela implement any proxy/agent feature to support the private network cluster?

Can you explain more about the architecture? I'd like to know your use case.

I think you can try OCM for this: https://github.com/kubevela/samples/tree/master/12.Open_Cluster_Management_Demo
OCM use a PULL model for resource deployment, only control plane(hub) cluster is needed for public access.


Implement pwm input for TIM2, TIM3, TIM4

Hello !
I gave a try at implementing pwm input for the stm32f103, it was not tested (yet!) but the implementation is well documented.
Could you take a first look at it and tell me if you spot something wrong ?
Current features :

Define which pins can be used for PwmInput
Configure a timer in PwmInput mode
Automate PRESC and ARR calculation
Read a frequency or a duty cycle from a timer in PwmInput mode
Implement PwmInput for TIM2, TIM3, TIM4

Thank you ! :smile:

cc @jujudu121212

Thanks for the PR!
At a first glance, it looks very good. My only real complaint without looking into details about how the pwm capture works is that there are some lingering comments which would be nice if they were removed.

it was not tested (yet!) but the implementation is well documented.

It would be nice if it was tested before we merge, are you able to do that?

I am looking forward testing it in the next few weeks.
I will also remove out of date comments !

So we spent a few hours testing this code with @jujudu121212 and there are a few problems :

the struct Clock holds the frequency of the PLCK1/2 clocks, but ppre1 is used to multiply this frequency in some cases. However, the method to access ppre1/ppre2 are privates.
the code works for high frequencies (>600 kHz) but not for low frequencies... And we don't understand why... Do you have any idea ?

Thanks for this @gbip!
From a quick glance, could you either remove commented-out code or include a comment about why they are commented out and what they do?

Hey !
This is the final version of our code, with @jujudu121212.
We tested with frequencies ranging from 1 Hz to 1 MHz an everything works fine.
Please tell me if there is any changes needed.

@TheZoq2 I have applied most of the changes you required.
I am sorry so many errors slept through my attention, I will be more careful next time.
For the automatic presc and arr calculation, maybe a comment saying that it is experimental and not yet validated is enough ?
I removed the asserts and used Result as a temporary measure, but it might break things once we are able to remove it.
I also plan to have a proofreading of all comments, since you may have noticed that English is not my first language.

@TheZoq2 I have applied most of the changes you required.
I am sorry so many errors slept through my attention, I will be more careful next time.

Thanks, and no problem, I've submited much more unpolished PRs. This is what code review is for after all :)

For the automatic presc and arr calculation, maybe a comment saying that it is experimental and not yet validated is enough?

I think that would be enough, but a result sounds like a better idea since that forces users to acknowlege that something can go wrong. That does mean that we'll have a breaking change when this is fixed which I don't consider a huge issue for such a small thing.

I think that would be enough, but a result sounds like a better idea since that forces users to acknowlege that something can go wrong. That does mean that we'll have a breaking change when this is fixed which I don't consider a huge issue for such a small thing.

Then if you don't mind grammar errors you can review this PR as I added the Result in my last commit !

I think I addressed most of your requested changes, could you do a final pass on this PR ?

I think there is a oversight in the clock frequency computation.
The clock signal arriving to the timers might have already been pre-scaled:

In timer.rs they compute the frequency this way:
                fn get_bus_frequency_multiplier(&self) -> u32 {
                    if TypeId::of::<$apbX>() == TypeId::of::<APB1>() {
                        if self.clocks.ppre1() == 1 {
                            1
                        } else {
                            2
                        }
                    } else if TypeId::of::<$apbX>() == TypeId::of::<APB2>() {
                         if self.clocks.ppre2() == 1 {
                            1
                         } else {
                            2
                         }
                    } else {
                        unreachable!()
                    }
                }
            }

in pwm.rs there is this bug (what if the timer is on APB2??):
let clk = clocks.pclk1().0 * if clocks.ppre1() == 1 { 1 } else { 2 };

so I suggest we just change rcc.rs this way, and everybody uses this code:
impl Clocks {
....
    /// Returns the frequency of the APB1 Timers
    pub fn pclk1_tim(&self) -> Hertz {
        Hertz(self.pclk1.0 * if self.ppre1() == 1 { 1 } else { 2 })
    }

    /// Returns the frequency of the APB2 Timers
    pub fn pclk2_tim(&self) -> Hertz {
        Hertz(self.pclk2.0 * if self.ppre2() == 1 { 1 } else { 2 })
    }
....
}

Thank you !
We had identified this bug in our tests, this is why we made ppr1e() public and used it to compute clocks as a quick fix. This hacky fix got lost in my git problems.
Your solution is quite nicer, do you plan to make a PR ?

I think you are further along in your PR. I would try to sneak the RCC change along with your PR than go for another 15 days of code review

I preferred to make a PR this can wait a few more days.
Moreover since it is quite small #34 should get merged quickly !

Is there anything blocking this PR from being merged ? @TheZoq2

Looks good to merge, thanks!


feat: add include filters

Though ignore filters are useful, it would be helpful to have the opposite. For example pack only "*.md" files

Thank you for your feedback! That's a great idea.
While it might be good to have include and exclude patterns like in tsconfig, for repopack, I think we'll keep the existing ignore functionality and add include as a new feature.
I imagine the config would look something like this:
{
  "output": {
    ...
  },
  "include": ["*.ts", "*.md"],
  "ignore": {
    ...
  }
}

For the CLI, it would be nice if we could use it like this:
repopack --include "src/**/*.ts,*.md"

What do you think about this approach? Does this align with what you had in mind?

Hey this would be great. I actually tried to fork the repo to make this feature. I was filtering the paths in getPaths before the security check was done and returning only the files in the --include flag. I think the main thing for this feature at least for me is I want to be able to pass in specific files in my repo that I want packed in the output file. For example if im working on a feature there might be 2-5 files in my entire repo that are relevant to that feature. Including all of the files in the repo for the llm is still to much for the context window to handle and give back specific answers at least in chatgpt 4.

Curious to see how you would implement this though and thanks for your work on this tool has been super helpful.

Here's a general idea of what I had sketched out in case it helps at all.
CLI Usage
The CLI command allows specifying the files to include using relative paths, separated by spaces:
repopack --include /src/index.ts /src/utils/logger.ts /package.json

Implementation Details
Cli/Index.ts
Defines the CLI options and arguments, including the --include option for specifying files to be included:
interface CliOptions extends OptionValues {
  version?: boolean;
  output?: string;
  ignore?: string;
  config?: string;
  verbose?: boolean;
  topFilesLen?: number;
  outputShowLineNumbers?: boolean;
  include?: string[];
}

// CLI setup
program
  .version(version)
  .description('Repopack - Pack your repository into a single AI-friendly file')
  .arguments('[directory]')
  .option('-v, --version', 'show version information')
  .option('-o, --output <file>', 'specify the output file name')
  .option('-i, --ignore <patterns>', 'additional ignore patterns (comma-separated)')
  .option('-c, --config <path>', 'path to a custom config file')
  .option('--top-files-len <number>', 'specify the number of top files to display', parseInt)
  .option('--output-show-line-numbers', 'add line numbers to each line in the output')
  .option('--include <files...>', 'space-separated list of files to include')
  .option('--verbose', 'enable verbose logging for detailed output')
  .action((directory = '.', options: CliOptions) => executeAction(directory, options));

Packager.ts
Handles file filtering based on the include option and processes the files accordingly:
const ignorePatterns = await deps.getAllIgnorePatterns(rootDir, config);
const ignoreFilter = deps.createIgnoreFilter(ignorePatterns);

// Get all file paths in the directory
const filePaths = await getFilePaths(rootDir, '', ignoreFilter);
const filteredPaths = filterIncludedFiles(rootDir, filePaths, config.include);

// Use filteredPaths if not empty, otherwise use filePaths
const pathsToProcess = filteredPaths.length > 0 ? filteredPaths : filePaths;
// Perform security check
const suspiciousFilesResults = await performSecurityCheck(pathsToProcess, rootDir);

// Pack files and generate output
const packedFiles = await packFiles(pathsToProcess, rootDir, config, deps);
await deps.generateOutput(rootDir, config, packedFiles);

Utils/includeUtils.ts
Defines the utility function for filtering files based on the include list:
import path from 'path';
import { logger } from '../utils/logger.js';

export function filterIncludedFiles(rootDir: string, filePaths: string[], include: string[]): string[] {
  if (include.length === 0) {
    return filePaths;
  }

  // Normalize paths to handle case insensitivity and different representations
  const normalizePath = (p: string) => path.normalize(path.resolve(rootDir, p)).toLowerCase();

  // Create a Set of normalized absolute paths for the included files
  const includeSet = new Set(include.map(normalizePath));

  // Map file paths to their normalized absolute paths and filter those that are in the include set
  const filteredAbsolutePaths = filePaths
    .map(filePath => path.resolve(rootDir, filePath))
    .filter(absolutePath => includeSet.has(normalizePath(absolutePath)));

  // Log any files in includeSet that are not found in filePaths
  const absoluteFilePathsSet = new Set(filePaths.map(filePath => normalizePath(path.resolve(rootDir, filePath))));
  // [additional logic to handle unmatched include files]
}

@IsaacSante
Hi,
Thank you so much for your valuable contribution and for taking the time to work on this feature!
Your approach looks promising, and I'd love to see it integrated into the project. Would you be willing to create a pull request with your changes? This would allow us to review the code together, discuss any potential adjustments, and eventually merge it into the main branch.
Your current implementation with file-specific includes is a great start. As a future enhancement, i’ll support glob patterns for more flexible file matching, but let's begin with your current version and iterate from there.
Once again, thank you for your contribution. I'm looking forward to your pull request and continuing to improve Repopack together!

@IsaacSante
I'll merge this branch into my branch and test it out. Then I'll add the glob pattern implementation and release it!
The base code you provided is really helpful! Thank you!
https://github.com/IsaacSante/repopack/compare/IsaacSante:repopack:main...includefiles

@IsaacSante
I've made significant changes to the implementation to support glob patterns, but your initial work was incredibly helpful.
Regarding the CLI specification for include patterns, we decided to use comma-separated values, similar to the ignore option. This decision was made after careful consideration, as it helps avoid ambiguity with direct path/to/directory inputs and maintains consistency across the CLI interface.
The implementation is now complete, and we're planning to release it soon. Your contribution has been invaluable, and we truly appreciate your input.
You can find the details of the changes in this PR:

https://github.com/yamadashy/repopack/pull/30

Thank you again for your contribution!

I'm pleased to inform you that we've released the new version with the include functionality:
https://github.com/yamadashy/repopack/releases/tag/v0.1.19
If you have any feedback after trying it out, I'd be very grateful to hear your thoughts.

Hey was working yesterday didn't see your message but happy to hear it was helpful will be trying out this feature for sure. Thanks !

This is fantastic, thanks again for all your help getting this feature released!

Thank you for your valuable contribution and the time you've invested in improving Repopack!
I'll closing this issue.


Create constraint doesn't work from /constraints.gatekeeper.sh.template page.

What kind of request is this (question/bug/enhancement/feature request):
Bug
Steps to reproduce (least amount of steps as possible):

Create a cluster, navigate to dashboard, enable gatekeeper.
Create a constraint.
Click edit as yaml and cancel it.
Page lands on url/constraints.gatekeeper.sh.template. e.g.

https://rancher-server/dashboard/c/c-xxxx/constraints.gatekeeper.sh.k8srequiredlabels

Click create button.

Result:
Create page is blank.

Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): master-head
Installation option (single install/HA): Single

Validated the fix in:

Rancher version:

master-head (05/20/2020) b85ea695f
2.4-head (05/20/2020) 8e20687a4 with CATTLE_DASHBOARD_INDEX=https://releases.rancher.com/dashboard/latest/index.html


Add a document about plotting features of PyAF

PyAF has  a API call lEngine.standardPlots(). It gives some classical plots (signal against forecast, residues, trends, cycles, AR)
Document the plots generated.
The REST service (issue #20 ) also gives the same plots in a png/base64 encoding, to be documented.

Also document hierarchical plots.


create governance.md for ospo mind map project

This new file sets the governance process, including:

How contributors can become maintainers
Feature request voting process
Maintainer expectations

merging this to have a document where people can find this information. Feel free to open a PR to change content


[Cherry-Picked] [NSCache] [SR-3904] Fix for object storage.

This one should probably wait for #900 to be merged.

@swift-ci please test

Added limit fix. Please review.

@swift-ci please test

The build job seems to be finished successfuly.

LGTM. @parkera what do you think? #900 has been merged into master, and this is cherry-picked onto the swift-3.1 branch

Let's make sure this gets in.


jsx: add spaceBeforeSelfClosingTagSlash config

This PR adds a new configuration option, jsxElement.spaceBeforeSelfClosingTag, that controls whether or not a space is inserted before the end of the self closing tag of a JSX element.
true:
<Test />

false:
<Test/>

This configuration option does not seem to be respected inside markdown file, e.g.:
markdown here
```tsx
export function doX(/* ... */) {
    const {
        newThing,
        // ...
    } = config;

    const content = () => {
        // ...

        return (
            <Switch>
                // ... // ...
                {newThing && (
                    <Route path={`/${newThing.route}`}>
                        <Component {...newThing} />
                    </Route>
                )}
                // ...
            </Switch>
        );
    };
}
```
markdown here

renders exactly as the above (instead of <Component {...newThing}/>) via "jsxElement.spaceBeforeSelfClosingTagSlash": false,

@joscha works for me.

inside a markdown? Is there a way I can show this in the playground?

I can reproduce it inside dprint/dprint on https://github.com/dprint/dprint/commit/d78651ba4bf0cfc29e86d522da48b422186c3002
diff --git a/dprint.json b/dprint.json
index aea8f3c0..0b05b97c 100644
--- a/dprint.json
+++ b/dprint.json
@@ -6,6 +6,9 @@
   "includes": [
     "**/*.{ts,tsx,js,jsx,json,md,html,scss,css,toml,rs}"
   ],
+  "typescript": {
+    "jsxElement.spaceBeforeSelfClosingTagSlash": false,
+  },
   "excludes": [
     "website/playground/build",
     "scripts/build-website",
diff --git a/test.md b/test.md
new file mode 100644
index 00000000..9846f4d7
--- /dev/null
+++ b/test.md
@@ -0,0 +1,26 @@
+markdown here
+
+```tsx
+export function doX(/* ... */) {
+  const {
+    newThing,
+    // ...
+  } = config;
+
+  const content = () => {
+    // ...
+
+    return (
+      <Switch>
+        // ... // ...
+        {newThing && (
+          <Route path={`/${newThing.route}`}>
+            <Component {...newThing} />
+          </Route>
+        )}
+        // ...
+      </Switch>
+    );
+  };
+}
+```

with dprint check -- test.md passing with 0 exit status even though it should be:
-<Component {...newThing} />
+<Component {...newThing}/>

I take it back with an update to the TS plugin:
diff --git a/dprint.json b/dprint.json
index 0b05b97c..477af5ba 100644
--- a/dprint.json
+++ b/dprint.json
@@ -18,7 +18,7 @@
     "**/*-lock.json"
   ],
   "plugins": [
-    "https://plugins.dprint.dev/typescript-0.48.0.wasm",
+    "https://plugins.dprint.dev/typescript-0.52.1.wasm",
     "https://plugins.dprint.dev/json-0.12.1.wasm",
     "https://plugins.dprint.dev/markdown-0.9.2.wasm",
     "https://plugins.dprint.dev/toml-0.4.0.wasm",

however I then see https://github.com/dprint/dprint-plugin-typescript/issues/276:

on the diff above

Yeah, the markdown plugin calls back into the CLI and essentially says "format this with a plugin that formats .ts files", then the CLI will check for a plugin that can format it.
It doesn't error for excess config ("jsxElement.spaceBeforeSelfClosingTagSlash": false) in this case because it probably only created an instance of the typescript plugin for markdown formatting (it doesn't check config diagnostics in this scenario) due to incremental being enabled. I'm thinking maybe if the plugin config changes with incremental then maybe it should launch an instance of each plugin and check the config. Opened https://github.com/dprint/dprint/issues/403


[BUG] sort by most-used doesn't work

Environment
Self-Hosted (Docker)
System
No response
Version
2.1.1
Describe the problem
All of the sections on my dash have Sort By set to most-used.
In App Config, Disable Smart-Sort is unchecked.
The Edge DevTools, Application tab / Local Storage, shows 2 keys ( lastUsed and mostUsed ) changing whenever a dashboard item gets clicked.
Items do not change their order according to most used.
Additional info
No response
Please tick the boxes

[X] You have explained the issue clearly, and included all relevant info
[X] You are using a supported version of Dashy
[X] You've checked that this issue hasn't already been raised
[X] You've checked the docs and troubleshooting guide
[X] You agree to the code of conduct

I also have this problem. I also don't know how/where Dashy keeps count of clicks.

The stats seem to be stored locally, in the browser-cache.
From what I can see, they are very incomplete. Only 1 shortcut seems to be counted.
Whether those few stats are then used or not... I can't say, but it's obvious that sort-by most-used has zero effect.
Any input from @Lissy93 would be appreciated ?

please also see https://github.com/Lissy93/dashy/issues/1033#issuecomment-1445146511

Thanks @Zixim - Have replied on https://github.com/Lissy93/dashy/issues/1033#issuecomment-1445373374
Once #1123 is merged, this should be fixed :)


Update to reflect API changes from beta to final

Lots of them, from ObservableObject to onTapAction.

API Update: BindableObject => ObservableObject
API Update: ObjectBinding => ObservedObject
API Update: tapAction => onTapGesture

why tapAction renamed to onTapGesture? It was so nice to see the same syntax as in SwiftUI.

Update to reflect API changes from beta to final

tapAction was renamed to onTapGesture in SwiftUI, that's why:
@available(iOS 13.0, OSX 10.15, watchOS 6.0, *)
@available(tvOS, unavailable)
extension View {
    public func onTapGesture(count: Int = 1, perform action: @escaping () -> Void) -> some View
}

OMG what a shame. 😯 Ok, thanks. 👍


Migrate identity backlog to Primitives Sprint Board

Review this list https://github.com/celo-org/celo-monorepo/labels/Component%3A Identity of old Identity Team issues. Most will probably be closed, but some might be worth migrating to Primitives backlog

Closing this as the list is now empty


Enhancement

Hi developer....can you please enhance this software adding some features like file manager, camera, record calls etc
Thanks in advance

i am unable to run this on heroku the scripts in package gives error.

$ npm install
npm ERR! file C:\Users\princ\Desktop\AdoBot-IO-master\package.json
npm ERR! code EJSONPARSE
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token } in JSON at position 190 while parsing near '... "node index.js",
npm ERR! JSON.parse   },
npm ERR! JSON.parse   "main": "index....'
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
npm ERR!      C:\Users\princ\AppData\Roaming\npm-cache_logs\2019-03-16T14_23_40_147Z-debug.log

$ npm install

<EMAIL_ADDRESS>install C:\Users\princ\Desktop\AdoBot-IO-master\node_modules\phantomjs-prebuilt
node install.js

PhantomJS not found on PATH
Download already available at C:\Users\princ\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip
Verified checksum of previously downloaded file
Extracting zip contents
Removing C:\Users\princ\Desktop\AdoBot-IO-master\node_modules\phantomjs-prebuilt\lib\phantom
Copying extracted folder C:\Users\princ\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip-extract-1552746828353\phantomjs-2.1.1-windows -> C:\Users\princ\Desktop\AdoBot-IO-master\node_modules\phantomjs-prebuilt\lib\phantom
Writing location.js file
Done. Phantomjs binary available at C:\Users\princ\Desktop\AdoBot-IO-master\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe

<EMAIL_ADDRESS>postinstall C:\Users\princ\Desktop\AdoBot-IO-master
run-s sequelize_it_please gulp_it_please

<EMAIL_ADDRESS>sequelize_it_please C:\Users\princ\Desktop\AdoBot-IO-master
sequelize db:migrate

Sequelize [Node: 10.15.1, CLI: 2.7.0, ORM: 3.30.4]
Loaded configuration file "config\config.json".
Using environment "development".
(node:14184) [DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead.
Unable to connect to database: SequelizeConnectionError: ER_BAD_DB_ERROR: Unknown database 'adobot'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>sequelize_it_please: sequelize db:migrate
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>sequelize_it_please script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR!      C:\Users\princ\AppData\Roaming\npm-cache_logs\2019-03-16T14_34_13_447Z-debug.log
ERROR: "sequelize_it_please" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>postinstall: run-s sequelize_it_please gulp_it_please
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR!      C:\Users\princ\AppData\Roaming\npm-cache_logs\2019-03-16T14_34_13_580Z-debug.log

The error says:
Unable to connect to database: SequelizeConnectionError: ER_BAD_DB_ERROR: Unknown database 'adobot'

You have to setup your development database as indicated in the readme.


Update numpy in requirements.txt to avoid pip (warning) conflicts

Description
GluonTS currently states a depency towards Numpy 1.14.x (~=1.14)
numpy 1.14 is quite outdated, so when used with other libraries it generates a conflict in pip.
Can numpy be updated to latest (e.g. >=1.17.3), or simply to >=1.14?

I don't see an issue in doing so. Any concerns, @lostella ?

Sure, this makes perfect sense, and was already addressed in #456 (see also #465). The relaxed requirements will be part of the next bugfix release, likely to be issued tomorrow. For now, you will find the changes in the master branch if you want to try it out.

Sorry, I misread the issue: to be clear, I think ~=1.14 is fine in that it is equivalent to >= 1.4, == 1.* (where the comma means "and").
See: https://www.python.org/dev/peps/pep-0440/#compatible-release

@lcoulet mxnet==1.4.1 has a dependency on numpy<1.15, which is what may be causing trouble when installing the package from scratch. You can upgrade to mxnet>=1.5.0 if it works for you, we saw that it had some issues on Linux, so it's not our recommended version. But if you're on macOS or Windows than it should be fine.

I've tried installing installing numpy to 1.17 and all tests pass. I guess, you should be fine with just upgrading numpy without the need for mxnet.

I've also not seen any issues with upgrading numpy. In fact, we have run all our experiments for the GluonTS port of the Gaussian Copula paper on numpy 1.16 and it was fine.

There will be error messages from mxnet with newer numpy versions, so we decided to keep it as it is until we can upgrade mxnet.


Input data is not being validated

Please at least run the bids-validator on it. See: https://github.com/BIDS-Apps/example/blob/master/run.py#L50

https://github.com/BIDS-Apps/MRtrix3_connectome/blob/master/run.py#L515?

My bad!


Error on usage command "unable to build kubernetes objects from release manifest"

I've made the three files issuer.yaml, secret.yaml, and values.yaml, like the example provided.
I've created a cluster with minikube.
When running the usage command helm install desec-http oci://ghcr.io/irreleph4nt/charts/cert-manager-webhook-desec-http -f values.yaml -n cert-manager, I get an error:
Pulled: ghcr.io/irreleph4nt/charts/cert-manager-webhook-desec-http:1.0.1
Digest: sha256:33681fc818e32becab7b2ccbbdd7f31fd98457bd50097170e1b211a73ab62e8d
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: [resource mapping not found for name: "desec-http-cert-manager-webhook-desec-http-ca" namespace: "cert-manager" from "": no matches for kind "Certificate" in version "cert-manager.io/v1"
ensure CRDs are installed first, resource mapping not found for name: "desec-http-cert-manager-webhook-desec-http-webhook-tls" namespace: "cert-manager" from "": no matches for kind "Certificate" in version "cert-manager.io/v1"
ensure CRDs are installed first, resource mapping not found for name: "desec-http-cert-manager-webhook-desec-http-selfsign" namespace: "cert-manager" from "": no matches for kind "Issuer" in version "cert-manager.io/v1"
ensure CRDs are installed first, resource mapping not found for name: "desec-http-cert-manager-webhook-desec-http-ca" namespace: "cert-manager" from "": no matches for kind "Issuer" in version "cert-manager.io/v1"
ensure CRDs are installed first]

What am I missing?

Hi @angelovdev,
The error indicates you may be missing the CRDS (custom resource definitions) for cert-manager. How did you set up cert-manager prior to installing this webhook? One way would be the following, which installs both cert-manager and it's corresponding crds.
GITHUB_URL=https://github.com/cert-manager/cert-manager/releases
VERSION_CERT_MANAGER=$(curl -w '%{url_effective}' -I -L -s -S ${GITHUB_URL}/latest -o /dev/null | sed -e 's|.*/||')
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/${VERSION_CERT_MANAGER}/cert-manager.yaml
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/${VERSION_CERT_MANAGER}/cert-manager.crds.yaml


Synthesizer Waveforms

Adds a new Source, Synth, that can generate square, triangle, sawtooth and sine waveforms useful for additive music sound synthesis. Waveforms can be generated with arbitrary sample rates and frequencies.
Also the existing SineWave Source has been reimplemented as a client of Synth.

Can we hold on this for a moment? I'd like to add white and pink noise and I don't think it'd be too difficult.

Okay check that out.

What if I just called it “TestSignal”, that’s why I did it, I wanted to make signals as test sources for other sources.On Aug 13, 2024, at 7:22 AM, David Kleingeld @.***> wrote:
@dvdsk commented on this pull request.
In src/source/noise.rs:

sample_rate: cpal::SampleRate,
+}

+impl WhiteNoise {

/// Create a new white noise generator.
pub fn new(sample_rate: cpal::SampleRate) -> Self {

   Self { sample_rate }

}
+}

+impl Iterator for WhiteNoise {

type Item = f32;

#[inline]
fn next(&mut self) -> OptionSelf::Item {

   let randf = rand::random::<f32>();

In a015eb4
small_rng looks good! We might wanna put the whole synthesizer (and rand dependency) behind a cargo feature. Rodio is used in a ton of large projects that do not need synthesizers but without a feature the will pay the cost of compiling the rand crate.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

What I'd propose is just renaming Synth into TestSignal.
I definitely think there should at least be a WhiteNoise and PinkNoise, those have a lot of applications as test signals, it's hard to subjectively judge loudness differences with sine waves, they're better for testing dynamic processes, they're obligatory for testing monitors etc. I added it because I was going to do some dynamic gain sources and it just makes more sense to test and do an example with pink noise for those.
Square and triangle waves I'm more equivocal on. A lot of signal generator plugins make them, and not in a particularly musical context. It's definitely useful to be able to see them on a scope, square waves can tell you about slew rate in a DA, triangle waves have a known spectrum and you can see aberrant harmonics easily.
If we're talking about test signals maybe I'm missing one, we could definitely use a chirp signal generator, that's really useful for evaluating frequency response.

you clearly know what you are talking about which is very nice since I do not :sweat_smile:. I happily defer to your judgement :+1:.
And I  agree on the Synth -> TestSignal rename, that is clearer. I see you have also already reimplemented the Sine source as Synth/TestSignal :+1: .
We could deprecate it in the future (the Sine source), that would clean up the API a bit.

I'll get on these in a few days, I'm finishing a Chirp source to complete the suite.

This is all passing again, it looks like all of the failures in nightly are outside the scope of the PR.

Oh that shouldn't be there, I thought I'd deleted that, I'm not going to support try_seek with any of the signal generators based on our previous convo.

Why isn't this building in nightly BTW? I've merged the upstream so I'm not sure what the problem is.

Why isn't this building in nightly BTW? I've merged the upstream so I'm not sure what the problem is.

Its building fine its just that the test builds are failing as there are undocumented methods. The wierd thing is, that lint never fired in the past... My guess is that the lint was broken and has been fixed in the latest nightly.

I'll disable the lint or fix the docs

if you merge main all the lint errors not related to this PR should disappear :+1:

OMG this thread is so long, I'm so so sorry.

LGTM! :partying_face:

Epic.


Exception on saving of Unmanaged Object with Embedded Object

Crash during upsert of an existing object with a list of EmbeddedObject inside.
Goals / Expected Results
I can upsert a record.
Actual Results
Exception: ** Terminating app due to uncaught exception 'RLMException', reason: 'Cannot add an existing managed embedded object to a List.'**
Steps for others to Reproduce
Create unmanaged copy of existing object with the property - list of EmbeddedObject's children objects.
Try to add it with UpdatePolicy.update
Workaround
Create a deep copy of a target object.
Code Sample
class Address: EmbeddedObject {
    @objc dynamic var street: String? = nil
    @objc dynamic var city: String? = nil
    @objc dynamic var country: String? = nil
    @objc dynamic var postalCode: String? = nil
}

// Define an object with an array of embedded objects
class Business: Object {
    @objc dynamic var _id = ObjectId.generate()
    @objc dynamic var name = ""
    let addresses = List<Address>() // Embed an array of objects

    override static func primaryKey() -> String? {
        return "_id"
    }

    convenience init(name: String, addresses: [Address]) {
        self.init()
        self.name = name
        self.addresses.append(objectsIn: addresses)
    }
}

    let b = realm.objects(Business.self).first!

    //make an unmanaged copy of a business
    let someBusiness = Business(value: b)
    someBusiness.name = "New Business Name"

    try! realm.write {
        realm.add(someBusiness, update: .modified)
    }

Stack trace
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff2043a126 __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007fff20177f78 objc_exception_throw + 48
	2   delcrash                            0x00000001036918c5 _ZN18RLMAccessorContext12createObjectEP11objc_objectN5realm12CreatePolicyEbNS2_6ObjKeyE + 3125
	3   delcrash                            0x00000001036ea20d RLMAddObjectToRealm + 285
	4   delcrash                            0x00000001038876c4 $s10RealmSwift0A0V3add_6updateySo0aB6ObjectC_AC12UpdatePolicyOtF + 1252
	5   delcrash                            0x00000001034fc24b $s8delcrash14ViewControllerC9addActionyyFyyXEfU_ + 251
	6   delcrash                            0x00000001034fb84f $ss5Error_pIgzo_ytsAA_pIegrzo_TR + 15
	7   delcrash                            0x00000001034fc2a4 $ss5Error_pIgzo_ytsAA_pIegrzo_TRTA.1 + 20
	8   delcrash                            0x00000001038866cb $s10RealmSwift0A0V5write16withoutNotifying_xSaySo20RLMNotificationTokenCG_xyKXEtKlF + 299
	9   delcrash                            0x00000001034fbfb8 $s8delcrash14ViewControllerC9addActionyyF + 1112
	10  delcrash                            0x00000001034fbace $s8delcrash14ViewControllerC6runAddyyF + 46
	11  delcrash                            0x00000001034fb0d3 $s8delcrash14ViewControllerC11viewDidLoadyyF + 723
	12  delcrash                            0x00000001034fba8b $s8delcrash14ViewControllerC11viewDidLoadyyFTo + 43
	13  UIKitCore                           0x00007fff23f37de3 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 88
	14  UIKitCore                           0x00007fff23f3c6ca -[UIViewController loadViewIfRequired] + 1084
	15  UIKitCore                           0x00007fff23f3cab4 -[UIViewController view] + 27
	16  UIKitCore                           0x00007fff246ac28b -[UIWindow addRootViewControllerViewIfPossible] + 313
	17  UIKitCore                           0x00007fff246ab978 -[UIWindow _updateLayerOrderingAndSetLayerHidden:actionBlock:] + 219
	18  UIKitCore                           0x00007fff246ac93d -[UIWindow _setHidden:forced:] + 362
	19  UIKitCore                           0x00007fff246bf950 -[UIWindow _mainQueue_makeKeyAndVisible] + 42
	20  UIKitCore                           0x00007fff248fa524 -[UIWindowScene _makeKeyAndVisibleIfNeeded] + 202
	21  UIKitCore                           0x00007fff23ace736 +[UIScene _sceneForFBSScene:create:withSession:connectionOptions:] + 1671
	22  UIKitCore                           0x00007fff2466ed47 -[UIApplication _connectUISceneFromFBSScene:transitionContext:] + 1114
	23  UIKitCore                           0x00007fff2466f076 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 289
	24  UIKitCore                           0x00007fff2415dbaf -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 358
	25  FrontBoardServices                  0x00007fff25a6a136 -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 391
	26  FrontBoardServices                  0x00007fff25a92bfd __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.176 + 102
	27  FrontBoardServices                  0x00007fff25a77b91 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
	28  FrontBoardServices                  0x00007fff25a928cb __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 352
	29  libdispatch.dylib                   0x00000001054dfa88 _dispatch_client_callout + 8
	30  libdispatch.dylib                   0x00000001054e29d0 _dispatch_block_invoke_direct + 295
	31  FrontBoardServices                  0x00007fff25ab88f1 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
	32  FrontBoardServices                  0x00007fff25ab85d7 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
	33  FrontBoardServices                  0x00007fff25ab8a9c -[FBSSerialQueue _performNextFromRunLoopSource] + 22
	34  CoreFoundation                      0x00007fff203a8845 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	35  CoreFoundation                      0x00007fff203a873d __CFRunLoopDoSource0 + 180
	36  CoreFoundation                      0x00007fff203a7c81 __CFRunLoopDoSources0 + 346
	37  CoreFoundation                      0x00007fff203a23f7 __CFRunLoopRun + 878
	38  CoreFoundation                      0x00007fff203a1b9e CFRunLoopRunSpecific + 567
	39  GraphicsServices                    0x00007fff2b793db3 GSEventRunModal + 139
	40  UIKitCore                           0x00007fff2466d40f -[UIApplication _run] + 912
	41  UIKitCore                           0x00007fff24672320 UIApplicationMain + 101
	42  libswiftUIKit.dylib                 0x00007fff53c487b2 $s5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF + 98
	43  delcrash                            0x000000010350100a $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 122
	44  delcrash                            0x0000000103500f7e $s8delcrash11AppDelegateC5$mainyyFZ + 46
	45  delcrash                            0x0000000103501059 main + 41
	46  libdyld.dylib                       0x00007fff20257409 start + 1
	47  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'RLMException', reason: 'Cannot add an existing managed embedded object to a List.'
terminating with uncaught exception of type NSException
CoreSimulator 732.18 - Device: iPhone 8 (A8CA0A6C-C943-4C70-8EC4-EF9FC5E0F5F5) - Runtime: iOS 14.1 (18A8394) - DeviceType: iPhone 8

Version of Realm and Tooling
Realm framework version: 10.1.2
Xcode version: 12
iOS/OSX version: 14
Dependency manager + version: SPM

I am surprised no one is assigned to this issue. Getting the same problem here. This makes it very inconvenient to work with embedded objects. In my case there are two levels, which makes it even worse. It also differs from the behavior in the Android SDK.

This is specifically related to realm.add(), which the Android SDK does not have.

Any news on this? I've changed some models to benefit from embedded objects only to have the app crash all over now because of this :/

I fixed this in my app by converting the object to a dictionary/json representation and then using that as the parameter for value in let unmanaged = SomeObject(value: objectValue).
Would be great if we didn't have to do these workarounds and the SDK would do it on its own

@onelogapp so this is a work in progress yet, right? in my case, i get Cannot set a link to an existing managed embedded object when trying to update my Object with an EmbeddedObject field


Initial test case.

This PR includes initial test case related to kafka consumer.

Closing this PR as the new test case are completely different when compared to these.


Update dependencies

Please, tell me if you prefer I leave minor version changes alone.
Thanks!

Thank you for this PR.
I have been thinking about updating RustCrypto related deps to the latest version, but be afraid of touching them due to their complexity.


Failed to download distributions with large requirements file

Have a Dockerfile in which I'm testing the use of uv, but uv fails to build the dependencies:
# Use Python 3.9 as the base image
FROM python:3.9-slim

# Set environment variables to make Python outputs work correctly in Docker
ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    PIP_NO_CACHE_DIR=off \
    PIP_DISABLE_PIP_VERSION_CHECK=on \
    PIP_DEFAULT_TIMEOUT=100

# Install Git, as it's often necessary for installing dependencies
RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*

# Create a virtual environment to isolate our package dependencies locally
RUN python3 -m venv /venv
ENV PATH="/venv/bin:$PATH"

RUN pip install -U pip && pip install git+https://github.com/zenml-io/zenml.git@bugfix/whylogs-extras#20138b5a8c8e01ba74e3d8f3ba6f6a8ce4efb36b#egg=zenml[server,templates,terraform,secrets-aws,secrets-gcp,secrets-azure,secrets-hashicorp,s3fs,gcsfs,adlfs,dev,mlstacks]

RUN zenml integration export-requirements \
    --output-file integration-requirements.txt \
    whylogs scipy pytorch azure airflow aws deepchecks

RUN pip install uv
RUN uv venv

ENV PATH="/venv/bin:$PATH"

RUN uv pip install -r integration-requirements.txt

# Set the default command for the container to keep it running.
CMD ["tail", "-f", "/dev/null"]

The error I see is:
 => ERROR [8/8] RUN uv pip install -r integration-requirements.txt                                                            314.9s
------
 > [8/8] RUN uv pip install -r integration-requirements.txt:
13.74 Resolved 274 packages in 13.14s
314.2 error: Failed to download distributions
314.2   Caused by: Failed to fetch wheel: torch==2.2.1
314.2   Caused by: Failed to extract source distribution
314.2   Caused by: request or response body error: operation timed out
314.2   Caused by: operation timed out
------
Dockerfile_test:59
--------------------
  57 |     ENV PATH="/venv/bin:$PATH"
  58 |
  59 | >>> RUN uv pip install -r integration-requirements.txt
  60 |
  61 |     # Set the default command for the container to keep it running.
--------------------
ERROR: failed to solve: process "/bin/sh -c uv pip install -r integration-requirements.txt" did not complete successfully: exit code: 2

It doesn't time out on the same download each time. I'm assuming sorting the integration-requirements.txt file makes no difference, but there's something nondeterministic about this case.

Can you try increasing your request timeout? e.g. HTTP_TIMEOUT=600 or UV_HTTP_TIMEOUT=600

Duplicate of:

https://github.com/astral-sh/uv/issues/1912

Exploring some other ideas in

#1921
#1922

We'll track this in those long-term.

Setting HTTP_TIMEOUT=600 and UV_HTTP_TIMEOUT=600 made it work / pass, btw.

Actually it failed a few times later, so it's not completely solid :) I guess the time was longer than the values I put in. No worry; happy to wait for the better solution.


Feature request: Improve lazy loading

It would be really nice, if slick would  preload only the next and previous image while using lazyLoad: 'progressive'
I have implemented this behavior on my own but would be nice if this would come one day to slick out of the box.

I would also appreciate this feature. Probably a good and fast to implement solution would e to offer an interface. So one can besides predefined behaviour pass in his own function. In my example, I want kind of the "ondemand" behaviour but it should preload one image:
function lazyLoadSlide(slideIndex, slidesCount, firstActiveSlideIndex, slidesToShow) {   let lastActiveSlideIndex = firstActiveSlideIndex + slidesToShow;   return slideIndex >= firstActiveSlideIndex && slideIndex <= lastActiveSlideIndex + 1; }
The function is called for every slide on each navigation change. When it returns true and the image wasn't loaded already, it loads the image.


Revert "Update sbt-github, sbt-github-header, ... to 0.10.0"

Reverts higherkindness/mu-scala#1312
We're seeing some errors after the upgrade: https://github.com/higherkindness/mu-scala/runs/3719563249?check_suite_focus=true#step:9:44

CC @alejandrohdezma (stackoverflow when using sbt-github 0.10.0)

Thanks! I'll take a look using this repo in the tests to see what's happening


Integration tests executed on a real deployment as part of the CICD - Shares

Same as for https://github.com/data-dot-all/dataall/issues/1220.
This issue is to track the progress for the Shares modules.
It has its own dedicated issue because of the challenge of validating the shares

Required tests for basic coverage
For fresh deployments
For each of the following API calls we need to test authorized and unauthorized scenarios as well as all possible configurations (e.g. autoapproval...)

[ ] Create Dataset - includes testing if dataset is indexed in Catalog
[ ] Import Dataset - includes testing if dataset is indexed in Catalog
[ ] List Datasets
[ ] Edit Dataset
[ ] Delete dataset
[ ] Start crawler
[ ] Sync tables
[ ] Preview table
[ ] Delete table
[ ] Create folder
[ ] Delete folder

For backwards compatibility

[ ] Update created Dataset stack
[ ] Update imported Dataset stack
[ ] Create Dataset in updated Environment
[ ] Import Dataset in updated Environment

Full coverage [WIP]
For fresh deployments

[ ] AWS access to Dataset - Credentials
[ ] AWS access to Dataset - S3 redirect
[ ] Upload data
[ ] Profile table

For backwards compatibility
For the updated Dataset stacks:

[ ] AWS access to Dataset - Credentials
[ ] AWS access to Dataset - S3 redirect
[ ] Start crawler
[ ] Sync tables

Current progress

Happy path tests:

[ ] Create Share request
[ ] Submit request without Items (not allowed)
[ ] Add items to request
[ ] Submit request without autoapproval (status -- Submitted)
[ ] Submit request with autoapproval (status -- Approved)
[ ] Reject request
[ ] Approve request
[ ] Request succeeded
[ ] Item health verification
[ ] Folder sharing validation (cal list objects via s3 accesspoint , for same account check write|modify)
[ ] Bucket sharing validation (cal list objects in s3 bucket , for same account check write|modify)
[ ] Table sharing validation (cal perform athena query: select * from db.table , for same account check write|modify)
[ ] Revoke items
[ ] Folder sharing validation (no more access)
[ ] Bucket sharing validation (no more access)
[ ] Table sharing validation (no more access)
[ ] Delete share

Share 'breaks' tests:

S3 bucket policy is manually changed
1.a. Permissions are insufficient
1.b. More permissions are granted
IAM role policy is manually changed
1.a. Permissions are insufficient
1.b. More permissions are granted

[ ] Share verification job finished
[ ] Items are Unhealthy
[ ] Share reapplied successfully
[ ] Access to folders/bucket/tables is restored
[ ] For same account shares: separate checks for Read/Write/Modify

Resource are missing test:

Share principal IAM role is deleted
S3 bucket/ AccessPoint/Folder/Table/DB is deleted

[ ] Share verification job finished
[ ] Items are Unhealthy, the Reason is valid
[ ] Unhealthy Items can be revoked
[ ] Share can be deleted

User Managed policy test:
Share principal - consumption role without data.all managed policies

[ ] Share can not be created, if required policies are not attached and the flag "attach missing policies" is False
[ ] Share can be created, when the policies are attached
[ ] Share is created and policies are attached, when required policies are not attached and the flag "attach missing policies" is True