AddManagedDependency should allow version placeholder properties

What problem are you trying to solve?
I'm trying to add a managed dependency via AddManagedDependency
9/10 times a managed dependency is declared via a version placeholder in a bom to allow overrides. Currently the recipe only accepts semver versions.
Describe the solution you'd like
Accept ${something.version} and probably validate that such a property exists.

Thanks for the suggestion @dpozinen ; how would you envision this to work both in terms of configuration, and in terms of when the recipe runs? Because I have quite a few questions when I think through how to implement this, and I'll list a few below.
Right now the recipe already has quite an array of options: https://docs.openrewrite.org/recipes/maven/addmanageddependency

Were we to allow version: ${something.version} then we'd need to also know the actual version. How would you pass that in?
Should the property already exist, or should it be created?
How to handle conflicts if we create the property?
Should we honor any parent properties or override?

I'm thinking if we add option to indicate that the version should be placed in a property, then the naming of that property is going to be very much specific to one's particular taste. Some projects prefer <version.abc> whereas others prefer <abc.version>, and for instance any Spring migration recipes should ideally not force one over the other.
We're constantly trying to balance feature requests with usability and maintainability by thinking through some of these above edge cases. Since versions can be updated through recipes, we tend to favor just having them where they are used rather than add indirection.
If you do want to keep managed dependency versions in properties consistently then perhaps a dedicated recipe could make sense. That also has the benefit of not further complicating the logic for AddManagedDependency, so it's something to consider.

Hey @dpozinen, https://github.com/openrewrite/rewrite/pull/3992 should have fixed that, but the following still does not work out of the box:
type: specs.openrewrite.org/v1beta/recipe
name: org.ammachado.MyCustomRecipe
displayName: My custom recipe
description: Fix all the things.
recipeList:
  - org.openrewrite.maven.ChangePropertyValue:
      key: quarkus.platform.group-id
      newValue: io.quarkus.platform
      addIfMissing: "True"
  - org.openrewrite.maven.ChangePropertyValue:
      key: quarkus.platform.artifact-id
      newValue: quarkus-bom
      addIfMissing: "True"
  - org.openrewrite.maven.ChangePropertyValue:
      key: quarkus.platform.version
      newValue: 3.2.3.Final
      addIfMissing: "True"
  - org.openrewrite.maven.AddManagedDependency:
      groupId: ${quarkus.platform.group-id}
      artifactId: ${quarkus.platform.artifact-id}
      version: ${quarkus.platform.version}
      scope: import
      type: pom
      addToRootPom: "True"

The properties will be added, but the dependency will fail to resolve, because the placeholders were not resolved.
I think that ChangePropertyValue is just missing a call to maybeUpdateModel() on visitDocument. I wrote a recipe to force the maven model update, then I use it before my org.openrewrite.maven.AddManagedDependency recipes, and it works as expected.

Updated example
type: specs.openrewrite.org/v1beta/recipe
name: org.ammachado.MyCustomRecipe
displayName: My custom recipe
description: Fix all the things.
recipeList:
  - org.openrewrite.maven.ChangePropertyValue:
      key: quarkus.platform.group-id
      newValue: io.quarkus.platform
      addIfMissing: "True"
  - org.openrewrite.maven.ChangePropertyValue:
      key: quarkus.platform.artifact-id
      newValue: quarkus-bom
      addIfMissing: "True"
  - org.openrewrite.maven.ChangePropertyValue:
      key: quarkus.platform.version
      newValue: 3.2.3.Final
      addIfMissing: "True"
  - org.ammachado.ForceMavenModelUpdate
  - org.openrewrite.maven.AddManagedDependency:
      groupId: ${quarkus.platform.group-id}
      artifactId: ${quarkus.platform.artifact-id}
      version: ${quarkus.platform.version}
      scope: import
      type: pom
      addToRootPom: "True"

org.ammachado.ForceMavenModelUpdate recipe source
public class ForceMavenModelUpdate extends Recipe {

    @Override
    public String getDisplayName() {
        return "Force Maven Model Update";
    }

    @Override
    public String getDescription() {
        return "This recipe will force the Maven model to be updated.";
    }

    @Override
    public TreeVisitor<?, ExecutionContext> getVisitor() {
        return new UpdateMavenModel<>();
    }
}

@timtebeek, the Yaml from the example was just created using https://app.moderne.io. Booleans are showing "True", instead of true. Is that a problem as well?

Thanks for chiming in @ammachado ! Indeed that org.ammachado.ForceMavenModelUpdate utility would solve this right after adding the properties. I'm wondering if we should call that maybeUpdateModel() from ChangePropertyValue, and what any performance impact of that would be. Could be nice to have things "just work" rather than require such a workaround. 🤔
As for the "True" in the recipe builder output, I think that should be fine based on how that field is a nullable java.lang.Boolean, not a boolean. We load those values in here, and I've not heard any issues about their values so far 🤞🏻
https://github.com/openrewrite/rewrite/blob/fe15bdba4aca5bfe5fdc2c6f7b50ff10c90f6a98/rewrite-core/src/main/java/org/openrewrite/config/YamlResourceLoader.java#L322-L326

Hello @ammachado @timtebeek! I think that the fix doesn't fully work as it should.
Recipe example:
type: specs.openrewrite.org/v1beta/recipe
name: com.test
displayName: Test placeholder

recipeList:
  - org.openrewrite.maven.AddProperty:
      key: guava.version
      value: 33.0.0-jre
  - org.openrewrite.maven.AddManagedDependency:
      groupId: com.google.guava
      artifactId: guava
      version: ${guava.version}
      addToRootPom: true

result:
...
 <properties>
        <guava.version>33.0.0-jre</guava.version>
 </properties>

  <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>23.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
...

In this case the placeholder is not saved, but replaced with the some version. The reason is that the maybeUpdateModel() method is called after an attempt has been made to make changes to the pom file.
If I add second AddProperty and AddManagedDependency in this recipe, then it'll work in the second managed dependency as it should, because the maybeUpdateModel() method, which was called in the first AddManagedDependency, helped in this. In this case, it seems to me that it's necessary to modify AddProperty and ChangePropertyValue by adding maybeUpdateModel() there after properties added/changed.

@mankoffs your example need the extra recipe from https://github.com/openrewrite/rewrite/issues/4032#issuecomment-1960700602. I created another PR, #4069, to update the model automatically without the need of extra recipes. @timtebeek please review.


Style guide for "Bikeshed's recommended way"

A bikeshed file that demonstrates the "one true way" for doing various spec things like concepts, algorithms, IDL and links to/from IDL.
I guess this will include soft vs hard wrapping, so may be contentious.

This would be helpful. I'd happily help build it, if only to aggravate Tab by standardizing on hard-wraps at 100 columns and space-aligned lists.

I'm going to beat you up, @mikewest


Using document from getDocument in a query causes a TypeError

The snapshotter in Playwright attempts to call setAttribute on the element it is passed.
This causes a TypeError (setAttribute is not a function) because no such function exists on document

To reproduce:
const $document = await getDocument(page);
await getByRole($document, "heading", { level: 2, name: "Prepare file for upload"});

Workaround:
await page.mainFrame().evaluate(() => {
    Object.defineProperty(document, "setAttribute", { value: () => {}});
  });

I'm afraid I'm not super familiar with this Playwright feature, but I believe we're missing some additional context here? Can you have a look at my attempt to add a failing test here̱ and let me know if I'm missing something? It's currently passing.

@flakey-bit are you using @playwright/test to run your tests?

Hi,
I can reproduce it in your repo (i.e. your "does not throw when recording trace + snapshots" test) when I enable debugging. See screenshots:

Note that your beforeAll opens up a page, but so does the test so you'll want to set the debugger on that window. Also note I've enabled the option to break on all exceptions.

Ok, so it doesn't actually cause the trace/test to fail it just breaks debugging?

Ok, so it doesn't actually cause the trace/test to fail it just breaks debugging?

"breaking debugging" is definitely a bit of a stretch.
The reason I noticed this is that we're using React with an overlay that shows you any errors (when running in development mode) - see the second image in my first comment. Because of the error, the overlay was shown, obscuring the content in the videos Playwright recorded.
In production, the overlay is disabled.
I'm not 100% sure if the overlay is something we've added or whether it's part of React by default, however I know create-react-app has something similar.

"breaking debugging" is definitely a bit of a stretch.

It is an uncaught error in the page, so it definitely is a disruption (if we don't want to call it "breaking" 😉).
Unfortunately, I was unable to figure out how to assert that the error is not thrown as it doesn't seem to trigger page.on('pageerror', () => {}). I think I came up with a reasonable fix, though, so I'll get the released shortly.
Thanks for reporting this!

Thanks so much for fixing this so quickly! And for the awesome library


Refactor

Refactor project to be similar to https://github.com/owlprotocol/web3-redux/ using esbuild

/cib


Room bug with lost internet connection

Hello. AppRTC has a bug with reconnecting to the same room.
If i disconnect the internet while talking with my opponent, i can't reconnect to the same room again, but having a message that room is full. The same bug i experience using android, just closing the mozilla or chrome app.
Note: Preferable, I should be the second who connects to the room.
WSS, STUN AND TURN servers using from repo.
I can give some debug information if needed.
Could you add a possibility to disconnect user, if it is not online, or connection timeout please?
Thank you.

I experience the same issue with my setup. I suspect that it can happen due to the turn server not being able to close the session properly or maybe need more time to do so? As far as I know, this never happened at appr.tc, it works just fine. I plan to do more testing on this problem when I get a chance. iveusss, check the TURN server log and see if it works properly.

Appr.tc seems to have the same bug.
111.888: Signaling state changed to: stable
apprtc.debug.js:38 111.899: Set remote session description success.
apprtc.debug.js:38 111.899: Waiting for remote video.
apprtc.debug.js:38 111.899: Remote stream added.
apprtc.debug.js:38 111.899: ICE connection state changed to: checking
apprtc.debug.js:38 111.909: WSS->C: {"msg":"{"type":"candidate","label":0,"id":"audio","candidate":"candidate:4090310242 1 udp<PHONE_NUMBER> <IP_ADDRESS> 41825 typ host generation 0"}","error":""}
apprtc.debug.js:38 111.914: Remote candidate added successfully.
apprtc.debug.js:38 111.959: WSS->C: {"msg":"{"type":"candidate","label":0,"id":"audio","candidate":"candidate:1921329366 1 udp<PHONE_NUMBER> 46...*** 41825 typ srflx raddr <IP_ADDRESS> rport 41825 generation 0"}","error":""}
apprtc.debug.js:38 111.961: Remote candidate added successfully.
apprtc.debug.js:38 112.039: ICE connection state changed to: completed
apprtc.debug.js:38 112.039: ICE complete time: 108744ms.
apprtc.debug.js:38 112.039: ICE connection state changed to: completed
apprtc.debug.js:38 112.040: ICE complete time: 108744ms.
apprtc.debug.js:38 112.066: WSS->C: {"msg":"{"type":"candidate","label":0,"id":"audio","candidate":"candidate:49227043 1 udp 41885439 <IP_ADDRESS> 56261 typ relay raddr 46...*** rport 41825 generation 0"}","error":""}
apprtc.debug.js:38 112.067: Remote candidate added successfully.
apprtc.debug.js:38 112.072: WSS->C: {"msg":"{"type":"candidate","label":0,"id":"audio","candidate":"candidate:49227043 1 udp 41885439 <IP_ADDRESS> 53603 typ relay raddr 46...*** rport 41825 generation 0"}","error":""}
apprtc.debug.js:38 112.073: Remote candidate added successfully.
apprtc.debug.js:38 112.128: WSS->C: {"msg":"{"type":"candidate","label":0,"id":"audio","candidate":"candidate:49227043 1 udp 25108223 <IP_ADDRESS> 61286 typ relay raddr 46...*** rport 39535 generation 0"}","error":""}
apprtc.debug.js:38 112.131: Remote candidate added successfully.
apprtc.debug.js:38 112.207: Remote video started; currentTime: 0.059
apprtc.debug.js:38 112.207: Call setup time: 108912ms.
apprtc.debug.js:38 112.207: reattachMediaStream: blob:https%3A//appr.tc/3e984063-b7f6-46d2-8a84-96b1987ef1d7
apprtc.debug.js:38 123.032: ICE connection state changed to: disconnected
apprtc.debug.js:38 132.995: ICE connection state changed to: failed

My guess there is a timeout here before the client is deregistered from the room, in fact I believe it's 30 seconds. What happens if you try and wait a little longer?

The log above indicates Ice failure, not that the room is full. iceRestart could perhaps help in that case.

Waiting for 30 seconds or longer does not kick the second opponent. By reconnecting to the room from second opponent gives
Messages:
Room server join error: Registration error: FULL
WebSocket register error: Registration error: FULL
Same problem on appr.tc and apprtc.blogspot.com.

I see, for some reason the client id does not get deregistered after a timeout. Looks like a collider issue.

Team,
Can't we do something like remove_client(self, client_id), if occupancy = 2 and client exists in the clients list (in add_client)?, then continue re-adding it?

I've received FULL messages as well. My solution has been to renegotiate a new room between both peers if it's full.

Hi guys, any news about this bug?

Hey guys,
Could you please provide status of this issue ?

From console log
Here i open the new room:
INFO     2016-10-13 15:57:43,062 apprtc.py:551] User 17904196 joined room 11111
INFO     2016-10-13 15:57:43,062 apprtc.py:552] Room 11111 has state ['17904196']
INFO     2016-10-13 15:57:43,067 module.py:788] default: "POST /join/11111 HTTP/1.1" 200 1135
INFO     2016-10-13 15:57:43,631 apprtc.py:476] Saved message for client 17904196:{True, 1} in room 11111, retries=0
INFO     2016-10-13 15:57:43,635 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,649 apprtc.py:476] Saved message for client 17904196:{True, 2} in room 11111, retries=0
INFO     2016-10-13 15:57:43,659 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,673 apprtc.py:476] Saved message for client 17904196:{True, 3} in room 11111, retries=0
INFO     2016-10-13 15:57:43,680 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,684 apprtc.py:476] Saved message for client 17904196:{True, 4} in room 11111, retries=0
INFO     2016-10-13 15:57:43,690 apprtc.py:476] Saved message for client 17904196:{True, 5} in room 11111, retries=1
INFO     2016-10-13 15:57:43,695 apprtc.py:476] Saved message for client 17904196:{True, 6} in room 11111, retries=1
INFO     2016-10-13 15:57:43,698 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,700 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,703 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,712 apprtc.py:476] Saved message for client 17904196:{True, 7} in room 11111, retries=0
INFO     2016-10-13 15:57:43,715 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,732 apprtc.py:476] Saved message for client 17904196:{True, 8} in room 11111, retries=0
INFO     2016-10-13 15:57:43,735 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,754 apprtc.py:476] Saved message for client 17904196:{True, 9} in room 11111, retries=0
INFO     2016-10-13 15:57:43,757 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,779 apprtc.py:476] Saved message for client 17904196:{True, 10} in room 11111, retries=0
INFO     2016-10-13 15:57:43,786 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,793 apprtc.py:476] Saved message for client 17904196:{True, 11} in room 11111, retries=0
INFO     2016-10-13 15:57:43,797 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,800 apprtc.py:476] Saved message for client 17904196:{True, 12} in room 11111, retries=1
INFO     2016-10-13 15:57:43,804 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,809 apprtc.py:476] Saved message for client 17904196:{True, 13} in room 11111, retries=0
INFO     2016-10-13 15:57:43,812 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,914 apprtc.py:476] Saved message for client 17904196:{True, 14} in room 11111, retries=0
INFO     2016-10-13 15:57:43,919 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:43,923 apprtc.py:476] Saved message for client 17904196:{True, 15} in room 11111, retries=0
INFO     2016-10-13 15:57:43,925 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:44,046 apprtc.py:476] Saved message for client 17904196:{True, 16} in room 11111, retries=0
INFO     2016-10-13 15:57:44,051 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:44,052 apprtc.py:476] Saved message for client 17904196:{True, 17} in room 11111, retries=0
INFO     2016-10-13 15:57:44,055 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:44,166 apprtc.py:476] Saved message for client 17904196:{True, 18} in room 11111, retries=0
INFO     2016-10-13 15:57:44,174 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:44,179 apprtc.py:476] Saved message for client 17904196:{True, 19} in room 11111, retries=1
INFO     2016-10-13 15:57:44,184 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:44,212 apprtc.py:476] Saved message for client 17904196:{True, 20} in room 11111, retries=0
INFO     2016-10-13 15:57:44,217 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:44,221 apprtc.py:476] Saved message for client 17904196:{True, 21} in room 11111, retries=0
INFO     2016-10-13 15:57:44,224 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:44,294 apprtc.py:476] Saved message for client 17904196:{True, 22} in room 11111, retries=0
INFO     2016-10-13 15:57:44,299 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:44,312 apprtc.py:476] Saved message for client 17904196:{True, 23} in room 11111, retries=0
INFO     2016-10-13 15:57:44,315 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:44,323 apprtc.py:476] Saved message for client 17904196:{True, 24} in room 11111, retries=0
INFO     2016-10-13 15:57:44,326 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21
INFO     2016-10-13 15:57:44,428 apprtc.py:476] Saved message for client 17904196:{True, 25} in room 11111, retries=0
INFO     2016-10-13 15:57:44,431 module.py:788] default: "POST /message/11111/17904196 HTTP/1.1" 200 21

I join with my device:
INFO     2016-10-13 15:58:32,028 apprtc.py:408] Added client 34719596 in room 11111, retries = 0
INFO     2016-10-13 15:58:32,029 analytics.py:95] Event: {'rows': [{'json': {u'room_id': '11111', u'event_type': u'ROOM_SIZE_2', u'host': '<IP_ADDRESS>:8083', u'timestamp': '2016-10-13T15:58:32.029377'}}]}
INFO     2016-10-13 15:58:32,029 apprtc.py:92] Applying media constraints: {'audio': True, 'video': True}
WARNING  2016-10-13 15:58:32,032 apprtc.py:136] Invalid or no value returned from memcache, using fallback: null
INFO     2016-10-13 15:58:32,033 apprtc.py:551] User 34719596 joined room 11111
INFO     2016-10-13 15:58:32,033 apprtc.py:552] Room 11111 has state ['34719596', '17904196']
INFO     2016-10-13 15:58:32,037 module.py:788] default: "POST /join/11111 HTTP/1.1" 200 6742

Then i disconnect my device, console show nothing, then i try to reconnect:
INFO     2016-10-13 15:59:32,092 apprtc.py:545] Error adding client to room: FULL, room_state=['34719596', '17904196']
INFO     2016-10-13 15:59:32,097 module.py:788] default: "POST /join/11111 HTTP/1.1" 200 46
INFO     2016-10-13 15:59:36,799 module.py:788] default: "POST /bye/11111/34719596 HTTP/1.1" 404 52

Any news?

How do you disconnect? It looks like the disconnect message does not reach the room server.

I honestly do not remember, but if I'm not mistaken I changed the network or I set the phone to Offline mode
Please log console does not say anything, I tried several times.

Exiting and re-entering the room several times might be a race condition issue where the leave request has not had a chance to be processed.

How can I make sure that the room is closed before the 30 minutes, when I get disconnected unexpectedly?

I created some rooms 5-6 days ago, and not used anymore, it is still "full"
Any idea how to fix it?

Not sure when I will have time to look at this. But also keep in mind that anyone can create any room hence they could have been created by someone else as well.

Thanks for your interest, I wait your news,
I have not yet published the app , no one could have created the room these days.
I'm the only one working on it

So you have setup your own AppRTC and Collider instance?

yes, following your instructions i've installed coturn and collider.
its working good wifi/3g/4g with no problem.
I've only this issue

+1 same issue - my rooms are generated with random characters.. disconnection without explicit leave issued leaves the room 'full'

+1 the same issue

Our team have been setup own Collider/Coturn instances, integrate with iOS/Android applications, but the FULL ROOM issue is a blocker for now.
How we can workaround this issue? Please, let me know you thoughts.

Can you describe how your clients disconnect from the room?

I will try to look at this more closely as I know there are cases where Collider does the wrong thing but I would like to understand how clients disconnects when encountering this issue.
Not ETA as of yet though.

Positive case: client disconnects by user action, send a leave request - everything works well
Negative case: connection lost, client disconnects without send a leave request, try to reconnect  - fool room issue.
From point of view, If we will have a chance to send a leave request once connection will be restored it will be great. Clients will be monitor leave requests and will send leave request after reconnect if needed.

@KaptenJansson
I would help you with some logs,
In addition to those I have already posted here, I do not know what to do.
Tell me if you have any specific request
And tell me how to do

Hi, any updates on this issue? Does anyone know how to fix this?

this is looks a bug.  room server handle is leave: ('/leave/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)', LeavePage),  however in collider call  roomSrvUrl/bye/xxx/xxx,   I am tring modify collider bye to leave.
Anyway,  apprtc room server is ugly.   collider looks better!

Closing due to age.

Someone find this solution ?


feat(DMVP-2779): Enable GitHub Actions

Output
1 issue(s) found:

Warning: [Fixable] local.commit_message is declared but not used (terraform_unused_declarations)

  on locals.tf line 101:
 101:   commit_message  = var.commit_message

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.4.0/docs/rules/terraform_unused_declarations.md

@viktoryathegreat could you please check this issue? the rest looks good!


Concat problem while converting

I get this error while converting model to core-ml:
 "Error while converting op of type: {}. Error message: {}\n".format(node.op_type, err_message, )
TypeError: Error while converting op of type: Concat. Error message: unable to translate constant array shape to CoreML shape"

Pytorch tensor shape is:
A is (1, 128, 128, 256)
B is (1, 1, 128, 256)

C = torch.cat((A,B),1)
Expected C value is (1, 129, 128, 256)
I tried reshape tensors to:
A = (1, 1, 128, 128, 256)
B = (1, 1, 1, 128, 256)

But still have
unable to translate constant array shape to CoreML shape Error.

@xfarxod can you try with latest beta coremltools 3.0b2?
Following works without any error with latest beta
import torch

class cat_model(torch.nn.Module):
    def __init__(self):
        super(cat_model, self).__init__()

    def forward(self, a, b):
        c = torch.cat((a, b), 1)
        # print(c.shape)
        return c

a = torch.randn((1, 128, 128, 256))
b = torch.randn((1, 1, 128, 256))

model = cat_model()
torch.onnx.export(model, (a, b), 'cat_model.onnx')

import onnx
model = onnx.load('cat_model.onnx')
onnx.checker.check_model(model)
print(onnx.helper.printable_graph(model.graph))

from onnx_coreml import convert
mlmodel = convert(model)

Using TensorFlow backend.
1/1: Converting Node Type Concat
Translation to CoreML spec completed. Now compiling the CoreML model.
Model Compilation done.

Closing as issue no longer exists

Thank you for your response and sorry for my late reply.
Works for me!!!


media-query-list-comma-space-after conflict

media-query-list-comma-space-after rule from stylelint-config-standard has value of "always-single-line" which is in conflict with Prettier, so the value was changed to "always" in stylelint-config-prettier. When Prettier breaks long media query lists to multiple lines there are no required spaces after comma (but just line breaks), which is then reported as error by Stylelint. Example CSS reformated by Prettier which is causing Stylelint error:
@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

Seems like rules media-query-list-comma-newline-after and media-query-list-comma-space-after should somehow be aligned with Prettier (if it even possible), but I am still not sure how

Temp fix (not sure about it):
"rules": {
    "media-query-list-comma-space-after": null
  }

If prettier is taking care of this case I think that disabling the rule is the right call. Thanks!

Fixed by 418af4e.


Allow detached devenv up

Sometimes I want services to start with devenv up, and then continue working in that shell.
What I would imagine would be that I can

Run devenv up --detach and it will start processes in the background
Run devenv down to stop these processes

Basically like docker compose does it.

Seems related to https://github.com/cachix/devenv/pull/83 or this discussion . Very interested in this feature.

Seems like a duplicate of https://github.com/cachix/devenv/issues/80 too.

Closing as a duplicate.


1.19.x + small bug fix

This pull request contains the following changes:

Fixed a bug that caused crashes in my mod when working with this mod.
Extended compatibility from 1.19.2 to 1.19.x (if 1.19.5 is released, then you should test it).
Small refactorings have been made and Russian localization has been added.

All looks good so far, will test this soon!


Installing outside of zen-mods website?

I see the zen mods listing for this repo hasn't gone past 1.0.0 but there have been many updates since
is there a way for me to install this beyond that?

Yeah I haven't updated it yet since it has to be approved manually, so I wanted to publish it once I fixed all the bugs.
To try the current dev version:

disable the mod
add the content of chrome.css to your userChrome.css
add the preferences:

the non-string preferences to about:config

the string preferences to your userChrome.css like this:

:root {
  --theme-sidebar_expand_on_hover-expanded_width: 300px !important;
  --theme-sidebar_expand_on_hover-transition_speed: 120ms !important;
}

Where is userChrome css file? can you help?

Just wanted to let you know that the version on the mod website is updated.

Just wanted to let you know that the version on the mod website is updated.

New update is great! Good work on this :)


Review the logic of DefaultStorageClass and useDynamicProvisioning

While I tried to deploy OpenWhisk with Docker in Mac, I found the dynamic provisioning didn't work by default. In k8s doc, it is said "When a default StorageClass exists in a cluster and a user creates a PersistentVolumeClaim with storageClassName unspecified, the DefaultStorageClass admission controller automatically adds the storageClassName field pointing to the default storage class."
It looks like leaving storageClassName as blank is not unspecified. So I rewrite the logic of DefaultStorageClass and useDynamicProvisioning, change the pvc specification to:
spec:
{{- if **not** .Values.k8s.persistence.useDynamicProvisioning }}
  storageClassName: {{ .Values.k8s.persistence.defaultStorageClass }}
{{- end }}
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: {{ .Values.db.persistence.size }}

It works well with Docker in Mac environment.
The new logic is:

If dynamic provisioning is supported by the k8s cluster ( checking if there is default StorageClass by kubectl get StorageClass ), set .Values.k8s.persistence.useDynamicProvisioning to true. Without any additional configuration, the dynamic provisioning works for every pv claim.
If dynamic provisioning is not supported by the k8s cluster, set .Values.k8s.persistence.useDynamicProvisioning to false and set the value of .Values.k8s.persistence.defaultStorageClass. Manually create 5 and more pv, and then deploy OpenWhisk.

I think we should test the new logic in another k8s cluster.

I tested with IKS.
I failed to figure out a way to use dynamic provisioning, even the .Values.k8s.persistence.defaultStorageClass is set to "default", following what the document IBM IKS for OpenWhisk said:
IKS does not provide a properly configured DefaultStorageClass, instead you need to tell the Helm chart to use the default StorageClassName as shown above.

It looks like IKS use a wired way to configure dynamic provisioning. I will spend more time on it.

i can take a look.  it worked on IKS for me a couple of weeks ago, but we have merged some PRs since then that changed the logic.


Do not defer close in loop

See https://github.com/github/git-lfs/pull/378#issuecomment-111231779:

There are a couple problems that are causing the tests to deadlock.
The first one is easy, some of the download tests are doing a defer reader.Close() in a loop when it should just be closing them immediately, causing the deadlock:

Thanks for pulling this out :+1:


Intermittent 400 errors calling the API

Describe the bug
When calling the API, I keep getting 400 errors intermittently. I tested this out using Postman as well.
To Reproduce

Do axios.get("https://api.coronavirus.data.gov.uk/v1/data") or fetch the endpoint on Postman repeatedly
See error sometimes: response: "Invalid Query: the query is either empty or does not conform to the correct pattern. See the API documentations for additional information."

Expected behaviour
API always returns 200.
Screenshots
N/A
Desktop (please complete the following information):

OS: Mac
Browser Brave
Version 1.27

Smartphone (please complete the following information):

Device: iPhone 11
OS: iOS 14.7
Browser Brave
Version 14.7

Additional context
I'm trying to use this in this notebook: https://observablehq.com/@bluprince13/india-uk-covid-dashboard
You can see that it errors out there.

What's the exact API endpoint?
All APIs are working normally, otherwise you wouldn't be able to see the website.

I did consider that I may be getting throttled.
However, according to https://coronavirus.data.gov.uk/details/developers-guide#get-responses, if the requests were throttled, it should be returning 429 rather than 400.

What's the exact API endpoint?

https://api.coronavirus.data.gov.uk/v1/data

I did consider that I may be getting throttled.
However, according to https://coronavirus.data.gov.uk/details/developers-guide#get-responses, if the requests were throttled, it should be returning 429 rather than 400.

You get a 429 if the request is throttled, which is very unlikely in APIv1. It has a very large quota.

What's the exact API endpoint?

https://api.coronavirus.data.gov.uk/v1/data

That's not a correct query though. You need to specify what you need.
See the developer's guide to learn about the API and query constructs, or use the download feature underneath the cards to get prepped endpoints.

That's not a correct query though. You need to specify what you need.

Oh right. So, how come it does work sometimes then?
I will try to be more specific and see if the API returns 200 more consistently.

That endpoint has and will never work.
You need to at least provide the mandatory parameters - i.e. areaType and structure. Here's an example of a valid request:
https://coronavirus.data.gov.uk/api/v1/data?filters=areaType=overview&structure={"areaType":"areaType","areaName":"areaName","areaCode":"areaCode","date":"date","newCasesBySpecimenDate":"newCasesBySpecimenDate","cumCasesBySpecimenDate":"cumCasesBySpecimenDate"}&format=json

That endpoint has and will never work.

It did work for me intermittently which is what confused me.

or use the download feature underneath the cards to get prepped endpoints

This helped me a lot! For anyone else who stumbles upon this, the cards on say https://coronavirus.data.gov.uk/details/cases have a download button that lets you download as JSON and takes you to the correct endpoint.


add video references

Thank you for this! I should expand the track description at some point, I completely forgot about that being blank!


Parties that just finished attack seem to gain back movement points

Not sure if it is intentional, but parties that win fight first turn seem to move for free onto that tile. Maybe this should still cost the amount it would take to move onto a tile?

unintentional, I will get on it

We may also want to reduce the cost of entering battles so that it can still fight lots of small parties without being slowed down too much.

Maybe the cost should just be the same as the movement cost to that terrain?
The reason we didn't do this originally was so that path-finding doesn't suggest attacking mid movement. Is this still a problem?

From my testing it seems that this is not a problem so I will go ahead with fix.


fix: crash with backrefs

Closes #184
The problem was that when we went down the ref, we don't change the absolute path in rootNodeDocAbsoluteRef and that results in failures to resolve next $refs.

Thank you for the fix!


Implicit description from class docstring

Long story short, in my opinion,
This, (my class used for example)
...
@strawberry.type(description="Represents data about a device that is currently connected to the application")
class ActiveHdd(HddEntry):
    serial: ID
...

Should be equivalent to this,
...
@strawberry.type
class ActiveHdd(HddEntry):
    """
    Represents data about a device that is currently connected to the application
    """
    serial: ID
...

We can gather this from the __doc__ attribute on the class, or a clean sanitized string using getdoc from the inspect module,
from inspect import getdoc

class MyClass:
    """
    My class that should have a document string.
    """
    pass

assert getdoc(MyClass) == 'My class that should have a document string.'

I believe the description should be gathered from the docstring if no description parameter is explicitly set.
What do you think? I love the project so far! I hope to contribute more at some point.
Thanks!

Hi @AadamZ5! That's something we did at the very beginning but we removed this functionality because it was easy to forget about and expose implementation details (something that happened at work if I'm honest 😊).
What about using a new property on the class?
@strawberry.type
class ActiveHdd:
    __description__ = """
    Represents data about a device that is currently connected to the application
    """
    serial: ID

Pinging @jkimbo, @BryceBeagle and @ulgens for more opinions on this :)

Hi @AadamZ5! That's something we did at the very beginning but we removed this functionality because it was easy to forget about and expose implementation details (something that happened at work if I'm honest 😊).
What about using a new property on the class?
@strawberry.type
class ActiveHdd:
    __description__ = """
    Represents data about a device that is currently connected to the application
    """
    serial: ID

Pinging @jkimbo, @BryceBeagle and @ulgens for more opinions on this :)

I like the new attribute a little more, since the docstring may be oriented to developers and leak some implementation details.
At work we had a similar discussion and agreed with the special attribute approach.
If you want to take the docstring as the field description you explicitly set __description__ = __doc__ and you get the desired behavior, without the risk of doing it accidentally

I like the new attribute a little more, since the docstring may be oriented to developers and leak some implementation details.
At work we had a similar discussion and agreed with the special attribute approach.
If you want to take the docstring as the field description you explicitly set __description__ = __doc__ and you get the desired behavior, without the risk of doing it accidentally

The extra attribute would work, but truly I see it as redundant to the description= parameter in the decorator. The only reason I thought it would be a good idea was because it is a straightforward and implicit way to specify the description without actually specifying any explicit parameters or attributes. I love me some implicit-ness.
I think that if the description is gathered from __doc__ as a fallback, then we can avoid exposing any implementation details by explicitly setting description= in the decorator.
Maybe I should rethink how my class's docstring is being used. Perhaps I am not using it how it should be used. Regardless, this isn't a bug or issue.
What do you think?

The extra attribute would work, but truly I see it as redundant to the description= parameter in the decorator. The only reason I thought it would be a good idea was because it is a straightforward and implicit way to specify the description without actually specifying any explicit parameters or attributes. I love me some implicit-ness.
I think that if the description is gathered from __doc__ as a fallback, then we can avoid exposing any implementation details by explicitly setting description= in the decorator.
Maybe I should rethink how my class's docstring is being used. Perhaps I am not using it how it should be used. Regardless, this isn't a bug or issue.
What do you think?

I think that if the description is gathered from __doc__ as a fallback

I disagree. You wouldn't want to potentially leak implementation details because you were unaware of a cool, but non-obvious, feature of the library. I think there should be a schema-wide toggle that enables the feature, but is disabled by default:
schema = Schema(...)
schema.config.docstring_descriptions = True

I think that if the description is gathered from __doc__ as a fallback

I disagree. You wouldn't want to potentially leak implementation details because you were unaware of a cool, but non-obvious, feature of the library. I think there should be a schema-wide toggle that enables the feature, but is disabled by default:
schema = Schema(...)
schema.config.docstring_descriptions = True

I think there should be a schema-wide toggle that enables the feature, but is disabled by default:
schema = Schema(...)
schema.config.docstring_descriptions = True

I think this is a great idea @BryceBeagle. I thought of something along the lines of this, but wasn't sure of the best way to do it.
So since it seems like a lot of people use the docstring for implementation details, maybe I am using the docstring in an unconventional way. In other words, the docstring is probably not a suitable description. As I'm no employed or super experienced dev, what do you find the docstring is usually used for?

I think there should be a schema-wide toggle that enables the feature, but is disabled by default:
schema = Schema(...)
schema.config.docstring_descriptions = True

I think this is a great idea @BryceBeagle. I thought of something along the lines of this, but wasn't sure of the best way to do it.
So since it seems like a lot of people use the docstring for implementation details, maybe I am using the docstring in an unconventional way. In other words, the docstring is probably not a suitable description. As I'm no employed or super experienced dev, what do you find the docstring is usually used for?

So since it seems like a lot of people use the docstring for implementation details, maybe I am using the docstring in an unconventional way. In other words, the docstring is probably not a suitable description. As I'm no employed or super experienced dev, what do you find the docstring is usually used for?

I can't speak for the other users here, but personally I don't aim to have implementation details in my docstrings. But I also don't actively avoid doing so. It would require a bit of extra scrutiny to make sure that all the items I'm referring to in the comment are, in fact, public members. Someone that's unaware of the feature may not even think about doing this.

So since it seems like a lot of people use the docstring for implementation details, maybe I am using the docstring in an unconventional way. In other words, the docstring is probably not a suitable description. As I'm no employed or super experienced dev, what do you find the docstring is usually used for?

I can't speak for the other users here, but personally I don't aim to have implementation details in my docstrings. But I also don't actively avoid doing so. It would require a bit of extra scrutiny to make sure that all the items I'm referring to in the comment are, in fact, public members. Someone that's unaware of the feature may not even think about doing this.

So since it seems like a lot of people use the docstring for implementation details, maybe I am using the docstring in an unconventional way. In other words, the docstring is probably not a suitable description. As I'm no employed or super experienced dev, what do you find the docstring is usually used for?

That's a very good question, I think docstrings should be used as some sort of public documentation for classes, functions and modules, so ideally they'd work well for a GraphQL description. The problem is that it is too easy to do the wrong thing, personally I've seen docstrings used to explain how something was implemented (instead of how to use and when), I've done that too be honest.
As a aim for the library we should make it easy to devs to not do wrong things, but also give flexibility when needed. So we can think of adding a settings for this :)

So since it seems like a lot of people use the docstring for implementation details, maybe I am using the docstring in an unconventional way. In other words, the docstring is probably not a suitable description. As I'm no employed or super experienced dev, what do you find the docstring is usually used for?

That's a very good question, I think docstrings should be used as some sort of public documentation for classes, functions and modules, so ideally they'd work well for a GraphQL description. The problem is that it is too easy to do the wrong thing, personally I've seen docstrings used to explain how something was implemented (instead of how to use and when), I've done that too be honest.
As a aim for the library we should make it easy to devs to not do wrong things, but also give flexibility when needed. So we can think of adding a settings for this :)

I think docstrings should be used as some sort of public documentation for classes, functions and modules, so ideally they'd work well for a GraphQL description.

I guess it depends on your definition of "public". Usually when I write docstrings, I'm documenting things for coworkers/other developers, i.e. those with access to the source. Not for the customers/users of the product.
There's something to be said for in-source documentation for end users (a lot of libraries do this, e.g. Qt), but not all. Those that do in-source documentation could definitely benefit from docstring-based documentation for their GraphQL schemas.

I think docstrings should be used as some sort of public documentation for classes, functions and modules, so ideally they'd work well for a GraphQL description.

I guess it depends on your definition of "public". Usually when I write docstrings, I'm documenting things for coworkers/other developers, i.e. those with access to the source. Not for the customers/users of the product.
There's something to be said for in-source documentation for end users (a lot of libraries do this, e.g. Qt), but not all. Those that do in-source documentation could definitely benefit from docstring-based documentation for their GraphQL schemas.

Another issue to consider is whether the current way discourages documentation, or at least lengthy documentation. An advantage of docstrings is the builtin paragraph formatting. I'm curious how users handle line wrap and indentation using description=. Even with the argument ⬆ proposal, a long description would end up black-formatted as:
@strawberry.field
def my_field(
    info,
    my_arg: str = strawberry.argument(
        description="my field description............................."
    ),
) -> str:
    ...

which seems less readable to me, particularly as the number of args grows.

even FastAPI does this to produce OpenAPI docs, I don't see any harm in having the same feature in strawberry.
Both FastAPI routes and strawberry resolvers are meant to be lightweight transport layers, apart from the business logic anyways.
Here's a FastAPI route with a docstring based description:
from fastapi import FastAPI

app = FastAPI()

@app.get("/hello")
def send_hello():
    """
    Sends an hello.
    """
    pass

Workaround
I implement it using a decorator.
Implementation
from inspect import cleandoc
import strawberry.object_type

def load_description_from_docstring(cls):
    type_definition = getattr(cls, "_type_definition", None)
    if not isinstance(type_definition, strawberry.object_type.TypeDefinition):
        raise TypeError(f"{cls} is not a Strawberry type")

    raw_doc = cls.__doc__
    if not isinstance(raw_doc, str):
        raise ValueError(f"Invalid docstring for class {cls.__name__}")
    type_definition.description = cleandoc(raw_doc)

    return cls

Example
@load_description_from_docstring
@strawberry.interface
class Node:
    """
    An object with an ID.
    """

    id: strawberry.ID

I use cleandoc instead of getdoc because the former may lead to unexpected behavior, i.e. inheriting description from ancestor classes.

Yet another workaround
I didn't like the decorator approach as it required marking every object explicitly with it. Instead I added this code just after schema creation:
def _apply_hack_for_strawberry_docstrings(schema: StrawberrySchema) -> None:
    """Force Strawberry to use the docstrings from the Python objects describing
    GraphQL objects as GraphQL description.

    Strawberry doesn't expose any configuration yet to do this, so we have to
    use this hack to apply the docstrings manually.

    Here is a link to the Strawberry issue tracking this:
    https://github.com/strawberry-graphql/strawberry/issues/653
    """
    # Iterate over all types in the schema
    for gql_type in schema._schema.type_map.values():
        strawberry_type = gql_type.extensions.get("strawberry-definition")
        if strawberry_type is None:
            # This is not a Strawberry type (e.g. a Graphene type)
            continue
        assert isinstance(strawberry_type, StrawberryType)

        if gql_type.description is not None:
            # The description has already been set, so we don't override it
            continue

        if isinstance(strawberry_type, StrawberryObjectDefinition):
            origin = strawberry_type.origin
            raw_doc = origin.__doc__

            if not isinstance(raw_doc, str) or raw_doc.startswith(
                f"{origin.__name__}("
            ):
                # It seems that strawberry sets the docstring of a given Foo class
                # to something that starts with "Foo(..." if the docstring is not
                # present. Just skip it in that case assuming we don't have a
                # docstring.
                continue
        elif isinstance(strawberry_type, EnumDefinition):
            raw_doc = strawberry_type.wrapped_cls.__doc__
        else:
            raw_doc = None

        if not isinstance(raw_doc, str):
            # Make sure docstring is a string
            continue

        # Finally get the docstring as the GraphQL description
        gql_type.description = inspect.cleandoc(raw_doc)

I am in the middle of transforming our codebase from using Graphene to Strawberry, so in order to preserve the behaviour of Graphene using the docstring by default this function did come in handly.

My view is that if support for native enums was merged then __doc__ should be used as type description. I would argue that people are familiar with this pattern from tools like Pydantic. The situation and expectations have changed over last couple of years.
Additionally most teams I worked with used pre-commit to generate and commit schema.gql so it is reviewed before releasing.
(I guilty for not reading this discussion before submitting a PR)

Not sure where I wrote this, but I think we can do this, but as an opt-in only[1], so we don't change how the library works with current libraries.
I think the first implementation should support just the standard python docstrings (so on classes and methods), then we can think of this one:
class Node:
    id: strawberry.ID
    """Doc for id"""

:)
[1] Maybe we can also have a default best practise configuration in future, where this and other options are enabled :)


Credit Card patterns not working as expected

Describe the bug
We would like to add pattern validation to the auro-input field when we have type="credit-card". The patterns we were hoping to implement were to make sure that the user entered a full 15 or 16 digit credit card number for the field to say show it is valid. We want the field to say invalid if there is an incomplete credit card number input field.
Currently when we attempt to add a pattern into that field it behaves very strangely. When testing with the pattern "^[0-9]{15,16}" I expected the field to say invalid until the 15th or 16th character. That was true, until you click off the field; then it would turn invalid with no explanation. When another coworker of mine was playing with it on their machine, they almost got it to work however when the field showed visibly that it was valid the isValid flag on it was still false, so it was very confusing.
All in all, we've tried a number of ways to get it to work however we can't seem to get a consistent solution.
What we desire in general is for auro-input with type credit-card to show invalid if there is an incomplete credit card string inputted. That way we can prevent purchase if they have an incomplete card.
To Reproduce
Steps to reproduce the behavior:

Add auro-input to your project with type="credit-card".
add a pattern string to check whether or not the string is 15 or 16 digits. We used: "^[0-9]{15,16}"
Enter 15 or 16 characters.
See weird behavior (inconsistent invalid signs, false valid signs, etc.)

Expected behavior
I expect to be able to write a simple pattern that checks whether or not there are 15 or 16 digits included as a credit card string. This is so that I can make our payment form submit button 'invalid' if any fields have missing or incorrect information. This is just with using the built in pattern attribute though.
In general, what we desire is for the field to be able to show as invalid if an incomplete credit card string is added. We would like to add logic on other components in our repo to disable the purchase button if this field is invalid or missing.
Screenshots

Desktop (please complete the following information):

OS: MacOS Monterey 12.3 (21E230)
Browser: Chrome
Version: Version 101.0.4951.64 (Official Build) (arm64)

Additional context
I'm pretty sure the reason this error is being thrown is because depending on the first two digits of the credit card string inserts spaces to group specific numbered characters. However, because we don't have access to logic that shows when those different spacing patterns happen we can't adjust our pattern to match.
That's just if you want to enforce the pattern attribute to enable this functionality.
Something separate I noticed was that there's no explanation on the Expiration Date portion of the auro-input documentation that shows that the string renders with an actual forward slash inside. That means any numbers only pattern (ie "^[0-9]{4}" that says "expect 4 digits") to fail, because a non-digit character is forcibly put into the string. Documenting that you have to be aware of this backslash character would be helpful for future users of this field. Our new pattern that works with this component is: "^[0-9][0-9]/[0-9][0-9]". This gets us what we need so far.

Just an FYI, we are currently blocked from developing a feature on our microsite by this bug: https://dev.azure.com/itsals/E_Sell_Book/_backlogs/backlog/E_Sell_Book Team/Features/?workitem=757702

@jpalmer108 a few things I want to comment on here. I do not 100% understand why you are setting up a custom pattern for the credit card? What is the use case that you need to address? With each credit card type we are supporting, we pre-define the min and max length of characters and set up the pattern. The pattern you are trying to eval we already support.
https://github.com/AlaskaAirlines/auro-input/blob/main/src/base-input.js#L671-L687
Testing with a card number that starts with 1 is most likely causing you some issues. The input element credit card type uses https://nosir.github.io/cleave.js/ as the UI logic. We feed specs into the cleave API and it renders the UI spacing.

However, because we don't have access to logic that shows

The functionality for the feature is in this repo https://github.com/AlaskaAirlines/auro-input/blob/main/src/base-input.js#L694-L777 and all other logic is dependent on cleave.js
The same is true for the date input. Please see lines https://github.com/AlaskaAirlines/auro-input/blob/main/src/base-input.js#L216-L270 for how we set up the cleave.js API here as well.


Use nginx-route relation to replace ingress relation

The ingress relation is deprecated in the Nginx ingress integrator charm. Use nginx-route relation and nginx_route charm library to replace ingress relation and ingress charm library.

Not much to add from Arturo's comments.
The last test added seems unrelated, but is useful.
I'll approve once the comments are managed :)


[ENHANCEMENT FUNCTION]

Description
SIgnup should lead to a page Profile which will showcase previous consultations
Actual Behavior
the signup leads to nothing and even login
there must be a page to see the previous appointments with doctors
GSSOC'24

can i work on it?

assinged to someone else


Fix handling of the '--' argument followed by inputs for the immediate compilation mode ('swift')

Resolves rdar://114191406

@swift-ci test


In-line test configuration not respected

Component
Forge
Have you ensured that all of these are up to date?

[X] Foundry
[X] Foundryup

What version of Foundry are you on?
forge 0.2.0 (3df3e0c 2024-03-04T00:19:46.775990000Z)
What command(s) is the bug in?
forge test
Operating System
macOS (Apple Silicon)
Describe the bug
forge test no longer respects In-line test configuration.
To replicate, simply forge init a new Counter project. Add an in-line fuzz runs config to testFuzz_SetNumber:
    /// forge-config: default.fuzz.runs = 100
    function testFuzz_SetNumber(uint256 x) public {
        counter.setNumber(x);
        assertEq(counter.number(), x);
    }

Run forge test. Output:
Ran 2 tests for test/Counter.t.sol:CounterTest
[PASS] testFuzz_SetNumber(uint256) (runs: 256, μ: 27787, ~: 28409)
[PASS] test_Increment() (gas: 28379)
Suite result: ok. 2 passed; 0 failed; 0 skipped; finished in 8.41ms (8.13ms CPU time)

the Solc JSON ASTs are not included anymore for test (see https://github.com/foundry-rs/foundry/pull/7197) so inline config cannot be applied, works OK if you run forge test --ast but I think this should be on by default for tests too @mattsse @DaniPopes ?


How to use Tensorflow Lite GPU support for python code

I want to run tflite model on GPU using python code. But it seems that the code does not use GPU (There's no increase in GPU resource usage.). Is it possible to give an GPU-related option in "tf.lite.Interpreter(model_path, option)"?
System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):  Linux Ubuntu 16.04
Python version:  3.6
CUDA/cuDNN version: 10.1
GPU model and memory: 2080 ti

Describe the current behavior
tflite model with python code runs on cpu.
Describe the expected behavior
tflite model with python code runs on gpu.

@swim77
Please, let us know which tensorflow version you are using?.Request you to share colab link or simple standalone code with supporting files to reproduce the issue in our environment.It helps us in localizing the issue faster.Thanks!

I downloaded the tflite model from https://www.tensorflow.org/lite/models/image_classification/overview.
And used the simple code as below:
import cv2
import pathlib
import tensorflow as tf
folder_path = './data'
interpreter = tf.lite.Interpreter(model_path="test.tflite")
input_details = interpreter.get_input_details()
output_details = interpreter.get_output_details()
interpreter.allocate_tensors()
images = []
for file in pathlib.Path(folder_path).iterdir():
img = cv2.imread(r"{}".format(file.resolve()))
new_img = cv2.resize(img, (224, 224))

images.append(new_img)

interpreter.set_tensor(input_details[0]['index'], images)
interpreter.invoke()
output_data = [interpreter.get_tensor(output_details[i]['index']) for i in range(len(output_details))]

images.clear()

===============================================================
The tensorflow version is 2.2.0.

TF Lite does not support Nvidia gpu. See https://github.com/tensorflow/tensorflow/issues/34536#issuecomment-565632906


NullReferenceException: Object reference not set to an instance of an object.

I'm having a trouble with NullReferenceEXception. I tried 2 projects, am I doing something wrong/missing? I import it, add component and start the optimization. I get this error and left with new gameobject that has "(Broken)" in it. The only values that change are mesh renderers to skinned mesh renderers and that's it. If I try unchecking Merge Static Meshes as Skinned it still errors out. I'm using the newest VRCSDK.

seems like sometimes skinned meshes reference a null bone. well I fixed it, you can dl the fixed version here: https://github.com/d4rkc0d3r/d4rkAvatarOptimizer/archive/refs/heads/main.zip


MQ items

[ ] #20927
[ ] #20926
[ ] #20928
[x] #20929
[x] #20930

Closing this since I assigned to main epic the one we keep. Thanks!


Expand the Coordinate

Description
support z-axis.
min: [0,0,0],
max: [300, 200, 100]

supports n-axis
min: [0],
max: [300]


max size not show

Hello
This package also was shown the photos to enlarge?
like this :
![2]
(https://cloud.githubusercontent.com/assets/10260838/25134427/c502b386-2464-11e7-87da-003ecd28ac70.jpg)
 'maxSize' => 12000 * 12000,

Do my knowledge maxSize is not a valid parameter.
Please refer to the Glide documentation to learn which parameters are possible: http://glide.thephpleague.com/

I not fount any parameters.


Can't resolve deferred services when using tagging

Laravel Version: 5.7.12
PHP Version: 7.2.11
Database Driver & Version: N/A

Description:
I register multiple services in a service provider and then tag them. If the service provider has the defer property set to true, they won't be resolved (in a controller for example). If it's false it works.
Is it intended or is it a bug ? Or maybe I'm just fundamentally wrong about how tagging should be used.
Steps To Reproduce:
Create a service provider
protected $defer = true;

public function register()
    {
        $this->app->singleton('first', function ($app) {
            return new MyFirstCustomClass();
        });

        $this->app->singleton('second', function ($app) {
            return new MySecondCustomClass();
        });

        $this->app->tag(['first', 'second'], 'my_custom_classes');
    }

Try to resolve them
$tagged = app()->tagged('my_custom_classes'); //empty

This works for me. Did you add the service provider to your providers array in the app.php config file?

Yes, the service provider is in the providers array.
I made a fresh install and still get the issue. I run the clear-compiled command after changing the defer property.
Here is a full example of the provider :
<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use App\Services\Tests\MyTestClass;

class MyServiceProvider extends ServiceProvider
{
    /**
     * Indicates if loading of the provider is deferred.
     *
     * @var bool
     */
    protected $defer = true;

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton('bind.one', function ($app) {
            return new MyTestClass('one');
        });

        $this->app->singleton('bind.two', function ($app) {
            return new MyTestClass('two');
        });

        $this->app->tag(['bind.one', 'bind.two'], 'bind');
    }

    public function provides()
    {
        return [
            'bind.one',
            'bind.two',
        ];
    }
}

And I'm testing it directly in the routes/web.php file :
<?php

Route::get('/', function () {
    dd(app()->tagged('bind'));
});

I finally managed to reproduce this with the above info. I'm not 100% sure if this intended or not.
What could be done to fix this is overwrite the tagged method on the Application instance the same way the make method is overwritten. Then load the deferred provider if the tag name was found in the provides array. But I'm not sure that's wanted because the tag name isn't an actual service so it doesn't really belongs in the provides array. So I'm not really sure if this is solvable.

Ok. Thanks for taking time to test and for your feedback 👍
I will use an other method for now.

You should not tag anything from a deferred service provider meaning that :
this line
  $this->app->tag(['bind.one', 'bind.two'], 'bind');
should be moved into a normal service provider and it will work as normal.
Taggings are not cached in laravel since they are not used often.


Complete documentation for Notification creation

Notifications support several options that were yet to be documented:
buttons, description, and stack. Add descriptions for each option
and its defaults (where applicable, e.g. .buttons.className).
stack is technically available on all notification types, but it
doesn't make sense to use it on types other than 'error' and 'fatal'.
Therefore it's documented only in those two cases.
The usage and expected display, like preformatted vs. Markdown, taken
from atom/notifications/lib/notification-element.coffee.

Isn't onDidClick the correct event for the buttons?

@Gawdl3y You are right, thanks for catching that.
https://github.com/atom/notifications/blob/a14d3a0cc771687439176ec949ab4079add15341/lib/notification-element.coffee#L120

This looks good to me, @ssorallen 👍 Just two small comments and then I think we can 🚢 it.

@as-cii I added the descriptions you mentioned in your comment about whitespace and newlines.

Thanks, @ssorallen! 🙇


Fix scoped at types dependencies

Fixes #498
Also:

Made sure dependencies are always ordered alphabetically in generated package.json
Fixed an issue where dependencies listed in readme.md would not contain the correct package name.
Also fixed an issue where an NpmInfoClient would return something without a dist-tags or a versions property (Happens with unpublished packages. See http://registry.npmjs.org/emscripten).
Fixes an issue where parsing definitions for a single package using --single=package_name always generated an empty definitions.json file.

For reference: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/27729

@andy-ms Can you please review this? This is the first time I touched the code of types-publisher so its possible that I might have missed things.
Also when this is merged and published/used, how do I make sure that some packages are published without making changes to all of them?

npm run calculate-versions also calculates which packages are to be published. So if this change caused unnecessary extra publishes you could tell from that.

I am getting a new error when I run npm run generate -- --all
Error: No version info for axe-core@3
    at Versions.info (C:\Source\types-publisher\src\lib\versions.ts:140:10)
    at Versions.getVersion (C:\Source\types-publisher\src\lib\versions.ts:129:48)
    at generateNotNeededPackage (C:\Source\types-publisher\src\lib\package-generator.ts:40:63)
    at Object.generateAnyPackage [as default] (C:\Source\types-publisher\src\lib\package-generator.ts:16:29)
    at util_1.nAtATime (C:\Source\types-publisher\src\generate-packages.ts:41:40)
    at Promise.all.initArray (C:\Source\types-publisher\src\util\util.ts:60:25)

I think wat it tries to do is this:

node bin/calculate-versions.js generates versions.json and contains this piece:
"axe-core": {
    "2": {
        "patch": 7
    }
}

node bin/generate-packages.js tries to generate a "not-needed" package for the deprecated package axe-core because it is in DT's notNeededPackages.json:
{
    "libraryName": "axe-core",
    "typingsPackageName": "axe-core",
    "sourceRepoURL": "https://github.com/dequelabs/axe-core",
    "asOfVersion": "3.0.3"
}

When it gets to here and calls versions.getVersion(pkg) here:
https://github.com/Microsoft/types-publisher/blob/42307e76c34c7e0de3e4d8fd36d4f93c9ee37a75/src/lib/package-generator.ts#L40
versions.getVersion(pkg) calls versions.info(pkg.id) and comes down to this: pkg.id contains { name: "axe-core", majorVersion: 3 } and versions.data["axe-core"] contains { "2": { patch: 7 } } which causes versions.info() to throw with the error above because it was never put into versions.json. The result of versions.getVersion(pkg) would have been places in the final version property of the package.json.

I don't think my changes cause this but is this a bug?

@andy-ms Can you take a look at this again please?

Pinging @sandersn to take a look when he's back.

@mgroenhoff  @andy-ms @sandersn this will impact even more people very soon, can we make an effort to push this further?

@andy-ms @sandersn I am trying to get the conflicts resolved and I wanted to generate all packages to see if it still works but could it be that the documented '--forceUpdate' flag to 'node bin/calculate-versions.js' no longer works? I also don't see any references in the code.

@mgroenhoff It does look like there's some maintenance needed. For the last week I've been added tests, logging and instrumentation so I will know when I've broken something. Feel free to send PRs to eliminate unused features, or I'll get around to it eventually.
Anyway, thanks for your set of fixes here!

@sandersn I encounter the same problem when using https://www.npmjs.com/package/@types/storybook__addon-storyshots. What can I do to resolve this problem? Anyway I can trigger a publish for this package?

Probably the easiest way is to make a trivial edit to the package. I can do that today when I get off the bus.

The PR is here:
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/31547
I’ll merge it after CI passes.

@mortyccp Publishing is finished. I see an additional dependency, @types/storybook__react. Is that correct?


Image icons are clipped at VectorTile edges

After upgrading from OL 6.4 to 6.5 image icons are clipped at tile edges.
I put together a small codepen to show the problem.
https://codepen.io/dbauszus-glx/pen/ZEpoaNx

If I replace the ol library with the previous version in the same codepen I see the icon although there is a small line through the icon.

I wouldn't mind to have a look what might cause this issue but wouldn't know where to start since there have been quite a few changes between 6.4 and 6.5.

You can find the offending commit with the help of git's bisect command. https://git-scm.com/docs/git-bisect
It does a binary search between two commits and by telling it if the commit works (good) or doesn''t (bad) it continues the search in the right direction until you find the commit introducing the problem.
git bisect start v6.5.0 v6.4.0
# Then use either
#git bisect good
# or
#git bisect bad
# until the offending commit is found

You can find the offending commit with the help of git's bisect command. https://git-scm.com/docs/git-bisect
It does a binary search between two commits and by telling it if the commit works (good) or doesn''t (bad) it continues the search in the right direction until you find the commit introducing the problem.
git bisect start v6.5.0 v6.4.0
# Then use either
#git bisect good
# or
#git bisect bad
# until the offending commit is found

I found the issue not sure whether this is a bug or expected behaviour.
I found this issue while looking at the lines through the symbol in 6.4.
Setting declutter: true fixed the display in 6.4. Going back to 6.5 I can see now that this also fixes the display of the icon.
I guess this can be closed. Is it worth to put a note somewhere in this regard for others to not stumbled on the same issue?

I found the issue not sure whether this is a bug or expected behaviour.
I found this issue while looking at the lines through the symbol in 6.4.
Setting declutter: true fixed the display in 6.4. Going back to 6.5 I can see now that this also fixes the display of the icon.
I guess this can be closed. Is it worth to put a note somewhere in this regard for others to not stumbled on the same issue?

Unfortunately the problem happens with 6.4 as well but is less prominent. Is it possible that the renderBuffer property is not doing anything? Changing this does not have any effect on the clipping of images.

Unfortunately the problem happens with 6.4 as well but is less prominent. Is it possible that the renderBuffer property is not doing anything? Changing this does not have any effect on the clipping of images.

I created another codepen which has a layer with much more icons.
https://codepen.io/dbauszus-glx/pen/ZEpRPoe
In this case we cannot use the declutter method which means that with 6.4 with have lines through icons and with 6.5 we have clipped symbols.

Do you have a programme where we could sponsor fixing a bug if we are unable to do so ourselves?

I created another codepen which has a layer with much more icons.
https://codepen.io/dbauszus-glx/pen/ZEpRPoe
In this case we cannot use the declutter method which means that with 6.4 with have lines through icons and with 6.5 we have clipped symbols.

Do you have a programme where we could sponsor fixing a bug if we are unable to do so ourselves?

Thanks for your interest in sponsoring a bug fix. I would be able to fix this bug. Please see my profile page (@ahocevar) for a link to my website, where you will find my professional support offerings.

Thanks for your interest in sponsoring a bug fix. I would be able to fix this bug. Please see my profile page (@ahocevar) for a link to my website, where you will find my professional support offerings.

@ahocevar That sounds great. I will have a try over the weekend whether I am able to make a pull request myself and get back to you on Monday if I am unable to grok the render logic.

@ahocevar That sounds great. I will have a try over the weekend whether I am able to make a pull request myself and get back to you on Monday if I am unable to grok the render logic.

@ahocevar I am making some progress on this.
I was able to track down the pull request which causes the issue.
https://github.com/openlayers/openlayers/pull/11377
The renderBuffer will be removed when declutter is false. Oddly I can not find the merged code in the main branch. Is it possible that the main branch is not at the latest version?

@ahocevar I am making some progress on this.
I was able to track down the pull request which causes the issue.
https://github.com/openlayers/openlayers/pull/11377
The renderBuffer will be removed when declutter is false. Oddly I can not find the merged code in the main branch. Is it possible that the main branch is not at the latest version?

@ahocevar Is it possible that the new declutter implementation caused this to fail? https://github.com/openlayers/openlayers/pull/11592
I checked a few of the commits between 6.4.3 and 6.5.0 but non did change the behaviour of the dlipped image render.
I created this example script to test the behaviour.
import Icon from '../src/ol/style/Icon.js';
import LayerVectorTile from '../src/ol/layer/VectorTile.js';
import MVT from '../src/ol/format/MVT.js';
import Map from '../src/ol/Map.js';
import SourceVectorTile from '../src/ol/source/VectorTile.js';
import Style from '../src/ol/style/Style.js';
import View from '../src/ol/View.js';

const sourceVectorTile = new SourceVectorTile({
  format: new MVT({}),
  tileUrlFunction: (tileCoord) => {
    return `https://xyz-mvt.vercel.app/dev/api/layer/mvt/${tileCoord[0]}/${tileCoord[1]}/${tileCoord[2]}?locale=UK&srid=3857&layer=Scratch&table=dev.scratch`;
  },
});

const layerVectorTile = new LayerVectorTile({
  source: sourceVectorTile,
  renderBuffer: 200,
  declutter: false,
  style: styleFunction,
});

function styleFunction() {
  const style = new Style({
    image: new Icon({
      src: `data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2213%22%20cy%3D%2213%22%20r%3D%2210%22%20fill%3D%22%23333%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22%20fill%3D%22%23ff1744%22%2F%3E%3C%2Fsvg%3E`,
      scale: 3,
      anchor: [0.5, 0.5],
    }),
  });

  return style;
}

new Map({
  layers: [layerVectorTile],
  target: 'map',
  view: new View({
    center: [-49213.90160174308, 6731227.370615371],
    zoom: 13,
  }),
});

@ahocevar Is it possible that the new declutter implementation caused this to fail? https://github.com/openlayers/openlayers/pull/11592
I checked a few of the commits between 6.4.3 and 6.5.0 but non did change the behaviour of the dlipped image render.
I created this example script to test the behaviour.
import Icon from '../src/ol/style/Icon.js';
import LayerVectorTile from '../src/ol/layer/VectorTile.js';
import MVT from '../src/ol/format/MVT.js';
import Map from '../src/ol/Map.js';
import SourceVectorTile from '../src/ol/source/VectorTile.js';
import Style from '../src/ol/style/Style.js';
import View from '../src/ol/View.js';

const sourceVectorTile = new SourceVectorTile({
  format: new MVT({}),
  tileUrlFunction: (tileCoord) => {
    return `https://xyz-mvt.vercel.app/dev/api/layer/mvt/${tileCoord[0]}/${tileCoord[1]}/${tileCoord[2]}?locale=UK&srid=3857&layer=Scratch&table=dev.scratch`;
  },
});

const layerVectorTile = new LayerVectorTile({
  source: sourceVectorTile,
  renderBuffer: 200,
  declutter: false,
  style: styleFunction,
});

function styleFunction() {
  const style = new Style({
    image: new Icon({
      src: `data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2213%22%20cy%3D%2213%22%20r%3D%2210%22%20fill%3D%22%23333%22%2F%3E%0A%20%20%20%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22%20fill%3D%22%23ff1744%22%2F%3E%3C%2Fsvg%3E`,
      scale: 3,
      anchor: [0.5, 0.5],
    }),
  });

  return style;
}

new Map({
  layers: [layerVectorTile],
  target: 'map',
  view: new View({
    center: [-49213.90160174308, 6731227.370615371],
    zoom: 13,
  }),
});

That could definitely be the case, @dbauszus-glx, because we do not have a rendering test for point symbols crossing tile boundaries.

That could definitely be the case, @dbauszus-glx, because we do not have a rendering test for point symbols crossing tile boundaries.

I can also reproduce this issue. This is a code example with one of the tiles that is not rendered properly:
   const base64StringToArray = (s) => {
      let asciiString = atob(s);
      return new Uint8Array([...asciiString].map(char => char.charCodeAt(0)));
    }

    let data = base64StringToArray("GvEBeAIKBnBvaW50cxIWCAASCgAAAQECAgMDBAQYASIECaYZNRIXCAASCgAFAQECAgMDBAYYASIFCY4jjQEaA19pZBoEdHlwZRoLaXNQdWJsaXNoZWQaBWljb25zGgRuYW1lIhoKGDVmZjViMjVkZjc4ODc5MDEwMGFlMWQ2MiIHCgVwb2ludCIGCgR0cnVlIhoKGDVmZTg3YjY4ZTBlOTk0MDEwMGVhYmJlNiIaChhGcmVlLWxpdmluZyBuZXN0IGV4YW1wbGUiGgoYNWZlODkwNGM3MDhjNTYwMTAwY2EyZjUyIgsKCXNvbWUgbmVzdCiAIBoMeAIKBmdyb3VwcyhQGgx4AgoFbGluZXMogCAaD3gCCghwb2x5Z29ucyiAIBqrA3gCCgVkZWJ1ZxIRCAASAgAAGAIiBwkCAgoA/D8SEQgAEgIAABgCIgcJAgIK/D8AEhIIABICAAAYAiIICQL+Pwr8PwASEggAEgIAABgCIggJ/j8CCgD8PxITCAASAgABGAIiCQm0BrQGCgCYMxITCAASAgABGAIiCQm0BrQGCpgzABITCAASAgABGAIiCQm0Bsw5CpgzABITCAASAgABGAIiCQnMObQGCgCYMxITCAASAgACGAIiCQnoDOgMCgCwJhITCAASAgACGAIiCQnoDOgMCrAmABITCAASAgACGAIiCQnoDJgzCrAmABITCAASAgACGAIiCQmYM+gMCgCwJhITCAASAgADGAIiCQmaE5oTCgDMGRITCAASAgADGAIiCQmaE5oTCswZABITCAASAgADGAIiCQmaE+YsCswZABITCAASAgADGAIiCQnmLJoTCgDMGRIPCAASAgEEGAEiBQmAIIAgGgRzaXplGgRuYW1lIgkZAAAAAAAAAAAiCRkAAAAAAAAkQCIJGQAAAAAAADRAIgkZAAAAAAAAPkAiCgoIOC8xMzcvODQogCA=");

    let tileLoadFunction = (tile) => {
      tile.setLoader((extent, resolution, projection) => {
        const format = tile.getFormat();
        let features = format.readFeatures(data, {
          extent,
          featureProjection: projection
        });

        tile.setFeatures(features);
      });
    }

    const source = new VectorTileSource({
      format: new MVT(),
      url: "http://localhost:9091/tiles/{z}/{x}/{y}?format=vt",
      tileLoadFunction
    });

    const style = (feature) => {
      let properties = {};
      if(feature.getProperties) {
        properties = feature.getProperties();
      }

      if(properties["layer"] != "points" && properties["layer"] != "groups") {
        return;
      }

      const circle = new Circle({
        radius: 30,
        stroke: new Stroke({
          color: "#cc0033",
          width: 1
        }),
        fill: new Fill({
          color: "#ffffff"
        })
      });

      const style = new Style({
        image: circle
      });

      return [style];
    }

    const layers = [
      new TileLayer({
        source: new OSM(),
      }),
      new VectorTileLayer({
        source
      }),
      new VectorTileLayer({
        source,
        style
      })
    ];

    var map = new Map({
      layers,
      target
    });

    const transformedValue = transformExtent([10.924994132259753,52.039908148925804,15.364458324989526,53.37159512476504], "EPSG:4326", "EPSG:3857");
    map.getView().fit(transformedValue);

I can also reproduce this issue. This is a code example with one of the tiles that is not rendered properly:
   const base64StringToArray = (s) => {
      let asciiString = atob(s);
      return new Uint8Array([...asciiString].map(char => char.charCodeAt(0)));
    }

    let data = base64StringToArray("GvEBeAIKBnBvaW50cxIWCAASCgAAAQECAgMDBAQYASIECaYZNRIXCAASCgAFAQECAgMDBAYYASIFCY4jjQEaA19pZBoEdHlwZRoLaXNQdWJsaXNoZWQaBWljb25zGgRuYW1lIhoKGDVmZjViMjVkZjc4ODc5MDEwMGFlMWQ2MiIHCgVwb2ludCIGCgR0cnVlIhoKGDVmZTg3YjY4ZTBlOTk0MDEwMGVhYmJlNiIaChhGcmVlLWxpdmluZyBuZXN0IGV4YW1wbGUiGgoYNWZlODkwNGM3MDhjNTYwMTAwY2EyZjUyIgsKCXNvbWUgbmVzdCiAIBoMeAIKBmdyb3VwcyhQGgx4AgoFbGluZXMogCAaD3gCCghwb2x5Z29ucyiAIBqrA3gCCgVkZWJ1ZxIRCAASAgAAGAIiBwkCAgoA/D8SEQgAEgIAABgCIgcJAgIK/D8AEhIIABICAAAYAiIICQL+Pwr8PwASEggAEgIAABgCIggJ/j8CCgD8PxITCAASAgABGAIiCQm0BrQGCgCYMxITCAASAgABGAIiCQm0BrQGCpgzABITCAASAgABGAIiCQm0Bsw5CpgzABITCAASAgABGAIiCQnMObQGCgCYMxITCAASAgACGAIiCQnoDOgMCgCwJhITCAASAgACGAIiCQnoDOgMCrAmABITCAASAgACGAIiCQnoDJgzCrAmABITCAASAgACGAIiCQmYM+gMCgCwJhITCAASAgADGAIiCQmaE5oTCgDMGRITCAASAgADGAIiCQmaE5oTCswZABITCAASAgADGAIiCQmaE+YsCswZABITCAASAgADGAIiCQnmLJoTCgDMGRIPCAASAgEEGAEiBQmAIIAgGgRzaXplGgRuYW1lIgkZAAAAAAAAAAAiCRkAAAAAAAAkQCIJGQAAAAAAADRAIgkZAAAAAAAAPkAiCgoIOC8xMzcvODQogCA=");

    let tileLoadFunction = (tile) => {
      tile.setLoader((extent, resolution, projection) => {
        const format = tile.getFormat();
        let features = format.readFeatures(data, {
          extent,
          featureProjection: projection
        });

        tile.setFeatures(features);
      });
    }

    const source = new VectorTileSource({
      format: new MVT(),
      url: "http://localhost:9091/tiles/{z}/{x}/{y}?format=vt",
      tileLoadFunction
    });

    const style = (feature) => {
      let properties = {};
      if(feature.getProperties) {
        properties = feature.getProperties();
      }

      if(properties["layer"] != "points" && properties["layer"] != "groups") {
        return;
      }

      const circle = new Circle({
        radius: 30,
        stroke: new Stroke({
          color: "#cc0033",
          width: 1
        }),
        fill: new Fill({
          color: "#ffffff"
        })
      });

      const style = new Style({
        image: circle
      });

      return [style];
    }

    const layers = [
      new TileLayer({
        source: new OSM(),
      }),
      new VectorTileLayer({
        source
      }),
      new VectorTileLayer({
        source,
        style
      })
    ];

    var map = new Map({
      layers,
      target
    });

    const transformedValue = transformExtent([10.924994132259753,52.039908148925804,15.364458324989526,53.37159512476504], "EPSG:4326", "EPSG:3857");
    map.getView().fit(transformedValue);

@dbauszus-glx Sorry for jumping ahead and fixing this in #11901.

@dbauszus-glx Sorry for jumping ahead and fixing this in #11901.

@ahocevar Amazing. Thanks for fixing this. I just pulled through the latest changes into my fork and can confirm that they work.

@ahocevar Amazing. Thanks for fixing this. I just pulled through the latest changes into my fork and can confirm that they work.


DNU - How do you search for packages?

Is there a way to search for available packages with DNU/DNX, without having to install them?
Ideally, the search would support some kind of fuzzy matching.
examples:
dnu search xunit
dnu search nunit*
dnu search resharper* (for any packages containing "resharper" in the name)
dnu search MyMadeUpPackage* (which would match MyMadeUpPackage as well as MyMadeUpPackage.ExtraFeatures)

dnu doesn't have this built in. But you could go to www.nuget.org to search :smile:

Is there possibly some way to leverage the nuget List command specifying a feed to search?
http://docs.nuget.org/consume/Command-Line-Reference
Looks like the last fallback is using the default nuget feed.
https://github.com/NuGet/NuGet.PackageManagement/blob/b1319fd70ce472c5ba91920a0cc00206205b1369/src/NuGet.CommandLine/Commands/ListCommand.cs
Also if you go to the packages directory in a browser it looks like there might be some way to get a paginated listing
https://www.nuget.org/api/v2/Packages
At the end of that page:
<link rel="next" href="https://www.nuget.org/api/v2/Packages?$skiptoken='2a486e82.Mega','1.0.0-beta5'" /></feed>
Just some thoughts.

@yishaigalatzer this is presumably more for your team than mine.

We do have an API for that already, should be too hard to add to the command line. Please refile on github.com/nuget/home/issues

Closing out this issue.


DefaultValue on Hidden sets defaultvalue="$value"

Should
public function defaultValue($value)
    {
        if (! $this->hasValue()) {
            $this->setValue($value);
        }

        return $this;
    }

Not be set on Input instead of Text?

What's the use case for this?
Input is extended by Checkbox, File, Hidden, and Text.

File can't have a sensible default value.
Checkbox defines it's own methods for this to fit its inherently different (from most input types) behavior.
Hidden should not be modified by the client and should have its value set explicitly without needing a fallback


Add distinct option to return clause

Return now supports an additional options parameter that contains a distinct flag. Setting it to
true will cause the return clause to only return unique rows. In addition, the returnDistinct
method was added to the query interface as a shortcut to return(..., { distinct: true }).
fix #90

:tada: This PR is included in version 4.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[DOC] Add examples to docstrings

Describe the issue linked to the documentation

Improve the initial package documentation by adding examples to the docstrings.

This was completed for the skbase.validate module. Will work to incorporate it in other modules prior to release v0.5.0.


usb: Use composite equipment codes as universal codes for enumeration

Summary
The enumeration process in each class driver is similar. Extracting the common enumeration process code to composite.c can reduce redundant code. In this PR, only the adb class has been modified, and it will be applicable to all classes in the next PR.
Impact
usb enumeration
Testing
sim:usbdev and bes board

I don't think coupling USB device class logic with composite device logic is a good idea. These are two separate functionalities, and device class logic should not depend on composite logic.
Why not move the common USB device logic to a separate file, private for drivers/usbdev e.g. usbdev_common.c/usbdev_common.h ?

I don't think coupling USB device class logic with composite device logic is a good idea. These are two separate functionalities, and device class logic should not depend on composite logic.
Why not move the common USB device logic to a separate file, private for drivers/usbdev e.g. usbdev_common.c/usbdev_common.h ?

Hi, raiden00pl:
I initially extracted the common code, but found that it was almost identical to the code in composite.c. Additionally, the main difference between composite and non-composite devices is that composite devices support multiple functions, which can be distinguished through configuration. Therefore, I felt that it was more appropriate to directly use composite.c.

Then composite devices and other USB devices should use common USB device logic. Now the code gives the impression that non-composite USB device is just composite device with one supported device - which is wrong and confusing.

Then composite devices and other USB devices should use common USB device logic. Now the code gives the impression that non-composite USB device is just composite device with one supported device - which is wrong and confusing.

so @raiden00pl  do you want to rename the current composite driver to a general name and let's composite driver forward the call to these common function?

Ok, let's do it in the next step.


Add fast non-serde ByteString parameters

We can make ByteStrings without using serde. While the slow path will require a scope, the fast path can make use of the *const u8 string that gets passed to the method.
At the same time, we should support #[string] &[u8] which could be a zero-copy version of ByteString that would be extremely useful for HTTP headers and values.

It would also make sense to add Cow and Vec parameters:

#[string(onebyte)] Cow<[u8]>
#[string(onebyte)] Vec<u8>


Sanitize repo simulator role names when writing

Description of the changes being introduced by the pull request:
Sanitize the role names in the repo simulator when dumping in a
directory the same way the ngclient does.
That's necessary because when testing fishy role names leads to an
error:
PermissionError: [Errno 13] Permission denied: '/.json'
Please verify and check that the pull request fulfills the following
requirements:

[ ] The code follows the Code Style Guidelines
[ ] Tests have been added for the bug fix or new feature
[ ] Docs have been added for the bug fix or new feature

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
4030

Relevant Lines:
4114

💛  - Coveralls

alternatively could sanitize the delegated rolename when writing the file like client does (quoted_role = parse.quote(role, ""))

Well it just happened that I did the same thing yesterday: dc908eee52dcf2b66dcd38eb54c972a2b3e17ec2
(without the part in test_updater_with_simulator.py)

@sechkova I am sorry it happened that way, I haven't read #1689 and didn't notice that.
I will drop this commit and leave only the commit related to the error.

Bad timing on both sides 🤷 Can you have a look at my commit before dropping yours? Maybe I've missed something.

Bad timing on both sides 🤷 Can you have a look at my commit before dropping yours? Maybe I've missed something.

I just had a look and yours seems to cover what I did here, so don't worry.

I updated the code by using what @jku suggested.
Additionally, the commit and pr descriptions were changed together with the pr title.

This commit does not do what the message says.

It url encodes role names that do not need sanitizing (but does not url encode the delegated role names that could need it)
Then it skips dumping metadata for roles that actually would need sanitizing if they were used as filenames?

I changed the code to dump the delegated roles and removed the code where I skipped dumping.


developer experience: ask Android 10 developer to create root folder for testing TS

Android 10 can't create directories off root, hence αWallet can't create a top level AlphaWallet directory for users to through in test TS files.
We should

Modify the developer's guide to ask them to create a top-level AlphaWallet directory if there isn't one on the root level.

Modify αWallet Android so that it checks if such a folder exist - if it does, scan it for TokenScript.

Give user some visual hints that an AlphaWallet directory is found and is at work. e.g. having an extra menu item in "Settings" where, if the user clicks it, the user gets a list of TokenScript files in that directory, together with the status if they are recognised (in the case the user dropped a random XML file in it).

The original problem, reproduce: A developer might:

Double-click a tokenscript xml file in Android. open it with αWallet.
Now the developer isn't sure if αWallet has successfully taken it in. He looks for a place to see the list of TS files at work. So he goes to Settings.
Not seeing anything there, he Google for the cached TS location, and found Android/data/io.stormbird.wallet/files or check root directory "AlphaWallet" folder, butboth turn out empty.
He Double-click a tokenscript xml file in Android again. At this point he is frustrated.

Normally this would not happen because the developer would have seen changes to the token view. But if for some reason the XML file failed to work, e.g. the developer simply acquired the wrong token or downloaded the TS file for a token that he doesn't have or care, it's pretty hard to tell if 𝑎) tokenscript file loaded but not in the expected way 𝑏) tokenscript file isn't taken in to cache

Let's make it work in Android first then reässign this issue to Sangalli to update developer document.

@colourful-land why does reässign have umlauts? Is this a new AlphaWallet tradition? Or is there a subtle difference in meaning between reassign with and without umlauts?


VNC Server Version

VNC Server Version
Summary by Sourcery
New Features:

Introduce a basic VNC server setup script using QEMU for macOS virtualization.

Thanks, but this is already integrated into basic.sh with the HEADLESS=1 argument.


Use int_fast64_t in C++11 and greater

Thanks! Would you like your name added to the AUTHORS file at all?

Yes, you can add.