Support #import

Our graphql systems support an #import directive in graphql files to allow sharing fragments between operations in different files.
e.g.
#import './TeacherProfileUser.fragment.graphql'
#import './ProfileSettingsContainer/ProfileSettings/StandardsPreferences/StandardsPreferences.fragment.graphql'
#import "../../core/viewer.fragment.graphql"

mutation TeacherProfileUpdateUser($userId: ID!, $input: UserInput!) {
  updateUser(id: $userId, input: $input) {
    user {
      ...TeacherProfileUserFragment
      ...StandardsPreferencesUserFragment
      ...ViewerFragment
    }
  }
}

Currently this file gives an error:
/home/ubuntu/app/src/ui/client/teacher/profile/TeacherProfile.mutation.graphql
   8:12  error  Unknown fragment "TeacherProfileUserFragment"        @graphql-eslint/known-fragment-names
   9:12  error  Unknown fragment "StandardsPreferencesUserFragment"  @graphql-eslint/known-fragment-names
  10:12  error  Unknown fragment "ViewerFragment"                    @graphql-eslint/known-fragment-names

It would be nice if this support could be ported over to this linter somehow.

Stumbled upon the same problem, support for imports would be greatly appreciated

@oliverlukesch For now you can provide your operations under parserOptions like below;
{
  "parserOptions": {
     "operations": "/path/to/operations/*.graphql"
   }
}


Cannot run Windows container in process-isolated mode

I followed the Microsoft document  and try to run a Windows contianer in process-isolated mode. I got errors below.  I can run container with --isolation=hyperv, but not --isolation=process.
docker run -it --isolation=process mcr.microsoft.com/windows:ltsc2019 cmd

docker: Error response from daemon: hcsshim::CreateComputeSystem b54b8c03a1950f220bfa0402b8c87688fb0fb235676995fd216d33bb300dee7b: The container operating system does not match the host operating system.

Does this error means I need to find the exact tag of base image with match my os on the post PC?
I use both Windows 10 on my host pc, which tag is right for me?
Edition: Windows 10 Pro
Version: 22H2
OS build: 19045.2006
Experience: Windows Feature Experience Pack 120.2212.4190.0
Best regards,
Miche

Thanks for your comment. I see now I have to check the build number, but there is no 22H2 container image available. I tried process isolation because I am want to share devices with container. Can I share device with hyperv isolation container? Do you know there any plans of release new Windows base image?

This would answer your question: https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/hardware-devices-in-containers
USB is not supported and device sharing is only supported with process isolation.

Thanks for answering my question. It looks like windows container does not meet my requirement.


Add user preview for remote search results

[x] add remoteHost to the URL
[x] implement the remote user retrieval in the contrller
[x] implement equivalent search with anonymous identifier
[x] add API version check (should be >= 1.4.0)

Fixed in e6fbb5ea768b88e9aaf3989db9c73f68d69ba8c7


Planner acceleration vs CarController

If planner requires small amounts of deceleration carcontroller brakes harshly. At least with much more deceleration than was requested.
The acceleration that comes from the planner that finally ends up here goes through the longcontrol pid. I am not sure if the linear scaling is correct and so I have applied a ^2 to the apply_accel to get the required decceleration from planner to match closer to the actual deceleration of the car.
From tests ^2.5 is too little and ^.1.5 is too much braking. Maybe this change needs to be made somewhere else in the PID. But you guys can have a look at it.

Be sure to consider this...
https://discordapp.com/channels/469524606043160576/524328425415245827/608854545635737621

@arne182 after giving up and disabling stopping_condition and starting_condition (they don't seem to be needed for Toyota), I'll give this a try.
Brakes on Prius are much more touchy at low speed, likely due to differences between brakes vs regen. It's difficult driving manually to not mash on the brakes and at 1-2 MPH, light pedal presses more than 27% cause a hard braking event.

We also may need to implement custom logic, such as checking if v_ego is under x (such as 2 m/s) and capping the max brake % to something like 27% as I feel the PID response will vary on v_ego.

Here's some logic which should implement full brake holding after 3 seconds:
apply_accel, self.accel_steady = accel_hysteresis(apply_accel, self.accel_steady, enabled)
    if CS.v_ego < 0.5:
        apply_accel = clip(apply_accel * ACCEL_SCALE, -0.81, ACCEL_MAX)
        if CS.v_ego < 0.3:
            self.brake_timer += 1
        if self.brake_timer > 300:
          apply_accel = clip(apply_accel * ACCEL_SCALE, ACCEL_MIN, ACCEL_MAX)
        if apply_accel > 0.0:
          self.brake_timer = 0
    else:
        apply_accel = clip(apply_accel * ACCEL_SCALE, ACCEL_MIN, ACCEL_MAX)
        self.brake_timer = 0

When you have a exact deceleration that you want to achieve. Feeding forward that acceleration with a gain of one gives you the correct deceleration workout needing to add proportional and integral values to it. This is especially visible if you check the output to the car. The output is always higher than the input and it is due to the p and I parts. Temporarily setting them to 0 allows the car to recieve exactly the input value of deceleration and the car will track that value nicely until you reach 7kph.


Task - treeview for OTUs with filterring and displayed annotations

Potentially could be implemented as an extension of OTU filterring.
As a user, I would like to have an interface where I can filter OTU by a geographic region and display data as a treeview.
Further, next to each node, I would like to display an information from a secondary filter. In particular I am interested to display which nodes have identification keys (but other filterring options could also be implemented). For the keys in particular, those could be represented in 4 different ways (interactive, image matrix, dichotomous and as a citation to a particular source, at the moment we can mark an OTU with a topic).

I think this could be started by breaking it down into specific new methods  to be added before it is considered?  For example, add an issue Helper - computes whether the OTU has an identification key.  This would let us build up required bits rather then tackle the the more complex concept here.

this was mentioned during discussion today, I would like to annotate OTU with an existing identification key (matrix, dichotomous, image key, source reference) and on public page add a panel with key (if those are available for a particular OTU, a genus for example). So that if the genus has a key to species, I can see it on public page and open an interactive key in a separate browser tab.


Update middleware.js

i think rogerbot is for moz org and linkedinbot not linkedinbo

Thanks for the PR, looks like we had some typos. Once you sign the CLA we can merge.

ping

Ok, i signed CLA , thank you .


Update sbt-typelevel-no-publish to 0.6.7

About this PR
📦 Updates org.typelevel:sbt-typelevel-no-publish from 0.4.20 to 0.6.7
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.typelevel", artifactId = "sbt-typelevel-no-publish" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.typelevel", artifactId = "sbt-typelevel-no-publish" }
}]

labels: sbt-plugin-update, early-semver-major, semver-spec-minor, version-scheme:early-semver, commit-count:1

Superseded by #289.


Unnecessary scroll bars on the home page

Description
The homepage of LinkFree has an unnecessary vertical scroll bar even though there is on content below it. And on a smaller width screen, there is an unnecessary horizontal scroll bar because of the image overflowing.
This does not have a good impact on the user experience.
Screenshots
Vertical scrollbar:

Horizontal scrollbar:

Both at same time:

Additional information
I am up for solving this issue.

I have already fixed it and raised a Pull Request.


How to access transaction_id from purchases object.

Whenever I tried to print the purchase object it says: [<pyinapp.purchase.Purchase object at 0x7f907bd40410>]
How can I access the transaction_id, product_id after receipt verification?
Please help!!

Could you please show the code? I need more context.


[question]

Question
Add your question here
AttributeError: module 'simulaix' has no attribute 'Generator'
Expected behavior
If what happened was unexpected, outline the expected behaviour.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. Ubuntu]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Question Add your question here
AttributeError: module 'simulaix' has no attribute 'Generator'
Expected behavior If what happened was unexpected, outline the expected behaviour.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. Ubuntu]
Version [e.g. 22]

Additional context Add any other context about the problem here.

Sorry, our project has not been officially released yet, you need to wait.


Fix table's within tables bug

Nested tables inside the floated table header were having odd issues. These changes force floatThead to use only the thead/tbody belonging directly to the selected table(s).
Bug: http://jsfiddle.net/z9t1wmg8/4/
In this example, the size-row gets inserted in the wrong table.

I created a clean test without that change and it seems to work now. It must have been something in my specific use case in my other project.
I've worked around it differently on my project, but it seems to me the $tbody variable is not necessary.
Regardless, here's just the children changes.

Thank you!


Add AdvertiseComponent and add it to vending machines

About the PR
Adds AdvertiseComponent, a component to broadcast a message to chat at random intervals. This PR also adds it to vending machines so they can advertise their product.

AdvertiseComponent
It's a component that sends a random message from the pack at a random interval, between minWait and maxWait. pack is a AdvertisingPackPrototype, which contains a list of advertisements. Advertising can be paused and resumed by using AdvertiseComponent.Pause() and AdvertiseComponent.Resume().
Vending Machines
The component has been added to vending machines, and advertisements were taken from TG. When a vending machine is broken or unpowered, it stops advertising. There are a few vending machines without ads. I decided to print a warning when a vending machine does not have ads, which means there will be three warnings printed on saltern currently. I can remove this if it's annoying, but it seems nice to have ads for every vending machine. Not all of TGs ads are as funny, so tell me which ones I should remove.
Changelog

:cl:

add: Added advertising to vending machines

Fixes #3273

This is ready for review again. Major changes since last review:

Increased time delay until new ad is broadcasted
Remove ads from department vending machines (only commercial vending machines will have ads)
Changed initialization/resume to start timer without a minimum wait bound, so ads are more randomized when considering multiple vending machines.


Update to APISpec 1.3.3

The only breaking change was .add_path() which was renamed to .path() and the response codes are now strings.
Also slipped in a little typo fix in the arguments for test_resource_with_metadata and updated spec.definition to the new call in the README.

Codecov Report

Merging #10 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #10   +/-   ##
=======================================
  Coverage   97.05%   97.05%
=======================================
  Files           3        3
  Lines          34       34
=======================================
  Hits           33       33
  Misses          1        1

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 45e83e2...a0a63af. Read the comment docs.

Thanks @dillonco! I will try to cut a release and upload to PyPI during downtime today.


Distortion?

I have several images that are displayed one by one in a container, Most of the time when naviagting between the images, the viewer.load(lowres,highres) works perfectly... but about 1/0th of the time the new image comes up oddly expended (not physically) and appears distorted.
Going away to another image and then back can help and things are normal again.
I see nothing the the dom to indicate an issue.
Have a look at one.jpg (below) that is how it should look and two.jpg as it appears now and then

.

Closing this issue as no activity on the issue. Also, there is a complete rewrite so that might have fixed the issue.


Using add_subdirectory not working on MacOS

Assume the following folder layout:
external/
    VulkanMemoryAllocator-Hpp/
    CMakeLists.txt

Initialized using git submodule update --init --recursive, so the dependencies of this repository are included as well.
And the following contents of CMakeLists.txt:
add_subdirectory(VulkanMemoryAllocator-Hpp)

Results in:
[cmake] CMake Error at external/VulkanMemoryAllocator-Hpp/CMakeLists.txt:14 (find_package):
[cmake]   By not providing "FindVulkanMemoryAllocator.cmake" in CMAKE_MODULE_PATH
[cmake]   this project has asked CMake to find a package configuration file provided
[cmake]   by "VulkanMemoryAllocator", but CMake did not find one.
[cmake]
[cmake]   Could not find a package configuration file provided by
[cmake]   "VulkanMemoryAllocator" with any of the following names:
[cmake]
[cmake]     VulkanMemoryAllocatorConfig.cmake
[cmake]     vulkanmemoryallocator-config.cmake
[cmake]
[cmake]   Add the installation prefix of "VulkanMemoryAllocator" to CMAKE_PREFIX_PATH
[cmake]   or set "VulkanMemoryAllocator_DIR" to a directory containing one of the
[cmake]   above files.  If "VulkanMemoryAllocator" provides a separate development
[cmake]   package or SDK, be sure it has been installed.

This is caused by if(EXISTS VulkanMemoryAllocator/CMakeLists.txt) being false, while the folder does exist. I don't want to install this project (or VMA) locally in order to build my project, but build it on the fly.

Having the same issue on Ubuntu.
After changing it to if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/VulkanMemoryAllocator/CMakeLists.txt), its works.

Guys, maybe you can submit a PR then?


Not Enough Money from Admin Shop

So I saw this was a bug back in April 2016.  It seems to be back, wherein the admin shop can run out of currency.

This does not seem to be possible to happen with the latest version.


⚠ Australian Anti Ice Campaign has degraded performance

In 979964f, Australian Anti Ice Campaign (https://australianantiicecampaign.org.au) experienced degraded performance:

HTTP code: 200
Response time: 7496 ms

Resolved: Australian Anti Ice Campaign performance has improved in ab755f2.


Make python-msgpack a dependency for salt-common package for Debian 8

Hello there,
I would like to use salt-cloud on dedicated host without salt-minion or salt-master installed for experiments and development purposes.
I've tried to install and use a single salt-cloud package from Salt corporate repo:
# salt-cloud --version
[CRITICAL] Unable to import msgpack or msgpack_pure python modules
[ERROR   ] Error importing salt cloud No module named msgpack
salt-cloud is not available in this system
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
UnboundLocalError: local variable 'salt' referenced before assignment
Traceback (most recent call last):
  File "/usr/bin/salt-cloud", line 10, in <module>
    salt_cloud()
  File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 420, in salt_cloud
    sys.exit(salt.defaults.exitcodes.EX_UNAVAILABLE)
UnboundLocalError: local variable 'salt' referenced before assignment
Traceback (most recent call last):
  File "/usr/bin/salt-cloud", line 10, in <module>
    salt_cloud()
  File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 420, in salt_cloud
    sys.exit(salt.defaults.exitcodes.EX_UNAVAILABLE)
UnboundLocalError: local variable 'salt' referenced before assignment
# apt-cache policy python-msgpack
python-msgpack:
  Installed: (none)
  Candidate: 0.4.2-1
  Version table:
     0.4.2-1 0
        500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
        500 http://repo.saltstack.com/apt/debian/8/amd64/latest/ jessie/main amd64 Packages

It seems that almost all other salt-* packages have python-msgpack set as dependency, except for the salt-cloud and salt-common.
Because the salt-common package really contains the python code that imports msgpack module, I think it would be wise to make salt-common depend on python-msgpack and drop this dependency for all other salt-* packages.
Installation log for reference: https://gist.github.com/vutny/510cf1765d83a7a8b404
Thanks!

@vutny this should appear in the next point release, added with Moved all python-msgpack dependencies to salt-common for Debian 8, Sa… #43

Thank you @dmurphy18!

@vutny Okay to close  this ?

Let's leave it as a reminder for testing future point release.

Encountered this today, while working on a vanilla ubuntu 16.04. python-msgpack was not installed along with salt-cloud.

@mmisztal1980 Can you provide a --versions-report showing the version of Salt that you are running ?.
python-msgpack is a dependency of salt-common which should have been installed as a dependency of salt-cloud in the latest point release of Salt 2017.7.2.

mmisztal@workstation:~/poc-k8s-salt-cloud-inf$ sudo salt-cloud
--versions-report
Salt Version:
            Salt: 2015.8.8

Dependency Versions:
 Apache Libcloud: 0.20.0
          Jinja2: 2.8
        M2Crypto: Not Installed
            Mako: Not Installed
          PyYAML: 3.11
           PyZMQ: Not Installed
          Python: 2.7.12 (default, Nov 19 2016, 06:48:10)
            RAET: Not Installed
         Tornado: 4.2.1
             ZMQ: Not Installed
            cffi: Not Installed
        cherrypy: Not Installed
        dateutil: 2.4.2
           gitdb: Not Installed
       gitpython: Not Installed
           ioflo: Not Installed
         libgit2: Not Installed
         libnacl: Not Installed
    msgpack-pure: Not Installed
  msgpack-python: 0.4.6
    mysql-python: Not Installed
       pycparser: Not Installed
        pycrypto: 2.6.1
          pygit2: Not Installed
    python-gnupg: Not Installed
           smmap: Not Installed
         timelib: Not Installed

System Versions:
            dist: Ubuntu 16.04 xenial
         machine: x86_64
         release: 4.10.0-37-generic
          system: Ubuntu 16.04 xenial

On Fri, Oct 27, 2017 at 3:07 AM, David Murphy<EMAIL_ADDRESS>wrote:

@mmisztal1980 https://github.com/mmisztal1980 Can you provide a
--versions-report showing the version of Salt that you are running ?.
python-msgpack is a dependency of salt-common which should have been
installed as a dependency of salt-cloud in the latest point release of Salt
2017.7.2.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/saltstack/salt-pack/issues/41#issuecomment-339843710,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABS1AdAYOQVAFfx_hWrP1vvZXgYK3vpgks5swSy4gaJpZM4HlOC8
.

Same applies for python-zmq

@mmisztal1980 that is quite an old version of Salt, of which only CVE fixes are currently being supported  and even then that support ends in November of 2017.  The fixes are in later versions, I suggest updating to the latest point releases 2016.11.8 or 2017.7.2 to obtain the fixes that you desire.
This issue was fixed over a year and a half ago.

@dmurphy18 then how come this got installed using apt-get on a vanilla instance VM in digital ocean? outdated satellite package repo?

@mmisztal1980 Sorry but I cannot be sure given that it is such an old version of Salt and it has reached it's effective EOL some time ago, and hence debugging issues for it would not be a valuable use of resources especially since it was already addressed over a year ago.


CSS @import doesn't work inside :deep()

Vue version
3.4.31
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-9ygjdp?file=src%2Fassets%2Fbase.css,src%2Fassets%2Fbase2.css,src%2Fcomponents%2FTestOne.vue,src%2Fcomponents%2FTestTwo.vue,src%2FApp.vue,src%2Fmain.js&terminal=dev
Steps to reproduce
Import a style within a :deep (or :global), using @import.
In the reproduction link, you'll see two components. Both components use v-html. In our actual use case, this is HTML from an external system, rather than static text. We want to apply styling rules to the HTML, without affecting components/elements outside of the container. The two example components do not work, in one case the @import results in an @import in the browser, pointing to an invalid path, in the other case, the styling is global (well that's actually correct, but that's not what we want).
What is expected?
@import behaves the same, regardless of where it's placed (e.g. the @import is replaced with the content of the file).
What is actually happening?
The style is not imported.

@import can only be placed at the root of CSS files, that's how CSS works.

You are right, however, we're not talking about plain CSS, so how plain CSS works isn't really relevant.
An @import works inside a scoped stylesheet. This cannot be compiled to an actual @import in the plain CSS, as the plain CSS is something like [data-v-xxxxx] { /* css here */ }, yet the @import inside it, which is not at the top, works and is replaced with the contents of the imported file.
This replacement doesn't occur when using :deep (e.g. when the resulting css would be something like [data-v-xxxxx] div { /* css here */).
The former works, the latter does not. Neither has @import at the top of the plain CSS. I'd understand your reply if the @import didn't work inside of a scoped stylesheet and did work in :global, but it's the exact opposite.
I've added a third component to the reproduction on stackblitz, showing it works in a scoped style (i.e. @import not at the top of the plain CSS).
@yyx990803 can you reopen this?

I guess I can understand the reasoning that it should be on top in the scoped style also, though it appears to be based on principe rather than logic. Considering the @import is actually replaced with the file content, the requirement isn't there anymore.

You are confusing what it means to be "at the root level". Syntactically CSS doesn't allow @import statements to be nested in blocks. This has nothing to do with whether the <style> tag is scoped or not.
A single SFC can contain multiple <style> tags. If you want to import a global stylesheet, do so in a separate non-scoped <style> sheet.


Configure autoware_launch launch files

x1 person
Break down these tasks further:

Configure the launch file for our setups for:

[ ] CARLA
[ ] AWSIM
[ ] Twizy
[ ] ENV200

Relevant launch repos:

https://github.com/Monash-Connected-Autonomous-Vehicle/mcav_vehicle_launch
https://github.com/Monash-Connected-Autonomous-Vehicle/mcav_autoware_sensor_kit_launch
https://github.com/Monash-Connected-Autonomous-Vehicle/autoware_launch

configure parameters

Example implementation: tier4/aip_launcher
If you need to test Autoware with a simulator, read here.

@Robin-Chea If you're on campus to work on this Fri I can drop in and help/discuss what we need to do

@Robin-Chea If you're on campus to work on this Fri I can drop in and help/discuss what we need to do

ok ill be in from 12-5 on friday.

Tried to create the launch files for twizy however after using the current stuff we had we were missing some stuff eg config files that describe the links to each sensor. So instead i have created the basic struture to create these config files.
I have basically copied the sample description and launch file and configured it to the twizy sensors eg 8 camera, 1 imu, 1 lidar (VLP-16) and 1 gnss.
I am following the guide https://autowarefoundation.github.io/autoware-documentation/pr-491/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-model/
However not sure if i should include the ultrasonic sensors.
I skipped this part for now
https://autowarefoundation.github.io/autoware-documentation/pr-491/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-model/creating-individual-params/
i skipped configuring the sensor launch for now and will do it later
https://autowarefoundation.github.io/autoware-documentation/pr-491/how-to-guides/integrating-autoware/creating-vehicle-and-sensor-model/creating-sensor-model/#sensor-launch.
For vehicle launch desciption the config files need to be filled out.
For vehicle mesh a dae or a fbx needs to be made.
However in https://github.com/Monash-Connected-Autonomous-Vehicle/mcav_autonomy/tree/main/visualisation/vehicle_model/meshes they were able to use the stl file. will try to attempt to use this.

did the same but for the env200

Would it be okay if I change the repo URLs in our Autoware fork to our other forks where relevant or would there be more to it than just that?
Is this being worked on right now as part of this issue and do I need to wait for it if I want to test out changes to sensing launch in a new branch as part of the sensing issue?

@AbBaSaMo Yes it should be okay to change the repo url to relevant forks, especially if it helps streamline our development process. Currently i am working on the config files for the Twizy and once its completed, ill update it in the branch for integration.

@Robin-Chea @AbBaSaMo to finish this off this week

The model is now working on autoware :

Still need to add the ultra sensors and the gps/imu. Need to also double check the drivers for camera and velodyne


State of 2.0?

Hi Jan, I'm a big fan of your work ever since we started using serenity-js over a year ago.
First of all, sorry for opening an issue here, but I don't know how else I can get in touch with you...
I'm with a new company starting a new project and I definitely want to use serenity for our e2e needs. I can see v2 is under heavy development and you do regular alpha releases. Now I am wondering if it still makes sense using the current serenity version when starting a new project, meaning will v2 be an "easy" upgrade path or is it a larger rewrite and we should wait for v2 being released and even more important: documented

Hi @ctaepper! Thanks for your kind words and your support for Serenity/JS :-)
I'm finishing the last major feature for v2 now, which is adding support for the Jasmine framework. After that, the last thing that's left is to update the handbook and the tutorials - I think we're looking at a release date at some point in June.
Most classes already have comprehensive JSDoc with usage examples and those that don't will get it over the coming weeks, there are also several example mini-project that demonstrate the major features.
I've designed v2 so that the upgrade path should be relatively straight-forward as the main classes (Actor, Task, Interaction and Question) are backwards compatible.
Having said that, if you're starting a new project now I'd suggest to either go with the alpha, which is now stable and any changes are limited to the internals, or wait for the "official release".
What I can also propose is that if you (or others) would like to experiment with v2 you could use this ticket to ask any questions about the new version or let me know if there are things we should address before the official realease.

@jan-molak,
I tried to migrate some of my old tests to v2 and I didn't find photographer stage crew. What happened to him?
What can I use instead?

@asnov - Since Photographer is Protractor-specific, he decided to move to the @serenity-js/protractor module (specs available here).
import { Photographer, TakePhotosOfFailures } from '@serenity-js/protractor';

new Photographer(new TakePhotosOfFailures())

[ ] Which reminds me that I should add a factory method to make the instantiation simpler, maybe something like Photographer.who(TakesPhotosOfFailures) 🤔

hi @jan-molak,
is any v2 document available ?

Hi @owlran - the website hasn't been published yet as it would replace the existing one for version 1.
If you'd like to see a preview of the website for v2 you can clone this repository, checkout the 2.0 branch and run make clean site which generates the website under documentation/website/target.

Hey,
I tried updating one of my projects to the new version but I am running into a few issues which you might be able to help me with:

I can not find the Is class - do I have to implement that myself using protractor or is it somewhere else?
I can not find the  TakeNotes ability. Do you plan on adding it back?
@step('') for performAs for my custom tasks is not available anymore? It doesn't say anything about removing it in the changelog.

Hi @Ijee!

I can not find the Is class - do I have to implement that myself using protractor or is it somewhere else?

The Is class from 1.x has now been replaced with expectations that can be used with both Wait and Ensure. For example:
import { isClickable, Wait } from '@serenity-js/protractor';
import { Ensure } from '@serenity-js/core';

actor.attemptsTo(
  Wait.until(Form.Submit_Button, isClickable()),
  // but also:
  Ensure.that(Form.Submit_Button, isClickable()),
);

I can not find the TakeNotes ability. Do you plan on adding it back?

Yes, it will be added back in some form. If you need it right now you could copy the one from 1.x (source)

@step('') for performAs for my custom tasks is not available anymore? It doesn't say anything about removing it in the changelog.

In 1.x the @step annotation would emit events when the activity was started/finished. In 2.x this responsibility is now with the Actor who uses the description of an activity provided by its toString() method. This means that the only thing that the @step would do in 2.x would be to generate a toString()... which doesn't seem that useful.
In other words, instead of:
export class DoSomethingCool extends Interaction {

  @step('#actor does something cool')
  performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void> {
       return SomeAbility.of(actor).doStuff();
  }
}

you can simply:
export class DoSomethingCool extends Interaction {

  performAs(actor: UsesAbilities & AnswersQuestions): PromiseLike<void> {
       return SomeAbility.of(actor).doStuff();
  }

  toString() {
      return '#actor does something cool';
  }
}

or even shorter:
import { Interaction } from '@serenity-js/core';

export DoSomethingCool = () =>
    Interaction.where(`#actor does something cool`, actor =>
        SomeAbility.of(actor).doStuff());

I also found that Check.whether(condition: boolean | Question | Question<PromiseLike>) {...} got changed to
Check.whether(actual: Answerable, expectation: Expectation<any, A>) {...}.
I tried changing it using this new Ensure thing but it did not work. Do you have an example for it?

You're correct. An Answerable is either a Question<Promise<value>>, a Question<value>, a Promise<value> or just a value.
This means that you could do things like:
Check.whether(process.env.BASE_URL, includes('dev'))
    .andIfSo(
        DoOneThing(),
    )
    .otherwise(
        DoSomeOtherThing(),
    )

But also:
Check.whether(Cookies.Consent_Form, isVisible())
    .andIfSo(
        Click.on(Cookies.Accept)
    )

You can find some examples in the specs

(I am probably just stupid atm)

I'm sure that's not the case :-)
Thanks for taking the time to try 2.x and report the issues! If you come across anything else, please let me know!

@Ijee I've just added TakeNotes back in, here's an example of how you'd use it:
import { Note, TakeNote, TakeNotes } from '@serenity-js/core'
import { BrowseTheWeb, Target, Text } from '@serenity-js/protractor'
import { by, protractor } from 'protractor';

const VoucherCode = () => Target.the('voucher code').located(by.id('voucher'));
const AppliedVoucherCode = () => Target.the('voucher code').located(by.id('applied-voucher'));

const actor = Actor.named('Noah').whoCan(
    TakeNotes.usingAnEmptyNotepad(),
    BrowseTheWeb.using(protractor.browser),
);

actor.attemptsTo(
    TakeNote.of(Text.of(VoucherCode())),
    // ... add the product to a basket, go to checkout, etc.
    Ensure.that(AppliedVoucherCode(), equals(VoucherCode())),
);

The cool thing about Note.of is that you can use it with assertions:
Ensure.that(Note.of(AppliedVoucherCode()), equals('SUMMERSALE'))

or interactions:
Enter.theValue(Note.of(VoucherCode())).into(Checkout.VoucherCodeField);

Hope this helps!

Noted - cheers! 👍

Hi @jan-molak : any update on release dates of serenity-ks 2.0 officially?

@abhinaba1080 - I decided to fix some bugs in Serenity/JS CLI before the release, which ended up becoming a re-write of the CLI... I'm almost finished with that though, so the last bit is the tutorials and more documentation. Thanks for your patience!

@asnov - Since Photographer is Protractor-specific, he decided to move to the @serenity-js/protractor module (specs available here).
import { Photographer, TakePhotosOfFailures } from '@serenity-js/protractor';

new Photographer(new TakePhotosOfFailures())

Which reminds me that I should:

[ ]  add a factory method to make the instantiation simpler, maybe something like Photographer.who(TakesPhotosOfFailures) 🤔
[ ]  document that the Photographer has moved elsewhere. Maybe a migration guide could be useful?

@asnov  does the Photographer working for you? Its not for me eventually. Can you share your serenity version and piece of configuration?
@jan-molak : i am really stuck, kindly look into this:  https://github.com/jan-molak/serenity-js/issues/335

@abhinaba1080 - I've replied in #335, so let's move this conversation there, please.

All, I've moved the SerenityBDDReporter class to a dedicated module @serenity-js/serenity-bdd responsible for integrating Serenity/JS with Serenity BDD reporting CLI.
Additionally, the @serenity-js/serenity-bdd module ships with a brand new CLI wrapper, which you can use to download the Serenity BDD jar:
serenity-bdd update

and generate the reports:
serenity-bdd run

This means that you no longer need to use the old serenity-cli module and can switch to the new one at your convenience.
A more in-depth description of the new module can be found in its readme.
The new implementation has an improved downloader, which can restart the download should it be interrupted, as well as a better Java detection mechanism, so you should no longer see warnings on Linux-based systems.
Fun fact: the new CLI wrapper is written in Serenity/JS Screenplay ;-)

When will the 2.0 alpha release be available as an npm package?

Hi all,
I've just put together a small template project demonstrating the setup required to run tests using Serenity/JS v2 (alpha), Cucumber v5 and Protractor - https://github.com/serenity-js/serenity-js-cucumber-protractor-template
Thoughts and feedback welcome.

@jan-molak would you shed some light on this topic in 2.0? When I run tests using browserstack and multicapabilities I do not see any tagging of browsernames in the tests. Is this feature still pending in 2.0?

Hi all,
I've just published a new @serenity-js/console-reporter module that supersedes the experimental (and now deleted!) ConsoleReporter class that used to ship with @serenity-js/core.
Have a look at the module's readme for full installation instructions.
To upgrade from the experimental ConsoleReporter to the new version, please install the new module:
npm install --save @serenity-js/console-reporter

and update your Protractor config:
// protractor.conf.js

- const { ConsoleReporter } = require('@serenity-js/core');
+ const { ConsoleReporter } = require('@serenity-js/console-reporter');

exports.config = {
  framework:      'custom',
    frameworkPath: require.resolve('@serenity-js/protractor/adapter'),
    serenity: {
      crew: [
-       new ConsoleReporter(),
+       ConsoleReporter.withDefaultColourSupport(),
      ],
      // other Serenity/JS config
    },
    // other Protractor config
 };

Please note that the new ConsoleReporter supports several colour themes, which you can choose by calling either of the following factory methods:
ConsoleReporter.withDefaultColourSupport()
ConsoleReporter.forMonochromaticTerminals()
ConsoleReporter.forDarkTerminals()
ConsoleReporter.forLightTerminals()

All the existing implementation examples have also been updated to use the new ConsoleReporter.
And here are some screenshots:

Thoughts and feedback welcome!

This feature is killing.. But still it is alpha :stuck_out_tongue_closed_eyes:
Can't wait for the official release..

Can't wait for the official release..

Working on it 👨💻

@jan-molak I feel like the indentation is different when working with cucumber (in alpha-89, at the least), but the existing extra feedback from execution is definitely helpful.
You have the step, a single indentation, and then the serenity steps in a list, not indenting further when a new interaction is introduced (which may be intended, because it reduces noise), but it may be nice to have an option to be able to include some more noise with the interaction descriptions so the intent is clearer in the output, or to remove the description of the interactions (like "Wendy attempts to log in (4s 808ms)" in the examples below) in order to avoid confusion.
Current (based on the Mac Terminal, another terminal called Hyper [powered by electron] and also the Jetbrain's Webstorm terminal):
Given Wendy is using us as her supplier
    ✓ Wendy enables synchronisation with Angular (0ms)
    ✓ Wendy navigates to '/login' (1s 944ms)
    ✓ Wendy visits the login page (1s 945ms)
    ✓ Wendy waits up to 5s until the email field does become visible (146ms)
    ✓ Wendy enters<EMAIL_ADDRESS>into the email field (112ms)
    ✓ Wendy enters 'password' into the password field (47ms)
    ✓ Wendy clicks on the login button (48ms)
    ✓ Wendy waits for 2s 500ms (2s 505ms)
    ✓ Wendy attempts to log in (4s 808ms)

Expected (following the same pattern as shown in your previous screenshots):
Given Wendy is using us as her supplier
    Wendy attempts to log in
        ✓ Wendy enables synchronisation with Angular (0ms)
        ✓ Wendy navigates to '/login' (1s 944ms)
        ✓ Wendy visits the login page (1s 945ms)
        ✓ Wendy waits up to 5s until the email field does become visible (146ms)
        ✓ Wendy enters<EMAIL_ADDRESS>into the email field (112ms)
        ✓ Wendy enters 'password' into the password field (47ms)
        ✓ Wendy clicks on the login button (48ms)
        ✓ Wendy waits for 2s 500ms (2s 505ms)
    ✓ Wendy attempts to log in (4s 808ms)

Are you already aware of this, or should I create a ticket?

Hey @KyleFairns and thanks for your feedback!
The formatting reflects the structure of the tasks your actor performs.
The output in your example would've been produced in a scenario similar to the one below:
actor.attemptsTo(
  UseAngular.enableSynchronisation(),
  Navigate.to('/login'),
  Wait.until(emailField, isVisible()),
  Enter.theValue('yeahthisemailisfake@wendysemailprovider.com').into(emailField),
  Enter.theValue('password').into(passwordField),
  Click.on(loginButton),
)

If you introduced domain-specific tasks, for example:
const LaunchTheApp = () =>
  Task.where(`#actor launches the app`,
    UseAngular.enableSynchronisation(),
    Navigate.to('/login'),
  );

const Authenticate = {
  using: (email: string, password: string) =>
    Task.where(`#actor authenticates using '${ username }' and password '${ password }'`,
        Wait.until(emailField, isVisible()),
        Enter.theValue(username).into(emailField),
        Enter.theValue(password).into(passwordField),
        Click.on(loginButton),
    ),
}

And used the following flow instead:
actor.attemptsTo(
  LaunchTheApp(),
<EMAIL_ADDRESS>'password'),
)

You'd see that the level of indentation reflects how deeply the tasks are nested.
Given Wendy is using us as her supplier
  Wendy Launches the app
    ✓ Wendy enables synchronisation with Angular (0ms)
    ✓ Wendy navigates to '/login' (1s 944ms)
  Wendy authenticates using<EMAIL_ADDRESS>and password 'password'
    ✓ Wendy waits up to 5s until the email field does become visible (146ms)
    ✓ Wendy enters<EMAIL_ADDRESS>into the email field (112ms)
    ✓ Wendy enters 'password' into the password field (47ms)
    ✓ Wendy clicks on the login button (48ms)
# etc.

Does this make sense?

Apparently I was stumbling on the issue due to defining them as interactions instead of tasks - but hadn't been able to find the 2.0 syntax for tasks before now (and didn't think it would be that simple)
Thanks for the help @jan-molak, and keep up the smashing work!

Hey guys, just to let you know, since Serenity/JS is eating up all the free time I have, I'm looking for alternative ways to sponsor its development going forward to make it more sustainable.
I thought I'd experiment with a Github Sponsors profile as a way to do it, so if you or your company find Serenity/JS useful, please consider buying me a coffee every now and then ;-)

@ctaepper,  @asnov, @owlran , @Ijee, @nbarrett, @abhinaba1080, @KyleFairns - thanks a million for helping me iron out the issues with Serenity/JS v2 🙇
I'm happy to announce that the official release is now available on NPM and the new website at https://serenity-js.org.
Please give it a try and let me know your thoughts on Twitter and our new Gitter Chat!

Yesterday i was checking that github was bombarded with commits... I knew
some big is coming... Thanks for all your hard work @jan
Version 2.0 will be a huge success.
On Mon, 3 Feb 2020 at 6:38 PM, Jan Molak<EMAIL_ADDRESS>wrote:

Closed #318 https://github.com/serenity-js/serenity-js/issues/318.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/serenity-js/serenity-js/issues/318?email_source=notifications&email_token=AFQR3UQMGQIAEDHOJVTDEITRBAJNPA5CNFSM4HPB5XWKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOWLYMMSY#event-3002123851,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFQR3UXIGPQEZX3RUPUSHJLRBAJNPANCNFSM4HPB5XWA
.


chore(playground): does not overwrite tsconfig.paths

🔗 Linked issue

❓ Type of change

[ ] 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Hello 👋,
This PR rework the TSConfig in the playground to not overwrite paths from the generated tsconfig file.
📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

Thanks for noticing it. We should not need paths hack


ValueError: Failed to initialize Pyglet window with an OpenGL >= 3+ context

Same problem here, and I have run the code on a ubuntu server. The error reports that "If you're logged in via SSH, ensure that you're running your script with vglrun (i.e. VirtualGL)". But I don' know how.
Have you solved the problem?


wrong expectation

Hey Michael,
I was wondering about your expect library. First I thought that I was using it when writing tests in mocha/chai. But apparently that is a different expect lib, right? The syntax looks slightly different.
Maybe it would be beneficial to clarify that in the top of the readme? Also to note that this expect lib fills some shortcomings, that you encountered with mocha/chai's expect.
Is there no need for sinon.js or chai anymore if one uses your expect?
I do understand the tag line "expect lets you write better assertions." I just do not understand the context; better than what?
Would be very nice if you had the time to clarify this!
Cheers

Better than just a plain assert ;)
Sure, I'll clarify what I mean in the README.


Adding Support for VPN Connections

support create, delete, describe

Could you add a couple tests?

@spulec added tests

thanks!


External monitor plug crashes kitty

Bug or Regression?
Bug
System Info and Version
 System/Version info
Hyprland, built from branch  at commit 9e781040d9067c2711ec2e9f5b47b76ef70762b3  (props: bump version to 0.41.1).
Date: Thu Jun 13 09:54:06 2024
Tag: v0.41.1, commits: 4818

flags: (if any)

System Information:
System name: Linux
Node name: thinkpad
Release: 6.9.4-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Wed, 12 Jun 2024 20:17:17 +0000

GPU information:
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15d8] (rev d2) (prog-if 00 [VGA controller])

os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo

plugins:

======Config-Start======

Config File: /home/davide/.config/hypr/hyprland.conf: Read Succeeded
monitor=eDP-1,preferred,1920x1080,1.2
monitor=HDMI-A-1,preferred,0x0,1
monitor=,preferred,auto,auto

exec-once = waybar
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store

$terminal = kitty --single-instance
$menu = wofi --gtk-dark --show drun --define key_expand=space

env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that

xwayland {
    force_zero_scaling = true
}

# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
    kb_layout = it
    kb_options = caps:escape

    follow_mouse = 1

    touchpad {
        natural_scroll = no
    }

    sensitivity = 0 # -1.0 to 1.0, 0 means no modification.
}

general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    gaps_in = 0
    gaps_out = 0
    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.inactive_border = rgba(595959aa)

    layout = dwindle

    # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
    allow_tearing = false
}

decoration {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    blur {
        enabled = true
        size = 3
        passes = 1
    }

    drop_shadow = yes
    shadow_range = 4
    shadow_render_power = 3
    col.shadow = rgba(1a1a1aee)
}

animations {
    enabled = yes

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}

dwindle {
    # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
}

master {
    # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
    new_is_master = true
}

gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = on
}

misc {
    disable_autoreload = true
}

# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.

# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, C, killactive,
# bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, $menu
# bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle

# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10

# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

# Volume
binde = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
binde = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bind = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle

# Switch to previous workspace
bind = $mainMod, TAB, workspace, previous

# Screen brightness
binde = , XF86MonBrightnessUp, exec, brightnessctl s +5%
binde = , XF86MonBrightnessDown, exec, brightnessctl s 5%-

# Move current workspace to monitor
bind = $mainMod SHIFT, page_up, movecurrentworkspacetomonitor, l
bind = $mainMod SHIFT, page_down, movecurrentworkspacetomonitor, r

# Lock
bind = $mainMod, L, exec, hyprlock

# Clipboard
bind = $mainMod, V, exec, cliphist list | wofi --gtk-dark --dmenu | cliphist decode | wl-copy

# Move active window
bind = $mainMod SHIFT, left, swapwindow, l
bind = $mainMod SHIFT, right, swapwindow, r
bind = $mainMod SHIFT, up, swapwindow, u
bind = $mainMod SHIFT, down, swapwindow, d

======Config-End========

Description
ref. https://github.com/kovidgoyal/kitty/issues/7546
kernel: kitty[756]: segfault at 30 ip 0000715c7312bcb4 sp 00007ffed0b32008 error 4 in libwayland-client.so.0.23.0[715c7312a000+6000] likely on CPU 5 (core 2, socket 0)

How to reproduce

Plug the external monitor
Move the workspace with kitty on the external monitor
Unplug the external monitor
Plug the external monitor again and kitty crashes (segfault, see above)

Crash reports, logs, images, videos
No response

is this a regression? if so please bisect

6967a31450441fc5605c05db6f65505dace4b263 is the first bad commit
commit 6967a31450441fc5605c05db6f65505dace4b263 (HEAD)
Author: Vaxry<EMAIL_ADDRESS>Date:   Sat Jun 8 10:07:59 2024 +0200

    wayland/core: move to new impl (#6268)

    * wayland/core/dmabuf: move to new impl

    it's the final countdown

WAYLAND_DEBUG=1 kitty log please

debug.txt

debug.txt

[3614624.555] {Default Queue} wl_surface#27.enter(nil) and probably related to what's happening in #6503

how is that possible? dafoq?

That if block is not executed I guess: hyprland.log
Off topic but vscode gets stuck at Parsing workspace files: 958 / 2356 (40%) and intellisense doesn't work.

Fixed in v0.41.2 (maybe https://github.com/hyprwm/Hyprland/commit/cff0123ce62a1f721d3aa2ac0fb58019787a7778)


Color coding breaks in php if last character in string isnt space

Issue Type: Bug
If I write:
$id_result = $this->connection->prepare("SELECT @id AS ID");
the following characters in the document( (, ), ?, <, >, {, }, although not [, ] ) are color coded like a string, but writing:
$id_result = $this->connection->prepare("SELECT @id AS ID ");
fixes the color coding.
Testet this with the Color Themes Monokai and Cobalt2.
  What theme is this? Can you share the full file as text?

I cannot really share the full text file these screenshots where already a bit too much actually. In the original post I already stated I tested it with the Cobalt2 and Monokai, but I checked some other color themes at random from the theme-gallery, issue persists independent of the Color Theme.
This is the minimal code I needed to reproduce the bug:
<?php
$sql = "SELECT id AS "
?>

I got some free time now I checked these things:

Removed all php related extensions. Issue persists.
Checked all the default themes, still happens.
Installed new VSCode on seperate drive, still wrong color coding.
-Checked VSCode on my laptop, and, you guessed it, wrong colors.

Can you try updating to 1.33 which was released yesterday? I still can't reproduce it so it may have been fixed.

already did that by reinstalling visual studio code.

And it still happens? Does it happen if you start with --disable-extensions? Not sure if you have some alternate php grammar installed?

Without changing anything about my setup it somehow disappeared today if I can recreate it again I will make a new issue but it seems I cannot reproduce the bug myself anymore.


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_15kj4jussb/clone/recipe/meta.yaml:19: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_15kj4jussb/clone/recipe/meta.yaml:33: missing_imports_or_run_test_py: Python packages require imports or a python test file in tests.
ERROR: /tmp/abs_15kj4jussb/clone/recipe/meta.yaml:43: missing_dev_url: The recipe is missing a dev_url
WARNING: /tmp/abs_15kj4jussb/clone/recipe/meta.yaml:43: documentation_overspecified: Using doc_url and doc_source_url is overspecified
Errors were found


Updated paren handling

Phrases ending in a two-word phrase in parens: the whole phrase should be the subtitle.

Phrases ending in a single-word phrase in parens:  just the last word in parens should be the subtitle.

This would be cool. We'll need to pay close attention to logo generation; long 'turtles' text will wrap when it exceeds the size of the headless chrome window. Some of the image logic may need to be tweaked to accommodate longer 'turtles' text.

Oftentimes Wikipedia's formats for title handling isn't how the target form would (i.e., a TV show title screen). Maybe replace parenthetical stuff with comma'd phrases.
So (let's say) the title "Morton Downey Jr. (show host)" shouldn't really have parentheses at all at that point. For a title screen it'd probably be "Morton Downey Jr., Show Host" if grammatically necessary but with "morton downey jr." in the top, really, the bottom would just need to drop parentheses to be visually distinct.
I also wanted to mention that locales might benefit from special handling in some cases, since Wikipedia treats US states and Japanese districts/prefectures/etc. in ways (using parentheses as well!) that also wouldn't fit the target media's style. Detecting a list of such things inside parentheses might just shift it so it's "comma style", like "Wexler County, Texas Schools" instead of "Wexler County Schools (Texas)". (And to clarify, I do think the original 'title text' above should remain the same, this is only for the image text. It'd really just add a little more to the end result than anything else.)
Just thoughts for the future. ^_^ If I manage to figure out how the code works at some point, I may attempt to submit a PR or two.


Logs not human readable.

With #111 merged, I just installed it in production and restarted the backscope server. I verified that https://numberscope.colorado.edu/api/get_commit now returns 5b54aee, the correct hash for the latest code. Also, https://numberscope.colorado.edu/api/get_oeis_values/A000040/128 indeed returns the list of primes. I then visited https://numberscope.colorado.edu/api/get_oeis_values/A400000/128 and in the browser I got back Error: B-file for ID 'A400000' not found in OEIS. as expected. Then looking in ~scope/repos/backscope, there was a brand new log file in logs/api.log.
So far so good. But now the contents of the file are
{"event": "request issue", "response": "[encoded data, 6364 characters]", "tags": ["http error"], "timestamp": "2024-04-12T19:25:20.029764"}

Now I do understand the fact that much of the content would be base-64 encoded is in the new docs file. But I will admit I did not much look at the exact content of the logs, since I hadn't been the primary reviewer. I guess I presumed that there would be enough plaintext to see the gist of what was going on, and base-64 decoding would be necessary only in a deep dive into details. But in fact, all you can tell is there was some http error. And base64 --decode logs/api.log just prints base64: invalid input. So the logs are not useful without some significant bit of work, which means they are not useful at all in a hypothetical future urgent/hot-fixing/stressful situation.
Therefore, we need to enhance the logging facility in one or more of the following ways I can think of (there might be other possibilities):

Just go ahead and dump in plain text rather than base 64, even though that might be more verbose (?). Maybe this is not feasible because of weirdness such as EOF characters or quote characters possibly being in the response. But perhaps the plain text of the response could be sanitized in some way that would not impair its readability, while still allowing it to be dumped in plain text.

In each entry, dump an intermediately-detailed report in plain text, and the full thing in base64 for when someone really needs to do a deep dive.

Provide a logscope command that knows enough about the format of backscope logs to decode the parts that need to be decoded, and present them in a pleasantly readable format, maybe making the event boundaries very clear (or even, if one wanted to get fancy, presenting a catalog of events and letting the user select one or a range to see in full).

It seems to be working, we just need to be able to access the information conveniently practically.

@katestange @Vectornaut what do you guys think -- is this issue "must," "definitely," or "ideally" for Apr 22?

I'm not sure, maybe "definitely"?  I see the point.  Ideally we could extract the core text from the response, like whether it's about a b-file or whatever.  But it's not higher priority than 1-6 in the project at the moment?

I agree that the base-64 response dump is ugly—but it's pretty ugly in every format I've tried. Base-64 was the most straightforward and reliable way I could think of to store the exact bytes we sent and received.
Writing a simple log browser seems like the most natural solution to me. I also like the idea of reading and filtering log data in an interactive Python session, taking advantage of the machine-readability of the JSON logs.

Glen: I guess I presumed that there would be enough plaintext to see the gist of what was going on

Kate: Ideally we could extract the core text from the response, like whether it's about a b-file or whatever.

Elaborating each log entry with basic summary data from the Response object, like request.method, request.url, and status_code, seems like a fine idea to me. The URL, for example, would make it easy to see whether we requested a B-file or something else.

I am not faulting you for the choice of base-64 in any way, Aaron. Your rationale is perfectly reasonable. It's just that one of the several purposes of logs is to see what is up in real time. And so there needs to be enough human-readable info to support that. So either or both of the items in your last note would be a fine solution to this issue: (i) a simple log browser, which could be something in tools that launches an interactive python session with some helpful functions preloaded and some clear instructions how to proceed shown on screen, if that's the simplest implementation route, or (ii) putting typical fields of interest like the ones you list into the log entries in plain text, even if they are redundant  with the base64 stuff were it to be decoded. Thanks!


extension webview reload not work

VS Code Version: 1.56
OS Version:Mac m1 11.2.2

Steps to Reproduce:
1.craete a extension use webview
2.in webview html add a button and bind click event to call location.reload()
3.only show a blank page
and also have a bug on Command "Developer: Reload Webviews"

it only effect webview on editor panel, not on sidebar or panel
when first call this command, page show blank, and call twice, it works

Yes we don't support modifying the location inside webviews.
Split  webview-view reload issue to #124212


.NET Standard support

Is there any plan for .NET Standard support?

I did a pr: #56

I added a beta version of MarcelloDB 1.0.3 on nuget.
Could you guys try installing it and see if it installs and behaves correctly?
@roubachof if the beta package works, I'm gonna stick with packaging the pcl as the netstandard 1.1. (at least for now)
Thanks again for the PR, but this way will give me less headaches :-)

I just published a 1.0.3 on nuget.
It should have support for netstandard1.1, fixes support for Universal Windows as well.


feat: created accordion component

Creation of accordion component (via two new content types, accordion, and accordion section)
Changes to Image Card content type to allow images to sit well inside accordions

:tada: This PR is included in version 3.3.0-next.7 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 3.3.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


2213273_2312469_2311744_2310707_2212941

Algorithm Overview

Dynamic Programming (DP)
Dynamic Programming solves problems by breaking them down into smaller subproblems and storing the solutions to avoid redundant calculations. It is effective for optimization problems like the 2D Cutting Stock Problem, aiming to minimize waste and improve efficiency.

Simulated Annealing (SA)
Simulated Annealing is a probabilistic optimization technique inspired by the annealing process in metallurgy. It explores the solution space by accepting worse solutions with decreasing probability, aiming to find a global optimum while avoiding local minima.

Summary
This pull request implements a comparative evaluation of Dynamic Programming (DP) and Simulated Annealing (SA) algorithms for solving the 2D Cutting Stock Problem. The comparison focuses on three primary metrics:

Area Wasted
Area Wasted Ratio (proportion of unused area)
Execution Time

Results

Episode
Algorithm
Area Wasted
Area Wasted Ratio
Time (s)

1
DP Policy
8796.0
0.2062
13.00

SA Policy
21551.0
0.3889
19.00

2
DP Policy
27315.0
0.2716
22.00

SA Policy
45568.0
0.3835
28.00

3
DP Policy
13661.0
0.2120
22.00

SA Policy
51981.0
0.5058
29.00

4
DP Policy
25731.0
0.1324
110.00

SA Policy
125679.0
0.4271
87.00

5
DP Policy
20598.0
0.1751
52.00

SA Policy
93084.0
0.4897
49.00

6
DP Policy
8835.0
0.3865
4.00

SA Policy
18367.0
0.5671
10.00

7
DP Policy
41585.0
0.2243
64.00

SA Policy
162197.0
0.5300
62.00

8
DP Policy
22195.0
0.1504
56.00

SA Policy
103151.0
0.4513
56.00

9
DP Policy
20763.0
0.1703
58.00

SA Policy
109284.0
0.5193
52.00

10
DP Policy
21659.0
0.1997
39.00

SA Policy
90733.0
0.5111
39.00

Summary

Dynamic Programming significantly reduces the area wasted and the area wasted ratio compared to Simulated Annealing.

Please revise the PR in Dec 16. Otherwise, your group will get 0 score for code.

"Could you please clarify which part our group is getting wrong?"

thank you, teacher
Vào Th 2, 16 thg 12, 2024 vào lúc 19:16 Duc Quang Nguyen <
@.***> đã viết:

sorry, your pr is good to be merged
—
Reply to this email directly, view it on GitHub
https://github.com/martinakaduc/MM241-Assignment/pull/148#issuecomment-2545473433,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BNWQMK6THFVXYEDB7WEOCTL2F3AALAVCNFSM6AAAAABTTV7EJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBVGQ3TGNBTGM
.
You are receiving this because you authored the thread.Message ID:
@.***>


Login screen responsiveness

Update files related to the login screen for the purpose of making the screen responsive on mobile devices.
Width Breakpoint: lower than 677px
The logo image it's on public\logo.png
Figma page reference

Done it


* prefixed to line 1 headers upon restart

Image above shows 4 * when there should only be 1. Not sure how, but they are added randomly as I restart SB. I'm on my edge but versioned as 0.7.7

I'm confused, so what's the actual markdown on the page?

The original text was # KUL, after subsequent restarts, it became # * * * KUL

It also happens when the original text is - KUL, after subsequent restarts, it became * * - KUL

I have more insights into this problem and it seems to be related to another problem that I observed for quite a while.

My homepage is set to the daily journal
If I start it for the first time of the day, it opens a day's journal and adds a *, why does it do that?
And it seems that SB now sometimes also adds a * to the start even when the day's journal already has some info

Makes sense?
Pt 2 is another problem because when I go to my Journals page, which is a collection of all the days' journal, there are often blank days that I wish did not show up (because I opened SB but did not type anything for that day). My expectation is, if I did not type anything, the page should just discard itself.

I dug a bit a found the problem Library/Journal/New Page/Daily Note has * |^|, which I promptly removed.
But I think the issue of adding stuff behind the scens to an existing page still exists.


what's this project does?

It's an automatic patching/modding tool for the MMO named Mabinogi with various QoL/graphical mods included.


[WIP] Foundations for updated frontend design methodology & system

Resolves #001
Description

Type of change

Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
This change requires a documentation update
Documentation update

How Has This Been Tested?

Screenshots

Should we be merging this as a target into main or into a separate branch? My thought is if it is a separate branch we can divvy up all the work after for the various pages easier.

@seanmarcia I think we ought to close this PR and then clean up the house before moving over to a new theme. A very good point brought up in the meeting is that it seems like we are trying to solve 2 separate problems. Themeing and the front end (JS/stylesheets). The JS is the most annoying that is keeping us from extending/maintaining the application.
As a side note, one thing we were wondering is what problems are we addressing by moving to a new theme? I think this got lost in translation so its hard to know how to prioritize this against all the other objectives.


[BUG]: uninstall issue v 1.4..4

How are you running AnythingLLM?

OMG

This is because the app is running and you are trying to delete files while the app is running and/or you lack the permissions on the file.
There is literally an uninstall exe you can run.
https://docs.useanything.com/uninstall#uninstalling-on-windows

and no "APP" and no "process"  is running named "AnythingLLM "

same bug 1.5.5


instance NFData k => NFData1 (HashMap k) and instance NFData2 HashMap

I'm filing this issue to request NFData1 and NFData2 instances for HashMap. If no one else does, I'll write the instances in the next 48 hours and submit a pull request.

Done in #314.


TableColumn Extensions documentation is misleading

Setup

Rancher version: v2.7.3

Describe the bug
This page has a screenshot about the position of the TableColumn extensions. The screenshot also says "New table columns will be added to the end of the table (before inline actions)" and indicates with a double line the position of the new column.
This is not the position the column will appear. According to this function https://github.com/rancher/dashboard/blob/master/shell/store/type-map.js#L236 the column will be inserted before the "Age" column (if Age is the last column).
To Reproduce
Create a simple TableColumn:
plugin.addTableColumn(
  TableColumnLocation.RESOURCE,
  { resource: ['pod'], mode: ['list'] },
  {
    name:          'cluster-location',
    label:         'hello',
    getValue: (row: any) => {
      return `${ row.id }-DEMO-COL-STRING-ADDED!`;
    },
    width:         100,
    sort:          ['stateSort', 'nameSort'],
    search:        ['stateSort', 'nameSort']
  }
);

Result
The column will appear before the "Age" column.
Expected Result
According to the documentation the "Age" column does not have any influence to the position of the table columns.
Screenshots

Additional context
In my opinion, hardcoding the Age column is not a good idea. There are cases where there are action buttons after the Age, for example the Cluster management view (.../dashboard/c/_/manager/provisioning.cattle.io.cluster) with the "Explore" button (which is a column on its own without any ID or header name).

Fixed with https://github.com/rancher/dashboard/pull/9186


AMQP-706: Improve DefaultClassMapper Documentation

JIRA: https://jira.spring.io/browse/AMQP-706

I wonder how Travis failure is related to your changes:
org.springframework.amqp.support.converter.DefaultClassMapperTests > shouldReturnHashtableForFieldWithHashtable FAILED

    java.lang.AssertionError at DefaultClassMapperTests.java:93

Most likely because I didn't run a build 😄
Oops...
Fixing

Merged as https://github.com/spring-projects/spring-amqp/commit/8fc9e4e91cadccca1c87729aa173e6710e29a0ea


onSendProgress "jumps" to 99% and waits there until finished

Please see this issue:
https://stackoverflow.com/questions/61635094/flutter-how-to-increase-onsendprogress-calls-for-a-fluid-progress-bar-animation
It's happening to me too and it looks like a bug in Dio.
Platform name is Flutter, Dio version is 3.0.10.

Problem still exists, please don't close.

yes same here

this is how I'm using it and the output is not accurate
      "file": MultipartFile.fromBytes(await File(filePath).readAsBytes(),
          filename: fileName),
    });

    Response response = await dio.post(
      url,
      data: formData,
      onSendProgress: onSendProgress,
    );

up up

Still no fix
Please keep it open

Still no fix
Please keep it open

use MultipartFile.fromFileSync(file.path, filename: basename(file.path)) this working !

use MultipartFile.fromFileSync(file.path, filename: basename(file.path)) this working !

static Future<MultipartFile> fromFile(
    String filePath, {
    String filename,
    MediaType contentType,
  })

it's work too.

static Future<MultipartFile> fromFile(
    String filePath, {
    String filename,
    MediaType contentType,
  })

it's work too.

use MultipartFile.fromFileSync(file.path, filename: basename(file.path)) this working !

fromFileSync isn't available in Flutter Web.
onSendProgress still not working correctly (0% and then 100%)

use MultipartFile.fromFileSync(file.path, filename: basename(file.path)) this working !

fromFileSync isn't available in Flutter Web.
onSendProgress still not working correctly (0% and then 100%)

==========================working :=======================
1.use MultipartFile.fromFile(file.path)
2. use MultipartFile.fromFileSync(file.path, filename: basename(file.path))
those percentages as well. E.g. 10%, 20%, 50%, 75% etc.
==========================now working=====================

MultipartFile.fromBytes(fileData)

flutter: progress: 0.000003035281907563734 (29/9554302)
flutter: progress: 0.000013187776563897604 (126/9554302)
flutter: progress: 0.999996546058519 (9554269/9554302)
flutter: progress: 0.9999967553883057 (9554271/9554302)
flutter: progress: 1.0 (9554302/9554302)
As you can see it jumps from 0% to 100%
code 👍
`Future postObjectWithFile(
File file,
String bucketName,
String fileKey, {
ProgressCallback onSendProgress,
ObjectACL acl = ObjectACL.inherited,
}) async {
assert(acl != null, "ACL不能为空");
final OSSCredential credential = await credentialProvider.getCredential();
FormData formData = FormData.fromMap({
  //文件名，随意
  'Filename': fileKey,
  //"可以填写文件夹名（对应于oss服务中的文件夹）/" + fileName
  'key': fileKey, //上传后的文件名
  'policy': SignUtil.getBase64Policy(),
  //Bucket 拥有者的AccessKeyId。
  //  accessKeyId 大小写 和服务端返回的对应就成，不要在意这些细节  下同
  'OSSAccessKeyId': credential.accessKeyId,
  //让服务端返回200，不然，默认会返回204
  'success_action_status': '200',
  'signature': SignUtil.getSignature(credential.accessKeySecret),
  //临时用户授权时必须，需要携带后台返回的security-token
  'x-oss-security-token': credential.securityToken,
  // 指定OSS创建Object时的访问权限
  'x-oss-object-acl': acl.parameter,
  'file': await MultipartFile.fromFile(file.path),
});

final dio = DioUtil.getDio();
final res = await dio.post(
  'https://$bucketName.$endpoint',
  options: Options(
    responseType: ResponseType.plain,
  ),
  data: formData,
    onSendProgress: onSendProgress
);

return OSSResponse(res.statusCode, res.statusMessage, fileKey);

}`

I'm using Dio in my project but I couldn't write method that uploads file and show progress bar. I wrote code that uses "raw" Dart classes:
FormData and HttpRequest
and everything works perfect. HttpRequest has upload.onprogress getter that works correct (e.g. 0 - 10% - 35% -73% - 100%).
In dio source code there is file src/adapters/browser_adapter.dart that is implementation of 'request' but dio authors dont't use HttpRequest.upload.progress which like I said earlier, works perfect.

I'm experiencing the same behaviour with dio: ^3.0.10.
I'm using Flutter web and loading UInt8List filebytes into formData.
formData = FormData.fromMap(
 {
'file' : MultipartFile.fromBytes(fileBytes);
});

I upload the formData using POST as follows:
dio.Response response = await http.post(preSignedURL['url'],
      data: formData,
      options: dio.Options(
            headers: {dio.Headers.contentTypeHeader: 'multipart/form-data',
              dio.Headers.contentLengthHeader: formData.length}),
      onSendProgress: progress
);

The Function progress prints out int sent andint totaland I get this output:
......
Uploading 2969 out of 4016084 bytes... 0.0739 %
js_primitives.dart:30 Uploading 2998 out of 4016084 bytes... 0.0746 %
js_primitives.dart:30 Uploading 3085 out of 4016084 bytes... 0.0768 %
js_primitives.dart:30 Uploading 4016051 out of 4016084 bytes... 100 %
js_primitives.dart:30 Uploading 4016053 out of 4016084 bytes... 100
.....
As you can see, it jumps from 0% to 100%. When it hits 100% it just waits until the file uploads. After this, there is an XMLHttpRequest error thrown

same problem here ...

problem still remains ...

after two years still, dio have this issue

This problem still remains, please someone find any ans let us know

I have found the resolution.
Just use file.openRead() as the request's data param while PUT a file.
For MultipartFile maybe it can use MultipartFile(file.openRead(), file.lenthSync()). But I did not verify this, someone can try it if necessary.
var client = Dio();
await client.put(
  url,
  data: file.openRead(),
  options: dio.Options(
    headers: headers,
  ),
  onSendProgress: (int sent, int total) {
    print('progress: ${(sent / total * 100).toStringAsFixed(0)}% ($sent/$total)');
  },
);

The progress callback is smooth now.
I/flutter (19907): progress: 9% (65536/734883)
I/flutter (19907): progress: 18% (131072/734883)
I/flutter (19907): progress: 27% (196608/734883)
I/flutter (19907): progress: 36% (262144/734883)
I/flutter (19907): progress: 45% (327680/734883)
I/flutter (19907): progress: 54% (393216/734883)
I/flutter (19907): progress: 62% (458752/734883)
I/flutter (19907): progress: 71% (524288/734883)
I/flutter (19907): progress: 80% (589824/734883)
I/flutter (19907): progress: 89% (655360/734883)
I/flutter (19907): progress: 98% (720896/734883)
I/flutter (19907): progress: 100% (734883/734883)

also try this header, example: await client.put (
url,
options: dio.Options (
headers: {
'Accept-Ranges': 'bytes',
       },

),
onSendProgress: (int sent, int total) {
print ('progress: $ {(sent / total * 100) .toStringAsFixed (0)}% ($ sent / $ total)');
},
);

@zhpoo Thank you :)
MultipartFile(file.openRead(), file.lenthSync()) works !

this does not work on flutter-web

This is because fromBytes is data read directly from memory, which is much faster than reading from a file.

Still broken - the only viable solution that I found is to resort to vanilla JS as explained in the SO answer https://stackoverflow.com/a/67513990/445090

this does not work on flutter-web .. plz fix it.
O _ O

I confirm that it doesn't work with flutter web : it jumps to 100% at the start of upload, event if it just started...

this bug still exits on 4.0.6

Same problem. data: file.openRead() is not good enough:
progress: 0.24213404271041158
progress: 0.48426808542082317
progress: 0.7264021281312347
progress: 0.9685361708416463
progress: 1.0

bug still found in version 5.33

bug still found in version 5.3.4

Please file new issues with a minimal reproducible example. Thanks.


Control flow analysis for dependent parameters doesn't work for methods

Bug Report
🔎 Search Terms
control flow analysis, dependent parameters, methods, #47190, #48110
🕗 Version & Regression Information
This behavior has been present since #47190 was merged, so TS4.6.
⏯ Playground Link
Playground link with relevant code
💻 Code

interface Foo {
  method(...args: ['a', number] | ['b', string]): void
};

const methodSyntax: Foo = {
  method(kind, payload) {
    if (kind === 'a') {
      payload.toFixed(); // error, Property 'toFixed' does not exist on type 'string | number'
    }
    if (kind === 'b') {
      payload.toUpperCase(); // error, Property 'toUpperCase' does not exist on type 'string | number'
    }
  }
}

🙁 Actual behavior
Checking kind inside the body of method() does not narrow payload from string | number.
🙂 Expected behavior
Given #47190, I'd expect kind === 'a' to narrow payload to number, and kind === 'b' to narrow payload to string, which does happen when method is a function expression:
const funcExpr: Foo = {
  method: function (kind, payload) {
    if (kind === 'a') {
      payload.toFixed()  // okay
    }
    if (kind === 'b') {
      payload.toUpperCase(); // okay
    }
  }
}

And when method is an arrow function:
const arrowFunc: Foo = {
  method: (kind, payload) => {
    if (kind === 'a') {
      payload.toFixed(); // okay
    }
    if (kind === 'b') {
      payload.toUpperCase(); // okay
    }
  }
}

And by #46266 when destructured from a rest argument:
const manualDestructuring: Foo = {
  method(...args) {
    const [kind, payload] = args;
    if (kind === 'a') {
      payload.toFixed(); // okay
    }
    if (kind === 'b') {
      payload.toUpperCase(); // okay
    }
  }
}

I don't know whether this is really a bug or just a follow-up feature request to add to #46658 / #47190.  For context: I mentioned this in #47190, and @Andarist has written a PR for it at #48110.

Seems like an oversight


Can't see data from mbtiles in Android

I am trying to use mbtiles file as in this issue: https://github.com/tangrams/tangram-es/issues/1309 . But I am not able to see anything on map. I am using this mbtiles source file from that issue: https://openmaptiles.os.zhdk.cloud.switch.ch/v3.3/extracts/moscow_russia.mbtiles . And also this scene.yaml file: https://gist.github.com/rwrx/8f3e72615fc629edff40fa0e749715f6 . It has sources defined as:
osm:
        type: MVT
        url: file:///storage/emulated/0/moscow_russia.mbtiles
        max_zoom: 16

In Tangram-ES in Android I have enable LOG_LEVEL 3 and I can see this log message:
mbtilesDataSource.cpp:251: SQLite database opened: /storage/emulated/0/moscow_russia.mbtiles
and also this kind of messages:
mbtilesDataSource.cpp:159: loaded tile: 308/159/9/9, 31840
But on map I see nothing. I am on Moscow coordinates but nothing is showing. Are mbtiles files supposed to work correctly on Android? Or which kind of mbtiles do I need? Thank you a lot.

The scene file in your GIST uses the Tilezen schema, but OpenMapTiles uses a different schema. So you'd need a modified Tangram scene file that uses that other schema.

Thank you. Is there some tool for changing schema to OpenMapTiles? Or better how can I create mbtiles file with Tilezen schema?

While Mapzen doesn’t currently offer offline tile packs, you can use
https://github.com/tilezen/tilepacks to experiment. Please keep your
bounding box small (don’t do an entire state or country). If you need
something for production we can setup a support call.
On Tue, Jun 20, 2017 at 2:41 PM, rwrx<EMAIL_ADDRESS>wrote:

Thank you. Is there some tool for changing schema to OpenMapTiles? Or
better how can I create mbtiles file with Tilezen schema?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tangrams/tangram-es/issues/1544#issuecomment-309900051,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA0EO7DOnc48VJOKqJdumiy1EH2E4jK_ks5sGDx9gaJpZM4OAKaS
.

Thank you a lot. Is it also possible to do this offline on my computer? In that case I will need to run Tilezen map server on my computer and download OpenStreetMap data, right? Is there some tutorial how to do this? Thank you.

No need to download all of OSM, the tilepack software just requires a
Mapzen API key and requests tiles from the live service.
On Tue, Jun 20, 2017 at 4:18 PM, rwrx<EMAIL_ADDRESS>wrote:

Thank you a lot. Is it also possible to do this offline on my computer? In
that case I will need to run Tilezen map server on my computer and download
OpenStreetMap data, right? Is there some tutorial how to do this? Thank you.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tangrams/tangram-es/issues/1544#issuecomment-309918481,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA0EO2LSN0QMem0FSUR908lFF1YS96FWks5sGFNEgaJpZM4OAKaS
.

I understand, but in case when I don't want to use your servers to get tiles, could I run Tilezen on my machine?

Yes, though you may find more than a single machine is required to generate the world.

I am new to this stuff, but I also want to learn about this more. So just one last question and I will close this issue. When I will follow this setup https://github.com/tilezen/vector-datasource/wiki/Mapzen-Vector-Tile-Service I will be able to run this tile server? Thank you a lot for your help.

Generally speaking, yes. If you run into problems file issues in that
vector-datasource repo and we can work thru them there.
On Tue, Jun 20, 2017 at 4:54 PM, rwrx<EMAIL_ADDRESS>wrote:

I am new to this stuff, but I also want to learn about this more. So just
one last question and I will close this issue. When I will follow this
setup https://github.com/tilezen/vector-datasource/wiki/Mapzen-
Vector-Tile-Service I will be able to run this tile server? Thank you a
lot for your help.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tangrams/tangram-es/issues/1544#issuecomment-309923755,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA0EO8nJClVB7Bm9IKoP033rTECSlepeks5sGFuYgaJpZM4OAKaS
.

Ok, thank you.


Fix ROCm Dockerfile not working

This PR fixes the issue that ROCm Docker images not working due to missing hipfft and LD_LIBRARY_PATH. Also, now that Ubuntu 18.04 and Python 3.8 are deprecated in CuPy v13, we have to migrate to Ubuntu 20.04 and Python 3.9 instead.
To prevent the future error, I've added RUN python3 -c "import cupy; cupy.show_config()" line to verify that CuPy can be imported.

CI passed, ready for review.

Docker image for v13.0.0b1 deployed:
https://github.com/cupy/cupy/actions/runs/5817283513


feat: improved error management, and support non-utf8 classnames

Codecov Report
Attention: Patch coverage is 41.37931% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 55.19%. Comparing base (e3ee675) to head (5f518b9).

Files
Patch %
Lines

src/Command/AnalyzeCommand.go
0.00%
6 Missing and 1 partial :warning:

src/Engine/Php/PhpRunner.go
0.00%
6 Missing :warning:

src/Analyzer/Aggregator.go
33.33%
1 Missing and 1 partial :warning:

src/Engine/Golang/GolangRunner.go
33.33%
1 Missing and 1 partial :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
- Coverage   55.22%   55.19%   -0.03%
==========================================
  Files          39       39
  Lines        2691     2712      +21
==========================================
+ Hits         1486     1497      +11
- Misses       1023     1030       +7
- Partials      182      185       +3

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


DBZ-4952 Update 2.0 docker images, remove avro & guava dependency

https://issues.redhat.com/browse/DBZ-4952

[x] Added 2.0 docker images
[x] Remove avro dependency from connect-base/2.0 image
[x] Remove guava dependency connect-base/2.0 image

@ani-sha Applied, thanks!


Expose datasource fields directly

This change addresses #431, and exposes datasource fields directly via a fields() method.  This should allow Mapbox Studio to retrieve just the fields it needs without incurring some other potentially expensive side-effects of calling describe() on the datasource.

Brilliant - and keeps back compat, so great for the v3.3.1 release that @flippmoke aims to push out early next week once #448 lands.


brand new to oauth2, basic questions

I am trying to connect to the allscripts.com FHIR server with oauth2. I installed the oauth2-client and I've been trying to understand how it works. The allscripts.com documentation near the bottom of the page here:
[]https://developer.allscripts.com/Content/fhir/content/overview/
lists an authorize and token server, but it doesn't list a resource server, which the oauth2-client needs. I'm not sure what to put for that. I tried entering
'urlResourceOwnerDetails' => 'https://tw171.open.allscripts.com/FHIR/Patient',
When the page redirected to my redirect url I got this:
[]http://<redirect_url>?error=invalid_request&state=2a1587af166bc939faa7d3400b7495ef
I'm not sure what that error means or the state code.
Also, I am unclear as to where the code block (starting with if(!isset($_GET['code'])){...) in the example here
[]https://github.com/thephpleague/oauth2-client
should go. Would it be on every page in the application?
I'm very sorry for such basic questions. Thank you for any help.

lists an authorize and token server

In short, after looking through their docs, it looks like this is how you need to configure the request, using the GenericProvider:
$provider = new \League\OAuth2\Client\Provider\GenericProvider([
    'clientId'                => 'YOUR_CLIENT_ID',
    'clientSecret'            => 'YOUR_SECRET',
    'redirectUri'             => 'http://example.com/your-redirect-url/',
    'urlAuthorize'            => 'https://tw171.open.allscripts.com/authorization/connect/authorize',
    'urlAccessToken'          => 'https://tw171.open.allscripts.com/authorization/connect/token',
    'urlResourceOwnerDetails' => '???',
    'scopes'                  => ['permissions', 'your', 'app', 'requests'],
]);

but it doesn't list a resource server, which the oauth2-client needs. I'm not sure what to put for that.

I think you're on the right path here, but their server doesn't provide an authenticated "me" (or user/owner) resource like many other services do, so this is going to be tricky.
What you really need is this URL:
https://tw171.open.allscripts.com/FHIR/Patient/id

Where that "id" on the end is the identifier for the user who has authorized access.
Unfortunately, it doesn't look like you can get to this URL without using https://tw171.open.allscripts.com/FHIR/Patient to search for a patient, and even then, I'm not sure how you're able to get the record for the patient that is currently authorized, unless a simple request with no parameters to that search endpoint returns search results that list all patients the currently authorized user can access.
As a result, you may not be able to use the GenericProvider for your case, since it requires a urlResourceOwnerDetails. However, that's not a problem. The library is meant to be extended, so all you really need to do is write your own class. Something like this should do the trick:
namespace My\OAuth2;

use League\OAuth2\Client\Provider\AbstractProvider;
use League\OAuth2\Client\Token\AccessToken;
use League\OAuth2\Client\Tool\BearerAuthorizationTrait;
use Psr\Http\Message\ResponseInterface;

class AllscriptsProvider extends AbstractProvider
{
    use BearerAuthorizationTrait;

    /**
     * Get authorization url to begin OAuth flow
     *
     * @return string
     */
    public function getBaseAuthorizationUrl()
    {
        return 'https://tw171.open.allscripts.com/authorization/connect/authorize';
    }

    /**
     * Get access token url to retrieve token
     *
     * @param  array $params
     *
     * @return string
     */
    public function getBaseAccessTokenUrl(array $params)
    {
        return 'https://tw171.open.allscripts.com/authorization/connect/token';
    }

    /**
     * Get provider url to fetch user details
     *
     * @param  AccessToken $token
     *
     * @return string
     */
    public function getResourceOwnerDetailsUrl(AccessToken $token)
    {
        // You don't have one. You might consider throwing an exception here so
        // that, when this is called, you get an error and can code your
        // application to ensure that nothing calls this.
        //
        // Note that $this->getResourceOwner() is the most likely culprit for
        // calling this. Just don't call getResourceOwner() in your code.
    }

    /**
     * Get the default scopes used by this provider.
     *
     * This should not be a complete list of all scopes, but the minimum
     * required for the provider user interface!
     *
     * @return array
     */
    protected function getDefaultScopes()
    {
        return ['permissions', 'your', 'app', 'requests'];
    }

    /**
     * Check a provider response for errors.
     *
     * @throws IdentityProviderException
     * @param  ResponseInterface $response
     * @param  array $data Parsed response data
     * @return void
     */
    protected function checkResponse(ResponseInterface $response, $data)
    {
        // Write code here that checks the response for errors and throws
        // an exception if you find any.
    }

    /**
     * Generate a user object from a successful user details request.
     *
     * @param array $response
     * @param AccessToken $token
     * @return \League\OAuth2\Client\Provider\ResourceOwnerInterface
     */
    protected function createResourceOwner(array $response, AccessToken $token)
    {
        // Leave empty. You can't use this, since you don't have a clear
        // resource owner details URL. You might consider throwing an
        // exception from here, as well. See note on
        // getResourceOwnerDetailsUrl() above.
    }
}

Then, all you need to do is:
$provider = new AllscriptsProvider([
    'clientId'                => 'YOUR_CLIENT_ID',
    'clientSecret'            => 'YOUR_SECRET',
    'redirectUri'             => 'http://example.com/your-redirect-url/',
]);

If the scopes you require differ from what you put in the default scopes for the class, you can pass those in here, as well.

I'm not sure what that error means or the state code.

The error could be because you didn't provide any scopes; I'm not certain.
For the state code, before redirecting the user to the authorization URL, you'll want to do something like this:
$_SESSION['oauth2state'] = $provider->getState();

That stores the generated state code to the user's session. Then, when the provider redirects back to your redirectUri, you want to check the state code they give you against the one stored in the user's session. If it doesn't match, then that tells you something fishy is going on:
if (empty($_GET['state']) || (isset($_SESSION['oauth2state']) && $_GET['state'] !== $_SESSION['oauth2state'])) {
    if (isset($_SESSION['oauth2state'])) {
        unset($_SESSION['oauth2state']);
    }

    // Something fishy happened. Ask the user to attempt to authorization again.
}

Also, I am unclear as to where the code block [...] should go

No, it doesn't need to be on every page. This should only be on the page that you define as your redirectUri. That's where you'll do these checks and then store the access token somewhere to use later when making Allscripts API requests on other pages.
Hope this helps!

Thank you so much for this detailed response! I will test it out this week.

In my test it returned this in the redirect url:
https://tw171.open.allscripts.com/authorization/connect/authorize?state=f2ca17c6811046d738061f529b9c5fdf&scope=permissions%2Cyour%2Capp%2Crequests&response_type=code&approval_prompt=auto&redirect_uri=<redirect_url>&client_id=<client_id>
and in my browser:

Secure Connection Failed
The connection to the server was reset while the page was loading.
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.

I'm not sure if I did something wrong or if the problem is on their side. It seems that their documentation is lacking.

I am very new to OAuth2. I am trying to implement split payments api into my project.
I have completed first task of Authorisation and in callback.php I have saved the refresh_token and expires_at values in database for the user and access_token in session.
I have few question of how should I approach from here.

After 2 hours the access_token expires so should I store expires_at values in session as well or determine if the access_token is expired or not based on the response.

If I were to determine that based on the response then in case of expired token or Revoked Access I get the same status code = 401. How should I make a request that it determines the response has 401 code and should get the refresh_token to get new access_token or send user for Authorisation process again.

I am using the same extended class AllscriptsProvider  you provided up here.
Thank you

The documentation is complete.
If you look at the thephpleague/oauth2-client github page or view the README.md file, you can see under the 'Providers' heading in the setup instructions that there is a link to an explanation of how to develop a custom provider.
The remainder of this comment is an excerpt from that file...
"The AbstractProvider does not specify an access token resource owner identifier. It is the responsibility of the provider class to set the ACCESS_TOKEN_RESOURCE_OWNER_ID constant to the string value of the key used in the access token response to identify the resource owner.
/**
 * @var string Key used in the access token response to identify the resource owner.
 */
const ACCESS_TOKEN_RESOURCE_OWNER_ID = null;

Once this is set on your provider, when calling AbstractProvider::getAccessToken(), the AccessToken returned will have its $resourceOwnerId property set, which you may retrieve by calling AccessToken::getResourceOwnerId().
The next step is to implement the AbstractProvider::createResourceOwner() method. This method accepts as parameters a response array and an AccessToken. You may use this information in order to request resource owner details from your service and construct and return an object that implements League\OAuth2\Client\Provider\ResourceOwnerInterface. This object is returned when calling AbstractProvider::getResourceOwner()."


pip install needs requirements.txt

Yikes!  The pip install did not install the additional requirements.
python3 -m venv try-hklpy
source try-hklpy/bin/activate
python3 -m pip install hklpy pygobject

Originally posted by @prjemian in https://github.com/bluesky/hklpy/issues/212#issuecomment-1160875420

Can't install libhkl via pip:
ERROR: Could not find a version that satisfies the requirement hkl (from versions: none)
ERROR: No matching distribution found for hkl

Let's push a new 1.0.3 release to test these requirements.