Build failure on mingw64

Greetings, Fellow Developers,
I build libpwiz on MS Windows (7 and 10) using the excellent MSYS2/MINGW64 development environment that mimick a GNU/Linux machine.
When I build the 3.0.18342 version in this environment with gcc 8.2.1 20181207, I get the following errors:
pwiz/utility/misc/Filesystem.cpp: In function 'void* {anonymous}::GetLibraryProcAddress(PSTR, PSTR)':
pwiz/utility/misc/Filesystem.cpp:151:30: error: invalid conversion from 'FARPROC' {aka 'long long int ()()'} to 'PVOID' {aka 'void'} [-fpermissive]
return GetProcAddress(GetModuleHandleA(LibraryName), ProcName);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
pwiz/utility/misc/Filesystem.cpp:273:27: error: reference to 'SYSTEM_HANDLE_INFORMATION' is ambiguous
DWORD dwSize = sizeof(SYSTEM_HANDLE_INFORMATION);
^~~~~~~~~~~~~~~~~~~~~~~~~
pwiz/utility/misc/Filesystem.cpp:102:12: note: candidates are: 'struct {anonymous}::SYSTEM_HANDLE_INFORMATION'
struct SYSTEM_HANDLE_INFORMATION {
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from pwiz/utility/misc/Filesystem.cpp:35:
C:/msys64/mingw64/x86_64-w64-mingw32/include/winternl.h:837:5: note:                 'typedef struct _SYSTEM_HANDLE_INFORMATION SYSTEM_HANDLE_INFORMATION'
} SYSTEM_HANDLE_INFORMATION, PSYSTEM_HANDLE_INFORMATION;
^~~~~~~~~~~~~~~~~~~~~~~~~
pwiz/utility/misc/Filesystem.cpp:301:35: error: reference to 'SYSTEM_HANDLE_INFORMATION' is ambiguous
auto pInfo = reinterpret_cast<SYSTEM_HANDLE_INFORMATION>(pInfoBytes.data());
^~~~~~~~~~~~~~~~~~~~~~~~~
pwiz/utility/misc/Filesystem.cpp:102:12: note: candidates are: 'struct {anonymous}::SYSTEM_HANDLE_INFORMATION'
struct SYSTEM_HANDLE_INFORMATION {
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from pwiz/utility/misc/Filesystem.cpp:35:
C:/msys64/mingw64/x86_64-w64-mingw32/include/winternl.h:837:5: note:                 'typedef struct _SYSTEM_HANDLE_INFORMATION SYSTEM_HANDLE_INFORMATION'
} SYSTEM_HANDLE_INFORMATION, PSYSTEM_HANDLE_INFORMATION;
^~~~~~~~~~~~~~~~~~~~~~~~~
pwiz/utility/misc/Filesystem.cpp:301:60: error: expected '>' before '' token
auto pInfo = reinterpret_cast<SYSTEM_HANDLE_INFORMATION*>(pInfoBytes.data());
^
pwiz/utility/misc/Filesystem.cpp:301:60: error: expected '(' before '' token
auto pInfo = reinterpret_cast<SYSTEM_HANDLE_INFORMATION>(pInfoBytes.data());
^
(
pwiz/utility/misc/Filesystem.cpp:301:61: error: expected primary-expression before '>' token
auto pInfo = reinterpret_cast<SYSTEM_HANDLE_INFORMATION*>(pInfoBytes.data());
^
pwiz/utility/misc/Filesystem.cpp:301:81: error: expected ')' before ';' token
auto pInfo = reinterpret_cast<SYSTEM_HANDLE_INFORMATION*>(pInfoBytes.data());
^
)
make: *** [Makefile:5079: pwiz/utility/misc/Filesystem.lo] Error 1
Some errors seem to be specific of the MSWindows platform (FARPROC, I guess).
Could somebody be kind enough to help me find light here ?
Thank you for your attention,
Cheers,
Filippo
EDIT: I add a screen dump because the ^ location of the error is no more useful with the text pasted in this editor.

Unfortunately we just don't officially support mingw64 since Visual Studio Community is available for free. But if you want to submit a PR that will disable the file handling code above (make it a no-op) when compiling with Mingw GCC, I'd accept that.

Ok, thanks,
I'll look into it more closely. Closing then.
Cheers,
Filippo


Example of object detection in docs

It would be great to have a simple example of object detection in the documentation so I can reproduce it. I currently tried to use the detect method, but I'm likely using the wrong model version.
from transformers import AutoModelForCausalLM, AutoTokenizer
from PIL import Image

model_id = "vikhyatk/moondream2"
revision = "2024-07-23"
model = AutoModelForCausalLM.from_pretrained(
    model_id, trust_remote_code=True, revision=revision
)
tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)

I load input_image with PIL. Then...
enc_image = model.encode_image(input_image)
generated_boxes = model.detect(enc_image, question, tokenizer)

returns:
AttributeError: 'Moondream' object has no attribute 'detect'

It's not available in the latest version on Hugging Face yet, but I will share an example of how to use it from the client library shortly.

Hi! Any updates on this? Was wondering if moondream supports openset detections?


React 0.14 compatibility

Hi Eirik, thanks for building this. When using with React 0.14 RC1:
If using React.render(), the app works fine, but I get:
Warning: React.render is deprecated. Please use ReactDOM.render from require('react-dom') instead.

Warning: React.findDOMNode is deprecated. Please use ReactDOM.findDOMNode from require('react-dom') instead.

If importing ReactDOM and using ReactDOM.render(), the app does not work, I get:
Uncaught (in promise) Error: Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).

Thanks, will take a look :-)

I forgot to mention I'm using webpack.
The Invariant Violation can be fixed by either including React as an npm dependency and setting the version to >=0.13||>=0.14-alpha under npm 2, or using npm 3. Otherwise webpack bundles multiple copies of React.
The remaining issue is Warning: React.findDOMNode is deprecated. It should be an easy fix within this library.

:+1: having the same issue. just did a Find All on my project and there no findDOMNode on my source code tho

Feel free to submit a PR for this :-) Will have to release a new major version since this will break backwards compatibility.

need to use
ReactDOM.render()

Fixed from v2.0.0

Fixed from v2.0.0


Implement data deletion in message store

Currently the message store does not have the ability to delete data referenced by the CollectionsWrite messages. The implementation needs to take into account that:

Records within the same tenant can reference the same block.
Records across multiple tenants can reference the same block.

@dcrousso, I just did a sanity test of writing a 100MB data blob, then deleting it again. And the datastore folder still has ~100MB after deletion.
Can you sanity verify and investigate and fix if true?

Hey @dcrousso I did the same sanity test with a 100MB data blob before closing this issue, the level folder still appears to be 100MB in size... can you sanity verify on your end to make sure I am not dreaming?

im pretty sure that's how leveldb works, as a sort of performance optimization to prevent having to read the entire DB, figure out what to get rid of, and then (re)write it all back to disk (i.e. a kinda sorta somewhat operation similar to defragmentation)
if you do a test where you

put 100MB
delete 100MB
call level.prototype.open (repeat)

you should see that most of the time you call level.prototype.open the size of the folder on disk will go down (im pretty sure this is because one of the places where (partial) compaction happens is during open)
if it's a hard requirement that we delete the data on disk immediately then we might be able to leverage ClassicLevel.prototype.compactRange (though we'd have to figure out what to provide for start and end) which should trigger a compaction (of the given range), but IMO since the actual leveldb API doesn't expose this then i feel it's probably OK (i.e. you'd need access to the machine to get the data, or to have found some bug in leveldb) and it might utterly tank the overall performance of the Dwn
lmk what you want me to do :)

This is now done.


Improve support for touch input in UPF

Currently UPF relies on the touch device's ability to emulate a mouse cursor, but this can sometimes be a bit clunky. Worse, if mouse emulation is disabled, UPF pretty much stops working altogether. This can probably be substantially improved with a bit of love during the iOS port in 1.3.11.

Merged to dev.


Fix input mapping axis inversion being ignored

Is there an original linked issue? If not, could you describe the original issue here? It's difficult to understand what this fixes without context.

Godot 3.x contains code to parse an inverted axis (ie: leftx:a1~) from an SDL style mapping:
https://github.com/godotengine/godot/blob/689f59dca068b5617c39beea51eec21d3dafab87/main/input_default.cpp#L1170-L1174
And applies the inversion in InputDefault::_get_mapped_axis_event:
https://github.com/godotengine/godot/blob/689f59dca068b5617c39beea51eec21d3dafab87/main/input_default.cpp#L984-L987
However the patched function was not using the mapped value from InputDefault::_get_mapped_axis_event, resulting in the axis not actually being inverted.
master applies the inversion correctly.


Question: Load module from file in memory

Hi,
Im working on a large scale application and have the usage of loading modules on demand. This seems to be a great library for just that.
But -
I fail to find any documentation of how to do what I think we need to do.
We have multiple sets of questions we want to ask our user depending on what the user has selected in a previous step.
What I am trying to avoid here is to load ALL sets of questions beforehand and not even request the files from the server where the services are defined.
What I would like to do is to, based on the user choice, request the js-files from the server with $resource.get, and then load the module that is to be used into angularjs.
Is this possible with this library or am I looking for something else?

Yes that's exactly what this lib is for.
You can use the loader from the lib to load the files & automagically inject them, or load them yourself and call inject to make them available.
If you use $resource.get you will get the code of your services but you will have to call eval to execute it and then inject from my lib to make them available.
I advise you to simply use the load function from my lib (instead of using $resource), it will be simpler.

aha! So the load-function takes not only a filename, but a url to a file?
Great! I was not able to find this info in the documentation. I might just have read too fast perhaps.


 Fix the division used:
@deephaven/code-studio: DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
@deephaven/code-studio: Recommendation: math.div($rfs-breakpoint, $rfs-breakpoint * 0 + 1)
@deephaven/code-studio: More info and automated migrator: https://sass-lang.com/d/slash-div
@deephaven/code-studio:    ╷
@deephaven/code-studio: 57 │   $rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1);
@deephaven/code-studio:    │                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@deephaven/code-studio:    ╵
@deephaven/code-studio:     ../../node_modules/bootstrap/scss/vendor/_rfs.scss 57:20  @import
@deephaven/code-studio:     ../../node_modules/bootstrap/scss/_mixins.scss 6:9        @import
@deephaven/code-studio:     ../components/scss/custom.scss 230:9                      @import
@deephaven/code-studio:     src/layout/GoldenLayout.module.scss 1:9                   root stylesheet

Bootstrap already has an issue for this, as they need to update their code: https://github.com/twbs/bootstrap/issues/34051
We can either add the --quiet-deps flag or downgrade to 1.32 in the meantime...


Should I care about oom_per_second on system pools?

When calculating the oom_per_second metric, should I care about system pools? Shouldn't that be Microsoft's job?
We probably want to filter out non user pools:
SELECT pool_id,
       name AS resource_pool_name,
       IIF(name LIKE 'SloSharedPool%' OR name LIKE 'UserPool%', 'user', 'system') AS resource_pool_type,
       SUM(CAST(delta_out_of_memory_count AS decimal))/ (SUM(duration_ms) / 1000.) AS oom_per_second
FROM sys.dm_resource_governor_resource_pools_history_ex
WHERE name LIKE 'SloSharedPool%' OR name LIKE 'UserPool%'
GROUP BY pool_id, name
ORDER BY pool_id;

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 3265daef-8b67-9138-13a9-7c11dcb7115e
Version Independent ID: 56e897f7-64b7-2eb5-75ac-d7d8240fb731
Content: Resource management in dense elastic pools - Azure SQL Database
Content Source: articles/azure-sql/database/elastic-pool-resource-management.md
Service: sql-database
Sub-service: elastic-pools
GitHub Login: @dimitri-furman
Microsoft Alias: dfurman

Hi @josere, yes, generally speaking Microsoft owns memory troubleshooting for system pools. However, there are some scenarios where you may want to be aware that a system pool is out of memory. In some cases, solving the OOM will require customer action. For example, the SloHkPool system pool manages memory for In-Memory OLTP (Hekaton). If this pool runs out of memory, it likely means that the size of your memory-optimized tables is too large for the compute size, and you will need to either scale up to delete some data. Similarly, if the InMemQueryStorePool is out of memory, you may need to change Query Store capture policy to capture fewer queries, or parameterize queries to reduce Query Store memory consumption, or scale up to have more memory in this pool.
That said, if you want to focus on the user pool only in your alerting, you can certainly modify the query as proposed (and remove the resource_pool_type column from the SELECT clause).

@dimitri-furman Thank you for the detailed response on the issue.
@josere Please let us know if you have any further query.

@josere Awaiting your response on this.


[sub-plugin] Modify synchronization mechanism between push_data and getSample

Modify synchronization mechanism between push_data and getSample
- Remove some member variable
- Add member function to check queue

Self evaluation:

Build test:   [X]Passed [ ]Failed [ ]Skipped
Run test:     [X]Passed [ ]Failed [ ]Skipped

Thank you for your review, I will change PR :)

PR is changed, Thank you.

Design of the class InputTensorsInfo looks weird.
If it has getSample (pop), it should also have putSample (push). Having push function out of the class (nntrainer_model_push_data) doesn't look appropriate. It is also against general OO design principles.

Design of the class InputTensorsInfo looks weird.
If it has getSample (pop), it should also have putSample (push). Having push function out of the class (nntrainer_model_push_data) doesn't look appropriate. It is also against general OO design principles, causing more potential bugs. Please try to put all the properties private and let them accessed via methods, unless the properties are trivial; locks cannot be public.
The C functions in GstTensorTrainerFramework should not be complex. They should be trivial wrappers calling class member methods.
Thank you.
getSample is cb of nntrainer.
When nntrainer needs data, it calls cb.

Thank you very much for your detailed explanation offline.

:octocat: cibot: @songgot, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://ci.nnstreamer.ai/nntrainer/ci/repo-workers/pr-checker/2292-202309011523470.67244696617126-42d61a6cb8e9f93d98ebdea180fb183b8a447717/.

:octocat: cibot: @songgot, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://ci.nnstreamer.ai/nntrainer/ci/repo-workers/pr-checker/2292-202309050903110.85037708282471-42d61a6cb8e9f93d98ebdea180fb183b8a447717/.

:octocat: cibot: @songgot, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://ci.nnstreamer.ai/nntrainer/ci/repo-workers/pr-checker/2292-202309051117560.11529111862183-42d61a6cb8e9f93d98ebdea180fb183b8a447717/.


Why are the DbSets in IdentityUserContext non-virtual?

In ASP.NET Core 2.x the DbSets defined in the abstract classes IdentityDbContext and IdentityUserContext are all non-virtual making it much harder to effectively mock my database context that is built on them. It looks like they were virtual in ASP.NET Core 1.x, although the library was arranged differently then, so I am not 100% sure on that.
Is there a reason that they cannot just be made virtual to facilitate unit testing? I really don't like having to resort to something drastic like Fakes when I could just use Moq etc.
If there is a reason they can't be made virtual I would really appreciate it if any one has any ideas on how  I can proceed with mocking my db context that implements IdentityDbContext!

I don't believe there's anything preventing us from making them virtual, @ajcvickers can confirm.
This is something cheap we can do for 2.2

Thanks @HaoK! In case anyone else is interested I found a work around that feels a little hacky but works fine. Simply declare a new DbSet foreach of the identity classes in your context along side any others you may have:
public class MyContext
    : IdentityDbContext<User, Role, int, UserClaim, UserRole, UserLogin, RoleClaim, UserToken>
{
    // Identity entities
    public new virtual DbSet<User> Users { get; set; }
    public new virtual DbSet<Role> Roles { get; set; }
    public new virtual DbSet<RoleClaim> RoleClaims { get; set; }
    public new virtual DbSet<UserClaim> UserClaims { get; set; }
    public new virtual DbSet<UserLogin> UserLogins { get; set; }
    public new virtual DbSet<UserRole> UserRoles { get; set; }
    public new virtual DbSet<UserToken> UserTokens { get; set; }

    // Your other entities
    public virtual DbSet<Foo> Foos { get; set; }
    public virtual DbSet<Bar> Bars{ get; set; }
}

Yep that should work in the mean time, glad you aren't blocked!

No real reason not to do this, but keep in mind that mocking DbSet and in particular IQueryable can be painful. We usually recommend creating a repository abstraction if you are going to create test doubles.

Just goes to show how little us end users know about everything that goes in making the tools we use! Just glad I was able to work around it! Thanks for letting me know @HoaK


Expand description for warp_mouse_position method

Add more detail to the description for the warp_mouse_position method, clarifying that the vector is in screen coordinates and relative to an origin at the top of the game window.
Addresses godotengine/godot-docs#5576
Bugsquad edit: Fixes godotengine/godot-docs#5576

Thank you, and congrats to your first contribution! 🎉

Cherry-picked for 3.5.

Cherry-picked for 3.4.3.


Whaaaaaaaaaaaaaaaaaaaaaat?!!!!

laravel get database column type

Ctrl+?
...
DB::connection()->getDoctrineColumn('users', 'age')->getType()->getName()

HOLY MOTHERF*@#!!! :open_mouth: :scream: :exclamation: MIND = :boom:
(opens README.md)
insert image

Ctrl+?
...
![alt tag](https://raw.githubusercontent.com/username/projectname/branch/path/to/img.png)

Wait!  Am I the only person who thinks this should be on the front page of Reddit (or Hacker News or whatever kids use these days)?
Is it the Google API key requirement? Because I bet we could get Google to donate one to the application. One could setup a server to cache / pre-fetch results... maybe upvote/downvote answers... the possibilities are endless. How come this is dead in the water?


Update unsecure request version

request has a dependency to extend package. And in the version of request, that tumblr depends on, extend has a security warning according to GitHub.
Details of this vulnerability can be seen here: https://nvd.nist.gov/vuln/detail/CVE-2018-16492
I'm suggesting to increase the version number of request dependency. Updating the number from ^2.87.0 to ^2.88.0 should solve the issue. After updating, maybe there should be a patch level version bump also for tumblr.js?

Thank you again! This fix appears in<EMAIL_ADDRESS>now available in npm.


Metaquot+antiquot sig

This adds [%sig: ...] and [%sigi: ...] (issue #32) and extends the [%%s ...] antiquotation of #42 to signatures.
Note that I based this on #42.  Let me know if you want this PR without the antiquotation part.

Thanks!


"Converting circular structure to JSON" when using dependable field

When selecting any option from a Select as a dependable input, next message appears in developer console:
SupportAlpine.js:97 Uncaught TypeError: Converting circular structure to JSON
No dependent field is shown after option being selected.
Steps to reproduce the behavior:

Use a Select input in a resource form and make it dependable
Select any option
See an error in console

Dependent fields should actually appear after selecting particular option.

Filament version: 1.10.1
Livewire version: 2.4.4
Laravel version: 8.42.1
Browser: Chrome
Server OS: Mac OS 11.4
PHP version: 8.0.3
Database: MySQL 8.0.19

The form method of a resource:
public static function form(Form $form) {
      return $form
	      ->schema([
		      Components\Select::make('type')
			      ->placeholder('Select profile type')
			      ->options([
				      'artist' => 'Artist',
				      'venue' => 'Venue',
			      ])
			      ->dependable(),
		      // ...
		      Components\TextInput::make('price_from')
			      ->required()
			      ->when(fn ($userProfile) => $userProfile->type === 'artist'),
	      ]);
}

I just noticed exact same error happens after uploading an image via image upload input. Refreshing the page helps to solve the problem though.

Ok, so I've managed to solve the problem with images not being uploaded somehow. But the initial problem still exists.

How did you solve the problem? I wonder if upgrading Filament to Alpine v3 might fix it... I'll have a look when I can.

I can't event tell how I got it back to work. I made some significant changes in my form, after which the problem disappeared.


Configuration rules into firewalld/centos

Cookbook version
2.6.1
Chef-client version
12.9
Platform Details
centos
Scenario:
active firealld with some rules
Steps to Reproduce:
I've created this recipe:
# enable platform default firewall
firewall 'default' do
  action :install
end

# open standard ssh port
firewall_rule 'ssh' do
  port     22
  command  :allow
end

# open multiple ports for http/https, note that the protocol
# attribute is required when using ports
firewall_rule 'http/https' do
  protocol :tcp
  port     [80, 443, 8080]
  command   :allow
end

Expected Result:
firewalld is running and configured with my custom rules.
Actual Result:
When I perform firewall--cmd list-all it's getting me:
drop (active)
  target: DROP
  icmp-block-inversion: no
  interfaces: eth0 eth1
  sources:
  services:
  ports:
  protocols:
  masquerade: no
  forward-ports:
  sourceports:
  icmp-blocks:
  rich rules:

I've realized that:
[vagrant@localhost ~]$ sudo iptables -L -n -v | grep http
   18   912 ACCEPT     tcp  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>/0            tcp multiport dports 443,80,8080 /* http/https */

Any ideas?

Howdy -- assuming this is CentOS 7; firewalld is technically a frontend for iptables, so you will still see rules there, when using firewalld.
When I converge your recipe, I see:
[root@default-centos-72 ~]#  firewall-cmd --direct --get-all-rules | grep 80
ipv4 filter INPUT 50 -p tcp -m tcp -m multiport --dports 443,80,8080 -m comment --comment http/https -j ACCEPT
ipv6 filter INPUT 50 -p tcp -m tcp -m multiport --dports 443,80,8080 -m comment --comment http/https -j ACCEPT

@martinb3 similar here. But trying to understand if it works at all.

Hi @merqlove -- I'm not sure what you mean by "if it works at all." Are you saying you don't think the firewalld rules (and subsequent iptables rules shown) aren't taking effect? @jeusdi it's been a month without a response from you -- are you still seeing an issue?

@martinb3 currently i'm prefer to use firewalld on rhel7 installations, as predefined & core supported package. i'm only had issue on disabling firewall if i already have some rules. it fails with specific firewalld error. fixed manually by cli.
As i found, all rules is created but in special mode, so it is hidden when we try to get list by list-all ?

@merqlove My understanding is that --list-all is intended to print all the rules in a zone, including any defined services, port forwards, rich rules, etc (in other words, that it isn't just for firewall rules). My understanding is that, to list all firewall rules specifically (vs. services or special zone behavior), --get-all-rules should be used.

The direct options give a more direct access to the firewall. These options require user to know basic iptables concepts. Direct options should be used only as a last resort when it's not possible to use services or rich rules.
http://www.firewalld.org/documentation/man-pages/firewall-cmd.html

I'm not sure if we should let Chef be creating rich rules or defining services, so much as just "go make this rule." What's your thoughts on that?

@martinb3 i'm think rich rules is extended usage. Maybe it can be just validators(each for firewall) & force user to compose rule in raw format for such features? Sure it is for advanced usage only. & Yes any same it can be added by hands without any LWRP :-)

Sounds good! I'll close this out then, and add something to the docs to note that we don't create rich rules or services, only 'direct' rules.


Add man pages for ocitools

Also fix up Makefile so that it will install ocitools and man pages.
Signed-off-by: Dan Walsh<EMAIL_ADDRESS>

Replaces https://github.com/opencontainers/ocitools/pull/30

LGTM


Removed some unnecessary calculations

some additions and divisions were not necessary as they were just 2 constant numbers
at first i was checking addition but then i realised it would be a better idea to look at division

Focusing on code readability and context ensures better understanding and maintainability, especially when performance improvements are not measured.
This pr attempts to optimize but there are no metrics.

I do not see how it has become less readable?

@virophagesp This is not the first time you make such unprompted refactoring PRs which end up rejected as they don't actually improve things.
If you want to contribute to improve the codebase, I suggest you join the contributors chat to discuss your ideas and whether they're worth pursuing beforehand.
In general PRs should fix a reported bug, or implement a user requested proposal. Drive-by code style or non benchmarked microoptimization changes by first time contributors rarely end up merged.


Fix typo in project name

Thank you for contributing. I'm going to base, and improve the commit message before merging.


Add support for lowering memref.alloca to VM dialect.

Fixes https://github.com/google/iree/issues/9155

Sorry for the delay - rebased and ready to land as #9694.


App crashes while emaluating in android studio

Hi , very nice work done by you. can you please help me out i am new in android and pi . when i emulate the application it crashes and give error "reload again" please help me out to figure this out. Thanks.

Hi, unfortunately this was just a place where I have put some code for an article and I can't give support for any issue that happens with this codebase.
Sorry about that.


Evohome multiple locations

Hi,
I need to integrate 4 evohome locations into HA. Is there any chance to do it? I am aware that evohome component docs says that multiple locations at one time are not suported. Is there any plan for component improvement for multiple locations? If there is any serious issue with multiple locations at one time, is there any option how to switch between locations?
Your help is very appreciated !

@vertol-cz The latest versions of HA use an async version of this library, which is a different repo.
The async version is exactly the same as this version (other than using aiohttp instead of requests), and both can support multiple locations with minimal workaround.
Your question is best asked over at HA, in any case.
Nonetheless, I wrote the HA integration for evohome, and I can say this:

multiple locations are supported, but only one at a time (there will be limitations on higher-precision temps)
there are no plans by me for concurrent support of multiple locations

Thank you for your  explanation David, I will try to deal with it ! You support is very appreciated!

@zxdavb  Thanks for your answer!


⚠ Young Discoverers has degraded performance

In cd55dd0, Young Discoverers (https://youngdiscoverers.org.au) experienced degraded performance:

HTTP code: 200
Response time: 5420 ms

Resolved: Young Discoverers performance has improved in 6b3bc10.


ValueError: Unsupported model type falcon

I am getting the following error. Will update with FLAN instead and rety.
#033[2m2023-10-06T18:32:49.087661Z#033[0m #033[32m INFO#033[0m #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Args { model_id: "tiiuae/falcon-7b-instruct", revision: None, sharded: None, num_shard: Some(1), quantize: None, trust_remote_code: false, max_concurrent_requests: 128, max_best_of: 2, max_stop_sequences: 4, max_input_length: 1000, max_total_tokens: 1512, max_batch_size: None, waiting_served_ratio: 1.2, max_batch_total_tokens: 32000, max_waiting_tokens: 20, port: 8080, shard_uds_path: "/tmp/text-generation-server", master_addr: "localhost", master_port: 29500, huggingface_hub_cache: Some("/tmp"), weights_cache_override: None, disable_custom_kernels: false, json_output: false, otlp_endpoint: None, cors_allow_origin: [], watermark_gamma: None, watermark_delta: None, env: false }
--
#033[2m2023-10-06T18:32:49.087762Z#033[0m #033[32m INFO#033[0m #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Starting download process.
#033[2m2023-10-06T18:32:51.646683Z#033[0m #033[33m WARN#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m No safetensors weights found for model tiiuae/falcon-7b-instruct at revision None. Downloading PyTorch weights.
#033[2m2023-10-06T18:32:51.722142Z#033[0m #033[32m INFO#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Download file: pytorch_model-00001-of-00002.bin
#033[2m2023-10-06T18:33:02.752506Z#033[0m #033[32m INFO#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Downloaded /tmp/models--tiiuae--falcon-7b-instruct/snapshots/cf4b3c42ce2fdfe24f753f0f0d179202fea59c99/pytorch_model-00001-of-00002.bin in 0:00:11.
#033[2m2023-10-06T18:33:02.752599Z#033[0m #033[32m INFO#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Download: [1/2] -- ETA: 0:00:11
#033[2m2023-10-06T18:33:02.752840Z#033[0m #033[32m INFO#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Download file: pytorch_model-00002-of-00002.bin
#033[2m2023-10-06T18:33:07.745517Z#033[0m #033[32m INFO#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Downloaded /tmp/models--tiiuae--falcon-7b-instruct/snapshots/cf4b3c42ce2fdfe24f753f0f0d179202fea59c99/pytorch_model-00002-of-00002.bin in 0:00:04.
#033[2m2023-10-06T18:33:07.745585Z#033[0m #033[32m INFO#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Download: [2/2] -- ETA: 0
#033[2m2023-10-06T18:33:07.745660Z#033[0m #033[33m WARN#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m No safetensors weights found for model tiiuae/falcon-7b-instruct at revision None. Converting PyTorch weights to safetensors.
#033[2m2023-10-06T18:33:07.745780Z#033[0m #033[32m INFO#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Convert /tmp/models--tiiuae--falcon-7b-instruct/snapshots/cf4b3c42ce2fdfe24f753f0f0d179202fea59c99/pytorch_model-00001-of-00002.bin to /tmp/models--tiiuae--falcon-7b-instruct/snapshots/cf4b3c42ce2fdfe24f753f0f0d179202fea59c99/model-00001-of-00002.safetensors.
#033[2m2023-10-06T18:33:19.153703Z#033[0m #033[32m INFO#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Convert: [1/2] -- Took: 0:00:11.407687
#033[2m2023-10-06T18:33:19.153776Z#033[0m #033[32m INFO#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Convert /tmp/models--tiiuae--falcon-7b-instruct/snapshots/cf4b3c42ce2fdfe24f753f0f0d179202fea59c99/pytorch_model-00002-of-00002.bin to /tmp/models--tiiuae--falcon-7b-instruct/snapshots/cf4b3c42ce2fdfe24f753f0f0d179202fea59c99/model-00002-of-00002.safetensors.
#033[2m2023-10-06T18:33:24.271356Z#033[0m #033[32m INFO#033[0m #033[1mdownload#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Convert: [2/2] -- Took: 0:00:05.117383
#033[2m2023-10-06T18:33:24.829104Z#033[0m #033[32m INFO#033[0m #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Successfully downloaded weights.
#033[2m2023-10-06T18:33:24.829294Z#033[0m #033[32m INFO#033[0m #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Starting shard 0
#033[2m2023-10-06T18:33:28.178304Z#033[0m #033[31mERROR#033[0m #033[1mshard-manager#033[0m: #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Error when initializing model
Traceback (most recent call last):  File "/opt/conda/bin/text-generation-server", line 8, in <module>    sys.exit(app())  File "/opt/conda/lib/python3.9/site-packages/typer/main.py", line 311, in __call__    return get_command(self)(*args, **kwargs)  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1130, in __call__    return self.main(*args, **kwargs)  File "/opt/conda/lib/python3.9/site-packages/typer/core.py", line 778, in main    return _main(  File "/opt/conda/lib/python3.9/site-packages/typer/core.py", line 216, in _main    rv = self.invoke(ctx)  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1657, in invoke    return _process_result(sub_ctx.command.invoke(sub_ctx))  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1404, in invoke    return ctx.invoke(self.callback, **ctx.params)  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 760, in invoke    return __callback(*args, **kwargs)  File "/opt/conda/lib/python3.9/site-packages/typer/main.py", line 683, in wrapper    return callback(**use_params)  # type: ignore  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py", line 67, in serve    server.serve(model_id, revision, sharded, quantize, trust_remote_code, uds_path)  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 155, in serve    asyncio.run(serve_inner(model_id, revision, sharded, quantize, trust_remote_code))  File "/opt/conda/lib/python3.9/asyncio/runners.py", line 44, in run    return loop.run_until_complete(main)  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 634, in run_until_complete    self.run_forever()  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 601, in run_forever    self._run_once()  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 1905, in _run_once    handle._run()  File "/opt/conda/lib/python3.9/asyncio/events.py", line 80, in _run    self._context.run(self._callback, *self._args)
> File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 124, in serve_inner    model = get_model(model_id, revision, sharded, quantize, trust_remote_code)  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 314, in get_model    raise ValueError(f"Unsupported model type {model_type}")
ValueError: Unsupported model type falcon #033[2m#033[3mrank#033[0m#033[2m=#033[0m0#033[0m
#033[2m2023-10-06T18:33:28.832440Z#033[0m #033[31mERROR#033[0m #033[2mtext_generation_launcher#033[0m#033[2m:#033[0m Shard 0 failed to start:
Traceback (most recent call last):  File "/opt/conda/bin/text-generation-server", line 8, in <module>    sys.exit(app())  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py", line 67, in serve    server.serve(model_id, revision, sharded, quantize, trust_remote_code, uds_path)  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 155, in serve    asyncio.run(serve_inner(model_id, revision, sharded, quantize, trust_remote_code))  File "/opt/conda/lib/python3.9/asyncio/runners.py", line 44, in run    return loop.run_until_complete(main)  File "/opt/conda/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete    return future.result()  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/server.py", line 124, in serve_inner    model = get_model(model_id, revision, sharded, quantize, trust_remote_code)  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/models/__init__.py", line 314, in get_model    raise ValueError(f"Unsupported model type {model_type}")

<br class="Apple-interchange-newline">

+1, checked cloudwatch logs and got same error trying to deploy the stack today
ValueError: Unsupported model type falcon

I ran into this same error today, but i was able to resolve it by

upgrading sagemaker to the latest version (2.196.0)
in endpoint_handler.py, change the llm image to version 1.0.3
llm_image = get_huggingface_llm_image_uri(
"huggingface",
version="1.0.3"
)


Cleaning up promise.all in the sendRequest function

Previously was resolving the individual promises which will break batching and was wrong ...
Updating to the correct pattern:
Promise.all(
...
).then(res => {})
.catch(error => {})
Testing: ran locally and can see the batched responses:

Promise.all functionality no longer used, PR no longer relevant


Set EFFTIME_SPEC=0 for EXPID=152996 on 20221111

For whatever reason, EXPID=152996 still has EFFTIME_SPEC>0 (on Jan 8, 2023), though it should have EFFTIME_SPEC=0, as it is listed in the bad-guiding exposures list of https://github.com/desihub/desisurveyops/issues/74.
>>> d = Table.read("/global/cfs/cdirs/desi/spectro/redux/daily/exposures-daily.fits","EXPOSURES")
>>> d[d["TILEID"] == 21443]["NIGHT","EXPID","TILEID","EXPTIME","EFFTIME_SPEC"]

 NIGHT   EXPID  TILEID      EXPTIME         EFFTIME_SPEC
 int32   int32  int32       float64           float64
-------- ------ ------ ----------------- ------------------
20221110 152863  21443         1190.9635                0.0
20221110 152864  21443         1176.0957                0.0
20221111 152996  21443<PHONE_NUMBER>296875  98.68692779541016
20230107 162343  21443<PHONE_NUMBER>914062<PHONE_NUMBER>4902344

Slack thread: https://desisurvey.slack.com/archives/C01HNN87Y7J/p1673219020705959.
ps: I ve verified that it is the only one of the 91 exposures from badguidingtileexp.ecsv which has EFFTIME_SPEC>0.

@araichoor thanks for digging into this. It was an edge case in the reprocessing in which the exposure table entry was updated but the corresponding exposure directory did not get purged. I purged it by hand and re-ran tsnr, and EFFTIME_SPEC is now correct:
>>> d = Table.read("/global/cfs/cdirs/desi/spectro/redux/daily/exposures-daily.fits","EXPOSURES")
>>> d[d["TILEID"] == 21443]["NIGHT","EXPID","TILEID","EXPTIME","EFFTIME_SPEC"]

 NIGHT   EXPID  TILEID      EXPTIME         EFFTIME_SPEC
 int32   int32  int32       float64           float64
-------- ------ ------ ----------------- ------------------
20221110 152863  21443         1190.9635                0.0
20221110 152864  21443         1176.0957                0.0
20221111 152996  21443          527.4843                0.0
20230107 162343  21443<PHONE_NUMBER>914062<PHONE_NUMBER>4902344

Please have a look let me know if there is anything else you need.

looks good to me, thanks!
I verified that tiles-daily.csv also is updated:
>>> d = Table.read("/global/cfs/cdirs/desi/spectro/redux/daily/tiles-daily.csv")
>>> d[d["TILEID"] == 21443]["LASTNIGHT","NEXP","TILEID","EXPTIME","EFFTIME_SPEC"]

LASTNIGHT  NEXP TILEID EXPTIME EFFTIME_SPEC
  int64   int64 int64  float64   float64
--------- ----- ------ ------- ------------
 20230107     4  21443  3537.8        135.0

@schlafly : how do we update the info in tiles-specstatus.ecsv? (and what info should be updated?)

Sorry @araichoor, can you finish and close out this one too with the desi_update_tiles_specstatus invocation from the other ticket?  Thanks!

sure, done (see here; I ve proceeded as in https://github.com/desihub/desisurveyops/issues/91#issuecomment-1382342582).


[wrt] Remove tests due to Crosswalk Eclipse plugin deprecated

Impacted tests(approved): new 0, update 0, delete 3
BUG=https://crosswalk-project.org/jira/browse/XWALK-6557

LGTM


Fixing SplitButtonAutomationPeer's Invoke implementation

SplitButtonAutomationPeer's Invoke implementation currently just directly calls the Click event handler, which misses the fact that we also have the option of assigning a command to execute.  Instead of that, I've made it so we just forward the Invoke implementation to the primary button's automation peer, which will ensure that we do everything a button should do in this case.
I also edited the test case using the SplitButton with a command to use Invoke() to test that case as well.

/azp run


Fix no_std.

bytes has a default std feature, preventing no_std usage.

Thank you for the PR!
I didn’t even consider that bytes could be no-std capable but I suppose it makes sense for all the buffer traits.
Merge and a new release coming right up …


Jump to breakpoint in the window that contains the associated buffer

Currently, when I set a breakpoint, codelldb will jump to it using the current window.
It would be much better if codelldb could check if the buffer associated with the breakpoint is already open and switch to it, instead of changing the current window.
This would provide a very nice experience. Please consider adding it.

This behavior is implemented in VSCode itself.  I can't control this.


Incorrect Breakpoint bindings when using source maps

I’m seeing an issue in VS Code when debugging a TypeScript file with Source Maps that uses TypeScript Async Functions. When I set a breakpoint on the first line of the function body, the breakpoint moves to the first executable line following the end of the function body. I’m trying to determine if this is an issue with TypeScript’s SourceMap output, with VS Code, or with the version of V8 used by VS Code.  I’ve tested the same scenario in Chrome Canary and breakpoints seem to bind correctly, which leads me to believe the issue may not be with TypeScript.
After further discussion, it looks like the issue is in the node-debug extension. Changing the default from Bias.GREATEST_LOWER_BOUND to Bias.LEAST_UPPER_BOUND seems to solve the problem.
CC: @weinand

I'm just going to add to this issue as I'm also getting breakpoint errors. When doing the word count extension tutorial setting a breakpoint inside of updateWordCount() doesn't hit even though it must be working as the extension works as expected. I'm on osx if that helps.

Have also seen this...

Still talking about breakpoints and source maps: when we're not in debug mode, we can't put breakpoints in our .ts files, because they won't get caught, so, we must put them in the generated js file, so we can debug our files.
Is there any other way to achieve that? Am I missing anything?
Btw, isn't it possible to VSCode handle that automatically?
Thanks in advance.

@buzinas putting breakpoints in your .ts files should always work, not only when in debug mode. If it doesn't then this is a result of one or more of the following problems:

you haven't turned on "sourceMaps" in you launch config,
you didn't specify where the generated code lives via the "outDir" attribute in the launch config,
there are no source maps,
the source maps have "holes" (i.e. they do fully cover the full source),
a bug in VS Code node debugging

In order to help me investigate the problem, it helps immensely if you could:

use node-inspector to verify that source-maps work fine there, but not in VS Code,
make a reproducible test case available to me.

@weinand not sure if that's the reason, but I'm trying to debug mocha tests in VSCode.
My current workaround is to type debugger; in the place I would have a breakpoint, and then, add more breakpoints when the debugger gets caught.
I don't think it's a problem with the sourcemaps, because when I use the debugger; statement, I can debug the .ts files smoothly.
To reproduce the behavior I'm mentioning, you can follow the steps:

Clone my repo (https://github.com/buzinas/tslint-eslint-rules)
Run npm install and then npm test
You'll see the launch.json configuration. You'll be able to debug TypeScript if:

You place a breakpoint in the equivalent JS file; or
You put a debugger; where you want to break;

If you put a debugger, then you must run gulp build (or ctrl+shift+b).

My simplest repro is:
sample.ts
async function main() {
  await Promise.resolve(1); // bp on this line
  console.log("later");
}
main();

Compiled with:
tsc sample.ts --sourceMap --target ES6 --module commonjs

@buzinas thanks for providing steps that helped me investigating the problem. The problem was the value of "outDir": it should be the path to the generated code not the source. So after changing it to "dist" setting breakpoints in *.ts files worked for me.

@rbuckton yes, changing the default from Bias.GREATEST_LOWER_BOUND to Bias.LEAST_UPPER_BOUND seems to solve the problem. I will test this a little more and then push a fix. Thanks.

@weinand whoa, what a silly mistake hehe
Thanks very much, this will improve my productivity a lot!
A little off topic here, only a question:

Are we getting conditional breakpoints available anytime soon?

@rbuckton the sourcemap for your async/await case is a bit 'spotty':

It does not cover column 0. Using Bias.LEAST_UPPER_BOUND seems to help with that.

As a test, I modified TypeScript to not indent so that column zero was mapped and still saw the same issue.

@andrew-w-ross this bug is about source maps, your problem with the wordcount example seems to be more fundamental. Could you please create a new bug for your problem and include detailed repro steps, since I wasn't able to reproduce the problem. Thanks.

@weinand Sure thing

This issue was moved to Microsoft/vscode-node-debug#7


Benchmark graphics memory usage in add-to-app after dismissing Flutter view.

To prevent issues like https://github.com/flutter/flutter/issues/82790 and to prevent risk of memory leaks, we should benchmark the memory usage of flutter in add-to-app scenarios to verify we clean up any graphics buffers when Flutter is dismissed.

cc @mariamhas


Add protocol s3 to ImageHelper::ALLOWED_PROTOCOLS

Issue Description
Our website uses an S3 bucket for media, but the s3 protocol is not included in ImageHelper::ALLOWED_PROTOCOLS. As a result, the ImageHelper::is_protocol_allowed method returns false, causing an exception to be thrown:
InvalidArgumentException: 'The output file scheme is not supported.'
Proposed Solution
It appears that simply adding s3 to the list of allowed protocols resolves the issue. Perhaps we could add a filter to make ALLOWED_PROTOCOLS configurable, particularly where it is used in the ImageHelper::is_protocol_allowed method (as of Timber v2.1.0).
Versions
Timber : v2.3.0
WP : v6.7.1
PHP : 8.3

Sorry i forgot to give the versions i'm using in my original post :
Timber :  v2.3.0
WP : v6.7.1
PHP : 8.3

Hi @marc-lpg , ImageHelper::ALLOWED_PROTOCOLS or is_protocol_allowed are only present in Timber version 2.1.0 due to a security issue with PHP8.0. We bumped the minimal version to 8.1 in 2.2.0 and removed these methods. Please double check your installed version since I have a feeling you are still running an older version.

Thank you @Levdbas for your help. I was indeed using version 2.1.0 and it works now in 2.3. Sorry for this !


What files need to be hosted?

Hi @andreypopp,
I'm a member of cdnjs. We want to host this library.
Now I guess the files need to be added in cdnjs as fllowing:

src/TextareaAutosize.js
src/calculateNodeHeight.js

Could you please confirm if there is any other files need to be added in cdnjs?
Thank you.
cdnjs/cdnjs#10364

Closing this as duplicate of #140


Issue In Scopes

App error: Error Domain=MSALErrorDomain Code=-42000 "(null)" UserInfo={MSALErrorDescriptionKey={(
openid,
profile,
"offline_access"
)} are reserved scopes and may not be specified in the acquire token call.}

The user you are logging with must not have rights to fetch the data. Go to application settings on the azure portal application settings  and set the permissions to fetch the data.


Feature request: Layout/AlignHash option to allow for key and table styles to both be permissible

Is your feature request related to a problem? Please describe.
The changes to Layout/AlignHash in 0.60 mean that you can no longer mix the key and table style without one of them being reported as a violation. For example:
key_style = {
  key: :value,
  another: :value,
  yet_another: :value
}
table_style = {
  key:         :value,
  another:     :value
  yet_another: :value
}

Before 0.60, if you chose the key style, both hashes would be allowed, because in both cases the keys are left-aligned.
However starting with 0.60, RuboCop strictly enforces the whitespace to the right of the keys. If you set the enforced style to key, the second hash will get marked as a violation. If you choose table, then the first will be a violation.
I believe that there is room for both styles in a single codebase. For small hashes, key is appropriate. But for large hashes the table style is much easier to read. Take a look at the changes introduced by 0.60 to RuboCop's own codebase. I think many people would agree that readability has been decreased.
Describe the solution you'd like
I am open to ideas. A naive solution would be a key_or_table option that allows for both styles of whitespace to be accepted. I.e.
Layout/AlignHash:
  EnforcedColonStyle: key_or_table
  EnforcedHashRocketStyle: key_or_table

Describe alternatives you've considered
Currently the only way to mix key and table styles in the same codebase is to turn off AlignHash altogether. This is a big step backwards, though, because now even blatantly bad alignments will be allowed without any violations, like this:
{
  key: :value,
    another:   :value
}

Or I could set the enforced style to key, and then use a # rubocop:disable comment around every hash where I want to use table syntax. That is a bit tedious, and again, it disables alignment checking completely. To my knowledge there is not a way to change the enforced style with a # rubocop comment; you can only disable the cop.

I believe that there is room for both styles in a single codebase. […] Take a look at the changes introduced by 0.60 to RuboCop's own codebase. I think many people would agree that readability has been decreased.

I agree 100%, and was about to open an issue myself.
What I noticed after seeing the changes to this repository, and two others where I tried upgrading to rubocop v0.60.0 was: it seems that the table style is often used for “literal” hashes, while the key style is used when a hash makes part of method arguments. If I have time, I will try modifying AlignHash to enforce this style, so I can count the number of offenses in these three repositories I checked.

I expected a ticket like this, as the change was somewhat controversial. :) Maybe we can add something which behaved like the old style, but I'm not sure about the naming there (or the exact behaviour it should have).

Fully agree with the original post. I had to disable AlignHash on my own projects because readability of the hashes got reduced in many cases by forcing one or the other option.
What I found useful of this cop was that the key alignment was consistent.
Having value alignedment check would be nice if it is able to accept that values are consistently aligned either by 1. one space after key or left aligned with the rest of the values.
Via the AST that should be possible, right? After having collected the Hash literal, one could query the source ranges for key and value and match them against these criterias?
Not sure what the naming should be. key_or_tablesounds very accurate. While flexibleis much more ambiguous (would require looking up the docs to recall its meaning.)

@bquorning have you been able to find the time to do your experiment?

I did a small experiment, but as I recall, the results were inconclusive.

I think I have created a PR where you can allow both key and table at the same time. Take a look at #6649.
The rubocop yaml will look like:
https://github.com/rubocop-hq/rubocop/pull/6649/files#diff-11a0d7906801d9dea0eccb85667ad811

Closing as fixed by #6649


Change FAQ test_in_other_country for EU integration

Closes #555 where draft texts were discussed with @heinezen.
Many thanks for your help and collaboration!
Please use as you see fit!
The previous texts for
https://www.coronawarn.app/en/faq/#test_in_other_country
https://www.coronawarn.app/de/faq/#test_in_other_country
were in place before the EU integration took place in V1.5 of the app. With the integration it is useful now to:

point to the list of apps from other countries, so that users have access to the download links of these other apps
https://ec.europa.eu/info/live-work-travel-eu/health/coronavirus-response/travel-during-coronavirus-pandemic/mobile-contact-tracing-apps-eu-member-states_de
refer to the FAQ
https://www.coronawarn.app/de/faq/#interoperability_countries
where users can read for which countries keys are available in the German backend.

The advice in this PR is in conformity with the European Commission - Coronavirus: EU interoperability gateway for contact tracing and warning apps – Questions and Answers - Section 3 EU interoperability gateway: contact tracing across borders where it says:
What about if I did a test in another EU country?
You can only insert a positive coronavirus test result in the app of the country where the test was taken. However, when you enter the code in that app, thanks to the interoperability, citizens from the country that you have visited will get notified that they have been in close contact of an infected case.

Also: have you tested the website locally using npm?

@heinezen
Thanks for the review, which I will follow up on tomorrow.
I wouldn't know how to test the website locally using npm. Is that something I could do without previous experience?

@MikeMcC399 The README mentions it here: https://github.com/corona-warn-app/cwa-website#getting-started
You would need to install nodejs and follow the instructions from the README in the terminal/Powershell. This will spawn a local server with the website that you can view to check if the formatting is correct. But it is not required, I can also do that for you.

@heinezen
I have made the suggested text changes. Thank you again for your comments!
I added  target='_blank' rel='noopener noreferrer' to the links. It is more convenient to open external pages in a separate tab (or window), and many of the other links in the FAQ page use this mechanism as well.
Thank you for your pointer to npm in the README. I was able to install and test with npm.
I will complete the commits and put up for review again shortly.

@heinezen
I have made the text changes.
I also made the local FAQ link relative so when it popped up during testing it opened http://localhost:8000/en/faq/#interoperability_countries
Here are screen shots of the article in English and German, plus screen shots of the sites it is linked to:
573 test_in_other_country.zip
I hope this is all OK. I am still feeling my way through the publishing process here (with your help!).

For convenience in reviewing and approving, here are the screen shots from the zip file attached to the previous comment:

@loki-cui
Since you commented in https://github.com/corona-warn-app/cwa-website/issues/447#issuecomment-710079161 about the continued validity of the FAQ entry i.e. positive tests only go into app of country where tested, you might like to review this PR?

I have pushed a dummy change to add my correct github e-mail address. Unfortunately my git client was incorrectly configured for the previous two pushes. Hopefully the commits can be squashed during the final merge (assuming no further changes are requested).

Hi all - we've just received the following text proposal from the RKI:
ALT
Kann ich positive Testergebnisse aus anderen Ländern eingeben?
Nein, das ist leider nicht möglich. Jedes positive Test-Ergebnis, das in die App geladen wird, muss zuvor von Laboren überprüft worden sein. Diese stellen sicher, dass kein Missbrauch stattfindet und keine falsche Ergebnisse eingetragen werden. Dazu sind zur Zeit nur Labore in Deutschland angeschlossen. Sie können also kein positives Testergebnis aus anderen Ländern, zum Beispiel aus den Niederlanden, eingeben.

Wenn Sie sich im EU-Ausland oder in einem dieser Staaten befinden und dort einen molekularbiologischen Test (PCR-Test) gemacht haben, der positiv ist, können Sie diesen in Ihrer Corona-Warn-App hochladen. Dafür müssen Sie sich unter der Hotline +49<PHONE_NUMBER> verifizieren lassen. Sie erhalten eine 10-stellige TAN, mit der das Testergebnis in der App registriert werden kann. Achtung: Die TAN ist nur eine Stunde gültig!
Can I enter positive test results from other countries into the Corona-Warn-App?
If you are in another EU country or in one of these countries and have made a molecular biological test (PCR test) which is positive, you can upload it to the Corona-Warn-App. To do so, it is necessary to verify your identity by calling the hotline +49<PHONE_NUMBER>. You will receive a 10-digit TAN with which the test result can be registered in the app. Attention: The TAN is only valid for one hour!

@MikeMcC399: Thank you nevertheless for your suggestion. I didn't know that the RKI was working on this as well...

Sorry, @MikeMcC399 but I need to decline this pull request as the RKI provided an alternate text.
See https://github.com/corona-warn-app/cwa-website/pull/573#issuecomment-728768274
If you want you can create a new pull request, if not, we will to this tomorrow.
Thanks for your understanding!

@loki-cui
It's good news that foreign PCR tests are allowed via the TAN hotline!
@svengabr
I will create a new PR today based on the text from @loki-cui / RKI. Since I already started this and I now have just a little experience I may as well use it. 😀 No problem about rejecting this PR!


Broadcast page - when try to broadcast email it shows error in notification

Describe the bug

When try to broadcast email it shows error message not triggered email

https://www.berrycast.com/conversations/77386475-8cea-5b1c-9d81-c27e6b3a198d

https://www.berrycast.com/conversations/b9325bec-32fd-5876-a335-92df43a1a215


Fix for #11036 – Provide messages for null pointer exceptions when map property literals contain null

Fixes #11036.
Recreates #16648 with additional changes as requested in the review. As it was only mentioned which method triggers the validation and I didn't know how it's triggered from the build file, I only added an extra unit test for that method.
Context

This solves the issue that null values in map properties provided as literals result in null pointer exceptions without error message, making it difficult to identify the issue without debugging Gradle.
Null values and keys were already checked and even resulted in useful error messages, but only if they are added to a map property via put.
I didn't update any documentation because I don't think the changes require it. The null pointer exceptions were thrown already, they just didn't contain a message.
Contributor Checklist

[x] Review Contribution Guidelines
[x] Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
[x] Make sure all contributed code can be distributed under the terms of the Apache License 2.0, e.g. the code was written by yourself or the original code is licensed under a license compatible to Apache License 2.0.
[x] Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by Gradle team
[x] Provide integration tests (under <subproject>/src/integTest) to verify changes from a user perspective
[x] Provide unit tests (under <subproject>/src/test) to verify logic
[x] Update User Guide, DSL Reference, and Javadoc for public-facing changes
[x] Ensure that tests pass sanity check: ./gradlew sanityCheck
[x] Ensure that tests pass locally: ./gradlew <changed-subproject>:quickTest

Gradle Core Team Checklist

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation
[ ] Recognize contributor in release notes

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test rFM

OK, I've already triggered ReadyForMerge build for you.

@kiwi-oss your PR still makes some tests fail: https://ge.gradle.org/s/p4dnt3jrhnc6g/tests/overview?outcome=failed

I'm surprised because I had run all the tests and they passed, but I'll take a look.

I still can't reproduce that locally. I updated the branch after your merge of the main branch and ran ./gradlew :model-core:check --no-configuration-cache (because it failed for some other reason with the configuration cache). I chose that subproject because that is where MapPropertyIntegrationTest is located.

@kiwi-oss  running configCacheIntegTest should reproduce the problem:

Thank you, now I see the errors, too. I will look into that.

@gradle/configuration-cache please advise

@kiwi-oss, please annotate the offending tests with @ToBeFixedForConfigurationCache, we'll take care of them

Thank you, @eskatos, I added the annotation.

@bot-gradle test rFM

OK, I've already triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test and merge

OK, I've already triggered a build for you.

Pre-tested commit build failed.

@bot-gradle test and merge

OK, I've already triggered a build for you.

@kiwi-oss thank you for the contribution!

Thank you, I'm happy that it worked out in the end!

Follow up fixing the configuration cache usage at https://github.com/gradle/gradle/pull/19596

Thanks! I'm glad it was an easy change. I didn't have enough insight into the code to figure it out quickly.


Adding filter using an empty array throws error

let operationalModes = try RestaurantOperationalHourMode.query(on: req).filter(\.id ~~ opertionHrModeIds).all()

opertionHrModeIds is an empty array
Thrown error log is shown below
[psql] [2018-05-18 04:34:25 +0000] select oid, relname from pg_class []
[psql] [2018-05-18 04:34:25 +0000] SELECT * FROM "tokens" WHERE ("tokens"."value" = $1) LIMIT 1 OFFSET 0 ["TEXT (binary) 7278D68E-1A48-495B-BD69-AA12489E20CB)"]
[psql] [2018-05-18 04:34:25 +0000] SELECT * FROM "users" WHERE ("users"."id" = $1) LIMIT 1 OFFSET 0 ["UUID (binary) »ïJé$OG²\rvCñËÚY)"]
Getting restaurant
[psql] [2018-05-18 04:34:25 +0000] SELECT * FROM "restaurants" WHERE ("restaurants"."userId" = $1) ["UUID (binary) »ïJé$OG²\rvCñËÚY)"]
[psql] [2018-05-18 04:34:25 +0000] SELECT * FROM "restaurantoperationalhourmodes" WHERE (0) []
[ ERROR ] PostgreSQLDiagnosticResponse.coerce_to_boolean: ERROR: argument of WHERE must be type boolean, not type integer (Logger+LogError.swift:17)
[ DEBUG ] Possible causes for PostgreSQLDiagnosticResponse.coerce_to_boolean: argument of WHERE must be type boolean, not type integer (Logger+LogError.swift:23)

A test for this was added in Fluent's benchmarker a while back (and the related issue fixed). Let me know if you're still seeing it, thanks!


Crash at app update

I have an app with no room db, and at update, a db with saferoom in place. What happens when attempting to use the database is this:
2019-08-26 09:51:24.217 31117-31165/ E/AndroidRuntime: FATAL EXCEPTION: pool-5-thread-1
Process:, PID: 31117
net.sqlcipher.database.SQLiteException: file is not a database: , while compiling: select count(*) from sqlite_master;
at net.sqlcipher.database.SQLiteCompiledSql.native_compile(Native Method)
at net.sqlcipher.database.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:91)
at net.sqlcipher.database.SQLiteCompiledSql.(SQLiteCompiledSql.java:64)
at net.sqlcipher.database.SQLiteProgram.(SQLiteProgram.java:89)
at net.sqlcipher.database.SQLiteQuery.(SQLiteQuery.java:48)
at net.sqlcipher.database.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:60)
at net.sqlcipher.database.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:2012)
at net.sqlcipher.database.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1898)
at net.sqlcipher.database.SQLiteDatabase.keyDatabase(SQLiteDatabase.java:2647)
at net.sqlcipher.database.SQLiteDatabase.openDatabaseInternal(SQLiteDatabase.java:2577)
at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1243)
at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1318)
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:166)
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:135)
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:131)
Do you have any idea about what might be causing this? Thanks

I struggle with similar issues. Currently it looks like a background task like JobScheduler or similar causes this.
I tested with
class MyApplication : Application() {
   ...
    override fun onTerminate() {
        appDatabase.close()
        super.onTerminate()
    }

but then you run into "DB not open" errors. When and how to open db again ... ?
Even making a PR in this repo and based SqlCipher repo is a kind of senseless. You have to ask yourself, if you want to be depending on this repo. It has a promising feature, but I at least spent to much time with this not working library

@hannesa2: onTerminate() on an Application is not called — see the documentation.
@ovicristurean: That comes from SQLCipher. The most common cause is that the passphrase is invalid.

Both statements are not true
A:

@hannesa2: onTerminate() on an Application is not called — see the documentation.

How do yout explain after my close statement this one ?

B:

@ovicristurean: That comes from SQLCipher. The most common cause is that the passphrase is invalid.

I use a stable, always the same, password

How do yout explain after my close statement this one ?

Since I do not have the source code that corresponds to this stack trace — let alone a project that reproduces the crash — I cannot fathom a guess. Give me a way to reproduce the problem, and I will happily look into it.

In my case, I think the problem is that I also have GreenDAO ORM which also uses SQLCipher. Perhaps SafeRoom is changing the passphrase, and the secure key which I used for GreenDao cannot be used to open the writable database, since it has been changed by SafeRoom. I noticed that at app update, if I open the GreenDAO db without it being encrypted, everything is fine. Of course, this is not the optimal solution, so I am currently migrating all my GreenDao entities to Room, and then removing the dependency completely. Will let you know if this will be the final solution in my case, because I believe this would be useful to some other people experiencing the same issues.

I can confirm that the app update crash was caused by the fact that I had both GreenDao and Room in my app. Things seem to be fine so far. Migrating the encrypted database tables of GreenDao to Room solved the problem.


SKBitmap.Decode returns null when provided WebClient Stream with certain jpg

Environment:
Windows 10, .NET Core 2.0 Preview 2<EMAIL_ADDRESS>SKBitmap.Decode returns null when provided Stream from WebClient for some jpg files.
using (var client = new WebClient())
{
    using (var stream = client.OpenRead(url))
    {
        var bitmap = SKBitmap.Decode(stream); //returns null
    }
}

Interesting enough, the same image will be decoded fine if first downloaded to memory stream. Also works if converted to bytes.
I tried to compare failing/working files, using JPEGSnoop. Found out that the following data is present in the failing files. Not sure if it is exactly the reason, but at least some clue.

Please see the repro here:
https://github.com/funkyOne/SkiaSharpStreamIssueRepro
This does seem like a bug. I'm happy to help more, but don't have much expertise in imaging stuff. I can provide more of such images if needed.
Thanks

I'm having the same issue using HttpClient, e.g.
using (var client = new HttpClient())
{
	var url = "https://image.ibb.co/bO1RLF/broken2.jpg";
	var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead);
	// var worksWithThis = await response.Content.ReadAsByteArrayAsync();
	using (var stream = await response.Content.ReadAsStreamAsync())
	{
		var skbmp = SKBitmap.Decode(stream);
	}
}

It does seem to be something to do with buffering, because it works if I change to HttpCompletionOption.ResponseContentRead or uncomment the worksWithThis line, but I'm at a complete loss to explain why it affects some files but not others.

Thanks for reporting this.

Hi there
the "bm" in this method
    public byte[] Image2Byte(SKBitmap bitmap)
    {
        var temp = bitmap.Bytes;

        var bm = SKBitmap.Decode(temp);

        return temp;
    }

is always null.
Is it me, or is should this not be happening?
Cheers

@CmdrNexus this is a bug that was fixed https://github.com/mono/SkiaSharp/commit/dbd09b0ffeca981c878c5ce5ec333019c85406a4
The basic issue is that the .NET and SkiaSharp streams work differently, and I was not properly handling this.


rand()

First of all, thank you, @daanhb and everyone else for making this package - we have been needing something to represent these types of spaces for a while: https://github.com/JuliaPOMDP/POMDPs.jl/issues/301, https://github.com/JuliaReinforcementLearning/CommonRLSpaces.jl/issues/14 (also, it seems quite a challenge to deal with all of the conceptual issues and different use cases people have - I admire your valor in attempting that :smiley: )
One thing that we commonly need in our applications is to get a random element of a set, for example rand(ProductDomain(1..2, 3..4)).
Do you think that this package should include rand?
On one hand, this does not make a ton of sense because it is not clear what distribution this should be drawn from (uniform would be a natural choice, but may be hard to implement for some sets), but on the other hand, many other sets without distributions support rand, i.e. (rand(Set([1,2])), rand(1..2)).
If rand does not belong in this package, where should it go?

Hmm, does IntervalSets actually implement rand? I seem to get an error:
julia> using IntervalSets; rand(1..2)
ERROR: ArgumentError: Sampler for this object is not defined

Apart from that, did you have any issues implementing rand? If so perhaps I can help.
Not sure that this package itself is the place though. There is a point_in_domain function to generate exactly one point of a domain, which is mainly used for testing purposes (and is incredibly helpful for that).

First of all, thank you, @daanhb and everyone else for making this package - we have been needing something to represent these types of spaces for a while: JuliaPOMDP/POMDPs.jl#301, JuliaReinforcementLearning/CommonRLSpaces.jl#14 (also, it seems quite a challenge to deal with all of the conceptual issues and different use cases people have - I admire your valor in attempting that 😃 )

Thanks!

It works for me with IntervalSets 0.7.1
julia> using IntervalSets

julia> rand(1..2)
1.0824522848444758

Apart from that, did you have any issues implementing rand? If so perhaps I can help.

No, it should not be a terrible challenge to implement. It is just a communication/packaging/conceptual issue. If I implement rand(::DomainSets.Rectangle) in package P, and someone else implements it in package Q, things could get confusing if you use both P and Q.
So, the question is where to implement it. Since rand belongs to Base and DomainSets owns the types, it seems like here would be the only safe place. Maybe another package like DomainSetsRandom?

(to be clear, I'm happy to make a PR for the low hanging fruit cases at least but just want to make sure package maintainers are on board before I jump in)

Well if IntervalSets has it, we are just extending. Why don't you aim for a file like src/applications/rand.jl to get started, thanks for offering.


suppliers-admin: Sort default by name and add sort-arrows to the chart headers [Bug] [Javascript]

The Problem:
As am Admin user, When visiting suppliers-admin page, I would like the chart to be sorted default by name and to add sort-arrows to the chart headers
Steps:

Login as ad admin.
https://spark.staging.midburn.org
2 Go to suppliers-admin page
https://spark.staging.midburn.org/he/suppliers-admin

Result:
not sure how the chart is sorted, and the user dont know he can click on headers to sort by them. (See screenshot)
Expected:
Chart to be sorted default by name
and to add sort-arrows to the chart headers

#853

done


django.db.utils.ProgrammingError: relation "pghistory_context" already exists

When restarting a dockerized instance of Django, the pghistory migrations are not properly idempotent. Requires clearing the DB before I can launch the app again.

I double checked and there are no instances where the migrations in pghistory would cause the pghistory_context table to be re-built. All migration were created with the migration system except for 0004 which just installs the context tracking func.
I also use pghistory frequently with pytest-django and --reuse-db/--create-db, which I imagine would exercise this scenario.
If I'm missing something and you can provide a way to replicate this, let me know!


Stop clearing PDF scale args

https://github.com/Modelmat/sphinxcontrib-drawio/blob/7155c36fa792b22553de6edf4da7e39c1ccd03d1/sphinxcontrib/drawio/__init__.py#L182
Mentions the issue 344 which is now fixed on later versions.

If this doesn't break operation for newer drawio versions, I would keep this in the code for now so that old versions continue to work well.

Okay, maybe we should just note this in code.


Error: Unable to set multiple values on scalar index for key

When I run this code and click on "promote 1" or "promote 2", then I see "Uncaught Error: Unable to set multiple values on scalar index for key" error in the console.
If I disable the "Nest the items" section, then the "promote 1" and "promote 2" buttons work as expected (i.e. their title is swapped with the zero title).
Or if their is a branch of the tree with just a single child, then promoting that child works (i.e. only have 0 and 1 in the tree and click "promote 1" or have 0,1,2, and 3 in the tree and click "promote 3". All other promotes fail with the aforementioned error).
So their seems to be an issue when parent-div += child-div inserts 2 siblings and then a change is made.
Create some test items
commit
  [#item idx: 0 title: "0"]
  [#item idx: 1 title: "1"]
  [#item idx: 2 title: "2"]
  //[#item idx: 3 title: "3"]
  //[#item idx: 4 title: "4"]
  //[#item idx: 5 title: "5"]
  //[#item idx: 6 title: "6"]

Make the items into a binary tree by inserting a parent index. Zero is the root;
1 and 2 are the children of 0; 3 and 4 children of 1; etc.
search
	item = [#item idx]
bind
	item.parent := floor[value: (idx - 1) / 2]

Swap item tree position with its parent (i.e. promote it)
search @event @session @browser
  [#click element: [#div #promote pidx]]
  item = [#item idx: pidx]
  parent = [#item idx: item.parent]
  i2 = parent.idx
commit @browser
  [#div children: [#div text: "promote click match for sidx " + pidx]]
commit
  parent.idx := item.idx
  item.idx := i2

Display the items
search
	[#item idx title parent]
bind @browser
  [#div idx text: "{{idx}}, t:{{title}}, p:{{parent}}"
     style: [padding-left: "10px"]
     sort: idx]

Nest the items
search @browser @session
  child = [#item idx parent]
  child-div = [#div idx]
  parent-div = [#div idx: child.parent]
bind @browser
  parent-div.children += child-div

Add buttons for promoting an item up the hierarchy
search
  [#item idx parent]
  [#item idx: parent]  // Only those items whose parent exists
bind @browser
  [#div children:
    [#div #promote text: "promote " + idx pidx: idx]]

Hey @btheado
That error message (which is in desperate need of improvement) means that you have multiple children assigned to the same parent. It blows up since that's invalid DOM.
However, in this case the error is faulty -- your code is doing everything as it should and is never actually assigning multiple parents to the same child. Unfortunately, a fix for one edge case seems to have broken another, and the renderer is just not doing the right thing here. I'll look into it.


Update code to work with latest Rust [WIP]

What about merging this to master?
Nobody uses the old code anyway.


Fix riscv64 for no-std

See issue #8768

The latest release (22.0) is 2 days old and doesn't include this PR. Is this a correct behavior?

Sounds like a reasonable strategy!


Cannot push to git-lfs Gitlab repo

VSCode Version: Code - Insiders 1.13.0-insider (eaa887c507e1614f90c9f04a30ceda775759e814, 2017-06-06T10:23:09.381Z)
OS Version: Darwin x64 16.6.0
Extensions:

Extension
Author
Version

ng-template
Angular
0.1.3

vscode-markdownlint
DavidAnson
0.9.1

code-settings-sync
Shan
2.8.1

sort-lines
Tyriar
1.3.0

Bookmarks
alefragnani
0.15.1

project-manager
alefragnani
0.18.0

vscode-eslint
dbaeumer
1.2.11

vscode-html-css
ecmel
0.1.5

tslint
eg2
0.15.0

Angular2
johnpapa
2.3.2

vscode-icon-theme
jtlowe
1.5.0

karyishlight
smlombardi
1.0.0

theme-karyfoundation-themes
karyfoundation
14.0.0

HTMLHint
mkaufman
0.3.3

vscode-stylefmt
mrmlnc
2.4.1

angular2-inline
natewallace
0.0.17

typescript-hero
rbbit
0.13.2

stylelint
shinnn
0.24.0

darcula-extended
smlombardi
3.3.2

slime
smlombardi
2.6.2

theme-tesla
smlombardi
6.0.0

change-case
wmaurer
1.0.0

Steps to Reproduce:

make some edits to files in a branch
commit working files
click "git sync" button in statusbar

Get an error that I need to pull first, even though there is nothing to pull on the remote.  I click "open git log" and this is what is there:
git pull
git push

This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.

error: failed to push some refs to<EMAIL_ADDRESS>
git show :client/src/app/web/badges/badges.component.html

The Git Tower app, which we also use, can then push this without issue.  This only happens with this repo, older repos on GitLab and GitHub work fine.

What do you get with which git-lfs, in the command line?
Is there any error/warning in the Developer Tools?

I guess I don't have it on my Mac.  I have Xcode, I thought I had all I needed.  Will investigate further.

Just installed it via Homebrew.  So I get /usr/local/bin/git-lfs
It works now.  You might want to add this to the docs somewhere?

Code doesn't depend on git-lfs. Your repository does.

Good point.


Add drush rebuild-registry ("rr") command to CLI container.

https://www.drupal.org/project/registry_rebuild

Resolved in https://github.com/blinkreaction/docker-drupal-cli/commit/344eb6b37bc17c74995fde761443057e2dd2f891#diff-3254677a7917c6c01f55212f86c57fbf
docker-compose pull to get the latest cli image, then dsh up to restart containers.


CloudIotMqttExampleTest is failing

./iot/api/CloudIotMqttExampleTest/runTests.ps1
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotSample/CloudIotSample.csproj : warning NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project. [/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/CloudIotMqttTest.csproj]
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExample/CloudIotMqttExample.csproj : warning NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project. [/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/CloudIotMqttTest.csproj]
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotSample/CloudIotSample.csproj : warning NU1701: Package 'M2Mqtt 4.3.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project. [/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/CloudIotMqttTest.csproj]
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExample/CloudIotMqttExample.csproj : warning NU1701: Package 'M2Mqtt 4.3.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project. [/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/CloudIotMqttTest.csproj]
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/CloudIotMqttTest.csproj : warning NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/CloudIotMqttTest.csproj : warning NU1701: Package 'M2Mqtt 4.3.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
Build started, please wait...
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/CloudIotMqttTest.csproj : warning NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/CloudIotMqttTest.csproj : warning NU1701: Package 'M2Mqtt 4.3.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotSample/CloudIotSample.csproj : warning NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotSample/CloudIotSample.csproj : warning NU1701: Package 'M2Mqtt 4.3.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExample/CloudIotMqttExample.csproj : warning NU1701: Package 'BouncyCastle 1.8.4' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
/tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExample/CloudIotMqttExample.csproj : warning NU1701: Package 'M2Mqtt 4.3.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project.
Build completed.

Test run for /tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/bin/Debug/netcoreapp2.0/CloudIotMqttTest.dll(.NETCoreApp,Version=v2.0)
Microsoft (R) Test Execution Command Line Tool Version 15.8.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Topic IAM Policy updated: { "etag": "BwWIdICdolY=", "bindings": [ { "role": "roles/pubsub.publisher", "members": [<EMAIL_ADDRESS>] } ] }
Number of registries: 86
projects/dotnet-docs-samples-tests/locations/us-central1
Creating iot-test-1557408837
Registry:
iot-test-1557408837
	Name: projects/dotnet-docs-samples-tests/locations/us-central1/registries/iot-test-1557408837
	HTTP Enabled: HTTP_ENABLED
	MQTT Enabled: MQTT_ENABLED
Device created:
rsa-device-mqttconfig-1557408837
	Blocked: False
	Config version: 1
	Name: projects/dotnet-docs-samples-tests/locations/us-central1/registries/iot-test-1557408837/devices/2793535185789384
	State:
CloudIotMqttExample startMqtt dotnet-docs-samples-tests us-central1 iot-test-1557408837 rsa-device-mqttconfig-1557408837 /tmpfs/src/gfile/rsa_private.pem RS256 /tmpfs/src/gfile/roots.pem events --waittime 5 --nummessages 1
Removed device: rsa-device-mqttconfig-1557408837
Creating gateway with id: rsa-listen-gateway
[xUnit.net 00:00:33.60]     GoogleCloudSamples.CommonTests.TestMqttDeviceEvents [FAIL]

uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException : Exception of type 'uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException' was thrown.
   at uPLibrary.Networking.M2Mqtt.MqttClient.SendReceive(Byte[] msgBytes, Int32 timeout)
   at uPLibrary.Networking.M2Mqtt.MqttClient.Connect(String clientId, String username, String password, Boolean willRetain, Byte willQosLevel, Boolean willFlag, String willTopic, String willMessage, Boolean cleanSession, UInt16 keepAlivePeriod)
   at uPLibrary.Networking.M2Mqtt.MqttClient.Connect(String clientId, String username, String password)
   at GoogleCloudSamples.CloudIotMqttExample.StartMqtt(String projectId, String cloudRegion, String registryId, String deviceId, String privateKeyFile, String algorithm, String caCert, Int32 numMsgs, String messageType, String mqttBridgeHostName, Int32 mqttBridgePort, Int32 jwtExpiresMin, Int32 waitTime) in /tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExample/Program.cs:line 416
   at GoogleCloudSamples.CloudIotMqttExample.<>c.<Main>b__18_2(MqttExampleOptions opts) in /tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExample/Program.cs:line 751
   at GoogleCloudSamples.VerbMap`1.<>c__DisplayClass9_0`1.<Add>b__0(Object a) in /tmpfs/src/github/dotnet-docs-samples/commandlineutil/Lib/VerbMap.cs:line 53
   at GoogleCloudSamples.VerbMap`1.Run(String[] args, Parser parser) in /tmpfs/src/github/dotnet-docs-samples/commandlineutil/Lib/VerbMap.cs:line 90
   at GoogleCloudSamples.CloudIotMqttExample.Main(String[] args) in /tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExample/Program.cs:line 758
   at GoogleCloudSamples.CommandLineRunner.Run(String[] arguments) in /tmpfs/src/github/dotnet-docs-samples/testutil/TestUtil.cs:line 135
   at GoogleCloudSamples.IotTestFixture.Run(String[] args) in /tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/CloudIotMqttTest.cs:line 304
   at GoogleCloudSamples.CommonTests.Run(String[] args) in /tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/CloudIotMqttTest.cs:line 52
   at GoogleCloudSamples.CommonTests.TestMqttDeviceEvents() in /tmpfs/src/github/dotnet-docs-samples/iot/api/CloudIotMqttExampleTest/CloudIotMqttTest.cs:line 66

I will look into it

Looks like it was issue with something outside of this code. I have just tested unit tests locally. It looks like it is back to normal.

Ok.  Then please create a PR to no longer skip the test.

Ok, Will do

I think I mis-used built-in github tool to create PR, and it looks like I already pushed changes.
https://github.com/GoogleCloudPlatform/dotnet-docs-samples/commit/2c9f9932082313e24f1a4d6b998e2857ae213136

Ok.  Thank you for letting me know.  It looks like the build is still
passing.
On Fri, May 24, 2019 at 1:18 PM munkhuushmgl<EMAIL_ADDRESS>wrote:

I think I mis-used built-in github tool to create PR, and it looks like I
already pushed changes.
2c9f993
https://github.com/GoogleCloudPlatform/dotnet-docs-samples/commit/2c9f9932082313e24f1a4d6b998e2857ae213136
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/dotnet-docs-samples/issues/812?email_source=notifications&email_token=ACZ3TYUIC7BTVF26SIO4SJ3PXBERPA5CNFSM4HL3YM7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWGPCUY#issuecomment-495776083,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACZ3TYVJW3Y5WRLWVXFYSZTPXBERPANCNFSM4HL3YM7A
.


PFS-131 Upload online card payments file

Codecov Report
Attention: Patch coverage is 78.94737% with 4 lines in your changes missing coverage. Please review.

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

Files with missing lines
Patch %
Lines

shared/upload_type.go
50.00%
4 Missing :warning:

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #20   +/-   ##
=======================================
  Coverage        ?   40.99%
=======================================
  Files           ?       39
  Lines           ?     1422
  Branches        ?        0
=======================================
  Hits            ?      583
  Misses          ?      807
  Partials        ?       32

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


Bump pyca/cryptography to v41.0.0 or upper.

Closes #98

Codecov Report

Merging #99 (b11f1db) into main (9e2eb38) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #99   +/-   ##
=======================================
  Coverage   86.70%   86.70%
=======================================
  Files          29       29
  Lines         782      782
=======================================
  Hits          678      678
  Misses        104      104


Fix tracing if method raise exception

If one of the decorated method was raising an exception, the next span was added under the span of the method that raised the exception, and the global span from customer was lost.
Without fix:

With fix:

(message created by the CI based on PR content)


Is is possible that a python module that wrap a third-party c++ trading communiction libraries can work well with zipline?

I want to use zipline to live-trade against the Chinese stock and future markets. The brokers in those markets have provides some c++ libraries to handle the execution of the orders. The problem is that most of these c++ libs are multithreading and with c++ callbacks. I have read the code of zipline and found that the way that zipline are written will probably make the integration very hard. My question is whether I can use gevent(or eventlet) to wrap these c++ lib to provide synchronize-style functions that work compatiblely with zipline framework?

Hey, is the library you are working with publicly available. It is hard to make a suggestion without seeing the API you are working with.

Yes, It is accessible to the public, the download page is here(http://www.sfit.com.cn/5_2_DocumentDown.htm). This API is written in c++, and is multi-threaded. Some of class methods may be called by a different thread to return the results to user(multi-threading is mentioned in its user manual). I am basicly new to python, so forget about gevent or eventlet here. I just wondered how to handle these callbacks if I want to integrate this c++ libs with zipline framework.

Hi @javagg , I don't know about the compatibility of gevent or eventlet with your c++ lib, but we've been using zipline in a gevented process successfully, so that end of it shouldn't be a blocker.


[Help] Wanted to create eval command

Hey evcxr team!
I was told in the crates.io repo to create an issue if I needed help with a usecase. So I made a discord bot in rust and would very much like to be able to evaluate rust code from discord. The way this would work is I would have a vec of strings that contain each line of my rust code.. I would then assemble that code into a single string. I would then like to use the EvalContext and evaluate the code, sending the output or any error. My main issues are as follows:

How do I get the output/error
How will this work given my app is asynchronous (tokio )
what does this meanevcxr::runtime_hook() , and why at the top of main?

How will this work given my app is asynchronous (tokio )

Evcxr is synchronous, so it will block until the code is executed.

what does this mean evcxr::runtime_hook(), and why at the top of main?

The function has a doc comment:
https://github.com/google/evcxr/blob/3464f7b931f53d54b24c5a451a26aa9571e7fb57/evcxr/src/runtime.rs#L26-L32
Honestly I don't think evcxr is very suitable for the discord bot you want to build. Evcxr has a lot of complexity to deal with preserving variables across individual invocations. In your case simply wrapping the code in fn main() { println!("{:?}", {  and  }); } and then directly invoking rustc should work fine. If you also want to support crates from crates.io, you may do something like the rust playground (source): Take the top 100 crates and add them as fixed dependency to a cargo project. This cargo project is then compiled once to compile all dependencies. The compiled dependencies can then be re-used for each code snippet.

Hi @Daggy1234 - I'd second what @bjorn3 said that assuming you don't need variables to be preserved between executions, you'd be better off with something a lot simpler.
But to add more detail about runtime_hook, evcxr starts a subprocess in which to run the code. That subprocess can either be the same binary as the one using evcxr::EvalContext or a separate binary. Either way, the binary that gets launched as the subprocess needs to call runtime_hook pretty much at the start of main. If runtime_hook detects that it's not running as a subprocess (it checks to see if some environment variable is set), then it just returns, otherwise it enters a control loop where it receives commands from the parent process.
If you call EvalContext::new, then the binary that you call it from must call runtime_hook as early as possible in main. If that's not an option, you can supply a separate binary for launching the subprocess. That separate binary needs to call runtime_hook. You can then use EvalContext::with_subprocess_command.

For a set of lessons I gave few year ago, I got a similar need "running a single rs with deps". I used cargo-script, maybe it will better suit your need + wrapper,...

Thank you everyone. Yeah rustc and a file based approach is much better. Thanks!


Setup help/guide

Hi @ThePrimeagen ,
this is an absolute cool project, the Refactoring book has boosted my skill level like nothing else, even not vim. I'd love to contribute.
It's most likely a setup issue on my machine, I am also not the Neovim-plug-pro yet. I know GH issues are no place for setup help - however, I really don't know where else to look/check.... Maybe you have some ideas on how to set this up for development?
I have installed neovim:
nvim --version
NVIM v0.5.0
Build type: Release
LuaJIT 2.1.0-beta3

and the plugins you mentioned via vim-plug, the installation works:
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'tree-sitter/tree-sitter-typescript'
Plug '~/refactoring.nvim'

while ~/refactoring.vim this repo cloned (last clone 8th of August) evening, latest and greatest version.
However when starting I get tons of errors. Here are examples for re rt with the test file from this project nvim ~/refactoring.nvim/lua/refactoring/tests/extract.simple-function.start.ts.
<leader> re:
E5108: Error executing lua ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:14: The
coroutine failed with this message: ...start/refactoring.nvim/lua/refactoring/pipeline/init.lua
:58: Scope is nil

<leader>rt
E5108: Error executing lua ...ck/packer/start/telescope.nvim/lua/telescope/pickers.lua:2: modul
e 'popup' not found:
        no field package.preload['popup']
        no file './popup.lua'
        no file '/Users/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/popup.lua'

        no file '/usr/local/share/lua/5.1/popup.lua'
        no file '/usr/local/share/lua/5.1/popup/init.lua'
        no file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/popup.lua'
        no file '/Users/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/popup/init.lua'
        no file './popup.so'
        no file '/usr/local/lib/lua/5.1/popup.so'
        no file '/Users/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/popup.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'

Where do I start from here? Any hint what's missing in my project installation?

could you provide the code you have highlighted?  Or a brief form of it?
Also I don't know what <leader>re I assume refactor extract function.
If you could provide me what you have highlighted that would be great.  It looks like you have some sort of telescope issue.  Do you have telescope installed?  What does re do?
My guess is that you have something that needs to be worked out with the first one, and the second one I assume is a library issue (potentially).
Lastly, you don't need tree-sitter-typescript.  You can simply :TSInstall typescript and it should be enough to run these plugins.  I am working pretty hard on hardening and making master the bestest its ever been.  Thanks for taking the time to make an issue with lots of detail.

You will need plenary for development.
https://github.com/nvim-lua/plenary.nvim

Hi @ThePrimeagen ,
thanks for the quick reply 🥇 . These are actually two issues, so I have split them.
Issue "refactor extract function"

could you provide the code you have highlighted? Or a brief form of it?

Sure, I used one of the test files in this repository, extract.simple-function.start.ts . I did highlight lines 4-6 (both including) with vim's visual line highlighting mode, so that 4-6 are completely selected. Here's a screenshot:

Also I don't know what re I assume refactor extract function.

Exactly, that's what I meant
Yes, I have telescope  and plenary installed, these are the installed plugins on my machine:
" Refactoring.nvim on local machine and the lib's dependencies
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'tree-sitter/tree-sitter-typescript'
Plug '~/refactoring.nvim'

Here comes the interesting part.
When I open a new editor, mark the line and "refactor extract function" as described above, it fails with the error. If I then add your suggested :TSInstall typescript, afterwards I can do the refactoring successfully on that open nvim session/instance. This is funny, because when doing that I get a warning "is already installed, do you want to reinstall..."
This works until I close nvim and open nvim again. When mark the same selection in the newly opened nvim, do "refactor extract function", then, the same issue appears again. I can then (again) resolve it with :TSInstall typescript....
Issue "display refactoring"
I can get one step further by adding popup to my installation Plug 'nvim-lua/popup.nvim'. then everything works 👍🏻 . I should have read this in the telescope.nvim documentation here.
I'll add a PR to add the popup.nvim/plenary.nvim lib to the sample packer setup require section, and add a hint that one has to TSInstall.
So the only thing left wrt issue is the first point, why I have to  TSInstall typescript after each time opening a new nvim.
Cheers, Fabian

@fabianschwarzfritz Is this still an issue? I think the plugin is more stable as this point.