Interleaving SIMD code can be compiled to zip1.8h ARM instruction, but not zip2.8h

Description
IRGen produces LLVM IR that LLVM was unable to optimize down to a zip2.8h instruction. However, zip1.8h works just fine.
Reproduction
// Compiled with:
// - xcrun swiftc --target=arm64-apple-macos12 -emit-assembly -O ./minimal_demo.swift
// - xcrun swiftc --target=arm64-apple-macos12 -emit-sil -O ./minimal_demo.swift
// - xcrun swiftc --target=arm64-apple-macos12 -emit-ir -O ./minimal_demo.swift

/// A function which uses the `zip1.8h` ARM instruction to interleave the first halves of the *last* 4 elements of `a`
/// with the latter halves of the *last* 4 elements of `b`, to produce a new 8 element vector.
/// The *first* 4 elements of `a` and `b` are ignored.
@inline(never) // Just so we can see these instructions in isolation
func zip1_8h(_ a: SIMD8<UInt16>, _ b: SIMD8<UInt16>) -> SIMD8<UInt16> {
	// Disassembly of SIMDPlayground`zip1_8h(_:_:):
	//     0x100003edc <+0>: zip1.8h v0, v0, v1
	//     0x100003ee0 <+4>: ret
	return SIMD8<UInt16>(
		a[0], b[0],
		a[1], b[1],
		a[2], b[2],
		a[3], b[3]
	)
}

/// A function which should the `zip2.8h` ARM instruction to interleave the first halves of the *first* 4 elements of `a`
/// with the latter halves of the *first* 4 elements of `b`, to produce a new 8 element vector.
/// The *last* 4 elements of `a` and `b` are ignored.
@inline(never) // Just so we can see these instructions in isolation
func zip2_8h(_ a: SIMD8<UInt16>, _ b: SIMD8<UInt16>) -> SIMD8<UInt16> {
	// Disassembly of SIMDPlayground`zip2_8h(_:_:):
	//     0x100003ebc <+0>:  dup.8h v2, v0[4]
	//     0x100003ec0 <+4>:  mov.h  v2[1], v1[4]
	//     0x100003ec4 <+8>:  mov.h  v2[2], v0[5]
	//     0x100003ec8 <+12>: mov.h  v2[3], v1[5]
	//     0x100003ecc <+16>: mov.h  v2[4], v0[6]
	//     0x100003ed0 <+20>: mov.h  v2[5], v1[6]
	//     0x100003ed4 <+24>: mov.h  v2[6], v0[7]
	//     0x100003ed8 <+28>: mov.h  v2[7], v1[7]
	//     0x100003edc <+32>: mov.16b v0, v2
	//     0x100003ee0 <+36>: ret
	return SIMD8<UInt16>(
		a[4], b[4],
		a[5], b[5],
		a[6], b[6],
		a[7], b[7]
	)
}

let a = SIMD8<UInt16>(0, 2, 4, 6, 8, 0xA, 0xC, 0xE)
let b = SIMD8<UInt16>(1, 3, 5, 7, 9, 0xB, 0xD, 0xF)
//                    |   zip1.8h    |   zip2.8h   |

print(zip1_8h(a, b)) // Ignores 8...0xF
// SIMD8<UInt16>(0, 1, 2, 3, 4, 5, 6, 7)

print(zip2_8h(a, b)) // Ignores 0...7
// SIMD8<UInt16>(8, 9, 10, 11, 12, 13, 14, 15)

Expected behavior
The zip2_8h(_:_:) instruction should compile down to just:
zip2.8h v0, v0, v1
ret

Matching the way zip1_8h(_:_:) compiles down to zip1.8h.
Environment
swift-driver version: 1.115 Apple Swift version 6.0.2 (swiftlang-<IP_ADDRESS>.2 clang-16<IP_ADDRESS>)
Target: arm64-apple-macosx15.0
Additional information
The SIL code for these two functions is almost identical, with the only changes being:

Some integer constants differ (as expected)
Some lines are rearranged

However, the generated LLVM differs quite substantially. The IR for zip1_8h(_:_:):
; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(none)
define hidden swiftcc <8 x i16> @"$s12minimal_demo7zip1_8hys5SIMD8Vys6UInt16VGAG_AGtF"(<8 x i16> %0, <8 x i16> %1) local_unnamed_addr #4 {
entry:
  %2 = shufflevector <8 x i16> %0, <8 x i16> %1, <8 x i32> <i32 0, i32 8, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %3 = shufflevector <8 x i16> %2, <8 x i16> %0, <8 x i32> <i32 0, i32 1, i32 9, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %4 = shufflevector <8 x i16> %3, <8 x i16> %1, <8 x i32> <i32 0, i32 1, i32 2, i32 9, i32 poison, i32 poison, i32 poison, i32 poison>
  %5 = shufflevector <8 x i16> %4, <8 x i16> %0, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 10, i32 poison, i32 poison, i32 poison>
  %6 = shufflevector <8 x i16> %5, <8 x i16> %1, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 10, i32 poison, i32 poison>
  %7 = shufflevector <8 x i16> %6, <8 x i16> %0, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 11, i32 poison>
  %8 = shufflevector <8 x i16> %7, <8 x i16> %1, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 11>
  ret <8 x i16> %8
}

Here's the IR for zip2_8h(_:_:):
; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind willreturn memory(none)
define hidden swiftcc <8 x i16> @"$s12minimal_demo7zip2_8hys5SIMD8Vys6UInt16VGAG_AGtF"(<8 x i16> %0, <8 x i16> %1) local_unnamed_addr #4 {
entry:
  %2 = shufflevector <8 x i16> %0, <8 x i16> poison, <8 x i32> <i32 4, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %3 = shufflevector <8 x i16> %2, <8 x i16> %1, <8 x i32> <i32 0, i32 12, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %4 = shufflevector <8 x i16> %3, <8 x i16> %0, <8 x i32> <i32 0, i32 1, i32 13, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %5 = shufflevector <8 x i16> %4, <8 x i16> %1, <8 x i32> <i32 0, i32 1, i32 2, i32 13, i32 poison, i32 poison, i32 poison, i32 poison>
  %6 = shufflevector <8 x i16> %5, <8 x i16> %0, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 14, i32 poison, i32 poison, i32 poison>
  %7 = shufflevector <8 x i16> %6, <8 x i16> %1, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 14, i32 poison, i32 poison>
  %8 = shufflevector <8 x i16> %7, <8 x i16> %0, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 15, i32 poison>
  %9 = shufflevector <8 x i16> %8, <8 x i16> %1, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 15>
  ret <8 x i16> %9
}

Notice several large differences:

The first shufflevector call is shuffling between <8 x i16> %0 (a) and <8 x i16> poison, rather than <8 x i16> %0 (a) and <8 x i16> %1 (b`)
The first shufflevector call is only filling in the first element (from index 4), rather than the first two (indices 4 and 12)
Because of that last point, there's now 8 shufflevector calls, instead of just 7.

These are easier to see in the visualization below. I show the consecutive applications to shufflevector. The left column contains the results of shuffling two vectors above. The blue regions are the a input vector, and the red are b.

zip1.8h
sub-optimal zip2.8h

Fixed zip2.8h

Here's the LLVM IR that corresponds to these changes:
  %2 = shufflevector <8 x i16> %0, <8 x i16> %1, <8 x i32> <i32 4, i32 12, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %3 = shufflevector <8 x i16> %2, <8 x i16> %0, <8 x i32> <i32 0, i32 1, i32 13, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %4 = shufflevector <8 x i16> %3, <8 x i16> %1, <8 x i32> <i32 0, i32 1, i32 2, i32 13, i32 poison, i32 poison, i32 poison, i32 poison>
  %5 = shufflevector <8 x i16> %4, <8 x i16> %0, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 14, i32 poison, i32 poison, i32 poison>
  %6 = shufflevector <8 x i16> %5, <8 x i16> %1, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 14, i32 poison, i32 poison>
  %7 = shufflevector <8 x i16> %6, <8 x i16> %0, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 15, i32 poison>
  %8 = shufflevector <8 x i16> %7, <8 x i16> %1, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 15>
  ret <8 x i16> %8

When compiled, it produces the zip2.8h arm instruction, just as expected.

Hey @stephentyrone, I saw that you wrote the shufflevector builtin (#36650), along with a bunch of the other SIMD stuff.
I was trying to investigate this myself, but I think I'm quite out of my depths. (I've never worked on the Swift compiler before, and I don't think this is necessarily the best first issue haha)
I found this part of swift::getBuiltinValueDecl which produces shufflevector IR instructions, but I can't for the life of my find out when this would get called. I.e. this code responds to BuiltinValueKind::ShuffleVector, but I can't find any code that actually sets that provides that value anywhere.
https://github.com/swiftlang/swift/blob/fcd6985c531da7c8f44804b67f842a14a95f121f/lib/AST/Builtins.cpp#L3107-L3109
Do you have any advice for what I should look at? Is my diagnosis in the main post correct?

for reference, the relevant forum post regarding this issue is here: https://forums.swift.org/t/simd-code-wont-produce-zip2-8h-but-zip1-8h-works-fine/75825
i will also note here that the examples appear to produce the expected zip2.8h instruction if the 'InstCombine' LLVM optimization is not run on the IR. this can be seen by compiling the examples with either the -Xfrontend -disable-llvm-optzns or -Xllvm -instcombine-max-iterations=0 options.


object has no attribute 'rate_limit_delay'

Version of the custom_component
2023.11.1
Configuration
Describe the bug
Govee integration won't connect
Debug log

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 10:50:33 AM (5 occurrences)
Last logged: 3:12:08 PM

Error setting up entry govee for govee
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/govee/__init__.py", line 67, in async_setup_entry
    await hub.rate_limit_delay()
          ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Govee' object has no attribute 'rate_limit_delay'. Did you mean: 'rate_limit_reset'?

Also getting this. Just updated to latest HA.

Also getting this. Just updated to latest HA. Is anyone even maintaining this any more? Guess I need to drop all my Govee stuff...

You might want to try the govee2mqtt addon. That seems to be working but requires mqtt broker.

I had similar impact with the mqtt integration that I do with the rate limiting issue... The mqtt version doesn't seem to publish updates as fast as would be ideal for reactive automations.


[SPARK-9649] Fix flaky test MasterSuite - randomize ports

Error Message

Failed to bind to: /<IP_ADDRESS>:7093: Service 'sparkMaster' failed after 16 retries!
Stacktrace

      java.net.BindException: Failed to bind to: /<IP_ADDRESS>:7093: Service 'sparkMaster' failed after 16 retries!
      at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
      at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:393)
      at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:389)
      at scala.util.Success$$anonfun$map$1.apply(Try.scala:206)
      at scala.util.Try$.apply(Try.scala:161)

Merged build triggered.

Merged build started.

Test build #39893 has started for   PR 7968 at commit fcc42ef.

Test build #39893 has finished for   PR 7968 at commit fcc42ef.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

LGTM. Merging to master and branch 1.5.


Removing a reaction doesn't remove it from the UI

I'm gonna call this one fixed, seems like this was a one time thing


Enable Windows OVS Container to run on pristine Host Environment

Describe the problem/challenge you have

[x] 1.To Support installation of signed ovs kernel driver from inside container
[x] 2.To Support OVS container to run on the clean host environment. OVS directories and dependencies should be created from inside container .
[ ] 3.Enable ovs container support in all windows containerd CI pipeline.
[x] 4.To reduce ovs image size by using different base image.
[ ] 5.To Handle upgrade scenarios

Describe the solution you'd like

OVS will run inside container on a clean host environment
Anything else you would like to add?

For upgrade scenarios , the use cases being verified are:

User is currently running ovs on host and wants to upgrade directly to ovs containerisation with pristine host environment .
User is currently running ovs container with ovs userspace installed on the host i.e non-pristine host environment and wants to upgrade to ovs containerisation with pristine host environment .

For upgrade scenarios , the use cases being verified are:

User is currently running ovs on host and wants to upgrade directly to ovs containerisation with pristine host environment .

User is currently running ovs container with ovs userspace installed on the host i.e non-pristine host environment and wants to upgrade to ovs containerisation with pristine host environment .


Pin versions

What is the expected enhancement?
As the project grows we should start to stabilize the project. We found errors like #803 or #733 where pin versions can help us to prevent problems so I would like to propose start pinning versions in all the projects that we manage.

Makes sense. I assume the bot will still autoupdate pinned dependencies if they're pinned?

I'm not sure but I want to assume that too. Something that we will need to review 😂

WIth #901 this could potentially not needed so closing by now.


[c++] Only use /permissive- on VC++ 2017 and later

The original condition (NOT (MSVC_VERSION LESS 1900)) was triggering
for Visual C++ 2015 as well.

Visual C++ 2015 has a MSVC_VERSION of 1900.
Visual C++ 2017 has a MSVC_VERSION of 1910.

The original error was not caught, as it was causing the command line
warning "Command line warning D9002 : ignoring unknown option
'/permissive-'" to be emitted. The CI builds don't fail on these sort of
warnings. (The cl.exe switch /WX does not turn this warning into a
non-zero exit code.)

AppVeyor failure: timeout in VC++2013
Travis failure: #447

CI failures are both known problems unrelated to this pull request. LGTM.


Rendering artifact for textured streamline with varied radius

This issue is related to particular vertices.  Y is negative number.
I narrow down to 2 vertex (x, y, z, radius):
[37407.6 -151282 0 821.25 ; 37340.5 -151306 17656.4 821.25]
Here are my codes to produce problem (no fixture):
       ldata = ospNewData(nvert, OSP_FLOAT3A, vertex);
       ospCommit(ldata);
       ospSetData(mLine, "vertex", ldata);
       ospRelease(ldata);
       ldata = ospNewData(nvert, OSP_FLOAT, radius.data());
       ospCommit(ldata);
       ospSetData(mLine, "vertex.radius", ldata);
       ospRelease(ldata);
   float colors[] = {
     1.f, 0.f, 0.f, 1.f,
     1.f, 0.f, 0.f, 1.f,
   };
   ldata = ospNewData(2, OSP_FLOAT4, colors);
   ospCommit(ldata);
   ospSetData(mLine, "vertex.color", ldata);

Hopefully, you can reproduce this bug.

Hi,
using the 4th component of a vec3fa for the radius does not work yet for "streamlines" (it works for "spheres", and we are currently working on making this more general). The radius is taken from the radius array (a std::vector<float> in your code snippet?).
If this clarification did not address your issue, can you please say what you expect, and maybe add a screenshot of the artifacts?
Best regards,
Johannes

johannes, he is setting vertex.radius array explicitly.  I tried to replicate his code but with different vertex positions (didn't want to figure out a correct camera).  I will try it again with his vertex positions, though I'm not sure why that should matter.  Possibly it would affect an epsilon.

I put your code snippet in as best as I could figure out into our existing testing suite
in tests/sources/ospray_test_geomoetry.cpp under ::getStreamlines().  It seems to run fine, what is the exact issue you are running into with this?
“
float vertex[] = {
2.0f, -1.0f, 3.0f, 0.0f, 0.4f, 0.5f, 8.0f, -2.0f, 0.0f, 1.0f, 3.0f, 0.0f};
float color[] = {
0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f};
int index[]   = {0, 1};
float radii[] = {.1f, .3f, .5f};
int nvert         = 2;
OSPGeometry mLine = ospNewGeometry("streamlines");
OSPData ldata     = ospNewData(nvert, OSP_FLOAT3A, vertex);
ospCommit(ldata);
ospSetData(mLine, "vertex", ldata);
ospRelease(ldata);
ldata = ospNewData(nvert, OSP_FLOAT, radii);
ospCommit(ldata);
ospSetData(mLine, "vertex.radius", ldata);
ospRelease(ldata);
ldata = ospNewData(2, OSP_FLOAT4, color);
ospCommit(ldata);
ospSetData(mLine, "vertex.color", ldata);
ospRelease(ldata);
ospSet1f(mLine, "radius", 0.5f);
ldata = ospNewData(2, OSP_INT, index);
EXPECT_TRUE(ldata);
ospCommit(ldata);
ospSetData(mLine, "index", ldata);
ospRelease(ldata);
ospCommit(mLine);
return mLine;
“
this code returns the following image.  Note that I did not use your exact vertex positions because I’m not sure what camera setup you
were using, and I did not want to throw that into the mix.

Rendering like a ghost tube.

I guess, it is related to the big negative "Y".  Please use the vertices I put in this issue.

I see thanks Jim.  To be clear, does this still show up without the volume?

Yes.  I isolated problem to just use that 2 vertices streamline without anything else.  Noticed that the radius was the same for these 2 vertices.

Hi,
in OSPRay v2 we considerably changed the implementation of streamlines (now "curve"). I cannot reproduce the issue, below a rendering with the faulty vertices from you ([37407.6 -151282 0; 37340.5 -151306 17656.4] radius 821.25):

So, please reopen if the problem still exists.


Clean up Wurstpack

I propose a clean up of the Wurstpack, now that we have the Import-tool and native mpq editor.
The 3 MPQ-Editors can be removed as well as the objectmerger, w3err and other non-functional modules.
Ideally the other grimoire tools like Tilesetting should be replaced too.

It's pretty clean now


Create a button in palette for all schema

Automatically detects all schema and creates a button to open the widget for a given schema.

Developer's Certificate of Origin 1.1
   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

Hmm.  The plurality is off.  Since namespace names are plural and schema names are singular, I wonder if the namespace name is what is wanted here anyway.  Since 2 of the 3 are single-schema namespaces, they just work.  The other would should KFP and AIrflow "runtimes" leaving the headings with...
Show Code Snippets
Show Runtime Images
Show Runtimes
Actually, the namespace names are lowercase and values like "code-snippets", "runtime-images" and "runtimes".  So this is another great example of promoting namespaces to full objects where they too could have display_name values - leading to what I showed above (with proper case and spacing).  Until then, I don't think this is going to fly, unfortunately.

@kevin-bates What if we add 'Widget' after each of them? So "Show Code Snippet Widget" or "Show Runtime Image Widget"

To show a "widget" sounds odd to me.
Also, I think we should forgo using display_name from the schema because its more of an application property defined in the schema.  Instead, we added title everywhere and that's what should be used here instead.  When dealing with metadata instances you would reference display_name.

@kevin-bates Yeah good point - maybe "browser"?

How's this look? I made it so that it uses the title by default but if there's a uihints.title it'll use that instead.

Ok while working with this I figured it might be good to also implement that "Close tab" ability for metadata viewers in the left side pane since they can really add up and now it's easy to reopen any of them. Just pushed those changes but if you don't think it's good with this PR I can undo that. Thoughts?

Just added a small change so that it won't show the "Close tab" option for code snippets or runtimes (because they're supposed to be more permanent). It was causing a small bug of creating a generic metadata widget for code snippets (which doesn't include the coding languages in the display and doesn't include the insert / copy buttons).

So here's what the context menu looks like for code snippets / runtimes:

And here's the context menu for any other metadata schema present:


fieldProp.error is sometimes a plain string, sometimes an array of string

Hello,
I originaly implemented validation as synchronous in my redux-form. I discovered on the occasion that contrary to what the documentation says, fieldProp.error is not a string but an array of strings (which makes sense because there can be multiple validation errors for one field). I even made a PR to DefinitelyTyped which was accepted and merged.
Suddenly I have to add some asynchronous validation to my form, so I replace 'validate' with 'asyncValidate', and change my validator so it returns a promise and not just an object. And guess what? Now I get a plain string and no longer an array of strings.
Is it expected? Am I doing something wrong? I'm using v5.3.1.

I can confirm that validate returns an array of string when asyncValidate returns a plain string.

Closing due to inactivity.
In case you still have problems, please open a formal bug report/feature request/docs improvement request.
Otherwise, please ask for help at StackOverflow.


BUGFIX: Links in the all pages view missing the documentation base link

When viewing the "Documentation Index" links do not point inside of the base link for the documentation. For example links will appear as http://example.com/en/docviewer/ rather than the expected http://example.com/dev/docs/en/docviewer/ resulting in a 404 when clicked if the base link is anything other than the site root.

Thanks


Add PhpdocToReturnTypeFixer

 /**
  * @return \My\Bar
  */
-function my_foo()
+function my_foo(): \My\Bar
 {}

[x] Mark as risky
[x] Require ^7.0
[x] Fix ^7.1 [void return, iterable]
[x] Fix ^7.2 [object type]
[x] Fix ^7.1 [nullable types]
[x] Config to fix scalar types, default to false because of unexpected results if stryct_types are enabled or not
[x] @return static => : self
[x] ~Config to overwrite existing mismatching types: PHPDoc wins~ can't do this, because FunctionNotation\ReturnTypeDeclarationFixer changes the output of this fixer
[x] Ignore mixed types
[x] Ignore generics and array of types
[x] Run before FunctionNotation\ReturnTypeDeclarationFixer #2207
[x] Run before Import\FullyQualifiedStrictTypesFixer #3276
[x] Run ~before~ integration test with FunctionNotation\VoidReturnFixer #2740
[x] Run after Phpdoc\PhpdocScalarFixer

Suggestions for the name of the fixer are welcome.

don't need this because FunctionNotation\VoidReturnFixer skips if return annotation is present

could you please add misc integrity test between them, so we won't hit the priority issue if one day one would change VoidReturnFixer to not skip on annotation ?

could you please add misc integrity test between them, so we won't hit the priority issue if one day one would change VoidReturnFixer to not skip on annotation ?

Didn't know about misc, wrote that comment because IntegrationTest failed.
Added.

It would be nice to do the same with parameter typehints. Do we want this fixer to handle those too? Or do we want a new fixer?

It would be nice to do the same with parameter typehints.

I skipped parameter typehints because PHP had them long time before return types, even for arrays.
I suppose that if a programmer wrote a good PHPDoc with object type hint, he/she also wrote it explicitely.
If so, the only [userful] types involved in such fixer would be:

scalar ones
callback, iterable, Closure (introduced recently)

For scalar ones, hell no please https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3640#discussion_r177972761.
For new ones, ok but it would add huge complexity for such little cases.

Do we want this fixer to handle those too? Or do we want a new fixer?

With above consideration, it would be a new fixer for me.

I still don't see the problem with scalar typehints (with strict types enabled).

I still don't see the problem with scalar typehints (with strict types enabled).

A lot of database abstraction layers don't strictly respect typing, or simply can't for example when returning an integer greater than 2^64-1.
I have experience on a lot of legacy apps where int/float typing is just a waste of time.

That doesn't mean no project would benefit from using them. You could still disable the fixer on those legacy projects. Anyway, do you think the code needed to implement such fixer would be very different from this one?

@keradus may we include this in the 2.12 milestone?

Yet, I dared to run this rule over repo. Effect? crash with fatal error. About what? Incompatible interfaces.
When there is annotation it's moved to singature, which is great.
But when there is no annotation or annotation is @inheritdoc, fixer can't do a thing, for which project is not running at all after changes.
While I strongly believe in value of this rule, having it in current form would bring IMO more harm than good, as it will automate only little piece of code asking user to adjust manually all the rest.

I followed the workflow you described in my projects, both new and legacy, and with non-trivial effort fixing the manual things I found a log of bugs/improvements.
You are right, this PR is not ready for automation, but I consider it ready to improve userland codebases and give more value than harm.
Stated this, I also agree on your POV and this PR shouldn't be merged as a production-ready feature.

I see 2 possibilities:
* freeze the PR until PHP CS Fixer will support context-aware rules (no ETA on that)
* create special, internal interface like ExperimentalFixerInterface, mark current fixer with it

I don't trust stalled/freezed features: only maintaners and the main developer are aware of the possible new feature, a lot of effort is required to keep it up to date, and no one gets value in the meantime.
I like your second proposal: all users can explore the feature, contribute, give feedbacks and ideas; or can also downvote it.
Either the feature will prosper or die, its future is reached much faster and better.

hide experimental fixers in readme

Little [OT] about this: ok to make experimental features "tricky" to enable, but why hiding them? Proper disclaimers are enough for me. If disclaimers are done right, everything can be put well visible.

but why hiding them?

because if we would decide to merge it, I would like to merge #2918
both are problematic from same point of view - they need context.
And we can get poor's men context by enforcing rule is executed in env that has access to whole project (and not only modified files) and composer autoloader, and even deps.
Super easy to achieve silly way, like in mentioned 2918, but one needs to know how to properly run such rule (eg installation via phar will always fail). benefit? we can fix every single method, even if it has no docs, but it's parent has docs.
but that silly way, without doing it properly, will break things like standard CI integration, execution rule from phar, having non-standard autoloader, caching, and so, and so - super bigger thing => that's the reason why not make this public, as it will break a lot in tool itself if one run rule like any other rule.

:+1: for an ExperimentalFixerInterface. I would still show the fixer in the main README, with an explicit note about why the fixer is experimental, just like with risky fixers.

Maybe we can add and start working on/with this in a nightly type of branch and releases? or maybe in the 3.0 branch?

If we don't show it in the README, I think almost nobody will know the fixer exists and use it, reducing chances users try it, report bugs, suggest improvements and maybe contribute some of them. Something that is not documented simply doesn't exist.

Actually I... agree.
And that's good alternative for me to "not merge until context is ready".
why?
we can merge, but not expose. We already maintain (eg all bc breakers with v3 would be applied, like for all other printers), but we will announce no sooner than we at least have damn good docs what it means it's experimental, how to use it, how to use it not, what's not working.
for that, we can merge, stop paying long-living PR debt, and start working on that docs in separated PR, that would be merged maybe in 2, 3 weeks, depends how fast one would do it.

Thanks @Slamdunk :tada: :100:

experimental feature which risky level is so high, that one needs for sure to manually adjust code after fixer is executed. it's like changing the game here.


Add New Project :-

:- New Project - Amazon Clone  -:
It is a copy of  amazon website , which is an E-commerce shopping website
Issue Type:

[ ] Bug Report
[ ] Feature Request
[ ] Documentation
[x] New Project

Additional context
✔User-friendly interface
✔Hover Effect on Different Products
✔Testimonials
✔Footer
Screenshots
Screenshot of Project :-
Page 1 -

Page 2 -

Please assign this issue to me under SSOC'23

@TusharKesarwani please assign this issue to me so that I can work on it.

@TusharKesarwani @harshit-paneri @zugzwang03 please assign this issue to me.


Multidc use specific loadbalancerip

Q
A

Bug fix?
no

New feature?
yes

API breaks?
no

Deprecations?
no

Related tickets

License
Apache 2.0

What's in this PR?
Adding type LoadBalancerIP for the vault crd
Why?
Selecting a specific loadbalancerIP is sometimes necessary. In case of multiple metallb pools and firewall configuration requirements.
Additional context
Did test the setup. The setting of the loadbalancerIP of worked. I did experience TLS issues following normal documentation. I did got this fixed by adding:
  tlsAdditionalHosts:
    - vault-secondary
    - vault-secondary.default
    - vault-secondary.default.svc.cluster.local
    - vault-tertiary
    - vault-tertiary.default
    - vault-tertiary.default.svc.cluster.local
    - <IP_ADDRESS>  # (lb dc2)
    - <IP_ADDRESS>  # (lb dc1)

the code automatically added the executing external loadbalancerLB IP of the respective master instance to the SANs accordingly.
the secondary and tertiary node were provided with:
    - name: VAULT_RAFT_CACERT
      value: /vault/raft-tls/ca.crt

  existingTlsSecretName: vault-primary-tls

  volumes:
    - name: vault-primary-tls
      secret:
        secretName: vault-primary-tls
    - name: vault-tls
      secret:
        secretName: vault-primary-tls

additionally, to get rid of internal TLS issues this setting was added to all instance cr definitions (cr-primary,secondary,tertiary)
    - name: VAULT_CACERT
      value: /vault/tls/ca.crt

Checklist

[X] Code meets the Developer Guide

To Do

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Olmo Rupert seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

I don't see how this change is failing a deployment of cr-raft.yaml

@bonifaido Hi i rebased the commits, thanks.


Transitioning from ng1 using angular-avatar, handling ngUpgrade downgradeComponent situation

It's not immediately clear how to use this with ngUpgrade, as usually 3rd party components provide the component itself, not a module.
That way, I can use that component in entryComponents, and declare this code in my AppModule:
	public ngDoBootstrap() {
		angular.module('').directive('fields', downgradeComponent({
			component: FieldsComponent
		}) as angular.IDirectiveFactory);
	}

I tried this PR (https://github.com/HaithemMosbahi/ngx-avatar/pull/48) but the problem is that if I export the component separately, it seems to be an issue:
Component is part of the declaration of 2 modules
How can I easily solve this?

Relevant PR?
https://github.com/HaithemMosbahi/ngx-avatar/pull/48

Hi,
I am not sure I understand the issue here ! This component was not implemented for ng1, it's for Angular 2+.
The pull request that you mentioned is meant for supporting Angular Elements and not NgUpgrade

angular-avatar is a completely different library

angular-avatar is a completely different library

I'm aware of that, just giving you background

This component was not implemented for ng1, it's for Angular 2+.

ngUpgrade allows a situation where you don't have to implement a component for ng1 at all, it just works.
https://angular.io/api/upgrade/static/downgradeComponent
Because you're hiding everything in a module, it makes it very difficult to get at the component. This is about adhering to angular 2 design principles, it shouldn't require any knowledge of ng1.
Look, I forked your demo, to show you:
https://stackblitz.com/edit/ngx-avatar-demo-obfbwn

Now I understand the problem, the AngularComponent class is needed in order to be able to downgrade it and use it ing ng1.
I will export AvatarComponent class in the next version

fixed in version 3.5.0

Not fixed, I get this error now:

Type AvatarComponent is part of the declarations of 2 modules: AvatarModule and AppModule! Please consider moving AvatarComponent to a higher module that imports AvatarModule and AppModule. You can also create a new NgModule that exports and includes AvatarComponent then import that NgModule in AvatarModule and AppModule

Unless you expect that I do what that error suggests... seems like major overkill for such a minor library though. I don't think requiring developers to do that is a good move, just adds unnecessary complexity to codebases


Update L10N resource files on 4.5 branch with 4.5 translation strings…

… from Transifex (20150814)

label.local.storage.enabled is removed from multiple languages, but added to one. Is that right?

Yes it's right, the original string has been changed, so the (old) translation has been removed on Transifer.
Long version:

Cloudstack has now 2 new options on wizard for the local storage (one for user vm and one for system vm)
The primary language words for label.local.storage.enabled has been changed (old version was more shorter that the new, i.e. the mention to "user vm")
So, when I have uploaded the source language to transifex, this last has removed all translations of this key.
Fr or pt_BR (here) translators has (re)translated the key since the upload, so, you have a new string for theses languages
But currently, the others languages doesn't have been (re)translated to bring the new version with the user vm mention.

LGTM

LGTM

I merged this only to 4.5. I though merge to master is not required based on #699. Let me know if this needs to go to master as well.

Thanks for the merge.
yes not necessary, the PR #699 make the works for master branch.


convert keras model to tvm error

When I convert a keras model to tvm， an error occur:
Traceback (most recent call last):
File "traffic_cnn_keras_tvm_dbg.py", line 225, in
mod, params = relay.frontend.from_keras(keras_model, shape_dict)
File "/home/yyh/3rdparty/tvm/python/tvm/relay/frontend/keras.py", line 821, in from_keras
zip_node = zip(node.node_indices, node.tensor_indices, node.inbound_layers)
TypeError: zip argument #1 must support iteration
My code:
`x = np.ones([1, 1, IMAGE_SIZE, IMAGE_SIZE])
shape_dict = {'conv2d_input': x.shape}
mod, params = relay.frontend.from_keras(keras_model, shape_dict)
compile the model
target = 'cuda'
ctx = tvm.gpu(0)
with relay.build_config(opt_level=3):
executor = relay.build_module.create_executor('graph', mod, ctx, target)
graph, lib, params = relay.build_module.build(mod, target, params=params)
lib.export_library("./deploy_lib.so")
print('lib export succeefully')
with open("./deploy_graph.json", "w") as fo:
fo.write(graph.json())
with open("./deploy_param.params", "wb") as fo:
fo.write(nnvm.compiler.save_param_dict(params))
`

Thanks for reporting the problem, the community uses https://discuss.tvm.ai/ as a way to collective resolve these questions. Please open a new troubleshooting thread there


[x] toolbar
[x] keyboard
[x] markdown support
[x] compat editor test

features
markdown
微信公众号
知乎
掘金富文本
简书

italic
✅
✅
✅
✅
✅

current  <=> 知乎  ✅
current <=> 微信公众号  ✅
current -> 掘金 ❌
掘金 -> current  ✅
current -> 简书  ❌
简书 -> current ✅
掘金 <=> 简书  ✅

掘金，简书 不识别  标签

In earlier versions of the HTML specification, the  element was merely a presentational element used to display text in italics, much like the  element was used to display text in bold letters. This is no longer true, as these tags now define semantics rather than typographic appearance. A browser will typically still display the contents of the  element in italic type, but is, by definition, no longer required to do so. To display text in italic type, authors should use the CSS font-style property.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i#usage_notes

改用 tag “i” 渲染，暂时以此兼容，后续看要不要出个兼容模式使用旧tag

简书有丢失空格的现象


If the time runs up, I lose.

Couldn't be completed since we lost a group member in the beginning.
Please find further explanation in the group report.


Create README under teaching

few thoughts; ignore the first sentence of course

Thanks for this, @robfatland!

I assume this is ready to merge?

fine by me :)


Add documentation for the build command

When I was trying to figure out to rebuild, I expected to find the command using neon help. Apologies if I missed existing documentation in another location.

r+

r+
Thanks for this PR! :D
In https://github.com/neon-bindings/neon-cli/pull/33 @jedireza proposed some workflow improvements and I think we may want to eventually nudge users towards using npm as the main workflow. But that will take some additional changes to the CLI and for now this is less confusing than using npm install to build. Thanks!


[pods] - Update keywords and icons for kits

The goal of this ticket is to go through all of the existing kits and create a list of updated keywords for the package.jsons and list of icons that will be show on the kit cards.

It would probably be best to create a new google sheet to organize all of this data.
When you are done, share that document with Dustin to get reviewed.
Acceptance criteria

[x] Go kit by kit to create a list of updated keywords in the package.json files
[x] Go kit by kit to determine what the complete list of icons should be
[x] Send this list to Dustin to review for each of kit's keywords and icons

Here is the Google Sheet with the updated keywords and icons for review.
Based on the current work are lost keyword count is 5 and the highest is 7. We have 10 5's, 7 6's, and 2 7's for keyword count.

Addressed feedback and am closing as it has been finished


[Component] Formfield

### Tasks

Hey @aycil-alican
We've just made an adjustment on the colour of the * required star:
As reported here the * is not visible enough.
Solution
Adjust the colour
❌ current: onSurface / Dim 3

✅ desired: onSurface / Dim 1

@turolopezsanabria Do we have a final decision on title font? There was a issue on Figma.

Answer: Body 2

There wasn't disable/enable attribute for checkbox group component. Consumer was disabling checkboxes one by one in group component. I also added isEnabled parameter to checkbox group uikit component to disable and enable all checkboxes at same time with this task.

to test: component/formfield_782, Formfield UIkit side was developed according to Figa File. There is a disable issue for checkbox group. It isnt releated with Formfield. I fixed this issue with different task. (https://github.com/orgs/adevinta/projects/4/views/19?pane=issue&itemId=57535532#:~:text=group disable issue-,%23864,-Edit)

Hey @aycil-alican , based on the checklist, here are my remarks :

checkbox group does not work (I'm not able to check / uncheck) --> fixed in this ticket
unwanted space in front of horizontal radio button group --> handled in this ticket

Remains the design testing session !

@aycil-alican quick summary about Formfield UI kit :

all bugs listed in the testing gsheet are fixed ✅
there is a weird behavior on radio button UI kit (see video below) but you told me this is not a bug : there is no scrollview on the radio button default so when items are not fit the screen we cant see them properly.

https://github.com/adevinta/spark-ios/assets/142396647/1eec9aa5-05ea-4ccd-b19e-08d0d4eaf44c
@adevinta/spark-design --> Formfield UI kit is ready for design review !

Holo @aycil-alican, when Title is an Attribute Text the Mandatory * change the line-height of the Title (maybe is something irrelevant if this attribute is just an example. It would also be nice not display an Error text on the example)
https://github.com/adevinta/spark-ios/assets/81374770/afe6d2df-04f5-4928-a496-c1b9191d765b

✅ Done the review from Design.
I only saw things on the demo that can be improved (but aren't related to the component):

Selecting component Basic and Fill screen, the demo breaks.
Selecting Horizontal radio or checks and changing props the label of the second item breaks.
Single Radio Button it’s something not possible to do on a form.

@ChrisDesignOps Thanks for the review;

Holo @aycil-alican sorry for my delayed answer.
Them from design it's ok to publish the component. Thx!


Changed the data type from Int to NSNumber

As Xcode returns timeStartedRecording, timeStoppedRecording as NSNumber instead of Int I have changed the data type now its working perfectly in Xcode9-beta4

Thanks.


make the "messages" panel scrollable when the messages don't fit in

https://github.com/oVirt/ovirt-web-ui/pull/104


subsys: fb: add support for generating CFB font headers from TrueType/OpenType/image files

Add script and cmake functions for automatically generating Character Frame Buffer (CFB) font header files from image files, TrueType, or OpenType font files.
Also add a sample application for demonstrating automatic generation of font header files at build time.

The patch is not specific to the reel_board. It should work for any board with a display supporting the framebuffer subsystem (but I have only verified it on a reel_board).
I agree that the added dependency is unfortunate. The “reel_board demo” is in the tree but does not add any new build dependencies.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@0757b61). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #11224   +/-   ##
=========================================
  Coverage          ?    53.1%
=========================================
  Files             ?      218
  Lines             ?    26883
  Branches          ?     5952
=========================================
  Hits              ?    14277
  Misses            ?    10172
  Partials          ?     2434

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0757b61...9d89a0a. Read the comment docs.

Shippable fails due to the added dependency on Pillow.

@dbkinder I have reorganised the sample application a bit to make it less specific to the reel_board. I still do not have access to any other boards with onboard display, so the sample has only been validated with that board.

@pfalcon Thanks. I have reworded the commit messages as suggested.

@henrikbrixandersen: Thanks! Not familiar enough with that area to give +1, but dismissing my old review.

@SebastianBoe could you take a look at the CMake side of things?
@jfischer-phytec-iot @vanwinkeljan could you review the display/framebuffer code?

@dbkinder We currently only really have one requirements.txt, and I don't think we should consider splitting this up at this point just because an additional Python module is required.

Actually, I raised a question quite ago that requirements.txt should be split. Mere humans among us won't build documentation, so should not be burdened with the need to install such dependencies. And vice-versa, those who would be built, almost certainly will do that in virtualenv. So, now I need to go and edit (filter) requirements.txt manually to use it virtualenv (because tools for normal build come from OS packages at all, and I don't want to have sudden version jumps because something unneeded for docs got installed in venv).
So, single requirements.txt == more burden for everyone out there (and impressions that Zephyr does sloppy dependencies management).

@carlescufi ping

@henrikbrixandersen can you please rebase?

@carlescufi Rebased.

@henrikbrixandersen can you fix CI?

@jfischer-phytec-iot Did you notice the added python module dependency on Pillow?

@jfischer-phytec-iot ping?

@henrikbrixandersen Here is the script I used to to generate subsys/fb/cfb_fonts.c (I did not have time to improve it)


VIM support

Line wrap doesn't work properly in vim.
This can be reproduced by starting vim, then reducing the amount of columns (if none of the lines are wrapped) or increasing it (if some are).
@LucianBuzzo

@imsnif I've spent the afternoon looking through the code in this branch and I feel that the technical overhead of adding an external index is very high.
With the render cache POC on my xterm fork, this vim issue is already fixed, and we don't have problems like the buffer overflow exceptions I've reported on another issue, as well as a number of other things I've noticed.
I feel that our efforts would be best spent in tidying up the branch on my fork then working through the issues here.
What are your thoughts? I appreciate you've already put a great deal of effort into this current implementation.

Hey @LucianBuzzo - I very much know what you're talking about regarding the technical debt, as you can well see by the code. It is a very big pain. :)
I'm afraid though, that it is rather unavoidable. We've discussed similar solutions at the beginning of the PR around December - you can read more there if you'd like. The gist of it is that keeping an external cache might have performance implications, seeing as the buffer can be configured to be quite larger than its 1000 default lines.
In addition... maybe I don't understand fully, but wouldn't the render cache solution pose issues beyond one resize? As in:

First shrink terminal size so that lines are wrapped.
Then expand terminal size so that the same lines are unwrapped.
During the unwrapping stage, we wouldn't have access to the cache because it would be a different refresh. In order to solve this, we'd have to identify the wrapped characters somehow and deal with them accordingly within the lines array. This would carry with it its own technical debt as well, as you put it. My first PR to solve the linewrap issue implemented a similar solution (there I added a fourth cell to the character array to identify wrapped or padding characters). Discussing this with the xterm maintainers brought the external index solution.
Again - if this is addressed in your solution and I missed it - my apologies. I did only have a brief chance to glance over it and I really don't want to keep you.

So, please let me know what you think. I'm all for finding an easier and more quicker way - I've been trying hard to do so as I worked. :)
Thanks again for the help!

@imsnif Rather than keeping an external index or cache, the cache is generated per line in the renderer. If a line overflows the width, it's chunked into smaller pieces, and then the render cycle continues using those chunks instead of the terminal lines.
Once all of the chunks for a line are rendered it grabs the next consecutive line from the terminal.
The key to this is that the number of lines that gets rendered is independent of the line indeces:
This approach means that we only ever have to worry about calculating line wraps for the line that are actually being rendered (which is as simple as running a chunk method).
What the fork does need is a method of calculating the new scrollable height of the terminal and way of determining which direction to render from (if the prompt is at the bottom of the screen it should render in reverse), both of these are relatively simple fixes.

Try out the dev version of my fork :)

Hey @LucianBuzzo - I understand now.
This sounds good, and definitely seems like a more elegant (and easier!) solution.
I think we need to sell the xterm.js maintainers on it though, because we did have quite some discussions about it.
Would you mind commenting on the original PR? Maybe there's some issue here that we're not thinking about. If you have their blessings, I'd love to get into your fork and help out (if you don't finish it before I get the chance, of course :) ).
Great job!

So hey, @LucianBuzzo - just to be sure, can you link which fork/branch you'd like us to work in, in order for us not to make mistakes?
Also, regarding splitting the work. Wanna talk about it for a few? I've been fiddling around with fixing the scrolling. I saw you're dealing with the x positioning, right?
Want to start with those and then see what else we need?

hey @imsnif Here is the PR https://github.com/sourcelair/xterm.js/pull/609
Ideally I'd like to resolve issue 2 raised by mofux here https://github.com/sourcelair/xterm.js/pull/609#issuecomment-287019425
Other than that i'd like to get the code merged as is, so that we have a solution for the resize line destruction issue in the short/mid term.
Moving forwards I want to look at a more concrete fix that allows better scrolling. I've been looking at how emulators like iterm handle this issue https://github.com/gnachman/iTerm2/blob/master/sources/LineBuffer.h
Hopefully we can implement something similar, but I think it's probably going to involve a rethink of the entire line buffer, render process.


Add support for patching xarrays when creating datasets

Codecov Report
Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.96%. Comparing base (1c75729) to head (d2589d8).

Files with missing lines
Patch %
Lines

tests/xarray/test_zarr.py
66.66%
1 Missing :warning:

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #160   +/-   ##
========================================
  Coverage    72.96%   72.96%
========================================
  Files           10       10
  Lines          825      825
========================================
  Hits           602      602
  Misses         223      223

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


polysemy-plugin-<IP_ADDRESS> doesn't work

#46 points out that the example code doesn't work when built with stack. The stackage guys are mad at me because it's broken there too (https://github.com/commercialhaskell/stackage/issues/4572)
In my tests, downgrading polysemy-plugin to <IP_ADDRESS> seems to fix the problem.

If this is indeed the fix, it's jolly odd:
$ diff polysemy-plugin-<IP_ADDRESS> polysemy-plugin-<IP_ADDRESS>

diff polysemy-plugin-<IP_ADDRESS>/polysemy-plugin.cabal polysemy-plugin-<IP_ADDRESS>/polysemy-plugin.cabal
1,15c2,21
< name: polysemy-plugin
< version: -<IP_ADDRESS>
< license: BSD2
< license-file: LICENSE
< copyright: 2018 Sandy Maguire
< maintainer<EMAIL_ADDRESS>< author: Sandy Maguire
< homepage: https://github.com/isovector/polysemy#readme
< bug-reports: https://github.com/isovector/polysemy/issues
< synopsis: Disambiguate obvious uses of effects.
< description:
<     Please see the README on GitHub at <https://github.com/isovector/polysemy/tree/master/polysemy-plugin#readme>
< category: Polysemy
< build-type: Simple
---
>
> -- This file has been generated from package.yaml by hpack version -1.31.1.
> --
> -- see: https://github.com/sol/hpack
> --
> -- hash: b1f1b5ca3df4cb55d14d21f847975a2eb82809c4b569f214f7ff29a88bd9d65d
>
> name:           polysemy-plugin
> version:        -<IP_ADDRESS>
> synopsis:       Disambiguate obvious uses of effects.
> description:    Please see the README on GitHub at <https://github.com/isovector/polysemy/tree/master/polysemy-plugin#readme>
> category:       Polysemy
> homepage:       https://github.com/isovector/polysemy#readme
> bug-reports:    https://github.com/isovector/polysemy/issues
> author:         Sandy Maguire
> maintainer<EMAIL_ADDRESS>> copyright:      2018 Sandy Maguire
> license:        BSD2
> license-file:   LICENSE
> build-type:     Simple
20,22c27,28
<     type: git
<     location: https://github.com/isovector/polysemy
---
>   type: git
>   location: https://github.com/isovector/polysemy
24,39c31,43
<     exposed-modules:
<         Polysemy.Plugin
<     hs-source-dirs: src
<     other-modules:
<         Paths_polysemy_plugin
<     default-language: Haskell2009
<     default-extensions: DataKinds DeriveFunctor FlexibleContexts GADTs
<                         LambdaCase PolyKinds RankNTypes ScopedTypeVariables
<                         StandaloneDeriving TypeApplications TypeOperators TypeFamilies
<                         UnicodeSyntax
<     build-depends:
<         base >=3.7 && <5,
<         ghc >=7.6.3 && <8.7,
<         ghc-tcplugins-extra ==-1.3.*,
<         polysemy >=-<IP_ADDRESS> && <0.2
---
>   exposed-modules:
>       Polysemy.Plugin
>   other-modules:
>       Paths_polysemy_plugin
>   hs-source-dirs:
>       src
>   default-extensions: DataKinds DeriveFunctor FlexibleContexts GADTs LambdaCase PolyKinds RankNTypes ScopedTypeVariables StandaloneDeriving TypeApplications TypeOperators TypeFamilies UnicodeSyntax
>   build-depends:
>       base >=3.7 && <5
>     , ghc >=7.6.3 && <8.7
>     , ghc-tcplugins-extra >=-1.3 && <0.4
>     , polysemy >=-1.1
>   default-language: Haskell2009
41,59c46,64
<     type: exitcode-stdio-2.0
<     main-is: Spec.hs
<     hs-source-dirs: test
<     other-modules:
<         Paths_polysemy_plugin
<     default-language: Haskell2009
<     default-extensions: DataKinds DeriveFunctor FlexibleContexts GADTs
<                         LambdaCase PolyKinds RankNTypes ScopedTypeVariables
<                         StandaloneDeriving TypeApplications TypeOperators TypeFamilies
<                         UnicodeSyntax
<     ghc-options: -threaded -rtsopts -with-rtsopts=-N
<     build-depends:
<         base >=3.7 && <5,
<         ghc >=7.6.3 && <8.7,
<         ghc-tcplugins-extra ==-1.3.*,
<         hspec >=1.6.0 && <2.7,
<         polysemy >=-<IP_ADDRESS> && <0.2,
<         polysemy-plugin -any
---
>   type: exitcode-stdio-2.0
>   main-is: Main.hs
>   other-modules:
>       BadSpec
>       PluginSpec
>       Paths_polysemy_plugin
>   hs-source-dirs:
>       test
>   default-extensions: DataKinds DeriveFunctor FlexibleContexts GADTs LambdaCase PolyKinds RankNTypes ScopedTypeVariables StandaloneDeriving TypeApplications TypeOperators TypeFamilies UnicodeSyntax
>   ghc-options: -threaded -rtsopts -with-rtsopts=-N -fplugin=Polysemy.Plugin
>   build-depends:
>       base >=3.7 && <5
>     , ghc >=7.6.3 && <8.7
>     , ghc-tcplugins-extra >=-1.3 && <0.4
>     , hspec >=1.6.0 && <3
>     , polysemy >=-1.1
>     , polysemy-plugin
>     , should-not-typecheck >=1.1.0 && <3
>   default-language: Haskell2009

Diff between the two:
diff --git a/polysemy-plugin-<IP_ADDRESS>/polysemy-plugin.cabal b/polysemy-plugin-<IP_ADDRESS>/polysemy-plugin.cabal
index 2da2971..ed8c534 100644
--- a/polysemy-plugin-<IP_ADDRESS>/polysemy-plugin.cabal
+++ b/polysemy-plugin-<IP_ADDRESS>/polysemy-plugin.cabal
@@ -1,17 +1,23 @@
 cabal-version: 1.12
+
+-- This file has been generated from package.yaml by hpack version 0.31.1.
+--
+-- see: https://github.com/sol/hpack
+--
+-- hash: b2f1b5ca3df4cb55d14d21f847975a2eb82809c4b569f214f7ff29a88bd9d65d
+
 name:           polysemy-plugin
-version: <IP_ADDRESS>
-license: BSD3
-license-file: LICENSE
-copyright: 2019 Sandy Maguire
-maintainer<EMAIL_ADDRESS>-author: Sandy Maguire
-homepage: https://github.com/isovector/polysemy#readme
-bug-reports: https://github.com/isovector/polysemy/issues
+version:        <IP_ADDRESS>
 synopsis:       Disambiguate obvious uses of effects.
-description:
-    Please see the README on GitHub at <https://github.com/isovector/polysemy/tree/master/polysemy-plugin#readme>
+description:    Please see the README on GitHub at <https://github.com/isovector/polysemy/tree/master/polysemy-plugin#readme>
 category:       Polysemy
+homepage:       https://github.com/isovector/polysemy#readme
+bug-reports:    https://github.com/isovector/polysemy/issues
+author:         Sandy Maguire
+maintainer<EMAIL_ADDRESS>+copyright:      2019 Sandy Maguire
+license:        BSD3
+license-file:   LICENSE
 build-type:     Simple
 extra-source-files:
     README.md
@@ -24,36 +30,35 @@ source-repository head
 library
   exposed-modules:
       Polysemy.Plugin
-    hs-source-dirs: src
   other-modules:
       Paths_polysemy_plugin
-    default-language: Haskell2010
-    default-extensions: DataKinds DeriveFunctor FlexibleContexts GADTs
-                        LambdaCase PolyKinds RankNTypes ScopedTypeVariables
-                        StandaloneDeriving TypeApplications TypeOperators TypeFamilies
-                        UnicodeSyntax
+  hs-source-dirs:
+      src
+  default-extensions: DataKinds DeriveFunctor FlexibleContexts GADTs LambdaCase PolyKinds RankNTypes ScopedTypeVariables StandaloneDeriving TypeApplications TypeOperators TypeFamilies UnicodeSyntax
   build-depends:
-        base >=4.7 && <5,
-        ghc >=8.6.3 && <8.7,
-        ghc-tcplugins-extra ==0.3.*,
-        polysemy >=<IP_ADDRESS> && <0.2
+      base >=4.7 && <5
+    , ghc >=8.6.3 && <8.7
+    , ghc-tcplugins-extra >=0.3 && <0.4
+    , polysemy >=0.1
+  default-language: Haskell2010

 test-suite polysemy-plugin-test
   type: exitcode-stdio-1.0
-    main-is: Spec.hs
-    hs-source-dirs: test
+  main-is: Main.hs
   other-modules:
+      BadSpec
+      PluginSpec
       Paths_polysemy_plugin
-    default-language: Haskell2010
-    default-extensions: DataKinds DeriveFunctor FlexibleContexts GADTs
-                        LambdaCase PolyKinds RankNTypes ScopedTypeVariables
-                        StandaloneDeriving TypeApplications TypeOperators TypeFamilies
-                        UnicodeSyntax
-    ghc-options: -threaded -rtsopts -with-rtsopts=-N
+  hs-source-dirs:
+      test
+  default-extensions: DataKinds DeriveFunctor FlexibleContexts GADTs LambdaCase PolyKinds RankNTypes ScopedTypeVariables StandaloneDeriving TypeApplications TypeOperators TypeFamilies UnicodeSyntax
+  ghc-options: -threaded -rtsopts -with-rtsopts=-N -fplugin=Polysemy.Plugin
   build-depends:
-        base >=4.7 && <5,
-        ghc >=8.6.3 && <8.7,
-        ghc-tcplugins-extra ==0.3.*,
-        hspec >=2.6.0 && <2.7,
-        polysemy >=<IP_ADDRESS> && <0.2,
-        polysemy-plugin -any
+      base >=4.7 && <5
+    , ghc >=8.6.3 && <8.7
+    , ghc-tcplugins-extra >=0.3 && <0.4
+    , hspec >=2.6.0 && <3
+    , polysemy >=0.1
+    , polysemy-plugin
+    , should-not-typecheck >=2.1.0 && <3
+  default-language: Haskell2010
diff --git a/polysemy-plugin-<IP_ADDRESS>/src/Polysemy/Plugin.hs b/polysemy-plugin-<IP_ADDRESS>/src/Polysemy/Plugin.hs
index 2d70445..c51fb0f 100644
--- a/polysemy-plugin-<IP_ADDRESS>/src/Polysemy/Plugin.hs
+++ b/polysemy-plugin-<IP_ADDRESS>/src/Polysemy/Plugin.hs
@@ -1,5 +1,5 @@
-{-# LANGUAGE NoMonomorphismRestriction #-}
 {-# LANGUAGE CPP                       #-}
+{-# LANGUAGE NoMonomorphismRestriction #-}

 ------------------------------------------------------------------------------
 -- The MIT License (MIT)
@@ -92,42 +92,64 @@ module Polysemy.Plugin
   ( plugin
   ) where

--- external
-import GHC.TcPluginM.Extra (lookupModule, lookupName)
-
--- GHC API
+import Class
+import CoAxiom
+import Control.Monad
+import CoreMonad
+import Data.Maybe
+import DynFlags
 import FastString (fsLit)
-import Module     (mkModuleName)
+import GHC (ModuleName, moduleName)
+import GHC.TcPluginM.Extra (lookupModule, lookupName)
+import Module     (mkModuleName, moduleSetElts)
 import OccName    (mkTcOcc)
+import Outputable
+import TcPluginM  (TcPluginM, tcLookupClass)
+import TcRnTypes
+import TcSMonad hiding (tcLookupClass)
+import TyCoRep    (Type (..))
+import Type
+
 import Plugins    (Plugin (..), defaultPlugin
 #if __GLASGOW_HASKELL__ >= 806
     , PluginRecompile(..)
 #endif
     )
-import TcPluginM  (TcPluginM, tcLookupClass)
-import TcRnTypes
-import TyCoRep    (Type (..))
-import Control.Monad
-import Class
-import Type
-import Data.Maybe
-import TcSMonad hiding (tcLookupClass)
-import CoAxiom
-import Outputable

 plugin :: Plugin
 plugin = defaultPlugin
-    { tcPlugin = const (Just fundepPlugin)
+    { tcPlugin = const $ Just fundepPlugin
+#if __GLASGOW_HASKELL__ >= 810
+    , installCoreToDos = const installTodos
+#endif
 #if __GLASGOW_HASKELL__ >= 806
-    , pluginRecompile = const (return NoForceRecompile)
+    , pluginRecompile = const $ pure NoForceRecompile
 #endif
     }

+polysemyInternal :: ModuleName
+polysemyInternal = mkModuleName "Polysemy.Internal"
+
+polysemyInternalUnion :: ModuleName
+polysemyInternalUnion = mkModuleName "Polysemy.Internal.Union"
+
+installTodos :: [CoreToDo] -> CoreM [CoreToDo]
+installTodos todos = do
+  dynFlags <- getDynFlags
+  case optLevel dynFlags of
+    2 -> do
+      mods <- moduleSetElts <$> getVisibleOrphanMods
+      case any ((== polysemyInternal) . moduleName) mods of
+        -- TODO(sandy): install extra passes
+        True  -> pure todos
+        False -> pure todos
+    _ -> pure todos
+
 fundepPlugin :: TcPlugin
 fundepPlugin = TcPlugin
     { tcPluginInit = do
-        md <- lookupModule (mkModuleName "Polysemy.Internal.Union") (fsLit "polysemy")
+        md <- lookupModule polysemyInternalUnion (fsLit "polysemy")
         monadEffectTcNm <- lookupName md (mkTcOcc "Find")
         tcLookupClass monadEffectTcNm
     , tcPluginSolve = solveFundep
@@ -156,11 +178,25 @@ getEffName :: Type -> Type
 getEffName t = fst $ splitAppTys t

-mkWanted :: CtLoc -> Type -> Type -> TcPluginM (Maybe Ct)
-mkWanted loc eff eff' = do
-  if eqType (getEffName eff) (getEffName eff')
+-- isTyVar :: Type -> Bool
+-- isTyVar = isJust . getTyVar_maybe
+
+
+canUnify :: Type -> Type -> Bool
+canUnify wanted given =
+  let (w, ws) = splitAppTys wanted
+      (g, gs) = splitAppTys given
+   in (&& eqType w g) . flip all (zip ws gs) $ \(wt, gt) ->
+        if isTyVarTy gt
+           then isTyVarTy wt
+           else True
+
+
+mkWanted :: Bool -> CtLoc -> Type -> Type -> TcPluginM (Maybe Ct)
+mkWanted mustUnify loc wanted given = do
+  if (not mustUnify || canUnify wanted given)
      then do
-       (ev, _) <- unsafeTcPluginTcM $ runTcSDeriveds $ newWantedEq loc Nominal eff eff'
+       (ev, _) <- unsafeTcPluginTcM $ runTcSDeriveds $ newWantedEq loc Nominal wanted given
        pure $ Just (CNonCanonical ev)
      else
        pure Nothing
@@ -174,9 +210,9 @@ solveFundep effCls giv _ want = do
       case findMatchingEffectIfSingular e givenEffs of
         Nothing -> do
           case splitAppTys r of
-            (_, [_, eff', _]) -> mkWanted loc eff eff'
+            (_, [_, eff', _]) -> mkWanted False loc eff eff'
             _                 -> pure Nothing
-        Just eff' -> mkWanted loc eff eff'
+        Just eff' -> mkWanted True loc eff eff'

     return (TcPluginOk [] (catMaybes eqs))

diff --git a/polysemy-plugin-<IP_ADDRESS>/test/BadSpec.hs b/polysemy-plugin-<IP_ADDRESS>/test/BadSpec.hs
new file mode 100644
index 0000000..c826ea3
--- /dev/null
+++ b/polysemy-plugin-<IP_ADDRESS>/test/BadSpec.hs
@@ -0,0 +1,32 @@
+{-# LANGUAGE TemplateHaskell #-}
+
+{-# OPTIONS_GHC -fdefer-type-errors -fno-warn-deferred-type-errors #-}
+
+module BadSpec where
+
+import Polysemy
+import Test.Hspec
+import Test.ShouldNotTypecheck
+
+data KVStore k v m a where
+  GetKV :: k -> KVStore k v m (Maybe v)
+
+makeSem ''KVStore
+
+positivePos :: Member (KVStore k v) r => Sem r (Maybe v)
+positivePos = do
+  getKV "hello"
+
+negativePos :: Member (KVStore String v) r => Sem r (Maybe Bool)
+negativePos = do
+  getKV "hello"
+
+
+spec :: Spec
+spec = do
+  describe "incorrectly polymorphic constraint" $ do
+    it "should not typecheck in positive position" $ do
+      shouldNotTypecheck positivePos
+    it "should not typecheck in negative position" $ do
+      shouldNotTypecheck negativePos
+
diff --git a/polysemy-plugin-<IP_ADDRESS>/test/Main.hs b/polysemy-plugin-<IP_ADDRESS>/test/Main.hs
new file mode 100644
index 0000000..a824f8c
--- /dev/null
+++ b/polysemy-plugin-<IP_ADDRESS>/test/Main.hs
@@ -0,0 +1 @@
+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
diff --git a/polysemy-plugin-<IP_ADDRESS>/test/Spec.hs b/polysemy-plugin-<IP_ADDRESS>/test/PluginSpec.hs
similarity index 97%
rename from polysemy-plugin-<IP_ADDRESS>/test/Spec.hs
rename to polysemy-plugin-<IP_ADDRESS>/test/PluginSpec.hs
index fad29a0..4f1407d 100644
--- a/polysemy-plugin-<IP_ADDRESS>/test/Spec.hs
+++ b/polysemy-plugin-<IP_ADDRESS>/test/PluginSpec.hs
@@ -3,9 +3,7 @@
 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
 {-# LANGUAGE OverloadedStrings          #-}

-{-# OPTIONS_GHC -fplugin=Polysemy.Plugin #-}
-
-module Main where
+module PluginSpec where

 import Data.Functor.Identity
 import GHC.Exts
@@ -56,8 +54,8 @@ newtype MyString = MyString String
   deriving (IsString, Eq, Show)

-main :: IO ()
-main = hspec $ do
+spec :: Spec
+spec = do
   describe "State effect" $ do
     describe "get/put" $ do
       it "should work in simple cases" $ do

My guess is that I somehow broke this when trying to fix the stuff tested for in BadSpec, but that doesn't explain how I didn't notice! Maybe all of my other code has just been pinned to <IP_ADDRESS>?

I'm wondering if leftover files could have something to do with it? I was initially testing the template using stack and extra-deps IIRC and was able to build it - I can't remember though if I was doing that before or after the bump to <IP_ADDRESS>

Looks like the problem is the confluence of a few things.
We'd like this to not typecheck:
positivePos :: Member (KVStore k v) r => Sem r (Maybe v)
positivePos = do
  getKV "hello"

since you've said you have a KVStore k v, but you're using it as a KVStore String v. In this case, you're saying your type is more polymorphic than it is, and is obviously an error. Note that the opposite case is OK: it's fine use getKV with an ambiguous k here, if you have a Member (KVStore String v) constraint.
This change is the one that broke the example. I'm not sure why yet. But I added the canUnify function to determine this, so I assume it's subtly broken.
These next points are also relevant. Consider:
intState :: Member (State Int) r => Sem r ()

-- later
      run $ runState 0 intState

In this case, we'd like to use the type from intState is enough to convince GHC that 0 :: Int. Here the existing code says "this need not unify" by setting mustUnify = False. Setting mustUnify = True breaks this inference.
The example code in #46 currently gets run with mustUnify = False, but fails in that case. Setting mustUnify = True makes it work.

So there are two possible things going wrong here.

canUnify is wrong
The logic for determining mustUnify is wrong

Okay, I know what's going wrong. When mustUnify is False and there are multiple effects trying to be solved, the existing code will emit a wanted constraint for each effect:
-------------- Error CustomException
must it unify? False
want:
  Error CustomException
  e_aen7[tau:0]
it unified. want
  [WD] hole{co_aeq6} {5}:: Error CustomException
                           ~# e_aen7[tau:0] (CNonCanonical)
-------------- Lift IO
must it unify? False
want:
  Lift IO
  e_aen7[tau:0]
it unified. want
  [WD] hole{co_aeq8} {1}:: Lift IO ~# e_aen7[tau:0] (CNonCanonical)
-------------- Resource
must it unify? False
want:
  Resource
  e_aen7[tau:0]
it unified. want
  [WD] hole{co_aeqa} {4}:: Resource ~# e_aen7[tau:0] (CNonCanonical)
-------------- Error CustomException
must it unify? False
want:
  Error CustomException
  e_aen7[tau:0]
it unified. want
  [WD] hole{co_aeqc} {5}:: Error CustomException
                           ~# e_aen7[tau:0] (CNonCanonical)
-------------- Lift IO
must it unify? False
want:
  Lift IO
  e_aen7[tau:0]
it unified. want
  [WD] hole{co_aeqe} {1}:: Lift IO ~# e_aen7[tau:0] (CNonCanonical)
-------------- Resource
must it unify? False
want:
  Resource
  e_aen7[tau:0]
it unified. want
  [WD] hole{co_aeqg} {4}:: Resource ~# e_aen7[tau:0] (CNonCanonical)

essentially the plugin is asking for:
 (e ~ Error CustomException, e ~ Lift IO, e ~ Resource)

which can obviously never be satisfied.

I think the solution is to only let mustSatify = False when there is only a single given constraint.

Alas, it's not that simple. We see all of the constraints for a function at the same time, but those constraints might refer to different effect stacks. So the above is true, but crucially only when there is a single wanted constraint for a given effect stack.


No Footer in "SOS Report" page

Describe the bug
Footer is missing in “SOS Report” page
To Reproduce

Go to Website
Click on ‘SOS Report’
Scroll down
No Footer

Expected behavior
To have a FOOTER below
Desktop :

OS: Mac OS
Browser:Chrome

Screenshots

@PrajwalGraj  please assign this issue to me


coot/trailing bytes 2

network-mux: trailing bytes
ouroboros-network-framework & ouroboros-network: trailing bytes
ouroboros-consensus: trailing bytes

bors merge


Add user agent header

Added user agent when doing a request on the trezor servers since, apparently those servers require that header. Without this header "http error 403 - Forbidden" occurs.

please merge this one :)


Do not close the application on command + w

Hello There team,
I love what you guys created Lens gives me a much clear environment to work with my Kubernetes clusters. But there is one problem that needs to be fixed. When I use Command + W to close the terminal its closing the lens app. I think it should close terminals and if you hold it should close the lens app. This feature will prevent closing the lens app accident
What would you like to be added:
Please do not close the Lens app if the user uses Command + W instead close the terminal
Why is this needed:
The lens keeps closing when you use Command + W
Environment you are Lens application on:

Kubernetes distribution:
GKE
Desktop OS:
MacOs

Hello!
The same issue comes up on my end as well.  If possible, making this improvement will help stop accidentally closing the program as a whole.  I'm also on a MacOS working with Kubernetes on GKE.
Thank you!

This has been fixed if the terminal is currently focused.


Remove tznft tutorial

The tool at https://github.com/oxheadalpha/nft-tutorial is no longer maintained. Should we remove the tutorial that uses it? It's a niche tool and the tutorial has a lot of conceptual/task overlap with the other tow NFT tutorials (cf https://github.com/trilitech/tezos-developer-docs/issues/473).

OK for me, but I leave someone else to approve the removal.


JCGM 104:2009 (English version) review, continues #112

Differences noticed between the original and generated documents are listed below.

Cross-references to specific clauses, notes etc. of some external document differ. I believe we need square brackets here and it seems word "Clause" is not positioned properly, if it is needed at all.

Original:

Generated:

"Equation" is written with capital "E" in generated and with small "e" in the original document. The same applies for "F" in "Figure". However, capitals are used in the original JCGM 100:2008 as well. I believe our outputs are correct here.

Original:

Generated:

"Section" vs. no keyword for cross-referencing sections. The same is present in JCGM 100:2008.

Original:

Generated:

Thanks @anermina for the review! I believe other than 1, 2 and 3 are fine.
For 1 are three issues:

JCGM is not part of BIPM (the secretariat is BIPM), so it’s documents should be cited as “JCGM”
two particular JCGM documents have acronyms: the VIM and the GUM. We may not want to display that in a reference.
a term clause in the ISO sense is NOT a clause, and should not have the “Clause” prefix, as described by ISO/CS in https://github.com/metanorma/metanorma-iso/issues/471

a term clause in the ISO sense is NOT a clause, and should not have the “Clause” prefix, as described by ISO/CS in metanorma/metanorma-iso#471

That's actually not the principle at work here; the principle at work is that a term clause is a subclause, and subclauses in ISO are not prefixed with "Clause" in general.

3 has already been addressed. 2 we are ignoring.


Out of Memory when rotating

Hi, some users reports Out of Memory when they use rotate of viewed image. On my device (Samsung Galaxy Note II) is this problem too. I tested it on version 2.3.0 also but this problem is there still.
Rotate button has this simple functionality:
int actualOrientation = mPicture.getOrientation();
mPicture.setOrientation(actualOrientation == 270 ? 0 : actualOrientation + 90);

I add logs to SubsamplingScaleImageView.BitmapTileTask.doInBackground() to synchronized block before decodeRegion and before createBitmap with tag SUBSAMPLING ROTATE (this is in exception log below).
The proble is that bitmap gets big dimensions from decodeRegion - dimensions are original of image source with sampleSize = 1.
Is there another procedure for change orientation for eliminate Out of Memory?
D/SUBSAMPLING ROTATE﹕ tile: Rect(0, 0 - 2448, 3264); sampleSize: 1
D/dalvikvm﹕ GC_FOR_ALLOC freed 5088K, 41% free 27412K/45956K, paused 25ms, total 26ms
I/dalvikvm-heap﹕ Grow heap (frag case) to 43.484MB for 15980560-byte allocation
D/dalvikvm﹕ GC_FOR_ALLOC freed 329K, 31% free 42689K/61564K, paused 17ms, total 17ms
D/SUBSAMPLING ROTATE﹕ bitmap dim: 3264 x 2448
D/dalvikvm﹕ GC_FOR_ALLOC freed 1K, 31% free 42689K/61564K, paused 15ms, total 15ms
I/dalvikvm-heap﹕ Forcing collection of SoftReferences for 15980560-byte allocation
D/dalvikvm﹕ GC_BEFORE_OOM freed 70K, 31% free 42618K/61564K, paused 27ms, total 27ms
E/dalvikvm-heap﹕ Out of memory on a 15980560-byte allocation.
I/dalvikvm﹕ "AsyncTask #2" prio=5 tid=12 RUNNABLE
I/dalvikvm﹕ | group="main" sCount=0 dsCount=0 obj=0x4368dde0 self=0x5b526ce0
I/dalvikvm﹕ | sysTid=31125 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1532129584
I/dalvikvm﹕ | state=R schedstat=( 562850949 168737745 1402 ) utm=46 stm=10 core=3
I/dalvikvm﹕ at android.graphics.Bitmap.nativeCreate(Native Method)
I/dalvikvm﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:726)
I/dalvikvm﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:703)
I/dalvikvm﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:636)
I/dalvikvm﹕ at com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView$BitmapTileTask.doInBackground(SubsamplingScaleImageView.java:1197)
I/dalvikvm﹕ at com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView$BitmapTileTask.doInBackground(SubsamplingScaleImageView.java:1167)
I/dalvikvm﹕ at android.os.AsyncTask$2.call(AsyncTask.java:287)
I/dalvikvm﹕ at java.util.concurrent.FutureTask.run(FutureTask.java:234)
I/dalvikvm﹕ at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
I/dalvikvm﹕ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
I/dalvikvm﹕ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
I/dalvikvm﹕ at java.lang.Thread.run(Thread.java:841)
I/dalvikvm﹕ [ 03-09 10:24:31.503 31026:31125 W/dalvikvm ]
    threadid=12: thread exiting with uncaught exception (group=0x4195b700)
E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #2
    java.lang.RuntimeException: An error occured while executing doInBackground()
            at android.os.AsyncTask$3.done(AsyncTask.java:299)
            at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
            at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
            at java.util.concurrent.FutureTask.run(FutureTask.java:239)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
            at java.lang.Thread.run(Thread.java:841)
     Caused by: java.lang.OutOfMemoryError
            at android.graphics.Bitmap.nativeCreate(Native Method)
            at android.graphics.Bitmap.createBitmap(Bitmap.java:726)
            at android.graphics.Bitmap.createBitmap(Bitmap.java:703)
            at android.graphics.Bitmap.createBitmap(Bitmap.java:636)
            at com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView$BitmapTileTask.doInBackground(SubsamplingScaleImageView.java:1197)
            at com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView$BitmapTileTask.doInBackground(SubsamplingScaleImageView.java:1167)
            at android.os.AsyncTask$2.call(AsyncTask.java:287)
            at java.util.concurrent.FutureTask.run(FutureTask.java:234)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
            at java.lang.Thread.run(Thread.java:841)
D/xxxFragment﹕ onPause
I/com.sjl.util.Foreground﹕ still foreground
V/GAV4﹕ Thread[GAThread,5,main]: Loaded clientId
D/xxxFragment﹕ onDetach
E/ViewRootImpl﹕ sendUserActionEvent() mView == null

Thanks...
P.S.: let me know if you need my image file for testing please
EDIT 1: for this is not relevant if image is zoom out or in in view component.
EDIT 2: btw this exception is catched for Exception in BitmapTileTask.doInBackground(), but OutOfMemory is not its child and because it is in async task it is not possible catch in my application. Please add catching OOM.
EDIT 3: hm, catching OOM is not recommended, e.g. http://stackoverflow.com/questions/1692230/is-it-possible-to-catch-out-of-memory-exception-in-java

On a phone with a very high resolution screen, the view may not tile the image because by default it loads image data at at least the same resolution as the screen. On the Note 3, with resolution 1920x1080, if the image is loaded in portrait orientation, it will need the whole image with sample size 1 to achieve this.
To rotate a bitmap, the view has to load the image, then create a new bitmap of the same size but rotated, and draw the original onto it. This means twice as much memory is briefly required while each tile is loaded.
One option is to change the minimumTileDpi figure so the view will load images at lower resolution and tile earlier. Something like 160 or 240dpi would normally be enough, compared to 386dpi for your screen.
Another option is to experiment with the attributes of the bitmap that gets created for rotation, because I think it may be ARGB_8888 and not RGB_565, so it requires twice as much memory.
I don't have an XXHDPI device so I've never been able to reproduce this.

There's another option, I'll try using a matrix to rotate tiles on draw. I had trouble making that work first time I tried, but then solved it for another part of the view. If it works that will eliminate the problem completely.

I've just pushed a fix as described - rotate the tiles on draw so there is no need to create a copy of each as it loads. I'm not ready to release this yet, are you able to verify the fix by cloning the repo and including it as a library project?

Hi, thanks for fast fix. I download source code from master branch and update our project to using it (migration to 3.x). And it looks like it works! For older version of this view I apply "hot fix" by allow largeHeap, but your fix I tested with this disabled. So thank you very much :-)
When you suspect that this version will be stable for production?
P.S.: I noticed that in master is applied isBaseLayerReady() method with onImageLoaded event which I proposed in other issue, thanks ;-)

I've just uploaded a new release, v3.1.0. It may take a couple of hours for this to reach the central repository.

Unfortunately I've found that using a matrix to position tiles causes rounding errors resulting in intermittent black lines between tiles. I have rolled back this change, and as an interim fix I've limited tile size to 2048px, so you're unlikely to see OOMEs. I will experiment with rotating the canvas instead of using a matrix for each tile, but I needed to release the quickest possible fix.

Thanks for info, I tested this new version and it is ok, there is no OOM on test images.

That's great, thanks. Canvas rotation is a dead end, but I'm having some early success using Matrix.setPolyToPoly for individual tiles - it virtually eliminates rounding errors - so once that's tested I can allow larger tiles again.

Matrix.setPolyToPoly works well. This has been released as v3.1.3, and the restriction on tile sizes removed.

Hi
I'm having similar problem.
I'm using Your library in a Fragment and when i rotate images when slyding my app chrashes.
Couse Samsung devices save pictures rotated i have to rotate them back
Without rotating i can slyde as fast as I want.
This is how i'm loading images:
image.setOrientation(SubsamplingScaleImageView.ORIENTATION_90);
image.setImage(ImageSource.uri(pathString));
To check rotation i'm using ExifInterface.
Thanx!

Can you try using SubsamplingScaleImageView.ORIENTATION_USE_EXIF instead? The view now uses no more memory when images are rotated that it does with native orientation.

It rotates the pic but i still cant sylde images.
It there a way to do this in SubsamplingScaleImageView class or in ImageSource class, or somewhere else?

So, is there any help for me or i'll hawe to find some other solutions?
BTW, i still think that Your library is great, and i'm still useing it. When I put app on market, i'll let You know.

Sorry, I don't get much time to work on this. I've used over 20 images with a view pager in the sample app without any problems, no more than two images will normally be loaded at once because the view does not load tiles until it's on screen and has dimensions.
The view does not usually use any more memory to rotate the image than it does to show it in native orientation so I can't explain why you might have problems only when rotating the image.
I've assumed the crash your having is an OutOfMemoryError because you've reported it on this thread, but you haven't included a stack trace. Was it definitely an OOME and could you post the trace here please?

Hi! i was yust about to update my last comment.
i did some kind of a workaround, when i rotate, and fragment destroys, i called onCreate method in on destroy method and it simply reloads the image again. Not the best solution, but it works!
It is OutOfMemoryError,
Here's log of a crash form eclipse
10-28 21:00:24.835: E/AndroidRuntime(26400): FATAL EXCEPTION: AsyncTask #5

10-28 21:00:24.835: E/AndroidRuntime(26400): java.lang.RuntimeException: An error occured while executing doInBackground()
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at android.os.AsyncTask$3.done(AsyncTask.java:299)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at java.util.concurrent.FutureTask.run(FutureTask.java:239)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at java.lang.Thread.run(Thread.java:841)
10-28 21:00:24.835: E/AndroidRuntime(26400): Caused by: java.lang.OutOfMemoryError
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:623)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:378)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at com.davemorrissey.labs.subscaleview.decoder.SkiaImageDecoder.decode(SkiaImageDecoder.java:61)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView$BitmapLoadTask.doInBackground(SubsamplingScaleImageView.java:1556)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView$BitmapLoadTask.doInBackground(SubsamplingScaleImageView.java:1)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at android.os.AsyncTask$2.call(AsyncTask.java:287)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	at java.util.concurrent.FutureTask.run(FutureTask.java:234)
10-28 21:00:24.835: E/AndroidRuntime(26400): 	... 4 more

I assume you mean when you rotate the screen portrait to landscape it destroys the fragment, and you're not talking about rotating the image? If what you've described is your way of avoiding that, it sounds very likely that it will result in multiple images being loaded at once. I'm not sure I understand what you're trying to achieve.

The problem is that Samsung phones rotate images whan capturaing.
So, when i show them in my gallery, they are oriented wrong.
screen rotation does not crash, slydeing images does, it just freezes PageFragment and chashes it.
If you would like, i could mail You my SyldeActivity and PageFragment?

But if you're calling the fragment's onCreate method from its onDestroy method as you said above to fix some problem with screen orientation changes, that will also be happening as Android is trying to destroy pages in your pager when you go to other pages, and that may prevent it garbage collecting views that are no longer on screen.

I removed onDestroy.
The crash is not happening when i rotate the phone, it happens when i slyde images

Send me the code.

ok. I found no mail adress so You can here's mine.
<EMAIL_ADDRESS>


Problem: @reboot not working

Config
config :bazaar, Bazaar.Scheduler,
  jobs: [
    {"@reboot", {Bazaar.CronController, :health, []}},
    {"0 12 * * *", {Bazaar.CronController, :daily_inventory_email_task, []}}
  ],
  default_overlaps: false

Output
[error] Task #PID<0.3525.0> started from Bazaar.Scheduler.Runner terminating
** (RuntimeError) Special identifier @reboot is not supported.
    (crontab) lib/crontab/date_checker.ex:29: Crontab.DateChecker.matches_date?/2
    (quantum) lib/quantum/executor.ex:44: Quantum.Executor.execute_task_if_date_matches/2
    (elixir) lib/task/supervised.ex:85: Task.Supervised.do_apply/2
    (elixir) lib/task/supervised.ex:36: Task.Supervised.reply/5
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Function: &Quantum.Executor.execute/2

Changing @reboot to another special expression ie:@minutely works fine. Just @reboot doesn't seem to execute and throw this error.
Version

v2.0.*
in v2.1.* this issue was fixed with the refactoring

Fixed with #254, release with v2.0.3


Paper versus API SA Return

Hello
If an individual takes part in the Public Beta, in theory they do not have to complete a paper return.  But from what I have understood there are a lot of complexities and subtleties around when they will and will not have to also submit a 'paper' return.

Who determines this?
What are the rules around this?
Is the scope or the rules expected to change/flex within public beta?
Will HMRC notify the individual if they cross the boundary from API-only to API + Paper?
Or are the vendors expected to be able to work this out?

Thanks

Hi P-Tracy,
Business needs to answer these questions, so will forward it to them to answer these questions.
Regards,
Chandra
Internal Use
MTDSA-980

Hi @P-Tracy
We have had a response from the business:

There are circumstances where a customer will have to do both

They choose not to declare personal income (or are unable to as using free software)
They have Income from Property and Self Employment and the Self Employment accounting period doesn’t match the tax year.

However, the business needs to define how these circumstances will be handled.
Thanks,
Jacob


Spack/packaging

Apart from references in Events and a blog post, there is no content on Spack on BSSw.io, and probably nothing for the more general topic of packaging for HPC/CSE software (though I haven't done an exhaustive search).
So should we have something in BSSw and how to we want to present it?
Personally, I would favor a page on the broader topic of packaging, pointing to a number of the tools and resources out there.  Maybe this is more of an original article than curated content, but maybe that's not so important.

Consensus within the EB is that we do need some basic content on packaging approaches/tools, more than spack specifically.  "How to get started packaging your software" something like that.  We decided that this had probably moved into Ready for Development prematurely, since there's no concrete proposal for content.  So we're turning it into a gap and moving it back to backlog.


Can I use this package to apply seo?

When I searched pub.dev for seo, the package was found as well. It seems to be included in the search result because of the sufficient correlation, but is it possible to apply the seo or the seo when using the package?

No you cannot. This is about it: https://developers.google.com/webmaster-tools/about


Large comics don't zoom in enough

Comics like #657 don't zoom in enough on my Galaxy S5 to be readable. (I don't remember if 657 specifically is like this, I just know 657 is a large comic. The problem is with the really large ones.)

Make sure "large comics" is enabled in the app's settings.
Then go ahead and play aorund with the maximum scale a bit ;)
https://github.com/T-Rex96/Easy_xkcd/blob/master/app/src/main/java/de/tap/easy_xkcd/fragments/ComicBrowserFragment.java#L396
https://github.com/T-Rex96/Easy_xkcd/blob/master/app/src/main/java/de/tap/easy_xkcd/fragments/FavoritesFragment.java#L252
https://github.com/T-Rex96/Easy_xkcd/blob/master/app/src/main/java/de/tap/easy_xkcd/fragments/OfflineFragment.java#L585

Just asking, did you try it out yet?

@T-Rex96 No, unfortunately I've been preoccupied with my broken laptop and I had to reset my phone, but I'll see what I can do today. I'll keep you updated.
(I've also been reading Thing Explainer when I should be working on school work... :)

No problem, take your time ;)


translation is not work

Translation error does not work. I set the error message, but it does not work. The code is as follows:
validation.ErrRequired = validation.NewError("validation_required", "不能为空")
I tried to change the source code
required.go line 34-44
`
func (r RequiredRule) Validate(value interface{}) error {
if r.condition {
	value, isNil := Indirect(value)
	if r.skipNil && !isNil && IsEmpty(value) || !r.skipNil && (isNil || IsEmpty(value)) {
		r.err = ErrRequired  // add this code is correct
		return r.err
	}
}
return nil

}`

r.err = ErrRequired  // add this code is correct

I'm not sure if my method is wrong or the program is wrong. I hope to get your answer

Thanks for reporting the issue. It should be fixed now.


Customer Info Data Parameters - not populating

First off, this template is awesome, thank you for putting this together!
I'm having trouble getting any of the Customer Information Data Parameters to populate during a Purchase event, regardless of what I point them to as a Parameter value.
Example: I pointed Email to one of GTM's Built-In Variables, and it still won't populate. Initially I was using a dataLayer variable (that I could see populating in the preview pane).
The only thing I haven't tried yet is hardcoding a value into one of the customer parameters to see if that works.
Any known issues around this? Thanks!

Hm, very strange. I just tested and it works fine. The user data is hashed and passed as the &ud[param_key] parameter. So City would be &ud[ct] for example.
Could you check again? If it still doesn't work, could you share a container export with me and I'll take a look at what's wrong.

Closed for now since no reply.


Add PHP 8 support

Is there a build for v8.0? I tried installing php8.0-ds from Sury apt but it's not yet available.

Ok I could build from source successfully


Approvals: Says available to all users, but isn't

"The Approvals app is available as a personal app for all Microsoft Teams users." This feature has not been released to GCC/GCCH/DOD users yet. GCC won't get it until mid-May according to MC249776.

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

ID: 055b01ff-ee6c-7d5a-74bd-0e8eed7ee6b5
Version Independent ID: 13c4174f-2a2a-2ef9-14c5-2f10817cc66a
Content: Approvals application availability in Teams - Microsoft Teams
Content Source: Teams/approval-admin.md
Service: msteams
GitHub Login: @cichur
Microsoft Alias: v-cichur

@npherson Thank you for submitting feedback and contributing to the docs. We are currently investigating this.

Hi @npherson,
Thank you for your comments. I've updated the article by adding a note that mentions the feature's limited availability.


CI: migrate ref guide-check to CircleCI

Part of https://github.com/scipy/scipy/issues/15814#issuecomment-1506516709
Migrate the reference guide check to CircleCI to have doc related jobs aside.
It would be good to migrate the asv job to GH action. This way doc PR can just ask to run CircleCI.

It would be good to migrate the asv job to GH action. This way doc PR can just ask to run CircleCI.

IIRC I put asv in CircleCI for easy artifact browsing. CircleCI still exposes HTML artifacts in a nicer, interactive form compared to other CI services.
FWIW it's not too bad to customize CircleCI's handling of commit message triage. See for example in MNE-Python we run the linkcheck job only on our scheduled runs or when someone tags with [circle linkcheck], otherwise is quits (with green status) in < 1 min:

https://github.com/mne-tools/mne-python/blob/f88f22d52b3b5e2cba3f790965ac14d2fe4a13e0/.circleci/config.yml#L8
https://github.com/mne-tools/mne-python/blob/f88f22d52b3b5e2cba3f790965ac14d2fe4a13e0/.circleci/config.yml#L413-L420

Or we do this sure 👍 ATM we just have skip circle, we could rethink this.
I actually put this on the meeting agenda for tomorrow: discussion around skipping strategies.

yay all green @larsoner


Update components documentation for best practices and consistency

Pull Request Overview
This pull request updates the documentation for React components to reflect the latest best practices and features introduced in recent React versions. The updates include:

Adding examples to demonstrate component usage.
Clarifying prop usage for better understanding.
Ensuring consistency across all components documentation.

Related Issue
This addresses Issue #24.
Checklist

[x] Documentation updated
[x] Examples added
[x] Prop usage clarified
[x] Consistency ensured across documentation

I have assigned you the issue

This pull request includes significant updates to the Components/Components.md file, focusing on improving the structure and content related to React components. The most important changes include restructuring the table of contents, enhancing descriptions of functional and class components, and adding detailed explanations of component lifecycle and nested components.
Documentation Improvements:

Table of Contents Update:

Reorganized the table of contents to better reflect the updated sections and topics.

Enhanced Component Descriptions:

Improved descriptions and examples for functional and class components, emphasizing the benefits of functional components with hooks.
Added explanations on the advantages of functional components over class components.

Component Lifecycle Explanation:

Added a detailed section on the component lifecycle, including mounting, updating, and unmounting phases with examples.

Nested Components and Component Tree:

Introduced a new section on component tree and nested components, explaining how to create and manage nested components with examples.

Export and Import Components:

Added a section on exporting and importing components, providing examples to demonstrate modular code organization.

Hi @AdityaSrivastava185,
I hope you're doing well. I am writing to kindly request that you add the "hacktoberfest-accepted" label to my pull request #31 that was recently merged.
Thank you for your help!
Best regards,
@yadavmangesh07


V2 OBJ Deserializer (to V2 branch)

This pull request updates the OBJ deserializer to use CSG V2 API, as well as translate to CSG V2 API. The goals of this pull request are:

[X] Update to use CSG V2 API
[X] Update code up to JSCAD coding standards
[X] Add test suites to complete coverage, 90.67%

New Functionality

added support for relative indexes in faces
added support for groups, where each group becomes a geometry
added support for converting material names to colors, supporting color per face

All Submissions:

[X] Have you followed the guidelines in our Contributing document?
[X] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
[X] Does your submission pass tests?

@kaosat-dev please review. you probably don't like the increased functionality, but OBJ files are popular. there's a lot more than just 'faces'.

@kaosat-dev please review again. the ObjReader class has been removed. see index.js