Selecting items in list via longpress doesn't work after switching from FlatList to FlashList

Current behavior
Long-pressing to initiate a multi-selection fails to trigger any update in the rendered items, although it does work with FlatList.
All other behaviors appear correct after the transition, except this issue.
FlashList behavior:
Note that selected items are not styled - and a non-long-press fails to add items to our accumulator and instead opens the item, because the rendered items are no longer aware there's a multi-selection occurring because they're not updating

Expected behavior
Code pattern that worked with FlatList should work with FlashList except where otherwise specified in the docs (which this doesn't appear to be)
FlatList behavior:
Long-pressing an item starts accumulating items in the list, and after the initial long press, a normal press on additional items will select them

To Reproduce
TBD. FlashList is cool but I likely cannot justify the time to produce a repro given the minimal benefits it has in our use case.
Platform:

[ ] iOS
[x] Android

Environment
1.1.0 and 1.2.2
Note: We're using Expo and 1.2.2 isn't officially supported by it yet, so maybe it could influence my findings - but the issue definitely affects 1.1.0
x.y.z
PS: This link in the issue template appears not to lead anywhere anymore: https://discord.com/channels/928252803867107358/986654488326701116

Friendly bump. I assume list children should be updatable like with FlatList? Can anyone confirm that?

@Slapbox Make sure you update your extraData to force an update. FlashList only updates its children if data AND renderItem props change. The other option is to use extraData which should work for you.

It works; thanks for the tip!
I wonder if I just overlooked some warning about that in the docs? I noticed some mentions about height requirements and other small differences from FlatList, but I didn't see that mentioned.


Security - Please add Fail2ban support

Hi, I've tried Wetty lately and suspected that it may let the hacker to brute-force user's password by repeatedly guessing it.  Please implement Fail2ban configs to block repeated login failure users.

@plato79 is right my only worry about that would be that youd fail2ban your web server from the server your ssh'ing to.


Fix Make participant create wizard user

In meeting:
Now new participants cannot be created anymore
How to recreate:

go into a meeting
start creating a new participant
press next
You arrive at step 3 but the save button is permanently disabled

Wanted Behaviour:
new participants should be creatable

The bug can only be recreated if the vote weight is enabled


ERROR in multi vendor Module not found

I get the following error when i try to do 'gulp build'

gulp serve runs fine
I am creating a teplate for myself and other to use ionic/cordova/angular etc with es6
repo => https://bitbucket.org/JamieVangeysel/repo_ionic-angular-template
just do an npm i and then gulp build and this guy pops up
ps: u need newest gulp cli and npm globally installed

It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I'm closing this. Please either update the issue with the template, or open a new issue.


Add flags for completions

https://beta.openai.com/docs/api-reference/completions/create

[x] -suffix -s Suffix that comes after
[x] -m --model Which model to use
[ ] -x --max-tokens number of tokens
[x] -t --temperature
[x] -k --top_p
[x] -e --echo
[ ] -r --presence-penalty
[ ] -f --frequency-penalty
[ ] -b best-of
[x] - n number

I think that the rest of these are pretty low value so closing for now


Get sphinx up and running

sphinx Git repo here: https://github.com/convexopt/sphinx_gpkit
OUTLINE:
gpkit Documentation
What is gpkit? ==> README
Installing Instructions @bqpd
Quick Reference Grid
->Includes first example with best practices, matches Examples
Examples (in order of complexity) @cjk12
->Cite Boyd Tutorial
->Includes first example with best practices, matches QRG
->Best practices box @bqpd
Why GP's? (including benefits and convexity) @whoburg @pgkirsch
GP Playbook
Introduction to how to read and understand code @bqpd
->Includes Docstrings
Sphinx @bqpd

Priority

Here is a proposed structure (slightly modified from above) for the the documentation. It is ordered as if it were a document rather than a website but I think it captures the necessary hierarchy of information.

What is a GP
-----> Concise description
-----> concise summary of benefits
-----> Citation of Hoburg 2012, Boyd tutorial

What is GPkit?
-----> Like in the README
-----> I think this section could benefit from a really simple flowchart:  User <---> GPkit <---> Solver

Installation Instructions
-----> As in the README but with distinct installation instructions for each platform

Getting Started
-----> I believe this should purely be a guide to using gpkit (no command-specific info yet)
-----> I also believe it should be as slap-in-the-face-obvious as stating that you need to cd into a certain directory or add it to your path or whatever (possibly with links to a friendly command line reference). No one ever said "wow this documentation is too obvious, I feel insulted", that person just skipped on to more interesting material. In my mind this section is targeted at someone with no/very little command line experience.
- Basic Commands
-----> A list of the most basic commands needed to solve a simple example, like the box example
-----> This section should be subdivided, if possible, into the commands for "declaring variables", "constructing constraints", "solving" etc...

Simple Example 1
-----> The box example using the basic commands listed above. No fewer, no more.
----> Well documented at each step

GPkit Glossary

Commands
Classes

-----> Sorted alphabetically (and/or if possible for commands, by type as in the basic commands section)
-----> Full listing of inputs, outputs, optional args, description etc.

Examples
-----> As many examples as we feel are useful to demonstrate the different capabilities of gpkit
-----> This could include ipython notebooks
-----> Make sure to cite Boyd tutorial

Download https://github.com/convexopt/sphinx_gpkit to get a basic install of sphinx. You may need to install the sphinx python package (pip install sphinx should do it)

Close? I think the intent of this ticket has been achieved; any missing items? They should be turned into new tickets with smaller scope.

I'm ready to close this. :)


Updating a more complex entity

Hi Tito, I'm banging my head against the wall on this.
I have a boolean field in a user account. Getting data from Drupal is easy and altering simple key values in the IDictionary is easy but I can't figure out how to alter the more complex ones, such as the roles or my custom boolean field here:
field_user_done : [user_dftd]: hashcode { 13189358 }
{
	und : [integer[]]: hashcode { 51595365 }
	{
		0
	}
}

I got that output from running:
var newuser = ser.Deserialize(ser.Serialize(_user));
WriteLine(newuser.DumpToString());
A pure DumpToString() gets me this
field_user_done : [XmlRpcStruct]: hashcode { 43231651 }
{
und : [Object[]]: hashcode { 43231651 }
{
0
}
}
Could you please help me how I can alter this key value from 0 to 1 and update the node object or user object or where ever the field in question is used and I will create a wiki entry on it when I get it to work? This needs documentation imo because it applies to every custom field you create.
Many thanks

I tried
var field_dftd = new Hashtable { { "und", "1" } };
_user["field_user_done"] = field_dftd;
but all I Get is error that Hashtable can't be mapped to XML-RPC.
I'm sure it's something silly simple I'm missing here.

I suspect that this is a better way, to create a new UserAccount object and just set the data that way.
UserAccount tempuser = ser.Deserialize(ser.Serialize(user));
tempuser.field_user_done.und[0].value = 1;
But UserUpdate() requires an XMLRpcStruct to ship it back to Drupal.

I figured it out. It was so simple.
        XmlRpcStruct dftd = new XmlRpcStruct();
        dftd.Add("und", "0");

        user.Remove("field_user_done");
        user["field_user_done"] = dftd;
        var structUser = drupal.ConvertAs2(user);
        drupal.UserUpdate(uid, structUser);

ConvertAs2() is the new method I created and proposed in issue 13: https://github.com/titobrasolin/Drupal7.Services/issues/13
    public XmlRpcStruct ConvertAs2(IDictionary value) {
        IDictionary old;
        XmlRpcStruct @new;

        old = value as IDictionary;
        if (old == null) {
            return null;
        }
        @new = new XmlRpcStruct();
        foreach (string key in old.Keys) {
            @new.Add(key, old[key] == null ? "" : ConvertAs(old[key]));
        }
        return @new;
    }

I will create a new page in the manual for how to update fields back to drupal once I see entity reference etc works the same way.


Nimony: Default float type should be -1

I think in Nim float is always mapped to float64 so -1 would be an incompatibility.

Thought it would be decided by the backend, but it does look like NF at least is mapped to double

Also for context, literals get assigned -1 so assigning a literal to float32 variable doesn't match https://github.com/nim-lang/nif/blob/master/src/nimony/builtintypes.nim#L39-L40

Integers are not floats, int is its own type and float is merely an alias.

I mean like let x: float32 = 1.0 which currently has mismatched types because literals are -1 and variables get 64, but if it is supposed to be like that the issue is in type checks

The type checking is WIP like generics, sets, case statements ... ;-)


handle route globally

My understanding of NavigationState.route is that each of its RouteElementIdentifier elements corresponds to a Routable that is triggered.  So if my route state goes from ["home"] to ["home", "favorites"] than the root Routable will push FavoritesVC (for example).  So each successive RouteElementIdentifier that is appended during a SetRouteAction([] hands control off to a new Routable.
But what if I want to push a loading screen as the 3rd Routable.  A loading screen could be presented from any VC.  Is there a way to define the routing to a loading screen (say by presenting LoadingVC modally) once and have FavoritesVC inherit the ability?  Because a ProfileVC along with 10 other VC's would reasonably present a loading screen.

i thought of another way to do this.  but it would involve changing the library.  looking at the source, (specifically Router<T>.routingActionsForTransitionFrom) if my routing state goes from ["foo"] to ["foo", "bar"],  than the Routable pushed for "foo" is charged with routing to "bar".  Is it possible to extend ReSwiftRouter such that the "bar" route could be handled only by the Routable for "foo"?


Application lifecycle

Problem and motivation:
Currently, an application starts when created. That forces the developer to create wrappers to delay the initialization. Also, there is no way to "destroy" an application (force unsubscribe all listeners and let the GC do its work). Finally, "dependencies" mechanism looks utterly useless.
Solution:

Remove dependencies field from createApp config.
Introduce two methods to the application: init and destroy.
init method should initialize modules with provided dependencies, start an engine and dispatch a special init event.
Application state still should be subscribable at any time.
destroy method should unsubscribe all store subscriptions and dispatch a special destroy event.

examples:
const app = createApp({
	name: 'test',
	modules: [...]
})

const { Consumer } = createComponents(app)

// later
app.init(dependencies)

// later
app.destroy()

Should app be subscribable before init? If not, should .init return a new app each time?

Destroy

Emits destroy event
Completes event$ and state$ streams
Unsubscribes from epics
Unsubscribes devtools

closed in #87


Stocktake, adjusts based on snapshot quantity difference not on real quantity difference

Stock-takes by their nature need to be done synchronously to other actions like receiving/issuing stock. This is explained in training but is not restricted in the app. Sound like we need to handle the cases where users issues/receives stock while stocktake is in progress, to minimise a chance of ledger issues.
Currently when stocktake is finalise we create an inventory adjustment based on difference between snapshot quantity, not actual quantity. This can result in ledger discrepancy.
i.e.
Item A -> Starting Quantity: 1000

Stocktake is created with snapshot quantity = 1000
Then a customer invoice is created, issuing 100 of stock (Item A Quantity = 900, Transaction Line A = -100)
User goes back to stocktake and enters Actual quantity = 900
Stocktake is finalised (Item A Quantity = 900, and stock take adjustment, based on Snapshot Quantity = 1000 - Real Quantity = 900, Transaction Line B = -100)

So our actual quantity = 900 but our ledger reads:
Starting Quantity = 1000
Transaction Line A -100
Transaction Line B -100
Expected Quantity = 800
Even though Quantity is correct, ledger is not.
This is how this example looks in mSupply Desktop Item->Stock->Ledger:

Prior to https://github.com/sussol/mobile/pull/634 with some trickery it was possible to finalise an a stocktake that show a negative ledger.
Solution:

As per mSupply desktop, when creating adjustment, make sure to use real quantity not snapshot quantity
When opening a stocktake, update the snapshot quantity = real quantity. (makes more sense from data integrity point of view, i.e. adjustment = difference between snapshot quantity and counted/actual quantity).
Disable issuing and receiving items that are in un-finalised stocktake (a bit of a mission to implement + restricts users from some tasks they may wish to do)

@GaryWilletts @ujwalSussol @Chris-Petty @craigdrown, which one do you prefer ?

Can we adjust possible ledger problems with migration code ?

Will have to implement forward/backwards ledger calculations, and adjust inventory adjustment lines accordingly.

Replicating mSupply desktop logic is probably the best approach.  This way our documentation will be the same….

On 26 Mar 2018, at 18:07, Andrei<EMAIL_ADDRESS>wrote:
A correction (while talking to @ujwalSussol https://github.com/ujwalSussol), he explained, and I tested. mSupply Desktop adjusts stocktake based on 'difference' between snapshot and counted quantity. (and as explained above mobile sets real quantity = counted quantity).
Scenario:
Stock adjusted in stocktake, -100
Customer invoice is created, -100
Stocktake is finalised, total reduction of real quantity = -200
This is makes sense if stocktake counted/actual quantity is entered before the customer invoice (i.e. most places when doing stocktake, a printout is given to the store-man, who does a 'snapshot' stocktake, and data entry may 'lag' behind stocktake's finalisation).
Makes a little less sense when we assume that at the time of finalisation, counted quantity is the actual, real quantity of the stock. (which maybe what happens in mobile ?)
I am happy with replicating mSupply logic of adjustments.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/sussol/mobile/issues/638#issuecomment-376147100, or mute the thread https://github.com/notifications/unsubscribe-auth/AGc26iGXIDFdLQYW7QLXPneB_fcghbRKks5tiN2fgaJpZM4S67xZ.

It's a notorious problem with stocktake. When using paper you have to make sure to include anything that has been picked for outgoing in your counted quantity (if picked before you counted).
I think places get around this by doing a massive full stocktake outside of normal work hours (at least in my experience).
Applying the difference from counted - actual stock on hand isn't any good either, the ledger problems are just positive values rather than negative.

Snapshot was 100
Counted quantity set to 100
Actual SoH becomes 0 through CI
Finalise stocktake: 100 - 0 = +100 difference to add
Real quantity is 0, mSupply quantity is 100.

For the record, mobile does apply the difference as you describe desktop does. Desktop even throws the same sort of error if you try to make reducing inventory adjustments when a customer invoice has reduced stock to 0 already. Problem with mobile was that you could wiggle around it by abusing a bug.

The code in mobile is interesting though.
StocktakeBatch.js
  finalise(database) {
    const isAddition = this.countedTotalQuantity > this.snapshotTotalQuantity;
    const inventoryAdjustment = isAddition ? this.stocktake.getAdditions(database)
                                            : this.stocktake.getReductions(database);
    // Adjust inventory
    this.itemBatch.batch = this.batch;
    // Review: The item batch is edited directly, changing the number of packs
    this.itemBatch.numberOfPacks = this.countedNumberOfPacks;
    this.itemBatch.expiryDate = this.expiryDate;
    // Create TransactionItem, TransactionBatch to store inventory adjustment in this Stocktake
    const item = this.itemBatch.item;
    const transactionItem = createRecord(database, 'TransactionItem', inventoryAdjustment, item);
    const transactionBatch = createRecord(database, 'TransactionBatch',
                                          transactionItem, this.itemBatch);
    // Review: The corresponding transaction batch is made using difference, but the
    // transaction (inventory adjustment) is created with confirmed state. This is means
    // that the difference isn't applied to stock, that was directly done above. I am not
    // sure why it's done this way. This is why ledger gets a negative value but
    // mobile sets it's stock to the counted quantity
    transactionBatch.numberOfPacks = Math.abs(this.snapshotTotalQuantity
                                              - this.countedTotalQuantity);

    database.save('ItemBatch', this.itemBatch);
    database.save('TransactionBatch', transactionBatch);
  }

If you haven't, read the "Review:" comments I made in the code above.
Desktop does appear to do it similarly. The inventory adjustments are never moved to status "finalised". They can be deleted separately from the stocktake which seems really naff to me. Why not have the inventory adjustment as "suggested" when starting finalisation of the stocktake and once the stocktake finalising code has completed populating the adjustment, confirm or finalise it to apply adjustments? That way in mobile we can stop editing the stock value directly (setting it to counted). At least then we'll actually show negative stock when when a bug allowed it!
As implied that doesn't actually fix the fact that the applied difference could give a negative stock value (if you wiggle round the check for changes into negative stock like you could in mobile).
For the current logic the only half decent way I can think is for customer invoices, supplier invoices and inventory adjustments to adjust snapshot quantity (making it no longer a snapshot...) or adjust the counted quantity of unfinalised stocktakes. A customer invoice would have to decrease the former or increase the latter. Old unfinalised stocktakes will still become a full blown mess at any rate. The meaning of counted quantity vs snapshot quantity for a given start date is lost, but for the final date is correct. That said, you can add items after you created the stocktake in mobile, so it already wasn't solid for the start date.

@GaryWilletts I detect has 2 cents given a comment on cerb.
@sussol/msupplyadmin in general probably have some wisdom on the matter.

@Chris-Petty I think I confused you re how mSupply desktop applies the adjustments, it doesn't actually look at the counted quantity vs actual quantity, it looks at counted quantity vs snapshot quantity and tried to apply the difference to actual quantity.

I am quite keen to reduce user error / confusion that results from stocktake (not by telling user not to do something, but by removing the possibility of that something being done).
For desktop I can only see one issue, when stocktake is finalised, the counted quantity is not necessary what the quantity will be adjusted to.. This maybe confusing for the user
Mobile, as outlined above will always adjust quantity to be counted quantity on finalisation, but mobile may create inventory adjustments that lead to ledger discrepancies (even thought the counted/actual quantity should stay correct)

Are you still arguing your case for in your original comment?
In mobile it can only make ledger issues if you abuse that bug we know about right? I agree it'd be better if mobile and desktop did the same by applying difference. Going negative stock should be blocked, but if we do (through a bug that allows it) I think mobile should show it.
Not sure if silly idea: What if stocktake had a "Refresh" button. It'd have a modal that comes up that warns/confirms. It'd look at past transactions since the creation date of the stocktake and adjust snapshot and counted quantities (don't touch "Not counted") by the same amount. Bring the creation date forward. Though if you've left your stocktake floating around like that to begin with, normal practice would be just to delete it as far as I know.

@GaryWilletts
If there is a reduction or addition transactions while the stocktake is in progress, when the stocktake is 'finalised' -> adjusted quantity != counted quantity. (for an example please read the first note of this issue)
@Chris-Petty I like the idea of refresh button, I think the solution we discussed yesterday is similar 'auto-refresh'.
Anytime a stocktake is opened, we check snapshot quantity vs actual quantity for every stocktake line, if snapshot quantity is different, then we readjust it and set counted quantity field to 'not counted'.  Also a modal will pop up, listing items which have been 'refreshed', maybe even a message warning that while stocktake is in progress, one should not make/edit transactions with items in the stocktake.
Benefits:

No ledger problem
Counted Quantity = Actual Quantity (this is a benefit of doing it this way, rather then the desktop way)

Ok I've been testing in mobile and have come to some conclusions. Little bit weird.
Just to be clear "Stock on Hand"/"Actual Stock" will be referred to as SOH.
Case one Make a stocktake for itemA (increasing) and then customer invoice

Stocktake for itemA, snapshot 1000, counted 1500, diff +500
Issue 500 in customer invoice
finalise stocktake
Once synced, desktop reconciles to say 1000 on ledger (definitely the correct value), SOH is 1500 (uh oh).

Case two - Make a stocktake for itemA (decreasing) and  then customer invoice

Stocktake for itemA, snapshot 1500, counted 1000, diff -500
Issue 500 in customer invoice
finalise stocktake
Once synced, desktop reconciles to say 500 on ledger (definitely the correct value), SOH is 1000 (uh oh).

Case three - Make a stocktake for itemA and then supplier invoice
Short story is this works fine. No ledger problems. The first 3 transaction in above picture resulted correctly in 1500. Doesn't matter if the stocktake increased or reduced stock for itemA, works fine.
Mobile is doing a bad between customer invoice and stocktake. Pending me investigating exactly what happens on the mobile side:
It should match the ledger by applying the difference (like desktop). This is ideal because it means previous counts in a stocktake are mostly fine except the one exception...
If the difference applied to SOH will result in negative ledger, it currently just blocks the user on finalising. It's a major headache to correct these. Throwing out a whole stocktake to correct a few lines would be a waste.
We discussed yesterday either blocking making new customer invoices all together while there is an unfinalised stocktake, but that's gross.
"Refreshing" or resetting lines which snapshot no longer matches SOH means that this is more spread out, but unnecessary if we correctly apply the difference.
TL;DR
Resetting lines that aren't counted yet and the lines that will have a difference applied that goes to negative stock will conserve the most amount of work, and keep the ledger and SOH as correct as possible. @andreievg did I miss something
@GaryWilletts, @craigdrown @adrianwb didn't complain when we talked about refreshing/resetting lines yesterday. I will note that mobile does give us a bit of flexibility to do this because there is only ever one point of data entry for , the tablet. This wouldn't work with desktop due to the multi client environment and tendency to print out stocktake sheets.
Actions

I'm going to poke around customer invoices and stocktake. Probably make stocktake correctly apply difference. Will have to test that supplier invoices keep playing ball.
When opening a unfinalised stocktake, quickly check all lines won't cause negative stock. If they do, reset them and inform user. Update snapshot for all uncounted lines. (Will do this one when all debate is settled)

@andreievg thanks, just checking I was understanding what you were saying - I was :-)
@Chris-Petty I'm coming round to the idea of refreshing the snapshot in mobile but I'm still not convinced. Let's see what your investigations show. Someone has to stand up for tradition ;-)

Sorry to be adding comments to this discussion this late.
But while doing a review of https://github.com/sussol/mobile/pull/655/ I've realised that our discussion didn't fully end, and we still have to agree on something.
My suggestion was to reset snapshot and counted quantity (without an option, but with a message) for all items where snapshot quantity != actual quantity (current available quantity), and do this every time a stock take is opened, with a message saying something along those lines: Snapshot quantities for these items have changed (due to stock issued or received while this stocktake is in progress), both Counted Quantity and Snapshot quantity will be reset: Item A, Item B, Item C..
This way we are completely locking the user out of making 'error' or something they will perceive as errors. There is a scenario where there might be a question, will give an example at the very bottom of this comment.
@Chris-Petty, I am happy with replicating the adjustment logic as per mSupply.
But I am still worried about these scenarios:

If we allow a cancel button in the reset snapshot modal (as per https://github.com/sussol/mobile/pull/655 currently), we might get these question from the user:

I did a stocktake for Item A, which had snapshot quantity of 100.  Before counting, we issued 20 of Item A, then we went back to Stocktake (and pressed cancel as we didn't quite understand the message), then we set Item A to our desired quantity = 80. It seems mSupply adjusted the quantity to 60. Please help us fix it. (Explain why, ask them to do readjustment etc.. at this stage they will most likely want to do a recount for that item anyways)
Consider the same example but in more complex form, Item A has two batches, Batch A (first expiry) snapshot = 25 and Batch B (later expiry) snapshot =  75.  We issued 20 using custom invoice, then went back to stocktake, pressed cancel again. Now we adjusted the quantity to what it currently is, Batch A = 5, Batch B = 75. Now we are getting an error saying we cannot reduce stock quantity below minimum. Please help us fix it (Again have to explain and again will need to recount)

If we do not adjust items with already counted quantity

Hi we did a stocktake for Item A, snapshot quantity was 100, and we set it to 80.  Right after the stocktake (before we finalised it), we had to issue 20 worth of stock via customer invoice. Before finalising our stocktake we realised that Actual Quantity for Item A is not 80 anymore but is 60, so we set it to 60. After finalising the stocktake, the quantity has changed to 40! Can you please explain how this happened that help us fix this issue (most likely a recount will be needed)
Similar can have even more complicated issue when talking about batches.

Would it not be better if the user does not ask us questions, and or thinks that our system is erroneously adjusting the stock  ?
There is a potential confusion for the user as per my suggestion. They can ask a question

I've created a stocktake for Item A, adjusted it to from 100 to 80. I had to make an urgent stock issue, and issued 20 of Item A to a customer. When I went back to stocktake I've received a message saying Item A will be reset as the snapshot quantity for the item has changed... Why did this happen, do I really need to recount this item now ? (Answer will be generic, we can point the user at our doc page where the answer lives, i.e. don't issue/receive stock while stocktake is in progress. Can even have a link in mobile, in the modal re why these items are being reset ?).

I am still holding strong to resetting all snapshot quantities / counted quantities. Thus all the scenarios.
I think the question for us is, what do we think is right ? And what customer thinks is right ? I think with the solution I am suggestion, the confusion between the two is minimised.

Your first 2 examples assume that they press the cancel button, not heeding the warning given to them. The blunt way to resolve that would be to not allow it to be cancelled. It's up to us if we want the new functionality/behaviour as optional. Counted items that are fine have their work preserved but the risk of error on other lines is resolved.

If we do not adjust items with already counted quantity...

Your suggestion of resetting any lines of snapshot quantity != stock on hand does mitigate this, but I argue that slightly better training on stocktake would enable them to do less rework (only recounting lines that would apply into negative stock). Common practice is rolling stocktake or full stocktake, diverging from that is training anyway. That said, mobile docs are suuuuper basic - assuming user has knowledge of stocktaking kinda basic.
Just a note: The current implementation in #655 will prompt every time they look at the stocktake until it's finalised. Could also prompt on editing every line (don't think it'll be much overhead).

@Chris-Petty

I argue that slightly better training on stocktake would enable them to do less rework (only recounting lines that would apply into negative stock). Common practice is rolling stocktake or full stocktake, diverging from that is training anyway. That said, mobile docs are suuuuper basic - assuming user has knowledge of stocktaking kinda basic.

So far training has not helped (I'll telegram you examples shortly), imagine 100+ mobile sites, doing stocktake every month, with possibility of erroneous adjustments. That's a lot of support emails, we can solve this issue for mobile once and for all by reseting as i've suggested, why not do it ?
By the way with this suggestion the app teaches the user, if they have done something they shouldn't have (stock movements) while a stocktake is in progress, they will need to recount those items, now they have an incentive, not to issue/receive stock when stocktake is in progress.
Mobile sites have small warehouses, and recounting a couple of items is not a big task.
Why allow a possibility of erroneous adjustments ?

Just a note: The current implementation in #655 will prompt every time they look at the stocktake until it's finalised. Could also prompt on editing every line (don't think it'll be much overhead).

With no cancel button and resetting snapshot and counted quantity for all items that had stock movements since stocktake started, we don't need to prompt on every line edit.
If we are in disagreement here still by the end of the day, we should ask for some mSupply guru opinions. (it's too much of a blocker atm)

I agree with making it non optional. I can get on board with resetting all stocktake lines that have had movement (i.e. including those that wouldn't result in negative stock). It should lead to less support for us and possibly a little more rework for them (though they should learn to avoid doing invoices while a stocktake is in progress as you've reiterated).
@sussol/managers can interject, but I'll move forward with that until then.

The same issue applies to mSupply desktop and we should keep the two consistent. Whichever way it's done, the user has to know because it makes a difference to what they count in a stocktake.
Other options are to disallow confirming an invoice with an item included in an unfinalised stocktake or to warn the user if they confirm an invoice with an item in an unfinalised stocktake.
@craigdrown @craig you have an opinion?

Mobile customer invoices are confirmed by default, so that's a bit of a paradigm shift on that platform @GaryWilletts . An equivalent would be not allowing confirmed invoices to be edited, though.

Ah, I'd forgotten that. We just need to make a decision about the way to go and it's not entirely clear which way is best, hence our long discussions. Personally I'd rather prevent someone editing a confirmed customer invoice in mobile if there's an unfinalised stocktake with the edited item on it (or putting the item on a new customer invoice if it's in an unfinalised stocktake). It prevents stock issues and trains the user to use correct stocktaking practice at the same time. Is the check expensive in mobile?

@GaryWilletts, this type of check is expensive in terms of keeping the code clean. If we do this type of check then it will have to be for Custom Invoices, Supplier Invoices, Customer Requisition (as it generates CI automatically) and for Other Stocktakes.
Can you please describe which part of the described solution you don't like or disagree with. Described solution being reseting the items in stocktake that have changed quantity (stock issued or received while stocktake is in progress)
Please keep in mind that this solution is aimed at mobile not desktop, where the scale of everything is smaller.

I'm not in disagreement, just trying to think round the wider issues. It's a pretty radical change and mobile and desktop will be working differently - important we do it the right way.
The expensive argument doesn't work I think because your proposed change is more expensive in all ways - you have to have the same checking code as if you were warning/stopping the user but you additionally have to check and update all suggested stocktakes.
I'm OK with updating the snapshot, just making sure it's properly thought through. Think of me as the grit that leads to the pearl ;-)

Current mSupply desktop logic  :
example 1 :
Snapshot = 600
stock take = 250  [ diff 600-250 = 350 ]
user issues = 100
So actual stock is :   600 - 100 = 500
Now stock take is finalised :   500 [current stock level]  - 350 [stocktake difference] = 150
example 2:
Snapshot = 600
stock take = 250  [ diff 600-250 = 350 ]
user issues = 400
So actual stock is :   600 - 400 = 200
Now stock take is finalised :   200 [current stock level]  - 350 [stocktake difference] = -150
Here the calculation shows that the stock will go negative if allowed... so mSupply disallows...
Instead it used to do  :     200 [current stock level]  - 200 [stocktake difference] = 0   .... Now we show the excel sheet which has created complication to the user....   Previously the inventory adjustment would be adjusted to bring the stock to zero....   If absolutely no stock was available, mSupply even adjusted the stock take to zero.  This was before the excel option..... Now we are having to bring back this feature as our users can't handle the excel sheet.

@GaryWilletts

The expensive argument doesn't work I think because your proposed change is more expensive in all ways - you have to have the same checking code as if you were warning/stopping the user but you additionally have to check and update all suggested stocktakes.

In mobile there is only ever a single page interface (no multi window) so we can quite easily adjust snapshot quantity for items where snapshot quantity differs from available quantity. This is done when stocktake is opened, so not expensive at all

I'm not in disagreement, just trying to think round the wider issues. It's a pretty radical change and mobile and desktop will be working differently - important we do it the right way.

Yeah, there will be differences in how mobile and desktop handles stock-takes. Mobile already differs in a few ways from desktop, I think the differences were driven by trying to simplify Mobiles interface and operations. I believe this new change to stocktake reset is the simplest way to avoid user error, user confusion (leading to support tickets).
On a side note, it look like one good difference, the requisition modal, is being applied to desktop now.

@ujwalSussol  @GaryWilletts @craigdrown
For mSupply Desktop, in my view the ideal solution will be to change our stocktake table + stock take line edit.
For stocktake table, change Enter Quantity to Snapshot Counted Quantity and add Finalised Quantity (the quantity stock level will be adjusted to after stocktake is finalised). Make the row red if Finalised Quantity is below zero.
And when stocktake row is double clicked, can add extra information. Finalised Quantity, Current Quantity (current actual or available quantity of the item, may be different to snapshot quantity) and Adjustment
We can even include a little formula here (maybe our interface can be in the shape of this formula)

Finalised Quantity = Current Quantity + Adjustment
Adjustment = Counted Quantity - Snapshot Quantity

This way the user will know what's actually going on with stocktake adjustments.

@ujwalSussol can I ask why there was the move to the excel option to start with?
The approach that you're bringing back is pretty simple but... is it gross?
What I've implemented on mobile

I've talked to Chris a little bit, it seems Snapshot Counted Quantity is not the best name for a column. I guess Counted Quantity will be sufficient (I was trying to say that 'this column is what you've counted, but may differ to actual quantity at the warehouse, as there could have been some stock movements since you've counted it'). And again there may be better suggestions for Finalised Quantity -> quantity that mSupply will adjust the stock to once inventory adjustment is created.

I've moved mSupply desktop related discussion to: https://bugs.msupply.org.nz/view.php?id=8811

@Chris-Petty  :  I think we had one client that noticed mSupply making stock take adjustment and ledger adjustment due to lack of stock.... So the excel approach was to stop the process and to allow the users to logically do the maths....  As we have noticed lately this was asking too much of the users.....
So the easy option for desktop is to use bring the previous approach back but to have logs mention lack of stock for stock take, so mSupply made stock take and ledger adjustment.
For mobile :  What every way you have done is fine for now....  as long as we don't have ledger problems.

Apparently I sleepily closed this issue and commented a half comment haha


Remote-exec getting error

Whenever I run 'terraform apply', I get an error at the end about remote-exec, and the command doesn't execute. I am using cloud-init and using the same snippet that is in the docs. guides/cloud-init.md
error: Error: host for provisioner cannot be empty
main.tf snippet:
provisioner "remote-exec" {
    inline = [
      "ip a"
    ]
  }
}

If I read the docs I would know the answer...
https://www.terraform.io/docs/provisioners/index.html

If I read the docs I would know the answer... https://www.terraform.io/docs/provisioners/index.html

can you share which part of it and how do you solve this issues?. how you properly used the provisioner "remote-exec" after create the VM?

um I haven't done it in a little while - i'll check my config once i get back. sorry about leaving such an unhelpful answer!

@reesericci hope you can share, haha I'm stuck with this i need to run few commands once VM created, btw is it required to have qemu-guest-agent installed when you're creating the template?.

An answer here would be nice. The documentation on this specific provider doesn't show how to properly do this


fix missing cholmod.h

At the moment, suitesparse has a very odd default installation location after the previous changes to the install.
I think this actually should break on both linux AND mac, but apt and conda have suitesparse version 5.10.1 instead of 7.6.0 which can be found in brew.
Running CI to see if things are working now with the updated version

Even if these pass, I have removed the Linux tests, so wait to merge until I add them back in, please.

At least they're all installing now. I'm going to make a final commit to allow the Linux tests to run.

@vhaasteren should I merge this into main now?

@vhaasteren Oops! I thought since this was a bug that would affect any pull request, it should go into master. Is that not the case here? It doesn't affect the code in the project at all.

Yes, master is fine also. Just merge it back into dev then 👍


Generics being removed from functions

The below code generates an unexpected type error, I'm not 100% sure of the cause but I believe it's due to the generics on B.Map being removed from it.
type A<T> = {
    Current: T,
}

type B<T> = {
    Current: T,

    Map: <U>(self: B<T>, Callback: (T) -> U) -> A<U>,
}

type AB<T> = A<T> | B<T>

type C = {
    ChildMap: { [string]: C },
    ABMap: { [string]: AB<any> },
}

local function takesC(C: C)
    for _, Child in C.ChildMap do
        takesC(Child) -- Type Error!
    end
end

Error:
TypeError: Type 'C' from 'FILE_PATH' could not be converted into 'C' from 'FILE_PATH'
caused by:
  Property 'ABMap' is not compatible.
Type
    '{| [string]: A<any> | B<any> |}' from 'FILE_PATH'
could not be converted into
    '{| [string]: A<any> | B<any> |}' from 'FILE_PATH'
caused by:
  Property '[indexer value]' is not compatible.
Type
    'A<any> | B<any>'
could not be converted into
    'A<any> | B<any>'
caused by:
  Not all union options are compatible.
Type 'B<any>' could not be converted into 'A<any> | B<any>'
caused by:
  None of the union options are compatible. For example:
Type 'B<any>' from 'FILE_PATH' could not be converted into 'B<any>' from 'FILE_PATH'
caused by:
  Property 'Map' is not compatible.
Type
    '(B<any>, (any) -> a) -> A<a>'
could not be converted into
    '<U>(B<any>, (any) -> U) -> A<U>'; different number of generic type parameters

Looks related to https://github.com/luau-lang/luau/issues/779.

Closing as a dupe of https://github.com/luau-lang/luau/issues/779.


Update typing's for gas limit

Both numbers and hex strings are acceptable.
Closes #499

Coverage remained the same at 82.139% when pulling a2a16c3fc5c8c9d033e02a91a41eaee52fe92b94 on update/typings-gasLimit into bb6871c7bde24b0072be3d304562569423d8f30a on develop.


GateSentry is blocking all traffic

I wanted to modify the squid.conf file (to add tmpfs cache). This did not work out too well, everything being blocked thereafter. Then I reverted to the previous configuration file and restarted but GateSentry keeps blocking all traffic. (I've put the original config file https://gist.github.com/fifthsegment/79fb356bf4cbf90253104388d504ee43 )
/var/log/squid3/access.log gives me little information on what is happening :
1464957874.619    407 <IP_ADDRESS> TCP_MISS/500 133277 GET https://www.google.fr/ - PINNED/2a00:1450:4007:80d::2003 text/html
1464957884.167   5768 <IP_ADDRESS> TCP_MISS/500 133282 GET http://google.com/ - HIER_DIRECT/2a00:1450:4007:807::200e text/html

Okay, seems like a broken pipe issue. After any change that you make to any config file, whether its squid, dansguardian or gatesentry, you must restart all three of them to allow the changes to take effect. Otherwise you'll keep getting the everything blocked error.
service squid3 restart service dansguardian restart service gatesentry restart

I did it. Same result.
Any ways to get more info in the logs ?
1465024727.899   5214 <IP_ADDRESS> TCP_MISS/500 133282 GET http://google.fr/ - HIER_DIRECT/2a00:1450:4007:80c::2003 text/html
1465024738.131   5181 <IP_ADDRESS> TCP_MISS/500 133282 GET http://google.com/ - HIER_DIRECT/2a00:1450:4007:80c::200e text/html
1465024775.533   5525 <IP_ADDRESS> TCP_MISS/500 133282 GET http://yahoo.com/ - HIER_DIRECT/2001:4998:c:a06::2:4008 text/html
1465024777.193    293 <IP_ADDRESS> TCP_MISS/500 133282 GET http://yahoo.com/favicon.ico - HIER_DIRECT/2001:4998:c:a06::2:4008 text/html
1465024778.733    293 <IP_ADDRESS> TCP_MISS/500 133282 GET http://yahoo.com/favicon.ico - HIER_DIRECT/2001:4998:c:a06::2:4008 text/html

Hmmm...weird. Can you list any changes that you made to the default GS image (any config files/software installed)?

I created a cache directory
then modified the /etc/fstab
tmpfs /cache tmpfs defaults,noatime,nosuid,size=500m 0 0
the /etc/squid3/squid.conf to activate the cache (commenting other statements)
cache_dir ufs /cache 400 16 256
and then
service squid3 stop
squid3 -z
service squid3 start

I have reverted and removing everything back to original (I think), restarted, rebooting, etc...


Fix overflow activity feed

Resolves https://github.com/NEARBuilders/gateway/issues/405

@itexpert120 can you please attach a video of the changes?


Azure AD B2C tenant per application tenant

We use a Azure AD B2C tenant per application tenant according to the isolation models described here: https://learn.microsoft.com/en-us/azure/architecture/guide/multitenant/service/azure-ad-b2c#isolation-models. I definitely need to use WithPerTenantAuthentication. Has anyone implemented this? Is there an example?

Hi I’m reviewing this so I can give you a good answer. Thanks for bringing up this question.


[Bug] the action adds - in front of lines starting with @

in case of any previous release note including a line like:
- Add workflow to clean-up action cache on PR closure xxxxxxxxxxx (PR #8 by
  @chicco785)

the action changes the content to:
- Add workflow to clean-up action cache on PR closure xxxxxxxxxxx (PR #8 by
- @chicco785)

I was able to reproduce this issue. The error is not happening in this project, but in a dependency down the line which I also maintain. 😎
I've opened a PR with the failing test here: https://github.com/stefanzweifel/commonmark-markdown-renderer/pull/7
The code in question, that breaks this is ListItemRenderer.php and ListBlockRenderer.php.

All markdown rendering apps that I use (Obsidian, iA Writer) convert the example you provided to a single line item without a line break in it.
So this …
- Add workflow to clean-up action cache on PR closure xxxxxxxxxxx (PR #8 by
  @chicco785)

turns into this.

Add workflow to clean-up action cache on PR closure xxxxxxxxxxx (PR #8 by @chicco785)

I would adopt this logic and update the package, to replace all line breaks (\n) in a list item with a space ( ).
Otherwise I would have to rewrite the ListBlockRenderer.php to distinguish line items differently. (And I have no idea how I could do that right now.)
Or do you expect the final document to keep the original formatting?
To be this:
- Add workflow to clean-up action cache on PR closure xxxxxxxxxxx (PR #8 by
  @chicco785)

instead of this:
- Add workflow to clean-up action cache on PR closure xxxxxxxxxxx (PR #8 by @chicco785)

I think the problem may be related to the combination of your code with prettier.io. I am currently on holidays, so I can’t provide more details right now, but will be happy to do so in 2 weeks.

Sure, no problem. Enjoy your vacation.

hi @stefanzweifel
i am back :)
basically, we run two workflows:

generates release release notes (https://github.com/zaphiro-technologies/github-workflows/blob/main/.github/workflows/release-notes.yaml)
check and pretty markdown (https://github.com/zaphiro-technologies/github-workflows/blob/main/.github/workflows/markdown.yaml)

so when release notes are updated, the workflows are triggered again, and the prettier changes the formatting of the release notes. the combination of the two actions may cause the weird behaviour. since, the prettier act on the release note and breaks it into multiple lines, and then the release note action process it again adding to the start of the new line the -, despite this is still actually part of the existing bullet. (I hope it's clear)

Thanks for the feedback. So the wrapping is coming from prettier.
I think I will simply fix and merge my PR here and update all upstream projects accordingly.

@chicco785 This issue should now be fixed.
As always, this was a bit more complex than expected. The Markdown-to-Markdown converter couldn't handle multi-line list items yet. This has now been fixed in https://github.com/stefanzweifel/commonmark-markdown-renderer/pull/7.
The underlying CLI of this Action has been updated as well (https://github.com/stefanzweifel/php-changelog-updater/pull/44).


Partial order payments don't end up in merchant's BitcoinZ address.

Page requests 824.826 to t1UeTZ3sAQV9iCSiphfUSLTQW6vxjzik8Zk
send 181.2 to t1UeTZ3sAQV9iCSiphfUSLTQW6vxjzik8Zk
The 181.2  doesn't seem to find it's way to merchant's BTCz address.

If you need mroe info, DM me on slack.

Sorted this, partial payments will now get forwarded with an email notifying that the buyer may need manual assistance / refund


Site Submission Resource Model - Missing Location

When creating a new site from the Heritage Site field in the Site Submission Resource model, the user is taken to a new window to start adding preliminary information to the record. The field for location is missing.

[ ] Add Location to list of attributes to appear when selecting 'Create a New Site..." from Site Submission RM

closing in favour of same ticket #899


BatchNorm generates NaN moving_variance on GPU with fused set to True

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Colab, Ubuntu
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: No
TensorFlow installed from (source or binary): binary (Colab), source (Ubuntu)
TensorFlow version (use command below): 'v2.4.1-0-g85c8b2a817f', '2.4.1'
Python version: 3
Bazel version (if compiling from source): default for TF 2.4.1
GCC/Compiler version (if compiling from source): 9.3.0
CUDA/cuDNN version: default for colab, cuda 11.0.3, cudnn <IP_ADDRESS> (Ubuntu)
GPU model and memory: default for colab, 1080Ti (Ubuntu)

Describe the current behavior
This is a continue of https://github.com/tensorflow/tensorflow/issues/34062
Original issue was not resolved due to wrong test (GPU is not used with tf-nightly-gpu).
Describe the expected behavior
Batchnorm should correctly work on GPU with batch size == 1 and fused = True
Standalone code to reproduce the issue
Make sure to uncomment line with "set_log_device_placement" if you want to test with tf-nightly (you will see only CPU placement in colab logs)
https://colab.research.google.com/drive/16LccjOuj9Aj8x0S9Q-hOTxGgqVWdVZ53?usp=sharing

@shkarupa-alex
I ran the code shared on  tf nightly at runtime GPU and BatchNorm did not generated NaN moving_variance on GPU, please find the gist here.Thanks

@shkarupa-alex
I ran the code shared on tf nightly at runtime GPU and BatchNorm did not generated NaN moving_variance on GPU, please find the gist here.Thanks

You did'n read comments in code and as result didn't uncomment line

tf.debugging.set_log_device_placement(True)

If you will, you see that all ops are placed on Cpu (tf-nightly does not work with colab gpu env), but issue is GPU-related.
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op FusedBatchNormV3 in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Identity in device /job:localhost/replica:0/task:0/device:CPU:0
<tf.Variable 'batch_normalization/moving_variance:0' shape=(1,) dtype=float32, numpy=array([0.99], dtype=float32)>
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op FusedBatchNormV3 in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Identity in device /job:localhost/replica:0/task:0/device:CPU:0
<tf.Variable 'batch_normalization_1/moving_variance:0' shape=(1,) dtype=float32, numpy=array([0.99], dtype=float32)>
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Mean in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op StopGradient in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op SquaredDifference in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Mean in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Squeeze in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Squeeze in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Sub in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Mul in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignSubVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Sub in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Mul in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignSubVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AddV2 in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Rsqrt in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Mul in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Mul in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Mul in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Sub in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AddV2 in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Identity in device /job:localhost/replica:0/task:0/device:CPU:0
<tf.Variable 'batch_normalization_2/moving_variance:0' shape=(1,) dtype=float32, numpy=array([0.99], dtype=float32)>
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op DestroyResourceOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Fill in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op VarHandleOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op FusedBatchNormV3 in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op AssignVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op ReadVariableOp in device /job:localhost/replica:0/task:0/device:CPU:0
Executing op Identity in device /job:localhost/replica:0/task:0/device:CPU:0
<tf.Variable 'batch_normalization_3/moving_variance:0' shape=(1,) dtype=float32, numpy=array([0.99], dtype=float32)>

TF 2.5.0 + Google Colab = issue is still here

TF 2.6.0 + Google Colab = issue is still here

same problem with TF 2.7.0

update: set batch_size > 1 solve this problem

update: set batch_size > 1 solve this problem

It is not always possible (e.g. if model is too large).
So, it is still an issue and i hope it will be solved.

TF 2.8.2 + Google Colab = issue is still here

TF 2.10 + running locally = issue is still here

Reproduced on nightly
https://colab.research.google.com/gist/bhack/88a2baa9c31788dc4e5bf6275929563c/bn-issue.ipynb

Any updates?

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.


Fix LyricsPlus buttons from disappearing behind player bar

This fixes #285 and #288

Before-Images can be found in the linked issues.
After for #285:

Notice that the text "Lyrics provided by Netease" and the four LyricsPlus buttons are visible.
After for #288:

Notice the video is not cut off by the player bar at the bottom, even on wider aspect ratios.

While this gets merged and eventually pulled into the marketplace, have the fixes in this as a Marketplace Snippet:
.VideoPlayer__container video,
.lyrics-lyricsContainer-LyricsContainer {
  padding-bottom: 105px;
}

I've checked the commit, but the annotation text and buttons look good now, but the center of the lyrics still seems a little low.

I found that the video was just moved up, changing the occlusion from below to above. This is not a viable solution.


get all values of a given facet

Hi,
Is there a way to get all values of a given facet in the search response ? I seem to get all of them if I don't specify any facetFilters, and a small subset of them otherwise. The documentation does mention this might be not exhaustive, but my index contains only 9 records, so I doubt that this is the reason.
Is it the way the client is supposed to work ? Or am I doing something wrong ? Here's what my data looks like :
{
    ...otherProps,
    offerCatalog: {
        "0": ["0", "2", "4"],
        "1": ["0 > 0", "0 > 4", "2 > 2", "2 > 5", "4 > 3"]
    }
}

The following query returns me all the facets values with their count :
{
    facets: ["offerCatalog.0", "offerCatalog.1"]
}

Both the following queries return me only a small subset of both offerCatalog.0 and offerCatalog.1 facets values :
// First query
{
    facets: ["offerCatalog.0", "offerCatalog.1"],
    facetFilters: ["offerCatalog.0:0"]
}
// Second query
{
    facets: ["offerCatalog.0", "offerCatalog.1"],
    facetFilters: ["offerCatalog.0:0", ["offerCatalog.1:0 > 1"]]
}

Many thanks for your help

{
facets: ["offerCatalog.0", "offerCatalog.1"],
facetFilters: ["offerCatalog.0:0"]
}

This is expected that the API in this case will only send you back objects having the "offerCatalog.0" field containing the value "0". Is that what you get?

facetFilters: ["offerCatalog.0:0", ["offerCatalog.1:0 > 1"]]

Can you explain to me the underlying query/filter you want to do? This one means: "offerCatalog.0 is 0 AND offerCatalog.1 is 0 > 1"

What you are looking for is the helper https://github.com/algolia/algoliasearch-helper-js


Update troubleshooting-404-errors-for-github-pages-sites.md

Why: Added troubleshooting for Github Page 404 error with private repository of an expired GitHub Pro, GitHub Team, GitHub Enterprise Cloud,or GitHub Enterprise Server user.
Closes: https://github.com/orgs/community/discussions/36070

What's being changed (if available, include any code snippets, screenshots, or gifs): Added one line in the doc
* Check if your GitHub Pro, GitHub Team, GitHub Enterprise Cloud, or GitHub Enterprise Server access has expired if you are using a private repository for the Github Page Site. If so, please make sure to renew it or change your repository's visibility to public.

Check off the following:

[x] I have reviewed my changes in staging, available via the View deployment link in this PR's timeline (this link will be available after opening the PR).

For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the data directory.

[x] For content changes, I have completed the self-review checklist.

@Yuchen-Song Thanks so much for opening a PR! I'll get this triaged for review ✨

@Yuchen-Song Thanks so much for committing those suggestions! I'll update the branch and get this merged once tests are passing 🍏


Does PeerPad break urls?

There needs to be a strategy around long-term persistence support. If I bookmark a pad today, will I be able to see it in a year? The answer should be always yes.
This leads to start thinking on how to upgrade the data model of PeerPad without breaking retro-compatibility. It also highlights how the current Pinner is a short-cut that might lead into a very complicate situation soon.

Currently, a pinner is simply another node that tries to participate in all collaborations is sees and blindly tries to replicate the state.
We plan to have the pinner save state to IPLD and then pin it.
This will allow to easily migrate every collaboration to IPLD by just revisiting all past collaborations.
Having said that, I don't feel strongly on guaranteeing persistence on an alpha, and I'm ok with waiting for the current endeavour of [decentralised IPNS saving[(https://github.com/ipfs-shipyard/peer-star-app/pull/75) to be finished before we can communicate that guarantee (but this is a PM decision).

Our super short term goal is to use it for our working group meeting next week. We could probably manually copy the data to a github gist for long-term persistence for that particular meeting. As @pgte says, the IPLD solution is where we want to be.


Release Flatcar Container Linux Beta 3493.1.0, Stable 3374.2.4

Release Flatcar Container Linux 3493.1.0, Stable 3374.2.4
The release of Flatcar Container Linux 3493.1.0, Stable 3374.2.4 is planned for February 16, 2023.
Tasks

[x] Go / No Go hackmd doc created from previous one for test tracking and release notes: link (@sayanchowdhury)
[x] All planned changes are merged & blocker bugs are fixed, last nightly reviewed for problems (@dongsupark)
Branch off main (only new major) (x)
[x] Tag build branch (@dongsupark)
[x] Start Jenkins builds, post links as comment (@dongsupark)
[x] Test status captured in hackmd doc (@sayanchowdhury)
[x] All tests are green (@sayanchowdhury, @dongsupark)
[x] Release notes / announcements added to Go/No Go doc from container/image_changes job by selecting Timestamps: None (@sayanchowdhury)
[ ] QA: check diff for image file list, packages, and image size in the image job output (@sayanchowdhury)
[ ] Matrix Go/No Go meeting (inc. release notes review) (@sayanchowdhury)
[ ] Update payload signed/uploaded ()
[ ] scripts release created on GitHub ()
[ ] Release job container/release ran ()
[ ] Images uploaded with copy-to-origin.sh ()
[ ] Azure offer updated & publishing started (@sayanchowdhury )
[ ] Azure Go Live (@sayanchowdhury )
[ ] GCP offers updated (@sayanchowdhury )
[ ] Symlink to "current" updated with set-symlink.sh ()
[ ] Website updated with ./update-flatcar-versions.sh and PR merged ()
[ ] Release package published in Nebraska ()
[ ] Send announcement to Mailing Lists ()
[ ] Send Tweet out (@miao0miao, @ahrkrak)
[ ] Brief version announcement in slack (k8s slack #flatcar) and the Flatcar matrix channel

Jenkins builds:

Beta 3493.1.0: http://jenkins.infra.kinvolk.io:8080/job/container/job/sdk/638/cldsv/
Stable 3374.2.4: http://jenkins.infra.kinvolk.io:8080/job/container/job/packages_all_arches/1294/cldsv/


DeferredProcess causes a memory leak

DeferredProcess adds itself to the process registry on creation. But this is entry is never removed. The Process Registry uses a map with strong references, so completed deferred processes are never garbage collected.

Possible solution is to remove registry entries in the await() method, in this branch:
https://github.com/crowdconnected/protoactor-kotlin/blob/49154c02a7cf518675a3b0d448bd79d62dfa4b00/proto-actor/src/main/kotlin/actor/proto/DeferredProcess.kt#L26

This looks good!
One option could be to remove the two remove calls and replace both with a single one inside a finally block

Yes, I had thought about using finally - but wan't sure on the behaviour if the exception is rethrown in the catch. Wanted to double check the finally is still called, and when (if the exception is caught further up, are any other catches executed before this finally, and which is preferred).
Needed a quick solution (currently in use under heavy load in a production environment!), will give some further thought to the best catch - finally structure, and make a PR.

I'm currently stuck in NodeJS land due to work.
The Kotlin version of ProtoActor could really use some love so I've sent an invite if you want to join in.

@james-cobb are you still using this?
I'm trying to get some time in to fix the current issue list

Yes, the current PR is still in use in production, has fixed the issue, and is stable.
Using a finally clause should work just as well, and seems neater. But I think the current solution actually makes the precise behaviour more explicit, at the expense of a duplicated line of code.

👍 Thanks, pulled it all in. marking this as closed


How to make the motion of AI vehicle in Beamng obey the script node

Hi, In my scenario, there is only an AI vehicle and a controlled vehicle. I want to slow down the AI vehicle after it quickly overtook the controlled vehicle in Beamng. I tried to use the script node to control the movement of AI vehicle. But I found that even though I use the function 'time.sleep(0.1)', the speed of AI is low and the AI vehicle make strange noises before the overtaking . Besides, after the AI vehicle overtakes, it moves strangely, with a sinusoidal-like trajectory. But the script node I set is a straight-line trajectory after it overtook. I'm exceedingly confused. My code is shown below. Can you help me? Looking forward to your reply! Thanks very much!
def getAiScript0(orig=(0, -10, 0),tb=0):
script = list()
for i in range(3600):
node = {
'x': orig[0],
'y': -i * 20 + orig[1],
'z': orig[2],
't': i+tb,
}
script.append(node) # drive with high speed, before overtaking
return script
def getAiScript2(orig=(0, -10, 0),tb=0):
script = list()
for i in range(3600):
node = {
'x': orig[0],
'y': -i * 3 + orig[1],
'z': orig[2],
't': i+tb,
}
script.append(node) # drive with low speed,after overtaking
return script
def resetAiScript0(script, pos_x):
for node in script:
node['x'] = pos_x
return script
beamng.open()
scenario = Scenario('smallgrid', 'test')
veh_cont = Vehicle('ego_vehicle', model='etk800', licence='control')
veh_auto1 = Vehicle('ai_vehicle1', model='etki', licence='auto', colour="Red")
electrics = Electrics()
electrics1 = Electrics()
veh_cont.attach_sensor('electrics', electrics)
veh_auto1.attach_sensor('electrics', electrics1)
timer = Timer()
timer1 = Timer()
veh_cont.attach_sensor('timer', timer)
veh_auto1.attach_sensor('timer', timer1)
damage = Damage()
damage1 = Damage()
veh_cont.attach_sensor('damage', damage)
veh_auto1.attach_sensor('damage', damage1)
posCon = (-2, -100, 0.40)
posAuto1 = (2, -100, 0.40)
scenario.add_vehicle(veh_cont, pos=(0, 0, 0.4), rot=(0, 0, 0))
scenario.add_vehicle(veh_auto1, pos=(0, -10, 0.4), rot=(0, 0, 0))
scenario.make(beamng)
beamng.load_scenario(scenario)
beamng.teleport_vehicle(veh_cont.vid, posCon, rot=(0, 0, 0))
beamng.teleport_vehicle(veh_auto1.vid, posAuto1, rot=(0, 0, 0))
beamng.switch_vehicle(veh_cont)
script1 = getAiScript0(posAuto1)
beamng.start_scenario()
veh_auto1.ai_set_script(script1)
while True:
same1 = 0
sensors = beamng.poll_sensors(veh_cont)
veh_cont.update_vehicle()

sensors1 = beamng.poll_sensors(veh_auto1)
veh_auto1.update_vehicle()

pos0 = veh_cont.state['pos']
pos1 = veh_auto1.state['pos']

timeNow = sensors['timer']['time']

sameLine = (pos0[0] * pos1[0] > 0)

if pos0[1] - pos1[1] > 10:
    if sameline == False:
        same1 = 0
        x_con = pos0[0]
        script11= getAiScript0(pos1, timeNow)
        script111 = resetAiScript0(script11, x_con)
        veh_auto1.ai_set_script(script111)
    else:
        script2 = getAiScript2(pos1, timeNow)
        if same1==0:
            veh_auto1.ai_set_script(script2)
            same1 = 1

if pos0[1] - pos1[1] <= 10:
    if pos0[0] > 0:
        script3 = getAiScript0(pos1, timeNow)
        script33 = resetAiScript0(script3, -3)
        veh_auto1.ai_set_script(script33)
    else:
        script4 = getAiScript0(pos1,timeNow)
        script44 = resetAiScript0(script4, 3)
        veh_auto1.ai_set_script(script44)

time.sleep(0.1)

if timeNow > 300:
    break

Hi, unfortunately it's quite hard to follow your script and find out what you are trying to do exactly. Also it seems you encounter a multiple issues, it would be much easier to investigate if you try to create a smaller separate snippet of code for every issue you encounter.
I'll try to address the problems you seem to be having:

speed of AI is low before overtaking
Not sure if you mean the response time of AI, or the speed of the AI vehicle. You can try increasing the time between sensor polling (time.sleep(0.5) for example) if you still experience the simulator lagging. Another possible reason could be your hardware is not sufficient enough.
after the AI vehicle overtakes, it moves strangely, with a sinusoidal-like trajectory
This could be a bug on the simulation side. Could you try to isolate a smaller code example of when this behaviour happens and post it either here or as a new issue?
I want to slow down the AI vehicle
You can use the function Vehicle.ai_set_speed for setting the target speed of the AI vehicle, like in this snippet:

veh_auto1.ai_set_speed(10, mode='limit')

The speed is in m/s, and the mode can be either limit or set.


Problem when running "node init.js"

I get the following error output when running "node init.js" as shown in the directions:
module.js:549
    throw err;
    ^

Error: Cannot find module 'chalk'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/abdulhakeem/FalconStats/init.js:1:83)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

Nevermind, turns out I needed to install package node-chalk

@Heholord can you add this to the package json and make sure we have the correct dependencies?

@AbuFiraas @HermannBjorgvin it works with the described dependencies in package.json, did you run npm install first?

@Heholord Yes I double checked that I've followed the instructions exactly, however now I'm getting a different issue when trying to run node init.js:
module.js:549
    throw err;
    ^

Error: Cannot find module 'clear'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/abdulhakeem/FalconStats/init.js:2:21)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

I think the problem is with the npm install
If, while in the FalconStats dir, I run npm install -g, it fails with a bunch of errors:
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/falconstats
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
/usr/local/lib
└──<EMAIL_ADDRESS>
npm ERR! Linux 4.15.0-23-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! path /usr/local/lib/node_modules/falconstats
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/falconstats'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/falconstats'
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules/falconstats' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/abdulhakeem/FalconStats/npm-debug.log

However if I run as sudo npm install -g, then it seems to work, however when trying to run node init.js it can't seem to find any modules.
I'm able to manually install the modules with sudo npm install --save [module name] but it seems like a hack and not best practice
So idk if it's just me but something about the npm module installation doesn't seem to be working quite right

I've now completed the initial setup script, but nothing happens when I actually login to my server, no FalconStats MOTD appears. I think the problem is with the symlink. It again doesn't work unless I run it as sudo, but I don't know exactly what it's linking to, I don't know where the falcon-motd folder is or where it's supposed to be, but it's not in the FalconStats cloned directory


Use gztar for sbuild, fixes #393

As pip maintainers mentioned tar is a legacy format and is not supported by 24.0 - we need this to pass the tests

I spent far too long trying to recognize (in pip code) where this broke... but it definitely broke in https://github.com/pypa/pip/pull/12327/  (now the --find-links actually checks for "valid" wheel or sdist format)

I spent far too long trying to recognize (in pip code) where this broke... but it definitely broke in https://github.com/pypa/pip/pull/12327 (now the --find-links actually checks for "valid" wheel or sdist format)

Oh yeah sorry about that - I did a bisect and initially found the same thing but removed from the comment as it sounded like finger pointing


flutter fails to run at keytool signing stage

Steps to Reproduce
I am using Gentoo with java version
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

if that makes any difference.
.
I installed flutter on my system, ignoring the Atom install part
setup the path to flutter as instructed, and created an app called myapp, again following instructions
attached my android device via usb and made sure flutter could see it by running
flutter devices

with the output of
1 connected device:

Nexus 7 • 09337fc8 • android-arm

ran the command
flutter run

inside the directory where the app lives, as per instructions.
At that point it seems it fails to run keytool which it uses to sign the generated apk to run on my attached device.  Output pasted below in the log and crash report section of this issue
Flutter Doctor
[✓] Flutter (on Linux, channel alpha)
• Flutter at /home/terrasea/flutter/flutter
• Framework revision e42be3c363 (12 days ago), engine revision 3291edef41
[✓] Android toolchain - develop for Android devices (Android SDK 21.1.2)
• Android SDK at /home/terrasea/Android/Sdk
• Platform android-22, build-tools 21.1.2
• Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
[x] Atom - a lightweight development environment for Flutter
x Atom not installed; download at https://atom.io.
Logs and Crash Reports
Building APK in debug mode (android-arm)...
Warning: signing the APK using the debug keystore.
* run-java-tool was invoked directly
* run-java-tool should only be used via symlinks to it
Exception from flutter run: Exit code 1 from: /usr/libexec/eselect-java/run-java-tool.bash -keystore /home/terrasea/flutter/flutter/bin/cache/artifacts/engine/android-arm/chromium-debug.keystore -storepass chromium -keypass chromium /tmp/flutter_toolsyXAJ93/app.apk.unaligned chromiumdebugkey
#0      _runWithLoggingSync (package:flutter_tools/src/base/process.dart:188)
#1      runCheckedSync (package:flutter_tools/src/base/process.dart:130)
#2      _ApkBuilder.sign (package:flutter_tools/src/commands/build_apk.dart:125)
#3      _signApk (package:flutter_tools/src/commands/build_apk.dart:386)
#4      _buildApk (package:flutter_tools/src/commands/build_apk.dart:341)
#5      buildAndroid.<buildAndroid_async_body> (package:flutter_tools/src/commands/build_apk.dart:542)
#6      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:27)
#7      StackZoneSpecification.registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:135)
#8      StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:206)
#9      StackZoneSpecification.registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:135)
#10     _rootRunUnary (dart:async/zone.dart:1212)
#11     _CustomZone.runUnary (dart:async/zone.dart:1067)
#12     _FutureListener.handleValue (dart:async/future_impl.dart:131)
#13     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:637)
#14     _Future._propagateToListeners (dart:async/future_impl.dart:667)
#15     _Future._complete (dart:async/future_impl.dart:467)
#16     _SyncCompleter.complete (dart:async/future_impl.dart:52)
#17     buildFlx.<buildFlx_async_body> (package:flutter_tools/src/flx.dart:307)
#18     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:27)
#19     StackZoneSpecification.registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:135)
#20     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:206)
#21     StackZoneSpecification.registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:135)
#22     _rootRunUnary (dart:async/zone.dart:1212)
#23     _CustomZone.runUnary (dart:async/zone.dart:1067)
#24     _FutureListener.handleValue (dart:async/future_impl.dart:131)
#25     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:637)
#26     _Future._propagateToListeners (dart:async/future_impl.dart:667)
#27     _Future._complete (dart:async/future_impl.dart:467)
#28     _SyncCompleter.complete (dart:async/future_impl.dart:52)
#29     assemble.<assemble_async_body> (package:flutter_tools/src/flx.dart:444)
#30     Future.Future.microtask.<anonymous closure> (dart:async/future.dart:144)
#31     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:206)
#32     StackZoneSpecification.registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125)
#33     _rootRun (dart:async/zone.dart:1200)
#34     _CustomZone.run (dart:async/zone.dart:1056)
#35     _CustomZone.runGuarded (dart:async/zone.dart:954)
#36     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:981)
#37     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:206)
#38     StackZoneSpecification.registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:125)
#39     _rootRun (dart:async/zone.dart:1204)
#40     _CustomZone.run (dart:async/zone.dart:1056)
#41     _CustomZone.runGuarded (dart:async/zone.dart:954)
#42     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:981)
#43     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#44     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#45     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#46     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)

For more information about diagnosing and reporting Flutter bugs, please see https://flutter.io/bug-reports/.

Hi have you found a solution to this yet? I think it's Gentoo specific since /usr/bin/java symlinks to /usr/bin/run-java-tool. The links are resolved until it finds the executable. I know nothing about Java but trying to learn so I cannot offer any solutions.

Can you try running flutter run with the -v argument to see if that helps?
We've not been able to reproduce this as far as I'm aware.

Yes, as soon as I can I'll give it a go

I'm pretty sure you can reproduce this on any Gentoo machine. Somewhere, the real path to whichever java tool to run is resolved first before it is run. This means it resolves to /usr/libexec/eselect-java/run-java-tool.bash (instead of, for example /opt/oracle-jdk-bin-<IP_ADDRESS>/bin/java) which exits with error as it needs the name of symbolic link in order to run the correct tool.
(See /usr/libexec/eselect-java/run-java-tool.bash: line 45)
I'm not sure which java tool is being run when flutter run is executed (sorry i don't know java). It is not java nor javac since I changed their symbolic links explicitly to /opt/oracle-jdk-bin-<IP_ADDRESS>/bin/java and /opt/oracle-jdk-bin-<IP_ADDRESS>/bin/javac respectively, and still /usr/libexec/eselect-java/run-java-tool.bash is being run directly.
It may be any of these:
/usr/bin/HtmlConverter /usr/bin/jhat /usr/bin/jdb /usr/bin/jps /usr/bin/native2ascii /usr/bin/jar /usr/bin/jsadebugd /usr/bin/orbd /usr/bin/wsgen /usr/bin/servertool /usr/bin/jinfo /usr/bin/rmid /usr/bin/ControlPanel /usr/bin/jarsigner /usr/bin/jstatd /usr/bin/xjc /usr/bin/javah /usr/bin/idlj /usr/bin/pack200 /usr/bin/rmic /usr/bin/jcontrol /usr/bin/serialver /usr/bin/policytool /usr/bin/tnameserv /usr/bin/javac /usr/bin/javap /usr/bin/javadoc /usr/bin/rmiregistry /usr/bin/apt /usr/bin/appletviewer /usr/bin/jconsole /usr/bin/jrunscript /usr/bin/jvisualvm /usr/bin/java /usr/bin/jstack /usr/bin/javaws /usr/bin/wsimport /usr/bin/keytool /usr/bin/jstat /usr/bin/jmap /usr/bin/schemagen /usr/bin/extcheck
If anyone could tell me which of these are being run when flutter run is executed I can test a workaround for now without having to change them all.
So anyways, here is the output of flutter run -v:
67 ms • /home/curvian/SDK/Android/platform-tools/adb devices -l    0 ms • Exit code 0 from: /home/curvian/SDK/Android/platform-tools/adb devices -l   18 ms • List of devices attached           4d00ed1ba37540a1       device usb:1-3.4 product:ja3gxx model:GT_I9500 device:ja3g  188 ms • /home/curvian/SDK/Android/platform-tools/adb -s 4d00ed1ba37540a1 shell getprop    9 ms • Running build command.   10 ms • Using engine artifacts dir: /home/curvian/SDK/flutter/bin/cache/artifacts/engine/android-arm   47 ms • Looking for YAML at 'flutter.yaml'    0 ms • No services specified in the manifest    0 ms • Using engine artifacts dir: /home/curvian/SDK/flutter/bin/cache/artifacts/engine/android-arm   10 ms • Building APK in debug mode (android-arm)... 1310 ms • /home/curvian/SDK/flutter/bin/cache/artifacts/engine/linux-x64/sky_snapshot --packages=/home/curvian/tmp/workspace/myapp/.packages --snapshot=build/snapshot_blob.bin --depfile=build/snapshot_blob.bin.d --build-output=build/snapshot_blob.bin /home/curvian/tmp/workspace/myapp/lib/main.dart  610 ms • Building build/app.flx   13 ms • which zip  107 ms • Encoding zip file to build/app.flx  240 ms • zip -q /home/curvian/tmp/workspace/myapp/build/app.flx fonts/MaterialIcons-Regular.ttf AssetManifest.json FontManifest.json LICENSE snapshot_blob.bin    0 ms • Exit code 0 from: zip -q /home/curvian/tmp/workspace/myapp/build/app.flx fonts/MaterialIcons-Regular.ttf AssetManifest.json FontManifest.json LICENSE snapshot_blob.bin   48 ms • Built build/app.flx.   13 ms • Building APK; buildMode: debug. 1078 ms • /home/curvian/SDK/Android/build-tools/24.0.1/dx --dex --force-jumbo --output /tmp/flutter_toolsbzFCY9/classes.dex /home/curvian/SDK/flutter/bin/cache/artifacts/engine/android-arm/classes.dex.jar  470 ms • Exit code 0 from: /home/curvian/SDK/Android/build-tools/24.0.1/dx --dex --force-jumbo --output /tmp/flutter_toolsbzFCY9/classes.dex /home/curvian/SDK/flutter/bin/cache/artifacts/engine/android-arm/classes.dex.jar 4338 ms • /home/curvian/SDK/Android/build-tools/24.0.1/aapt package -M android/AndroidManifest.xml -A /tmp/flutter_toolsbzFCY9/assets -I /home/curvian/SDK/Android/platforms/android-24/android.jar -F /tmp/flutter_toolsbzFCY9/app.apk.unaligned --debug-mode -S /home/curvian/tmp/workspace/myapp/android/res /tmp/flutter_toolsbzFCY9/artifacts    0 ms • Exit code 0 from: /home/curvian/SDK/Android/build-tools/24.0.1/aapt package -M android/AndroidManifest.xml -A /tmp/flutter_toolsbzFCY9/assets -I /home/curvian/SDK/Android/platforms/android-24/android.jar -F /tmp/flutter_toolsbzFCY9/app.apk.unaligned --debug-mode -S /home/curvian/tmp/workspace/myapp/android/res /tmp/flutter_toolsbzFCY9/artifacts    0 ms • Warning: signing the APK using the debug keystore.   36 ms • /usr/libexec/eselect-java/run-java-tool.bash -keystore /home/curvian/SDK/flutter/bin/cache/artifacts/engine/android-arm/chromium-debug.keystore -storepass chromium -keypass chromium /tmp/flutter_toolsbzFCY9/app.apk.unaligned chromiumdebugkey    0 ms • Exit code 1 from: /usr/libexec/eselect-java/run-java-tool.bash -keystore /home/curvian/SDK/flutter/bin/cache/artifacts/engine/android-arm/chromium-debug.keystore -storepass chromium -keypass chromium /tmp/flutter_toolsbzFCY9/app.apk.unaligned chromiumdebugkey   18 ms • * run-java-tool was invoked directly           * run-java-tool should only be used via symlinks to it

Looks like this line is wrong for gentoo: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/base/os.dart#L65
os.which('jarsigner') is called here:
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/commands/build_apk.dart#L77
Not sure why it resolves symlinks, @devoncarew might know.

I also got the same output as @vynes after running
flutter run -v

I think we were resolving symlinks in our which wrapper in order to better locate the dart sdk from the dart executable, back before we vendored the dart sdk.

Please let us know if this doesn't fix things on Gentoo.  Thanks again for
the report!
On Mon, Aug 22, 2016 at 2:35 PM, Devon Carew<EMAIL_ADDRESS>wrote:

Closed #5164 https://github.com/flutter/flutter/issues/5164 via #5531
https://github.com/flutter/flutter/pull/5531.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/5164#event-763670718, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ALTvi4Zczeem6H7duN4KAKmvnQcC6szUks5qihYjgaJpZM4JY2jN
.

Works for me, thanks!

I'll give it a go asap. Probably this weekend sorry. Sounds like it'll work though. Thank you.


PP3: RAM design support

This PR adds support for PP3 designs that utilize RAM blocks. It updates the pp3 assembler instantiation which is required due to changes in https://github.com/QuickLogic-Corp/quicklogic-fasm/pull/22.
It also adds the handle for RAM FASM line parser that will be later used for converting FASM RAM INIT lines into correct verilog code.
For now this handle raises NotImplementedError in case of generating verilog out of bitstream that configures RAM blocks.
Implementing the proper RAM INIT FASM line -> verilog conversion will be introduced in next PR.
For testing purposes a bram design is introduced and enabled in CI.

Every test went green here. @lnsharma please, have a look at this. This PR will also fix the CI run for this PR: https://github.com/QuickLogic-Corp/symbiflow-arch-defs/pull/683


Dealing with conditionally constant state

How could I add a constant state to my haiku module?
Specifically I would want something like this:
class MyModule(hk.Module):
  def __init__(output_size, const, name):
    if const = True:
      self.b = hk.conts(jnp.ones(output_size)) //won't be updated when adding gradient
    else:
      self.b = jnp.zeros(output_size) //will get updated when adding gradient

@joaogui1 Short answer:

hk.get_pameters for trainable parameters
hk.get_state for non trainable (but updatable state)
For true constant stuff just use a constant jax array.

Long Answers: You need to understand a bit how hooks work. In most hook systems you have use hooks unconditionally, this doesn't mean you can use branching, its that you have to declare the hook outside of the conditional parts of the code. For a discussion on this check out this section on Elegy's documentation: Module Hooks: Functional Style.
Note: Elegy's hook system is not the same as Haiku's, but most of the basic rules apply.

Thanks for the answer @cgarciae!
The thing is that I wanted to deal with the conditional part only on __init__, and use the same __call__ method irrespective of the variable being trainable or not, is that impossible?

@joaogui1 Ahh, thats easy then! For some reason I thought this was during __call__. Just do something like this:
class MyModule(hk.Module):
  def __init__(output_size, const, name):
    if const = True:
      self.b = jnp.ones(output_size) //won't be updated when adding gradient
    else:
      self.b = hk.get_parameter("b", [output_size], init=jnp.zeros) //will get updated when adding gradient

@joaogui1 I do worry you will try to this module inside the __call__ method of another module because things might break.

The safest solution, as suggested in the document I sent you, is to do something like this:
class MyModule(hk.Module):
  def __init__(output_size, const, name):
    b = hk.get_parameter("b", [output_size], init=jnp.zeros) //will get updated when adding gradient
    if const = True:
      self.b = jnp.ones([output_size]) //won't be updated when adding gradient
    else:
      self.b = b

This way hk.get_parameter("b", ...)get called no matter what.

Thank you very much!


Python Support

Any plan to support python or do you accept python support PR?
Thanks for the awesome project!

I don't think any of the maintainers are currently working on Python support, but you're welcome to make a PR. Is that something you're interested in?

Hey, Lyft Team! I am very interested in this project and think it can have significant impact. Has there been any progress on adding Python support? If not, I would be interested in getting some guidance to open a PR.
(I can continue this next part in a separate issue if you'd prefer)
The project I am working on is in proto2 though. What would be the effort for support protoc-gen for Python in proto2?

@rodaine and @dnguyen0304  unfortunately we don't have any bandwidth and haven't made any traction.
Please someone work on this!

@ccaraman, is the lack of traction due to specific obstacles such as a lacking value proposition or more the usual competing priorities? It would be helpful understanding if there's trouble garnering buy-in due to a leadership team not believing in the potential impact.
For the record, I think this project has big potential :)

Competing priorities :)

Hello! I think that I will be taking on this project.

Am interested in helping out, though #178 looks like it makes good headway, do we know roughly when this will get reviewed.

i see #238 was merged on aug 19'
but still, lack of good documentation (as mentioned already in #345 ) makes it kinda hard to understand how to use it.
for now, i'm trying to generate python files as mentioned in #368

The package is now available on PyPI:  https://pypi.org/project/protoc-gen-validate

@dkunitsk thank you so much for this one! i was waiting for it
heres a link to the up-to-dated readme section:
https://github.com/envoyproxy/protoc-gen-validate#python
and to the PR: #433


intent with treesitter doesn't work

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
options:
return {
"shellRaining/hlchunk.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function()
require("hlchunk").setup({indent={use_treesitter=true ,enable	= true}})
end
}
Open a cs file
Expected behavior
Continues lines on the edge
Screenshots

can you provide more info (such as source code, lang and the version of hlchunk.nvim)


Feedback for when a slide transition is running

PowerPoint does not fire events when transitions start/end, so this would have to be inferred rather than reported directly.
Closing this as I don't see this being added for the above reason.