bug: vim.fn.win_execute(win, 'normal zx') does nothing

Did you check docs and existing issues?

[X] I have read all the which-key.nvim docs
[X] I have updated the plugin to the latest version before submitting this issue
[X] I have searched the existing issues of which-key.nvim
[X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
0.10.0
Operating system/version
MacOS 14.6.1
Describe the bug
This appears to be a regression with V3 which-key version.
In previous versions, vim.fn.win_execute(win, 'normal zx') would work.
It also works if I completely comment out which-key plugin setup.
Steps To Reproduce

create 2 splits
in one of them, run =vim.fn.win_getid() to get the window id, ex result: 1067
select some lines and create a fold with zf
open the fold with zo
move cursor a few lines down, outside of the folded lines
enter insert mode
move to the other split (without exiting insert mode in the previous one) and enter :lua vim.fn.win_execute(1067, 'normal zx')

Notice that nothing happens.
Expected Behavior
the fold should collapse. As it does if you execute zx in normal mode from the first window.
Health
==============================================================================
which-key: require("which-key.health").check()

- OK Most of these checks are for informational purposes only.
  WARNINGS should be treated as a warning, and don't necessarily indicate a problem with your config.
  Please |DON't| report these warnings as an issue.

Checking your config ~
- WARNING |mini.icons| is not installed
- OK |nvim-web-devicons| is installed

Checking for issues with your mappings ~
- OK No issues reported

checking for overlapping keymaps ~
- WARNING In mode `n`, <m> overlaps with <m]>, <m8>, <mq>, <mu>, <m2>, <mi>, <mz>, <mk>, <mj>, <m:>, <mh>, <mf>, <m{>, <m,>, <me>, <m0>, <mc>, <m}>, <md>, <ms>, <mt>, <mr>, <mb>, <ml>, <mo>, <mx>, <ma>, <m4>, <m1>, <mp>, <mm>, <m9>, <my>, <m[>, <m5>, <m7>, <m6>, <m3>, <mg>, <mv>, <mw>, <mn>, <m;>:
  - <mq>: marks: set mark Q
  - <mu>: marks: set mark U
  - <mi>: marks: set mark I
  - <mz>: marks: set mark Z
  - <mk>: marks: set mark K
  - <mj>: marks: set mark J
  - <mh>: marks: set mark H
  - <mf>: marks: set mark F
  - <me>: marks: set mark E
  - <mc>: marks: set mark C
  - <md>: marks: set mark D
  - <ms>: marks: set mark S
  - <mt>: marks: set mark T
  - <mr>: marks: set mark R
  - <mb>: marks: set mark B
  - <ml>: marks: set mark L
  - <mo>: marks: set mark O
  - <mx>: marks: set mark X
  - <ma>: marks: set mark A
  - <mp>: marks: set mark P
  - <mm>: marks: set mark M
  - <my>: marks: set mark Y
  - <mg>: marks: set mark G
  - <mv>: marks: set mark V
  - <mw>: marks: set mark W
  - <mn>: marks: set mark N
- WARNING In mode `n`, <gc> overlaps with <gcc>:
  - <gc>: Toggle comment
  - <gcc>: Toggle comment line
- WARNING In mode `n`, <]y> overlaps with <]yy>:

- WARNING In mode `n`, <]u> overlaps with <]uu>:

- WARNING In mode `n`, <]C> overlaps with <]CC>:

- WARNING In mode `n`, <]x> overlaps with <]xx>:

- WARNING In mode `n`, <[y> overlaps with <[yy>:

- WARNING In mode `n`, <[u> overlaps with <[uu>:

- WARNING In mode `n`, <[C> overlaps with <[CC>:

- WARNING In mode `n`, <[x> overlaps with <[xx>:

- WARNING In mode `n`, <dm> overlaps with <dm->, <dm6>, <dm3>, <dm<Space>>, <dm4>, <dm1>, <dm=>, <dm2>, <dm9>, <dm8>, <dm5>, <dm7>, <dm0>:

- WARNING In mode `n`, <<Space>x> overlaps with <<Space>xt>, <<Space>xf>:
  - <<Space>x>: buffer: close current buffer while preserving window
  - <<Space>xt>: mini.test: run tests
  - <<Space>xf>: mini.test: run file
- WARNING In mode `x`, <r> overlaps with <r=>:
  - <r>: restOfIndentation textobj
  - <r=>: Select right hand side of an assignment
- WARNING In mode `o`, <r> overlaps with <r=>:
  - <r>: restOfIndentation textobj
  - <r=>: Select right hand side of an assignment
- OK Overlapping keymaps are only reported for informational purposes.
  This doesn't necessarily mean there is a problem with your config.

Checking for duplicate mappings ~
- OK No duplicate mappings found

Log
on_key: <CR>
ModeChanged(c:n)
  Unsafe(command-mode)
  suspend: Mode(n:8)
  Trigger(del) Mode(n:8) ' " ` g' g` ] [ <C-W> z = > <Space> < g <Plug>
State(start): Mode(n:0) Node(z) { keys = "z" }
  update Mode(n:12)
  continue: z Mode(n:12)
  getchar
  got: x
  suspend: Mode(n:12)
  Trigger(del) Mode(n:12) <Plug> ' " ` g' g` ] [ <C-W> z = > <Space> < g
  feedkeys: Mode(n:12) zx
Trigger(add) Mode(n:12) ' " ` g' g` ] [ <C-W> z = > <Space> < g <Plug>
Trigger(add) Mode(n:8) ' " ` g' g` ] [ <C-W> z = > <Space> < g <Plug>
on_key: s
on_key: l
BufEnter(12)
on_key: <Esc>
on_key: ;
ModeChanged(n:c)
  Safe(true)
on_key: q
on_key: a
on_key: <CR>
ModeChanged(c:n)
  Unsafe(command-mode)
  suspend: Mode(n:12)
  Trigger(del) Mode(n:12) <Plug> ' " ` g' g` ] [ <C-W> z = > <Space> < g
Trigger(add) Mode(n:12) ' " ` g' g` ] [ <C-W> z = > <Space> < g <Plug>

Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "folke/which-key.nvim", opts = {} },
    -- add any other plugins here
  },
})

Note: this is my full config:
      local wk = require('which-key')
      vim.o.timeout = true
      vim.o.timeoutlen = 500

      wk.setup({
        plugins = {
          marks = true, -- shows a list of your marks on ' and `
          registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
          spelling = {
            enabled = false, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
            suggestions = 20, -- how many suggestions should be shown in the list?
          },
          -- the presets plugin, adds help for a bunch of default keybindings in Neovim
          -- No actual key bindings are created
          presets = {
            operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion
            motions = false, -- adds help for motions
            text_objects = true, -- help for text objects triggered after entering an operator
            windows = false, -- default bindings on <c-w>
            nav = true, -- misc bindings to work with windows
            z = true, -- bindings for folds, spelling and others prefixed with z
            g = true, -- bindings for prefixed with g
          },
        },
        keys = {
          scroll_down = '<PageDown>', -- binding to scroll down inside the popup
          scroll_up = '<PageUp>', -- binding to scroll up inside the popup
        },
      })

Note, in case it helps debug the issue, this works as a workaround but has the side effect of cursor flickering if calculating folds for lots of lines:
    local currentWin = vim.api.nvim_get_current_win()
    vim.api.nvim_set_current_win(win)

    vim.api.nvim_feedkeys(
      -- note: if in insert mode, <C-\><C-o> does a normal mode command without moving cursor
      -- see help ins-special-special
      vim.api.nvim_replace_termcodes('<c-\\><c-o><cmd>normal zx<cr>', true, false, true),
      'n',
      false
    )
    vim.api.nvim_set_current_win(currentWin)

I've also tried using vim._foldupdate(win, start, end) as a workaround but it seems to do nothing...

note that this affects grug-far.nvim plugin. This line:
https://github.com/MagicDuck/grug-far.nvim/blob/ebab68b2150079732ae8074eefb261a124824139/lua/grug-far/fold.lua#L18
Workaround is to pass the following to wk.setup():
        disable = {
          ft = { 'grug-far' },
        },

Anti-close comment :)

worked around this issue in grug-far by executing norm! zx (with exclam)
Sine it's such an edge case, I'll just close this one.


server crash on illformatted metadata json

The server crashed due to incorrect format of jsons (metadata) while calling with api.
For e.g. if we write
{
"language_id: "file"
}
it will throw error, because JSON.parse on fetch controller of api.ts doesn't have try catch

Please assign me this issue.

Thanks for reporting this, the thing is we can fix this thing by JSON.stringify() before parsing it, so that It wont throw error, and the main thing to check is, if the json recieved by json can be fit in the type of MetacallJSON or not, if not we will simply respond back with incorrect metacall.json.


jodd-petite singleton scope bean is thread safe??

a singleton scope bean, when one more thread to invoke getBean, it is thread safe?

Huh.
After the bean is created, yes. Which means, 99% of your app is fine :)
But there is a thread-safe issue when creating bean. Fixing asap. Will be released in 5.5


Strange output when complex variants are called

I	6862	.	T?:>????0????]?}?;?G5@0>??4?4O?D?XA?I"??W5??R??*R?ش???*?T??|?H??Q&`<`+&?*	ATTTGGGCCTATACTTTCAAAATCGGGGTTTGAAAACCCCTATATGTTCGACCGAATGTTAATCTCATAAAAATTTGATGAAAATAAAAT	0	.
AB=0;ABP=0;AC=1;AF=1;AN=1;AO=5;CIGAR=90X;DP=6;DPB=89.3222;DPRA=0;EPP=13.8677;EPPR=0;GTI=0;LEN=90;MEANALT=2;MQM=60;MQMR=0;NS=1;NUMALT=1;ODDS=45.7811;PAIRED=1;PAIREDR=0;PAO=178;PQA=6734;PQR=0;PRO=0;QA=254;QR=0;RO=0;RPL=4;RPP=6.91895;RPPR=0;RPR=1;RUN=1;SAF=4;SAP=6.91895;SAR=1;SRF=0;SRP=0;SRR=0;TYPE=mnp;technology.ILLUMINA=1	GT:DP:RO:QR:AO:QA:GL	1:6:0:0:5:254:0
?S/??,GG?#82	N?$<3?{Z C?6E ܡ?|.U???B???I$?ԩ?G??J??^?"?I?YA..?F?	TCAGTCTCAAAATTTATACGATAGACACTTTTTGGCGTTTATCGCCTATATTCCGTCAAAAACCATTATTCATCATTCTTTCAATGTTGTTTTTTTTAAG	0	.	AB=0;ABP=0;AC=1;AF=1;AN=1;AO=2;CIGAR=14X1M85X;

I am getting strange output when complex variant types are called. If I add the -u flag it appears to prevent this from happening.

@danielecook that is very odd! It seems the reference fasta file may be corrupt or have a corrupt index?

I was using a bgzipped fasta index. Unzipping and indexing that worked fine. Does freebayes handle bgzipped indices?

I don't think freebayes supports a bgzipped reference file with the -f option.
It needs a regular .fasta and the corresponding .fai samtools index for it (although I think it will generate the .fai if it doesn't exist)

That's it! Thanks.


Perform Inference using Python instead of command line

Hi, is there any example of python code that can run inference instead of using the command line? If so can you kindly share

Thanks for your interest in LMFlow! You may check speculative_inference.py, where you can replace SpeculativeInferencer with Inferencer (along with their arguments) in examples/chatbot.py. Please feel free to contact us again if there is any problem during the usage. Thanks very much 😄


an ALL parameter to calc the all indicators with default parameter

Dear,
is there the possibility to have ALL the indicators created with only a few lines?
this feature could be very very useful.
thanks in advance and waiting a kindly reply.
luigif

You can use inspect module. But be careful that not every indicator methods have default parameter value.
import inspect
import stock_indicators.indicators as indicators

all_indicator_methods = inspect.getmembers(indicators, inspect.isfunction)
for indicator_method in all_indicator_methods:
    # call and do somthing here.

thanks...that's very kind of You!!
Best regards.
luigi


Number of classes

Hi
I have a query about the number of classes, as per this repo, for binary number of classes should be 1, but as per solutions discussed in issue #233 , number of classes should be 2 for proper training of the network. This is a bit confusing.
Also I do not see one hot encoding in the original repo by qubvel, so wondering how proper segmentation results were achieved.
I encoded my binary mask and expanded dimensions as required, but I had to get rid of the following code from this repo-
#extract certain classes from mask (e.g. cars)
   masks = [(mask == v) for v in self.class_values]
   mask = np.stack(masks, axis=-1).astype('float')
# # add background if mask is not binary
    # if mask.shape[-1] != 1:
    #     background = 1 - mask.sum(axis=-1, keepdims=True)
    #     mask = np.concatenate((mask, background), axis=-1)
    #     print(mask.shape)

so now the shape of my mask is : (1, 480, 320, 2) and image is (1, 480,320,3)
But now I am running into the following issues-

Binary mask is inverted: 1 (white) for background and 0(black) for the lesion(class of interest).

Error in the generation of the training augmentation batch:
-->  img = cv2.warpAffine(img, matrix, (width, height), flags=interpolation, borderMode=border_mode, borderValue=value)
return img
error: OpenCV(4.5.3) /tmp/pip-req-build-fvfwe_ss/opencv/modules/imgproc/src/imgwarp.cpp:2595: error: (-215:Assertion failed) src.cols > 0 && src.rows > 0 in function 'warpAffine'

In other words, what specifically needs to be changed in this "binary example repo"  to handle the binary segmentation case where there is only one class of interest (for eg tumor etc) and the other is the background.

Did you manage to sort this out? If so, please post your code?

Yes I did. Thank you @johnfoxy


Local pull request success status testing

Docs Build status updates of commit 1e614bc:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

E2E_DocsBranch_Dynamic/index.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Invisible selections

Since the 0.5.0 release all selections are borked. I'd post a screenshot, but you can literally see nothing when a block of text is selected.

:+1: Same here (on OS X Mavericks).

Okay, reverted that last commit and released v0.6.0


Plans for index submission

Hi just a heads up I've been marinating one of these at https://github.com/cnpryer/awesome-polars.
Thought I'd just let you know in case it get's added to the index.

Hi @cnpryer it's great, I hadn't seen it, sorry!
No problem to add this list to the index for sure but if you prefer maybe we can put everything together in the same list? I intend to do an almost daily watch of the news related to Polars in the next weeks/months


[entropy_src/rtl] create a pulse for alert signal

Verification works best when the main fsm alert signal is a pulse.
Fixes #10134.
Signed-off-by: Mark Branstad<EMAIL_ADDRESS>

Awesome! Mark is this ready to merge?  I think @Muqing-Liu could use this too.


Remove the deprecated JUnit surefire provider from reference

It's recommended to use the built-in provider from version 2.22.0 of the maven-surefire-plugin onwards.

👍


:memo: document where to add the tests and how to run them

This is purely from code review. I haven't managed to get tests working on windows.

@basarat: thank you for your contribution! When I started contributing on Atom, running tests was one of the major pain points I encountered, therefore I think this PR will be much appreciated by newcomers as well :+1:
Running specs from cmd with script/grunt run-specs doesn't work particularly well for me: as a result, I usually run tests via apm test, which by the way works greatly to run single-package specs as well. By the way, a similar discussion took place here and you may want to have a look at it :wink:
What do you think if we also specify that tests can be run also through the GUI (e.g. Window: Run Package Specs)?
Thank you again for this :space_invader:

Window: Run package specs does not work for me (on windows):

apm test works like a charm. Also I used fdescribe to run just my tests, but not going to document it as people might commit with that :rose:. I've updated this pull request to take apm test into account.

Thank you @basarat!


TypeError('sequence item 0: expected str instance, int found',) when we do make html

Hello I have the following error when I do "make html" in my doc directory
TypeError('sequence item 0: expected str instance, int found',)

If I do the following change in my conf.py it remove the error, it is normal ?
            'expand-responses': [ 200, 201 ],

            'expand-responses': [ "200", "201" ],

Cheers.

Hey @kadogo, thanks for the feedback! Apparently it was a bug in the docs. It was fixed in c12e231dae18afd02b7b75c506e71d5be8363cfb. Moreover, the code in master now throws a human readable error if these values aren't strings. I plan to release a new version really soon. Sorry for inconvenience.


ISO 3166-2

Proposed change

Clarified in documentation the part of the ISO 3166-2 code we use to identify subdivisions.
BTW, this form doesn't even contemplate documentation changes! 😭
Type of change

[ ] New country/market holidays support (thank you!)
[ ] Supported country/market holidays update (calendar discrepancy fix, localization)
[ ] Existing code/test/process quality improvement (best practice, cleanup, refactoring, optimization)
[ ] Dependency upgrade (version update)
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] Breaking change (a code change causing existing functionality to break)
[ ] New feature (new python-holidays functionality in general)

Checklist

[ ] I've followed the contributing guidelines
[ ] This PR is filed against beta branch of the repository
[ ] This PR doesn't contain any merge conflicts and has clean commit history
[ ] The code style looks good (make pre-commit)
[ ] I've added tests to verify that the new code works and all tests pass locally (make test, make tox)
[X] The related documentation has been added/updated (check off the box for free if no updates is required)

@mborsetti You might want to change the PR from merging into master to beta instead IMO

@mborsetti You might want to change the PR from merging into master to beta instead IMO

Absolutely, lol. Thanks for catching this.

Hey Mike, thanks for updating this!
I guess you still need to go over all checklist items to make sure the PR is ready for review. I'll also make sure to update the PR template based on your comment

Yeah, I did the edit on www.github.com and I guess it's not that easy to do it from here.

@mborsetti I've created a PR to make this PR works for the latest release, cheers :)


Errors when updating moquette-broker from 0.15 to 0.16

Running on JVM 17, yesterday we updated moquette-broker from 0.15 to 0.16 and started seeing these errors in our logs:
Error processing protocol message: PUBLISH

logger name: io.moquette.broker.NewNettyMQTTHandler

java.lang.NullPointerException: Cannot invoke "String.hashCode()" because the return value of "io.moquette.broker.SessionCommand.getSessionId()" is null
	at io.moquette.broker.PostOffice.routeCommand(PostOffice.java:632)
	at io.moquette.broker.MQTTConnection.processPublish(MQTTConnection.java:427)
	at io.moquette.broker.MQTTConnection.handleMessage(MQTTConnection.java:80)
	at io.moquette.broker.NewNettyMQTTHandler.channelRead(NewNettyMQTTHandler.java:58)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
        ...

CONNACK send failed, cleanup session and close the connection

logger name: io.moquette.broker.MQTTConnection

io.netty.channel.StacklessClosedChannelException: null
	at io.netty.channel.AbstractChannel$AbstractUnsafe.write(Object, ChannelPromise)(Unknown Source)

And before ánd after this:
An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
 It usually means the last handler in the pipeline did not handle the exception.

logger name: io.netty.channel.DefaultChannelPipeline

io.netty.channel.StacklessClosedChannelException: null
	at io.netty.channel.AbstractChannel$AbstractUnsafe.write(Object, ChannelPromise)(Unknown Source)

Also, our consuming application started reporting errors so it wasn't just some heads-ups but things were actually failing.
Mind you, these didn't start happening immediately but took like half a day to appear.
Any idea what this could be?

This happens because  routeCommand  method receives a null clientId https://github.com/moquette-io/moquette/blob/9eb2a6f3d4b582324444a198d94e6e6846acf0fd/broker/src/main/java/io/moquette/broker/PostOffice.java#L629-L632.
That clientId is extracted from the packet, do you have any logs around the time the problem manifest?

@andsel I'm afraid not, definitely not logs of the contents of packets. We have a number of clients integrating with us. Do you think it a pure coincidence that this started happening after this update, by some misbehaving client, or is there code that could have affected this?

@andsel This is the order of things happening:

With version 0.16 was introduced event loops to isolate processing of session's requests. Now sessions are sticky to a session event loop. Same loop can handle many sessions.
Every loop is a thread, and we have as many loop as many CPU cores.
Every loop has a command queue, which contains SessionCommands to be executed. So the routing method has the responsibility to create the session command and enqueue to the appropriate queue.
So your problem is not a coincidence, because before this code wasn't present.
The motivation of its introduction is to simplify concurrency management in Moquette.
So the problem could:

or the client is misbehaving  the client Id
or there is  a bug in code that doesn't decode or move forward the clientId

@andsel also we saw many additional warning logs that did not accompany those exceptions, while we didn't see those logs occur before.

That clientId is extracted from the packet

Do you not already know the clientId from the open connection itself? Does it not make sense to get the clientId from a more permanent place to avoid misbehaving clients, if that is a possibility?

Do you have a plain test form of the logs to share?

Does it not make sense to get the clientId

ClientId (if present) is passed by the client to the server during the CONNECT, then the broker stores the clientID in MQTTConnection and in Session.

Is it possible for the Publish packet to be handled before the code is run that sets the ClientID on the Channel?
https://github.com/moquette-io/moquette/blob/9eb2a6f3d4b582324444a198d94e6e6846acf0fd/broker/src/main/java/io/moquette/broker/MQTTConnection.java#L204-L237
(Actual setting in line 215 and 223)
Maybe we should move the call to NettyUtils.clientID(channel, clientIdUsed); directly in executeConnect and not in that ChannelFutureListener?

@hylkevds

Maybe we should move the call to NettyUtils.clientID(channel, clientIdUsed); directly in executeConnect and not in that ChannelFutureListener?

Yes that actually would be safer, however I don't think it's related to this. The publish on the new connection is done after it set the clientId in the channel's attributes:
https://github.com/moquette-io/moquette/blob/9eb2a6f3d4b582324444a198d94e6e6846acf0fd/broker/src/main/java/io/moquette/broker/MQTTConnection.java#LL220C29-L220C77
The idea was to set up all connection related stuff after we the broker has a working connection with the client, so setting the clientId into the attributes after the broker was successful in sending the CONNACK.

That's for sending queued messages with cleanSession=false.
But what happens when the client sends a new publish before the connect handshake is finished? Before that ChannelFutureListener has fired... is that possible?

If cleanSession=true means that the client is not yet subscribed to any topic.If I recall correctly the MQTT specification says that a client is not allowed to send any other message other than a DISCONNECT until it receives  a CONNACK.
@hylkevds your case could manifest when a client sends  a CONNECT, send a SUBSCRIBE before the receiving CONNACK, and another client sends PUBLISH that match the topic.
Now I don't recall exactly if the protocol prohibits to send SUBSCRIBE/PUBSLISH after a CONNECT and before a CONNACK. In case Moquette should enforce it, it should close the connection if the connecting client is sending a PUB on an MQTTConnect which is not yet transitioned to connected state (aka connected = true;).

If I understand the exception right, in this case it is the client itself that publishes, not another client.
So is it possible for a client to send a PUBLISH before the CONNACK has gone fully through? Considering that from the client perspective the CONNACK may have been sent, but not processed yet due to our short buffering?

From [MQTT-3.1.4-5] in MQTT 3.1.1 spec http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html
Clients are allowed to send further Control Packets immediately after sending a CONNECT Packet;
Clients need not wait for a CONNACK Packet to arrive from the Server. If the Server rejects the CONNECT,
it MUST NOT process any data sent by the Client after the CONNECT Packet [MQTT-3.1.4-5]

Non normative comment
Clients typically wait for a CONNACK Packet, However, if the Client exploits its freedom to send
Control Packets before it receives a CONNACK, it might simplify the Client implementation as
it does not have to police the connected state. The Client accepts that any data that it sends before
it receives a CONNACK packet from the Server will not be processed if the Server rejects the connection.

So this means that a PUB could be sent by the client after  the CONNECT and before it receives the CONNACK. So this means that the clientId has to be setup in the Channel attributes before the server reply with a CONNACK.

So this is a bug and the solution is to move the clientID assignment into Channel's attributes before the CONNACK message is written to the Channel itself.


Validate response codes in tests

when a test fails due to a failed request (for example not being able to auth), the code just continues on until it hits a miscellaneous runtime error (like a response dict not having a token)
This just adds a function to validate that a response yielded a 2XX status code, otherwise it errors out with the code and response body

LGTM


Perform a dry-run of booting a network with the Validator community

Problem Domain:

We want to iron out kinks in the process of booting a network in tandem with our validator community
We want our mainnet launch to benefit from any mistakes we make in a dry run

Solution:

Define the process to collect gentx's
Provision resources in xion-rehearsal-1 in the testnet cluster
Boot the network in tandem with Validator community
Fix what went wrong for mainnet launch

Dependencies:

Build the gentx collection tooling

Successful with speedrun boot of xion-testnet-4. Closing ticket


Unable to setup latest version

When trying to login to use my washer Dryer, I'm getting auth failure on the log viewer, yet can login on app with same information, no issues.
Have they killed this app?
Going to try the eariler versions if work then upgrade to v12 and see if works

Hi, Haier hasn't changed anything, we are now on good terms :slightly_smiling_face:
Problems with authentication are occasionally reported here, it is a bit fiddly implemented at the moment. For some it helped to change the password or reinstall the integration to get it working. I hope we can make a cleaner login in the future.

Hi, Haier hasn't changed anything, we are now on good terms 🙂 Problems with authentication are occasionally reported here, it is a bit fiddly implemented at the moment. For some it helped to change the password or reinstall the integration to get it working. I hope we can make a cleaner login in the future.

will give it a go, thank you.


Simplify webpack setup

Bundle the client using the standard web target. YEA.

Please ignore the missing coverage issue :eyes:.


Could not get a resource from the pool

I have a multithread application, where I have defined a JedisPool with next configuration:
JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxTotal(1000);
poolConfig.setMaxIdle(1000);
poolConfig.setMinIdle(16);
poolConfig.setTestOnBorrow(true);
poolConfig.setTestOnReturn(true);
poolConfig.setTestWhileIdle(true);
poolConfig.setMinEvictableIdleTimeMillis(Duration.ofSeconds(60).toMillis());
poolConfig.setTimeBetweenEvictionRunsMillis(Duration.ofSeconds(30).toMillis());
poolConfig.setNumTestsPerEvictionRun(3);
poolConfig.setBlockWhenExhausted(true);
The application is running in several machines so there is a JedisPool on each.
Sometimes I get the error:
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at redis.clients.util.Pool.getResource(Pool.java:50)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:99)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.NoSuchElementException: Unable to validate object
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:506)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
at redis.clients.util.Pool.getResource(Pool.java:48)
I have set  in redis server maxclients= 99900
Jedis version: 2.8.0
Redis version: 3.2.8
Java version: 1.8

poolConfig.setMaxTotal(1000);
may be your client get Jedis exceed 1000,i have sufferd this problem

^. Thx @jingbanghu for providing feedback. I'll close this as it has been discussed countless times already in the issue tracker

I actually scanned through the tracker but couldn't find any specific solution to this problem. Could you please point to one matching the question here?
Just to provide more information I configured also /etc/hosts to other available interfaces but didn't help either. I have set the parameters mentioned above, and even provided application.properties to my Spring boot application to no avail.


Error on scheduler: Only timezones from the pytz library are supported

Steps to reproduce:

Step 1: flexget -L verbose daemon start

Config:
schedules:
  - tasks: ['some-task']
    interval:
      hours: 1

Backtrace:
  File "/home/pi/.local/lib/python3.9/site-packages/flexget/__init__.py", line 44, in main
    manager.start()
  File "/home/pi/.local/lib/python3.9/site-packages/flexget/manager.py", line 383, in start
    self.handle_cli()
  File "/home/pi/.local/lib/python3.9/site-packages/flexget/manager.py", line 409, in handle_cli
    self.daemon_command(command_options)
  File "/home/pi/.local/lib/python3.9/site-packages/flexget/manager.py", line 506, in daemon_command
    run_daemon()
  File "/home/pi/.local/lib/python3.9/site-packages/flexget/manager.py", line 487, in run_daemon
    fire_event('manager.daemon.started', self)
  File "/home/pi/.local/lib/python3.9/site-packages/flexget/event.py", line 109, in fire_event
    result = event(*args, **kwargs)
  File "/home/pi/.local/lib/python3.9/site-packages/flexget/event.py", line 20, in __call__
    return self.func(*args, **kwargs)
  File "/home/pi/.local/lib/python3.9/site-packages/flexget/components/scheduler/scheduler.py", line 126, in setup_scheduler
    scheduler = BackgroundScheduler(
  File "/home/pi/.local/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 87, in __init__
    self.configure(gconfig, **options)
  File "/home/pi/.local/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 126, in configure
    self._configure(config)
  File "/home/pi/.local/lib/python3.9/site-packages/apscheduler/schedulers/background.py", line 29, in _configure
    super(BackgroundScheduler, self)._configure(config)
  File "/home/pi/.local/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 697, in _configure
    self.timezone = astimezone(config.pop('timezone', None)) or get_localzone()
  File "/home/pi/.local/lib/python3.9/site-packages/apscheduler/util.py", line 93, in astimezone
    raise TypeError('Only timezones from the pytz library are supported')
TypeError: Only timezones from the pytz library are supported

Additional information:

FlexGet version: 3.5.2
Python version: 3.9.2
Installation method:
Using daemon (yes/no): yes

It seems to have started after https://github.com/Flexget/Flexget/pull/3453 that change the timezone argument to a non-pytz compatible object.

It looks like maybe apscheduler handles setting the timezone to the local zone itself now, maybe we can just pull that argument out of the initialization of the scheduler...

I opened https://github.com/Flexget/Flexget/pull/3648 on that direction.


leftToRightJoined: _dependents.isEmpty

I'm getting several errors when attempting to use leftToRightJoined.

_dependents.isEmpty'
Duplicate Global Key detected
'_elements.contains(element)': is not true.

In Main, onGenerateRoute the switch statement for that route is:
case '/set_alarm':
            return PageTransition<dynamic>(
              child: SetAlarmScreen(key: key),
              type: PageTransitionType.leftToRightJoined,
              childCurrent: this,
              settings: settings,
              duration: const Duration(seconds: 1),
            );

I can't seem to find out where this issue is coming from, and it only affects the joined transitions. Any ideas?

I've tried that I'm afraid. I'm pretty sure it has something to do with the nav stack. Here's a short video of my app from splash screen.
It goes:
Splash screen -> Splash Screen (with animation) -> pushNamedAndRemoveUntil -> IntroScreen -> pushNamedAndRemoveUntil -> HomeScreen -> pushNamed (this is the one with the page transition or leftToRightJoined) -> setAlarm.
As you can see in the video you see previous screens from this nav stack, that should be removed?
Video Link


Linking problem with ghc 7.8.2 winx64

Hello,
While trying to compile the test suite (or any other library depending on bindings-GLFW), I obtain the following error:
[1 of 1] Compiling Bindings.GLFW    ( dist\build\Bindings\GLFW.hs, dist\build\Bindings\GLFW.o )
[1 of 1] Compiling Bindings.GLFW    ( dist\build\Bindings\GLFW.hs, dist\build\Bindings\GLFW.p_o )
In-place registering bindings-GLFW-<IP_ADDRESS>...
Preprocessing test suite 'main' for bindings-GLFW-<IP_ADDRESS>...
[1 of 1] Compiling Main             ( Test.hs, dist\build\main\main-tmp\Main.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package bindings-DSL-1.0.21 ... linking ... done.
Loading package bindings-GLFW-<IP_ADDRESS> ... linking ... ghc.exe: warning: _vsnprintf from msvcrt is linked instead of __imp__vsnprintf
ghc.exe: C:\Users\Vince\Documents\Coding\bindings-GLFW\dist\build\HSbindings-GLFW-<IP_ADDRESS>.o: unknown symbol `strdup'
ghc.exe: unable to load package `bindings-GLFW-<IP_ADDRESS>'

Here some version of the software I'm using:
[15:54:13] ~/Documents/Coding/bindings-GLFW> ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.2
[15:54:20] ~/Documents/Coding/bindings-GLFW> ghc --print-target-platform
x86_64-unknown-mingw32
[15:54:25] ~/Documents/Coding/bindings-GLFW> ghc --print-build-platform
x86_64-unknown-mingw32
[15:54:29] ~/Documents/Coding/bindings-GLFW> cabal --version
cabal-install version <IP_ADDRESS>
using version <IP_ADDRESS> of the Cabal library

Is there any working around for this problem?
Thanks

I'm pretty sure this is fixed.

same linking problem unknow symbol "strdup "
d\Graphics\UI\GLFW\Types.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package bindings-DSL-1.0.22 ... linking ... done.
Loading package bindings-GLFW-<IP_ADDRESS> ... linking ... ghc.exe: unable to load pa
ckage bindings-GLFW-<IP_ADDRESS>' ghc.exe: warning: _vsnprintf from msvcrt is linked instead of __imp__vsnprintf ghc.exe: C:\Users\rudy\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\bindings-G LFW-<IP_ADDRESS>\HSbindings-GLFW-<IP_ADDRESS>.o: unknown symbol strdup'
cabal: Error: some packages failed to install:
GLFW-b-<IP_ADDRESS> failed during the building phase. The exception was:
ExitFailure 1
B:\haskell>ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.3
B:\haskell>ghc --print-target-platform
x86_64-unknown-mingw32
B:\haskell>ghc --print-build-platform
x86_64-unknown-mingw32
B:\haskell>cabal --version
cabal-install version <IP_ADDRESS>
using version <IP_ADDRESS> of the Cabal library


[in_app_purchase][android] isAvailable returns false when enabling playstore after disabling it.

I have validated this on Android, not yet IOS.  But the scenario using package in_app_purchase is

From Android app settings, disable Google Play store
Execute flutter app, hit line of code
bool isStoreAvailable = await _iap?.isAvailable() ?? false;
Step 2 will return false (store is unavailable)
While app is still running, enable Google Play Store
Re-execute same command
bool isStoreAvailable = await _iap?.isAvailable() ?? false;

Step 5 will continue to return false, even when Google Play store is available.  The app must be restarted after store is re-enabled for it to return true (store available).
However, if you perform the opposite by starting flutter app with store enabled, execute  iap?.isAvailable() which will return true, then disable store and re-execute code it will return false as expected.
It appears that _iap?.isAvailable() is unable to detect when the Play store goes from unavailable to available.

Hi @sneglia9191, thanks for filing the issue.
Please provide the output of flutter doctor -v as well as the version of in_app_purchase and in_app_purchase_android & in_app_purchase_ios that you're using.
Thank you

Hello.  Thanks for the reply.
package versions:
in_app_purchase: ^3.0.8
in_app_purchase_android: ^0.2.3+6
in_app_purchase_storekit: ^0.3.3
Flutter doctor -v output:
[√] Flutter (Channel stable, 3.3.4, on Microsoft Windows [Version 10.0.22000.1098], locale en-US)
• Flutter version 3.3.4 on channel stable at C:\Users\snegl\Documents\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision eb6d86ee27 (6 weeks ago), 2022-10-04 22:31:45 -0700
• Engine revision c08d7d5efc
• Dart version 2.18.2
• DevTools version 2.15.0
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at C:\Users\snegl\AppData\Local\Android\sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
[√] IntelliJ IDEA Community Edition (version 2022.1)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1
• Flutter plugin version 69.0.4
• Dart plugin version 221.6008.17
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.1098]
• Chrome (web)      • chrome  • web-javascript • Google Chrome 105.0.5195.102
• Edge (web)        • edge    • web-javascript • Microsoft Edge 107.0.1418.35
[√] HTTP Host Availability
• All required HTTP hosts are available

Issue is reproducible on android only.
Steps to reproduce - Android

Disable play store in app settings
Run the example app in the in_app_purchase plugin or copy the sample below into the main.dart file of the example
Observe that the store connection is not available (this is expected)
Go to settings and enable play store again
Go back to the app and try to check isAvailable again, (if using the code sample below, just click on the FAB)
Observe that the app doesn't change the value of isAvailable
Hot-restart the app
Observe that isAvailable now returns true.

PS: Not all devices allow you to disable the play store, so this can only be attempted on devices that allow you to disable the store. I tested on an android emulator. My Poco X3 NFC did not allow me to disable the play store.
On iOS, this worked just fine.

iOS
android

modified sample
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:async';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:in_app_purchase/in_app_purchase.dart';
import 'package:in_app_purchase_android/billing_client_wrappers.dart';
import 'package:in_app_purchase_android/in_app_purchase_android.dart';
import 'package:in_app_purchase_storekit/in_app_purchase_storekit.dart';
import 'package:in_app_purchase_storekit/store_kit_wrappers.dart';
import 'consumable_store.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();

  runApp(_MyApp());
}

const bool _kAutoConsume = true;

const String _kConsumableId = 'YOUR-ID-HERE';
const String _kUpgradeId = 'YOUR-ID-HERE';
const String _kSilverSubscriptionId = 'YOUR-ID-HERE';
const String _kGoldSubscriptionId = 'YOUR-ID-HERE';
const List<String> _kProductIds = <String>[
  _kConsumableId,
  _kUpgradeId,
  _kSilverSubscriptionId,
  _kGoldSubscriptionId,
];

class _MyApp extends StatefulWidget {
  @override
  State<_MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<_MyApp> {
  final InAppPurchase _inAppPurchase = InAppPurchase.instance;
  late StreamSubscription<List<PurchaseDetails>> _subscription;
  List<String> _notFoundIds = <String>[];
  List<ProductDetails> _products = <ProductDetails>[];
  List<PurchaseDetails> _purchases = <PurchaseDetails>[];
  List<String> _consumables = <String>[];
  bool _isAvailable = false;
  bool _purchasePending = false;
  bool _loading = true;
  String? _queryProductError;

  @override
  void initState() {
    final Stream<List<PurchaseDetails>> purchaseUpdated =
        _inAppPurchase.purchaseStream;
    _subscription =
        purchaseUpdated.listen((List<PurchaseDetails> purchaseDetailsList) {
      _listenToPurchaseUpdated(purchaseDetailsList);
    }, onDone: () {
      _subscription.cancel();
    }, onError: (Object error) {
      // handle error here.
    });
    initStoreInfo();
    super.initState();
  }

  Future<void> initStoreInfo() async {
    final bool isAvailable = await _inAppPurchase.isAvailable();
    if (!isAvailable) {
      setState(() {
        _isAvailable = isAvailable;
        _products = <ProductDetails>[];
        _purchases = <PurchaseDetails>[];
        _notFoundIds = <String>[];
        _consumables = <String>[];
        _purchasePending = false;
        _loading = false;
      });
      return;
    }

    if (Platform.isIOS) {
      final InAppPurchaseStoreKitPlatformAddition iosPlatformAddition =
          _inAppPurchase
              .getPlatformAddition<InAppPurchaseStoreKitPlatformAddition>();
      await iosPlatformAddition.setDelegate(ExamplePaymentQueueDelegate());
    }

    final ProductDetailsResponse productDetailResponse =
        await _inAppPurchase.queryProductDetails(_kProductIds.toSet());
    if (productDetailResponse.error != null) {
      setState(() {
        _queryProductError = productDetailResponse.error!.message;
        _isAvailable = isAvailable;
        _products = productDetailResponse.productDetails;
        _purchases = <PurchaseDetails>[];
        _notFoundIds = productDetailResponse.notFoundIDs;
        _consumables = <String>[];
        _purchasePending = false;
        _loading = false;
      });
      return;
    }

    if (productDetailResponse.productDetails.isEmpty) {
      setState(() {
        _queryProductError = null;
        _isAvailable = isAvailable;
        _products = productDetailResponse.productDetails;
        _purchases = <PurchaseDetails>[];
        _notFoundIds = productDetailResponse.notFoundIDs;
        _consumables = <String>[];
        _purchasePending = false;
        _loading = false;
      });
      return;
    }

    final List<String> consumables = await ConsumableStore.load();
    setState(() {
      _isAvailable = isAvailable;
      _products = productDetailResponse.productDetails;
      _notFoundIds = productDetailResponse.notFoundIDs;
      _consumables = consumables;
      _purchasePending = false;
      _loading = false;
    });
  }

  @override
  void dispose() {
    if (Platform.isIOS) {
      final InAppPurchaseStoreKitPlatformAddition iosPlatformAddition =
          _inAppPurchase
              .getPlatformAddition<InAppPurchaseStoreKitPlatformAddition>();
      iosPlatformAddition.setDelegate(null);
    }
    _subscription.cancel();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    final List<Widget> stack = <Widget>[];
    if (_queryProductError == null) {
      stack.add(
        ListView(
          children: <Widget>[
            _buildConnectionCheckTile(),
            _buildProductList(),
            _buildConsumableBox(),
            _buildRestoreButton(),
          ],
        ),
      );
    } else {
      stack.add(Center(
        child: Text(_queryProductError!),
      ));
    }
    if (_purchasePending) {
      stack.add(
        Stack(
          children: const <Widget>[
            Opacity(
              opacity: 0.3,
              child: ModalBarrier(dismissible: false, color: Colors.grey),
            ),
            Center(
              child: CircularProgressIndicator(),
            ),
          ],
        ),
      );
    }

    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('IAP Example'),
        ),
        body: Stack(
          children: stack,
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () async  {
            final isAvailable =  await _inAppPurchase.isAvailable();

            setState(() {
              _isAvailable = isAvailable;
            });
          },
        ),
      ),
    );
  }

  Card _buildConnectionCheckTile() {
    if (_loading) {
      return const Card(child: ListTile(title: Text('Trying to connect...')));
    }
    final Widget storeHeader = ListTile(
      leading: Icon(_isAvailable ? Icons.check : Icons.block,
          color: _isAvailable ? Colors.green : ThemeData.light().errorColor),
      title:
          Text('The store is ${_isAvailable ? 'available' : 'unavailable'}.'),
    );
    final List<Widget> children = <Widget>[storeHeader];

    if (!_isAvailable) {
      children.addAll(<Widget>[
        const Divider(),
        ListTile(
          title: Text('Not connected',
              style: TextStyle(color: ThemeData.light().errorColor)),
          subtitle: const Text(
              'Unable to connect to the payments processor. Has this app been configured correctly? See the example README for instructions.'),
        ),
      ]);
    }
    return Card(child: Column(children: children));
  }

  Card _buildProductList() {
    if (_loading) {
      return const Card(
          child: ListTile(
              leading: CircularProgressIndicator(),
              title: Text('Fetching products...')));
    }
    if (!_isAvailable) {
      return const Card();
    }
    const ListTile productHeader = ListTile(title: Text('Products for Sale'));
    final List<ListTile> productList = <ListTile>[];
    if (_notFoundIds.isNotEmpty) {
      productList.add(ListTile(
          title: Text('[${_notFoundIds.join(", ")}] not found',
              style: TextStyle(color: ThemeData.light().errorColor)),
          subtitle: const Text(
              'This app needs special configuration to run. Please see example/README.md for instructions.')));
    }

    // This loading previous purchases code is just a demo. Please do not use this as it is.
    // In your app you should always verify the purchase data using the `verificationData` inside the [PurchaseDetails] object before trusting it.
    // We recommend that you use your own server to verify the purchase data.
    final Map<String, PurchaseDetails> purchases =
        Map<String, PurchaseDetails>.fromEntries(
            _purchases.map((PurchaseDetails purchase) {
      if (purchase.pendingCompletePurchase) {
        _inAppPurchase.completePurchase(purchase);
      }
      return MapEntry<String, PurchaseDetails>(purchase.productID, purchase);
    }));
    productList.addAll(_products.map(
      (ProductDetails productDetails) {
        final PurchaseDetails? previousPurchase = purchases[productDetails.id];
        return ListTile(
          title: Text(
            productDetails.title,
          ),
          subtitle: Text(
            productDetails.description,
          ),
          trailing: previousPurchase != null
              ? IconButton(
                  onPressed: () => confirmPriceChange(context),
                  icon: const Icon(Icons.upgrade))
              : TextButton(
                  style: TextButton.styleFrom(
                    backgroundColor: Colors.green[800],
                    // TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
                    // ignore: deprecated_member_use
                    primary: Colors.white,
                  ),
                  onPressed: () {
                    late PurchaseParam purchaseParam;

                    if (Platform.isAndroid) {
                      // NOTE: If you are making a subscription purchase/upgrade/downgrade, we recommend you to
                      // verify the latest status of you your subscription by using server side receipt validation
                      // and update the UI accordingly. The subscription purchase status shown
                      // inside the app may not be accurate.
                      final GooglePlayPurchaseDetails? oldSubscription =
                          _getOldSubscription(productDetails, purchases);

                      purchaseParam = GooglePlayPurchaseParam(
                          productDetails: productDetails,
                          applicationUserName: null,
                          changeSubscriptionParam: (oldSubscription != null)
                              ? ChangeSubscriptionParam(
                                  oldPurchaseDetails: oldSubscription,
                                  prorationMode:
                                      ProrationMode.immediateWithTimeProration,
                                )
                              : null);
                    } else {
                      purchaseParam = PurchaseParam(
                        productDetails: productDetails,
                        applicationUserName: null,
                      );
                    }

                    if (productDetails.id == _kConsumableId) {
                      _inAppPurchase.buyConsumable(
                          purchaseParam: purchaseParam,
                          autoConsume: _kAutoConsume || Platform.isIOS);
                    } else {
                      _inAppPurchase.buyNonConsumable(
                          purchaseParam: purchaseParam);
                    }
                  },
                  child: Text(productDetails.price),
                ),
        );
      },
    ));

    return Card(
        child: Column(
            children: <Widget>[productHeader, const Divider()] + productList));
  }

  Card _buildConsumableBox() {
    if (_loading) {
      return const Card(
          child: ListTile(
              leading: CircularProgressIndicator(),
              title: Text('Fetching consumables...')));
    }
    if (!_isAvailable || _notFoundIds.contains(_kConsumableId)) {
      return const Card();
    }
    const ListTile consumableHeader =
        ListTile(title: Text('Purchased consumables'));
    final List<Widget> tokens = _consumables.map((String id) {
      return GridTile(
        child: IconButton(
          icon: const Icon(
            Icons.stars,
            size: 42.0,
            color: Colors.orange,
          ),
          splashColor: Colors.yellowAccent,
          onPressed: () => consume(id),
        ),
      );
    }).toList();
    return Card(
        child: Column(children: <Widget>[
      consumableHeader,
      const Divider(),
      GridView.count(
        crossAxisCount: 5,
        shrinkWrap: true,
        padding: const EdgeInsets.all(16.0),
        children: tokens,
      )
    ]));
  }

  Widget _buildRestoreButton() {
    if (_loading) {
      return Container();
    }

    return Padding(
      padding: const EdgeInsets.all(4.0),
      child: Row(
        mainAxisSize: MainAxisSize.max,
        mainAxisAlignment: MainAxisAlignment.end,
        children: <Widget>[
          TextButton(
            style: TextButton.styleFrom(
              backgroundColor: Theme.of(context).primaryColor,
              // TODO(darrenaustin): Migrate to new API once it lands in stable: https://github.com/flutter/flutter/issues/105724
              // ignore: deprecated_member_use
              primary: Colors.white,
            ),
            onPressed: () => _inAppPurchase.restorePurchases(),
            child: const Text('Restore purchases'),
          ),
        ],
      ),
    );
  }

  Future<void> consume(String id) async {
    await ConsumableStore.consume(id);
    final List<String> consumables = await ConsumableStore.load();
    setState(() {
      _consumables = consumables;
    });
  }

  void showPendingUI() {
    setState(() {
      _purchasePending = true;
    });
  }

  Future<void> deliverProduct(PurchaseDetails purchaseDetails) async {
    // IMPORTANT!! Always verify purchase details before delivering the product.
    if (purchaseDetails.productID == _kConsumableId) {
      await ConsumableStore.save(purchaseDetails.purchaseID!);
      final List<String> consumables = await ConsumableStore.load();
      setState(() {
        _purchasePending = false;
        _consumables = consumables;
      });
    } else {
      setState(() {
        _purchases.add(purchaseDetails);
        _purchasePending = false;
      });
    }
  }

  void handleError(IAPError error) {
    setState(() {
      _purchasePending = false;
    });
  }

  Future<bool> _verifyPurchase(PurchaseDetails purchaseDetails) {
    // IMPORTANT!! Always verify a purchase before delivering the product.
    // For the purpose of an example, we directly return true.
    return Future<bool>.value(true);
  }

  void _handleInvalidPurchase(PurchaseDetails purchaseDetails) {
    // handle invalid purchase here if  _verifyPurchase` failed.
  }

  Future<void> _listenToPurchaseUpdated(
      List<PurchaseDetails> purchaseDetailsList) async {
    for (final PurchaseDetails purchaseDetails in purchaseDetailsList) {
      if (purchaseDetails.status == PurchaseStatus.pending) {
        showPendingUI();
      } else {
        if (purchaseDetails.status == PurchaseStatus.error) {
          handleError(purchaseDetails.error!);
        } else if (purchaseDetails.status == PurchaseStatus.purchased ||
            purchaseDetails.status == PurchaseStatus.restored) {
          final bool valid = await _verifyPurchase(purchaseDetails);
          if (valid) {
            deliverProduct(purchaseDetails);
          } else {
            _handleInvalidPurchase(purchaseDetails);
            return;
          }
        }
        if (Platform.isAndroid) {
          if (!_kAutoConsume && purchaseDetails.productID == _kConsumableId) {
            final InAppPurchaseAndroidPlatformAddition androidAddition =
                _inAppPurchase.getPlatformAddition<
                    InAppPurchaseAndroidPlatformAddition>();
            await androidAddition.consumePurchase(purchaseDetails);
          }
        }
        if (purchaseDetails.pendingCompletePurchase) {
          await _inAppPurchase.completePurchase(purchaseDetails);
        }
      }
    }
  }

  Future<void> confirmPriceChange(BuildContext context) async {
    if (Platform.isAndroid) {
      final InAppPurchaseAndroidPlatformAddition androidAddition =
          _inAppPurchase
              .getPlatformAddition<InAppPurchaseAndroidPlatformAddition>();
      final BillingResultWrapper priceChangeConfirmationResult =
          await androidAddition.launchPriceChangeConfirmationFlow(
        sku: 'purchaseId',
      );
      if (priceChangeConfirmationResult.responseCode == BillingResponse.ok) {
        ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
          content: Text('Price change accepted'),
        ));
      } else {
        ScaffoldMessenger.of(context).showSnackBar(SnackBar(
          content: Text(
            priceChangeConfirmationResult.debugMessage ??
                'Price change failed with code ${priceChangeConfirmationResult.responseCode}',
          ),
        ));
      }
    }
    if (Platform.isIOS) {
      final InAppPurchaseStoreKitPlatformAddition iapStoreKitPlatformAddition =
          _inAppPurchase
              .getPlatformAddition<InAppPurchaseStoreKitPlatformAddition>();
      await iapStoreKitPlatformAddition.showPriceConsentIfNeeded();
    }
  }

  GooglePlayPurchaseDetails? _getOldSubscription(
      ProductDetails productDetails, Map<String, PurchaseDetails> purchases) {
    // This is just to demonstrate a subscription upgrade or downgrade.
    // This method assumes that you have only 2 subscriptions under a group, 'subscription_silver' & 'subscription_gold'.
    // The 'subscription_silver' subscription can be upgraded to 'subscription_gold' and
    // the 'subscription_gold' subscription can be downgraded to 'subscription_silver'.
    // Please remember to replace the logic of finding the old subscription Id as per your app.
    // The old subscription is only required on Android since Apple handles this internally
    // by using the subscription group feature in iTunesConnect.
    GooglePlayPurchaseDetails? oldSubscription;
    if (productDetails.id == _kSilverSubscriptionId &&
        purchases[_kGoldSubscriptionId] != null) {
      oldSubscription =
          purchases[_kGoldSubscriptionId]! as GooglePlayPurchaseDetails;
    } else if (productDetails.id == _kGoldSubscriptionId &&
        purchases[_kSilverSubscriptionId] != null) {
      oldSubscription =
          purchases[_kSilverSubscriptionId]! as GooglePlayPurchaseDetails;
    }
    return oldSubscription;
  }
}

/// Example implementation of the
/// [`SKPaymentQueueDelegate`](https://developer.apple.com/documentation/storekit/skpaymentqueuedelegate?language=objc).
///
/// The payment queue delegate can be implementated to provide information
/// needed to complete transactions.
class ExamplePaymentQueueDelegate implements SKPaymentQueueDelegateWrapper {
  @override
  bool shouldContinueTransaction(
      SKPaymentTransactionWrapper transaction, SKStorefrontWrapper storefront) {
    return true;
  }

  @override
  bool shouldShowPriceConsent() {
    return false;
  }
}

flutter doctor -v
[✓] Flutter (Channel stable, 3.3.8, on macOS 13.0.1 22A400 darwin-arm, locale en-GB)
    • Flutter version 3.3.8 on channel stable at /Users/nexus/dev/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 52b3dc25f6 (9 days ago), 2022-11-09 12:09:26 +0800
    • Engine revision 857bd6b74c
    • Dart version 2.18.4
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio
    • Android Studio at /Applications/Android Studio Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[!] Android Studio
    • Android Studio at /Applications/Android Studio Preview 2.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9014738/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.73.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.52.0

[✓] Connected device (3 available)
    • Nexus (mobile)  • 00008020-001875E83A38002E • ios            • iOS 16.1.1 20B101
    • macOS (desktop) • macos                     • darwin-arm64   • macOS 13.0.1 22A400 darwin-arm
    • Chrome (web)    • chrome                    • web-javascript • Google Chrome 107.0.5304.110
    ! Error: Nexus is busy: Fetching debug symbols for Nexus. Xcode will continue when Nexus is finished. (code -10)

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.

[!] Flutter (Channel master, 3.6.0-5.0.pre.27, on macOS 13.0.1 22A400 darwin-arm64, locale en-GB)
    • Flutter version 3.6.0-5.0.pre.27 on channel master at /Users/nexus/dev/sdks/flutters
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9c9f7818ac (3 hours ago), 2022-11-17 23:11:27 -0500
    • Engine revision 04aea3c47b
    • Dart version 2.19.0 (build 2.19.0-406.0.dev)
    • DevTools version 2.19.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio
    • Android Studio at /Applications/Android Studio Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[!] Android Studio
    • Android Studio at /Applications/Android Studio Preview 2.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    ✗ Unable to find bundled Java version.
    • Try updating or re-installing Android Studio.

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9014738/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.73.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.52.0

[✓] Connected device (3 available)
    • Nexus (mobile)  • 00008020-001875E83A38002E • ios            • iOS 16.1.1 20B101
    • macOS (desktop) • macos                     • darwin-arm64   • macOS 13.0.1 22A400 darwin-arm64
    • Chrome (web)    • chrome                    • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 3 categories.

This sounds like a cache update issue.

After update flutter version in_app_purchase does not return price only return "Free" word only for android below version 12. But ios working fine and return price properly.
Anybody please help me, how to solve this issue smoothly.. please give me suggestions...

I am using in_app_purchase package. Please check this image

Price must be displayed here not free.
I am using
in_app_purchase: 3.0.8 (same issue happened)
When update to -  in_app_purchase: 3.1.7 (same issue happened)
Till i am not getting any solution. It happens only in Android not ios device. Please anybody help.

@gitcoder-23 I'm using v3.1.7 on Android. I get ProductDetails including the raw price rawPrice, but looks like ProductDetails.currencySymbol is no longer set. I tested it on Android 12 and 14, both are coming without currencySymbol. I guess you are using price instead rawPrice?
This is a new issue so I think it would be best if you create a new bug for this issue. Thanks for having found this.

@timobaehr  After using "rawPrice" displayed 0.0 price , price not displayed properly in below Android version 12.
I mean in Android 10, 9 and below Android version. But Android version 12 and upper it is working fine. Please help me by reply. And help me to provide solutions.

Please anybody help regarding "After update flutter version in_app_purchase does not return price, only return "Free" word only for android below version 12. But ios working fine and return price properly." issue


CargoConsoleMenu localization

About the PR

This PR adds localization capability for CargoConsoleMenu (name of entity: ComputerCargoOrders)
Why / Balance

Please let me tell you a story of my vision. First i decided to make these changes on one of russian community servers. But taking into account future changes of .yml files by space-wizards community (they are regularly added to our space-station build), we will have to constantly edit xml files to remove duplicate categories — imagine someone added cargoproduct with category "Fun", when we have tons of items with category "Развлечения".
To summarize: my PR makes possible to localize categories of "cargoproduct" and makes communities do less work when upstream comes
Technical details

New code considers strings comparisons of prototype.Category (Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs) using Loc.GetString(...). And that's all.
Media

Off course there are no visible changes on eng-localization

That's how these changes look like on our community build, using other .ftl file

[x] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

.yml

every category of type "cargoProduct" was edited to "cargoproduct-category-name-{categoryName}"

.ftl

file "cargoproduct-categories.ftl" was added to english localization to localize categories of cargoProduct

.cs

CargoConsoleMenu.xaml.cs got tweaks which prevent issues with strings comparisons

Changelog

:cl: ModerN

fix: localization of cargo request computer!

This is my first attempt to contribute in your build, so i hope u'll be merciful and don't smash me

you can remove CL, these is no changes to common players

you need remove CL, these is no changes to common players

thank you

no cl no fun 🐔


Fix generic types not found due to assembly loaded into wrong context

Replace LoadFile with LoadFrom in AssemblyManager. With LoadFile it seems that the assembly is loaded into separate context and then a type cannot be extracted from it by its name (similar issue: https://github.com/dotnet/runtime/issues/28870)
Fixes https://github.com/VSharp-team/VSharp/issues/193: in TestRunner we use LoadFrom, so it works

TODO: run benches and check that all is fine

upd: This fix breaks dependency resolving, looking for another solution

Closed because another solution for type resolving problem is found: https://github.com/VSharp-team/VSharp/pull/216


Raise warning if no time coords found with decode_times

Description

Closes #396

Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] My changes generate no new warnings
[x] Any dependent changes have been merged and published in downstream modules

If applicable:

[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass with my changes (locally and CI/CD build)
[ ] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[ ] I have noted that this is a breaking change for a major release (fix or feature that would cause existing functionality to not work as expected)

Hey @lee1043 and @pochedls, this PR is ready for review.
I tested it locally using dummy datasets without time coordinates and it raises the warning as expected. It would be good to test using the dataset from the example in #396 too.

Codecov Report
Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (adcb28d) compared to base (1a0afb4).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #409   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           14        14
  Lines         1254      1260    +6
=========================================
+ Hits          1254      1260    +6

Impacted Files
Coverage Δ

xcdat/dataset.py
100.00% <100.00%> (ø)

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

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

I tested it locally using dummy datasets without time coordinates and it raises the warning as expected. It would be good to test using the dataset from the example in #396 too.

@tomvothecoder below is what was happening when I open the example data in #396 from terminal.
Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:41:54) [Clang 13.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xcdat as xc
>>> path = 'target_grid.nc'
>>> ds = xc.open_dataset(path)
2023-01-26 11:23:21,603 [WARNING]: dataset.py(open_dataset:106) >> "No time coordinates were found in this dataset to decode. Make sure time coordinates exist and their CF 'axis' or 'standard_name' attribute is set (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding with `decode_time()` again."

I think revising the error message slightly may be helpful for clarifying. I suggest something like below:
No time coordinates were found in this dataset to decode. If existence of time coordinates is expected, make sure time coordinates exist and their CF 'axis' or 'standard_name' attribute is set (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time')

@tomvothecoder below is what I see when I open the example data in #396 from terminal. It is great that data opened with no problem.
Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:41:54) [Clang 13.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import xcdat as xc
>>> path = 'target_grid.nc'
>>> ds = xc.open_dataset(path)
2023-01-26 11:23:21,603 [WARNING]: dataset.py(open_dataset:106) >> "No time coordinates were found in this dataset to decode. Make sure time coordinates exist and their CF 'axis' or 'standard_name' attribute is set (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time'). Afterwards, try decoding with `decode_time()` again."

I understand @pochedls prefers error message to not shown in console and I agree.

Thank you for your input Jiwoo. @pochedls is actually in agreement with my revision to raise a warning instead of silencing it. A warning is raised if time coordinates cannot be detected with decode_times=True (the default).
Time coordinates can't be detected if they don't exist or don't have the appropriate CF attributes to map to them.
If we expect decode_times=True to work in most cases, I think it is reasonable to raise a warning since it won't appear often and they can override decode_times=False if they want.  Also, it is probably not good idea to silence potential warnings or errors because the user might expect time coordinates to be decoded/decodeable but that isn't true (and they find out later in their temporal workflow such as averaging).

In parallel, I think revising the error message slightly may be helpful for clarifying. I suggest something like below: No time coordinates were found in this dataset to decode. If existence of time coordinates is expected, make sure time coordinates exist and their CF 'axis' or 'standard_name' attribute is set (e.g., ds['time'].attrs['axis'] = 'T' or ds['time'].attrs['standard_name'] = 'time')

Good suggestion. I agree with revising the warning message to make it clearer.

Merging this PR


flutter 1.x

WebView + inefficient DOM manipulation (ionic)
JS Bridge (react native)
Native (ObjectiveC/Swift/Java/Kotlin)
Flutter (AOT+JIT, compiles directly to native code)

youtube: flutter channel
https://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw
best flutter blog:
https://www.didierboelens.com/
z-index
https://stackoverflow.com/questions/50215334/stack-on-working-as-expected-z-index-css-equivalent
custom-painter:
https://zocada.com/drawing-custom-shapes-in-flutter-using-custompainter/
How to set status bar color when AppBar not present
https://stackoverflow.com/questions/50501799/flutter-how-to-set-status-bar-color-when-appbar-not-present
clipping in flutter
https://medium.com/flutter-community/clipping-in-flutter-e9eaa6b1721a
How to change text color of AppBar, icon color of FAB universally using theme?
https://stackoverflow.com/questions/50619848/how-to-change-text-color-of-appbar-icon-color-of-fab-universally-using-theme
表单(键盘)相关
https://fluttercrashcourse.com/lessons/realistic-forms-part1
https://stackoverflow.com/questions/48870082/managing-events-in-flutters-textformfield?rq=1
https://flutter.dev/docs/cookbook/forms/focus
https://stackoverflow.com/questions/52150677/how-to-shift-focus-to-next-textfield-in-flutter
https://medium.com/@anilcan/forms-in-flutter-6e1364eafdb5
TextField文本框详解
https://medium.com/flutter-community/a-deep-dive-into-flutter-textfields-f0e676aaab7a
https://stackoverflow.com/questions/51893926/how-can-hide-letter-counter-from-bottom-of-text-field-in-flutter

学习列表
https://github.com/shijiacheng/wanandroid_flutter
https://github.com/diegoveloper/flutter-samples

全屏dialog
Creating full-screen dialog in Flutter – WeightTracker 2

打包ipa 在iphone上白屏
详见:
https://github.com/flutter/flutter/issues/24887#issuecomment-444412020


fixing python documentation formatting

issue: https://github.nrel.gov/MBAP/fastsim/issues/296

@calbaker I was able to fix the copy_sim_drive documentation formatting, although I had to add a line of description in order to do so -- the line can be changed or updated as needed. I figured out two things. One, from what I can tell it seems like in order for an argument to be recognized as such, it has to have a description on the same line as the argument (so, argument: xxxxxxx, all on one line). Two, any additional lines of description for an argument (like the bullet points in copy_sim_drive) must align with the beginning of the first line of description. Here's the updated docstring for copy_sim_drive:

And here's the resulting format:


Make StackEdit a Chrome desktop app

Google has recently created this chrome app that runs like your desktop app. I don't know what it takes for Google to make StackEdit into one of those apps. Maybe the developer has to request it?
Once your app is in the desktop section. We can run StackEdit like an native app and use "Ctrl+Tab" to switch in between different apps.
https://chrome.google.com/webstore/category/collection/for_your_desktop?hl=en

Can't you already do this by using the installable PWA?

Can't you already do this by using the installable PWA?


Drop unnecessary regexp.prototype.flags

https://github.com/inspect-js/node-deep-equal/commit/b8c179c5aa91c8a2f71f053e2d9e2d477780250e introduced this heavy-ish dependency but it didn't explain why. Tests pass without it as the property has been supported forever.

node 0.4, which this package supports.

Ouch!

dependency “weight” is only relevant if correctness is achievable with a lighter dependency

Indeed. It just feels unnecessary to support something a handful of people use, at the expense of everyone else. If people haven't moved on from Node 0.4, I wouldn't expect them to update dependencies either.

node 0.4, which this package supports.

Ouch!

dependency “weight” is only relevant if correctness is achievable with a lighter dependency

Indeed. It just feels unnecessary to support something a handful of people use, at the expense of everyone else. If people haven't moved on from Node 0.4, I wouldn't expect them to update dependencies either.

If you know you only target browsers with flags support, you can (and should) certainly configure your bundler to alias out the package in favor of x => x.flags or similar. In node, though, the cost is effectively zero.

If you know you only target browsers with flags support, you can (and should) certainly configure your bundler to alias out the package in favor of x => x.flags or similar. In node, though, the cost is effectively zero.

 Certainly a v3 could drop that support, but that seems capricious.

 Certainly a v3 could drop that support, but that seems capricious.

Rebased; I expect to see everything fail below node 6 (when flags was added).

Rebased; I expect to see everything fail below node 6 (when flags was added).

In node, though, the cost is effectively zero.

I disagree:

regexp.prototype.flags means npm installing 18 modules, which doesn't take 0ms
regexp.prototype.flags is required regardless of support, which takes longer than 0ms;
regexp.prototype.flags is executed regardless of support, which likely takes longer than the V8 implementation

In node, though, the cost is effectively zero.

I disagree:

regexp.prototype.flags means npm installing 18 modules, which doesn't take 0ms
regexp.prototype.flags is required regardless of support, which takes longer than 0ms;
regexp.prototype.flags is executed regardless of support, which likely takes longer than the V8 implementation

updating node is much harder than updating deps

Yeah but would you connect Windows XP to internet? So why would one run a severely outdated server? 😄

updating node is much harder than updating deps

Yeah but would you connect Windows XP to internet? So why would one run a severely outdated server? 😄

You're right that there's some install time impact. At runtime, the impact should be negligible. In other words, the cost isn't precisely zero, but it's effectively zero, as I said.
Regardless, a minor inconvenience for modern node/browser users, versus "you can't use this package" for users that need to run on older node/browsers, is not an equivalent comparison.

You're right that there's some install time impact. At runtime, the impact should be negligible. In other words, the cost isn't precisely zero, but it's effectively zero, as I said.
Regardless, a minor inconvenience for modern node/browser users, versus "you can't use this package" for users that need to run on older node/browsers, is not an equivalent comparison.

Would it make sense to leave them on v2 and release a v3 for modern engines? They can use v2 forever.

Would it make sense to leave them on v2 and release a v3 for modern engines? They can use v2 forever.

Even if i wanted to sign up for the maintenance burden of two simultaneous release lines (otherwise the v2 users would miss out on bugfixes and new features), .flags remains a brittle approach if someone has done delete RegExp.prototype.flags, so it wouldn’t be a complete improvement.

Even if i wanted to sign up for the maintenance burden of two simultaneous release lines (otherwise the v2 users would miss out on bugfixes and new features), .flags remains a brittle approach if someone has done delete RegExp.prototype.flags, so it wouldn’t be a complete improvement.


Dealing with variables in bagof/3

I stepped over this test case:
q(A, _, A).
q(_, A, A).
q(A, _, A).

I got a discrepancy between SWI-Prolog and Trealla Prolog:
/* SWI-Prolog 9.3.13 */
?- bagof(none, q(X,Y,Z), L).
X = Z,
L = [none, none] ;
Y = Z,
L = [none].

/* Trealla Prolog 2.58.8-20 */
?- bagof(none, q(X,Y,Z), L).
   Z = X, L = [none]
;  Z = Y, L = [none]
;  Z = X, L = [none].

I am afraid that SWI-Prolog would be the ISO behaviour.

I suspect that SWI-Prolog is the ISO behaviour, since
I get the same behaviour with a pure Prolog implementation:
/* Dogelog Player 1.2.4 */
?- ensure_loaded(library(aggregate)).
true.

?- bagof(none, q(X,Y,Z), L).
X = Z, L = [none, none];
Y = Z, L = [none].

Which derived from some folklore implementation of bagof/3,
via keysort/2. It uses ISO term_variables/3 to align variables.
Source code:
bags.p.log

Just sayin':
/trealla (devel) $ tpl x.pl
?- bagof(none, q(X,Y,Z), L).
   Z = X, L = [none]
;  Z = Y, L = [none]
;  Z = X, L = [none].
?-
~/trealla (devel) $ scryer-prolog
?-
~/trealla (devel) $ scryer-prolog x.pl
?- bagof(none, q(X,Y,Z), L).
   X = Z, L = [none]
;  Y = Z, L = [none]
;  X = Z, L = [none].
?-

Eclipse agrees with SWI.

Did you try GNU Prolog? It gives me the same as SWI-Prolog:
/* GNU Prolog 1.5.0  */
?- bagof(none, q(X,Y,Z), L).

L = [none,none]
Z = X ? ;

L = [none]
Z = Y

I have two issues related to variable handling in Scryer Prolog:
https://github.com/aarroyoc/scryer-playground/issues/39
https://github.com/aarroyoc/scryer-playground/issues/37
The Problem also shows in tabling.

~/trealla (devel) $ cxprolog
main ?- [x].
% File 'x.pl' consulted, 9.2e-05 sec 2112 bytes
yes
main ?- bagof(none, q(X,Y,Z), L).
X = _G17
Y = _G17
Z = _G17
L = [none,none,none]
main ?-
% CxProlog halted.

~/trealla (devel) $ bp
B-Prolog Version 8.1, All rights reserved, (C) Afany Software 1994-2014.
| ?- [x].
consulting::x.pl
yes
| ?- bagof(none, q(X,Y,Z), L).
X = Z
Y = Z
L = [none,none,none]
yes
| ?-
~/trealla (devel) $

~/trealla (devel) $ yap
YAP 7.5.0-4530233e (compiled  2024-05-28T12:37:36@andrew-E6430)
database loaded from /usr/local/lib/startup.yss

?- [x].
   % loading x...
   % /home/andrew/trealla/x.pl consulted in module user, 1 msec 0 bytes
yes
?- bagof(none, q(X,Y,Z), L).
X=X,
L=[none] ;
Y=Y,
L=[none] ;
X=X,
L=[none]
?-

You probably find a ISO test case, one of the examples
from the ISO core standard document, which would be
informative what is the desired behaviour. The test case
I am using, I didn't pick it from the ISO core document.

~/trealla (devel) $ xsb
[xsb_configuration loaded, cpu time used: 0.001 seconds]
[sysinitrc loaded]
[xsbbrat loaded]

XSB Version 5.0.0 (Green Tea) of May 15, 2022
[x86_64-pc-linux-gnu 64 bits; mode: optimal; engine: slg-wam; scheduling: local]
[Build date: 2024-03-01]

| ?- [x].
[x loaded]

yes
| ?- bagof(none, q(X,Y,Z), L).

X = _h417
Y = _h459
Z = _h417
L = [none];

X = _h417
Y = _h459
Z = _h459
L = [none];

X = _h417
Y = _h459
Z = _h417
L = [none];

no
| ?-
End XSB (cputime 0.03 secs, elapsetime 10.78 secs)

I don't have Sicstus or other.... maybe @pmoura

For what it's worth, the Trealla bagof/3 is basically the old O'Keefe code.

I don't think so, the O'Keefe code produces SWI behaviour.

Well it is, check library/builtins.pl
On Wed, 30 Oct 2024, 11:38 Jean-Luc-Picard-2021, @.***>
wrote:

I don't think so, the O'Keefe code produces SWI behaviour.
—
Reply to this email directly, view it on GitHub
https://github.com/trealla-prolog/trealla/issues/614#issuecomment-2445638033,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFNKSEQM6PR7WBWUO7DZOHLZ6A2BBAVCNFSM6AAAAABQ3B2CBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBVGYZTQMBTGM
.

SICStus Prolog uses O'Keefes code:
/* SICStus Prolog 4.9.0 */
bagof(none, q(X,Y,Z), L).
Z = X,
L = [none,none] ? ;
Z = Y,
L = [none] ? ;
no

Using your bags.pl:
~/trealla (devel) $ tpl bags.pl x.pl
?- xbagof(none, q(X,Y,Z), L).
   Z = X, L = [none,none]
;  Z = Y, L = [none].
?-

I just changed term_variables/3 to term_variables/2 since the 3rd arg wasn't used & changed bagof/3 to xbagof/3.
If this is definitive I will try using this version as a replacement to the existing implementation and see how other tests go.

It needs term_variables/3 because different solutions, might have
different number of variables. Take this example:
p(_,_).
p(a,b).
p(_,_).

It should give:
?- bagof(none, p(X,Y), L).
L = [none, none] ;
X = a,
Y = b,
L = [none].

ok, well Trealla doesn't have term_variables/3

Yeah, same here. I first had also only term_variables/2.
I even don't remember where I saw the solution with
term_variables/3? Maybe SWI-Prolog itself?
Yes, its from here:
%!  bind_bagof_keys(+VarsTemplPairs, -SharedVars)
%
%   Establish a canonical binding  of   the  _vars_ structures. This
%   code   was   added    by    Ulrich     Neumerkel    in    commit
%   1bf9e87900b3bbd61308e80a784224c856854745.

bind_bagof_keys([], _).
bind_bagof_keys([W-_|WTs], Vars) :-
    term_variables(W, Vars, _),
    bind_bagof_keys(WTs, Vars).

https://github.com/SWI-Prolog/swipl-devel/blob/master/boot/bags.pl

Ok, going on this defn:
term_variables(P1, P2, P3) :-
	term_variables(P1, P4),
	append(P4, P3, P2).

I get:
~/trealla (devel) $ tpl x2.pl
?- bagof(none, p(X,Y), L).
   L = [none,none]
;  X = a, Y = b, L = [none].
?-

Just testing with Logtalk now.

Fixed now. You should file an issue with Scryer Prolog as well.

I don't have Sicstus or other.... maybe @pmoura

$ sicstus
SICStus 4.9.0 (x86_64-darwin-21.6.0): Fri Dec 15 11:09:06 CET 2023
Licensed to Paulo Moura
% consulting /Users/pmoura/.sicstusrc...
% consulted /Users/pmoura/.sicstusrc in module user, 4 msec 50272 bytes
| ?- [user].
% compiling user...
| q(A, _, A).
| q(_, A, A).
| q(A, _, A).
|
% compiled user in module user, 43 msec 517872 bytes
yes
| ?- bagof(none, q(X,Y,Z), L).
Z = X,
L = [none,none] ? ;
Z = Y,
L = [none] ? ;
no

SWI-Prolog has a change ordering "artefact":
?- bagof(X, q(X,Y,Z), L).
Y = Z,
L = [_] ;
L = [Z, Z].

?- bagof(Y, q(X,Y,Z), L).
X = Z,
L = [_, _] ;
L = [Z].

Its difficult to get the 2nd query result. It has to do with a last
minute change in SWI-Prolog and the  extra alloc_bind_key_list/2:
?- '$free_variable_set'(X^q(X,Y,Z), H, W), findall(W-X, H, L), '$bags':bind_bagof_keys(L, _), keysort(L, R).
H = q(X, Y, Z),
W = v(Y, Z),
L = [v(_A, _B)-_B, v(_A, _A)-_C, v(_A, _B)-_B],
R = [v(_A, _B)-_B, v(_A, _B)-_B, v(_A, _A)-_C].

?- '$free_variable_set'(X^q(X,Y,Z), H, W), '$bags':alloc_bind_key_list(W, U), findall(W-X, H, L), '$bags':bind_bagof_keys(L, U), keysort(L, R).
H = q(X, Y, Z),
W = v(Y, Z),
U = [_A, _B|_],
L = [v(_A, _B)-_B, v(_A, _A)-_C, v(_A, _B)-_B],
R = [v(_A, _A)-_C, v(_A, _B)-_B, v(_A, _B)-_B].

Note the different R's.

Looks quite bright now, the ticket can be closed now?
I was running a  long variable instantiation chain test.
test2 :-
between(1,1000,_), bagof(none, N^(between(1,1000,N), X=X), _), fail; true.
In SWI-Prolog the above did explode in the past, when alloc_bind_key_list/2
wasn't deployed. But it can be also fixed by a fortunate term_variables/3
unification of the second argument. Mostlikely Trealla Prolog has hit the right spot:
?- time(test2).
% Time elapsed 2.076s, 12046004 Inferences, 5.802 MLips

If long variable instantiation chain happen, the above might need 8 seconds or
something. It can happen in this step:
% sys_same_vars(+Pairs, +List)
sys_same_vars([K-_|L], V) :-
   term_variables(K, V, _),
   sys_same_vars(L, V).
sys_same_vars([], _).

When the carried around V points to longer and longer instantiation chains.
It can be avoided if instantiations are only done from the term_variables/3
result to the carried around V, and not vice versa.
But mostlikely your are not bugged with this issue now.

P.S. Added 6 new bagof/3 tests to Logtalk for checking correct variable handling by this predicate.

P.S. Added 6 new bagof/3 tests to Logtalk for checking correct variable handling by this predicate.

Thanks.

Better late than never. The ISO core standard document
inspired test cases coverage is indeed poor.

Ok I see here:
https://github.com/LogtalkDotOrg/logtalk3/commit/a36eb5dd5cc24576c6add45ec88f557c90fd39a1
Better late than never. The ISO core standard document
examples section inspired test cases coverage is indeed poor.
But obviously only adding test cases for bagof/3 is not enough.
If at all, one would also need to add test cases to the following
predicates:

setof/3: Part of ISO core standard
aggregate/3: Bootstrapped from bagof/3
What else?

It might be desireable to test setof/3 and aggregate/3
as well, and not only bagof/3. I made some test cases:
newtests.p.log

The bagof/3 choker:
test :-
   bagof(X, N^(between(1,300,X), between(1,300,N),
      length(_,N)), _), fail; true.

I get:
/* Trealla Prolog 2.59.17 */
?- time(test).
% Time elapsed 13.280s, 16158649 Inferences, 1.217 MLips
   true

/* SWI-Prolog 9.3.14 */
?- time(test).
Action (h for help) ? abort
% 468,739 inferences, 52.016 CPU in 53.069 seconds (98% CPU, 9012 Lips)
% Execution Aborted

Goody, goody!


run: support slice flags

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 5 (0.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.2%) to 46.365%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

run.go
0
5
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.2%

Covered Lines:
338

Relevant Lines:
729

💛  - Coveralls


Provide configuration value to control if AMI should update or not

While conducting redeployments on already-existing Tower implementations deployed by the CX installer, it has been noticed that the underlying VM is occasionally replaced even though the only changes that were made related to Tower configuration files that are loaded onto the VM.
This is problematic for two reasons:

n+1 redeployments take longer due to the re-creation of EC2 infrastructure.
Implementations which rely on the containerized db (rather than RDS) will lose their data when the original VM is destroyed.

This should be fixed to ensure consistency.
Investigation / Hypothesis
I believe the problem occurs as a result of this flag in the AMI data object. As you can see from the screenshot below of the AWS console:

The existing filtering criteria returns many options.
Several of the options belong to the same family, with newer images likely patched for security vulnerabilities and library updates.

After discussion with the Devops team, we believe a snippet like the following could be used to tell TF to ignore changes in the AMI (to be implemented if using a containerized db):
resource "aws_launch_template" "lt" {
  # ...

  lifecycle {
    ignore_changes = [
      # Ignore changes to AMI Image ID
      image_id,
    ]
  }
}

To do:

[x] Create new flag in "EC2 Host" section: ec2_update_ami_if_available (default to True).

[x] Add entry in variables.tf
[x] Add entry in templates/TEMPLATE_terraform.tfvars
[x] Add entry in local terraform.tfvars file

~[ ] Refactor the aws_launch_template object to include a dynamic lifecycle block.~
~[ ] Populate block only if terraform.tfvars flag var.ec2_update_ami_if_available  is False.~
[x] Add warnings to Python config checking:

[x] If   data.ec2_update_ami_if_available is True, warn that VM will occasionally be destroyed and re-created.
[x] If  data.ec2_update_ami_if_available is True and data.flag_use_container_db is True and, warn that container db could occasionally be destroyed.

[ ] Add entry to Design Decisions
[ ] Add entry to Security documentation
[ ] Figure out how to fulsomely test this (since we're dependent on a new AMI to show up during the data retrieval phase to trigger this logic)

Update
Initial testing indicates that the proposed approach (dynamic "lifecycle" { ... }) won't work.
# Added into `resource "aws_launch_template" "lt"`

  # Does not work (doesnt like dynamic and lifecycle mixing): "Blocks of type "lifecycle" are not expected here."
  # dynamic "lifecycle" {
  #   for_each = var.ec2_update_ami_if_available == false ? [1] : []
  #   iterator = item
  #   content {
  #     ignore_changes = [ image_id ]
  #   }
  # }

  # Works
  # lifecycle {
  #   ignore_changes = [ image_id ]
  # }

  # Does not work (mad about var...): "A static list expression is required."
  # lifecycle {
  #   # ignore_changes = var.ec2_update_ami_if_available == true ? [] : [ image_id ]
  #   ignore_changes = var.ec2_update_ami_if_available ? [] : [ image_id ]
  # }

A cursory Google search reveals various potential reasons for this:

Literal values only
Lack of support re: dynamic blocks and meta-arguments

Conversely, the Terraform dynamic page does show the use of for_each tied to a variable, but this seems to be tied to a discrete argument exposed by the resource itself.

Random Notes
When looking at the various AMI options available, I wondered a bit about the various types. Since they  are all Amazon Linux 2023, I never worried too much about which one was grabbed since they should all have the same baseline (and I install everything that is needed via Ansible).
Regardless, some quick notes:

AWS-Neuron ready ECS-optimized AMI
HVM-type virtualization
Standard vs Minimal AL2023


New contributor made changes

Adding new contributor

Thanks @Suyash-Purwar for your contribution, Welcome to the community.

Thanks @Suyash-Purwar for your contribution, Welcome to the community.

Thanks @Abhishek-kumar09 😀

Thanks @Abhishek-kumar09 😀


Use MS for iOS hashes

Previously we have been using seconds for calculating our hashes. This has caused us to be out of sync with the Places MS hashes
https://stackoverflow.com/questions/28872450/conversion-from-nstimeinterval-to-hour-minutes-seconds-milliseconds-in-swift

Closing in favor of #1289


Switch to configstore

Instead of manual fs handling. It's tested, trusted and works well.

+15 −80 🤘


docs: clarify overlapOnly param

in Phaser.Physics.Arcade.Collider
Explain that the callback will trigger on any overlap with any part of a tileLayer
Please do not update the README or Change Log, we will do this when we merge your PR.
This PR (delete as applicable)

Updates the Documentation

@rgk Like this?

👍