[Feature Request] Guard against unnecessary int call on functions that already yield integer

While cleaning up our code base, I noticed the following anti-patterns (?) which seem pretty well-spread:
num = 0.5

# `round` with `ndigits=None` (default value) already gives int
int(round(num))

# I believe `int(round(num, 0))` gives the same result as `round(num)`
int(round(num, 0))

# The same applies to `len`
int(len([1, 2, 3])

# `sourcery` seems to have a rule to suggest against the following
# WARNING: `//` is the floor division, for negative results their behaviors are different
int(positive_number / 2)  # -> positive_number // 2

# Some `math` functions also give int only (perhaps there are more that I'm missing):
- math.ceil
- math.comb
- math.floor
- math.factorial
- math.gcd
- math.lcm

int(math.ceil(num))

Also calling int on round(num, ndigits) (with ndigits not as None) in general might be a bad idea as results may very likely be suprising:
round(2.994, 2)  # -> 2.99
round(2.995, 2)  # -> 3.0

int(round(2.994, 2))  # -> 2
int(round(2.995, 2))  # -> 3

round(2.994)  # -> 3
round(2.995)  # -> 3

On top of the unnecessary verbosity, this also comes with performance penalty, trying to work on 10 floats for 1_000_000 repetitions:
Time taken for round(): 0.805204 seconds
Time taken for int(round()): 0.946426 seconds
Time taken for math.ceil(): 0.429992 seconds
Time taken for int(math.ceil()): 0.524181 seconds

 Test script (by GPT)
import timeit
import math

def round_function(value):
    return round(value)

def int_round_function(value):
    return int(round(value))

def int_ceil_function(value):
    return int(math.ceil(value))

def ceil_function(value):
    return math.ceil(value)

# Set up the test data
test_values = [0.1, 1.5, 2.3, 3.7, 4.8, 5.9999, -1.5, -2.3, -3.7, -4.8]

# Number of repetitions for the benchmarking
repetitions = 1_000_000

# Benchmarking round()
time_round = timeit.timeit(
    stmt='for v in test_values: round_function(v)',
    setup='from __main__ import round_function, test_values',
    number=repetitions
)

# Benchmarking int(round())
time_int_round = timeit.timeit(
    stmt='for v in test_values: int_round_function(v)',
    setup='from __main__ import int_round_function, test_values',
    number=repetitions
)

# Benchmarking int(math.ceil())
time_int_ceil = timeit.timeit(
    stmt='for v in test_values: int_ceil_function(v)',
    setup='from __main__ import int_ceil_function, test_values',
    number=repetitions
)

# Benchmarking math.ceil()
time_ceil = timeit.timeit(
    stmt='for v in test_values: ceil_function(v)',
    setup='from __main__ import ceil_function, test_values',
    number=repetitions
)

print(f'Time taken for round(): {time_round:.6f} seconds')
print(f'Time taken for int(round()): {time_int_round:.6f} seconds')
print(f'Time taken for math.ceil(): {time_ceil:.6f} seconds')
print(f'Time taken for int(math.ceil()): {time_int_ceil:.6f} seconds')

It should be noted that while some might be decidable by Ruff, few of the cases require type analysis which is, as far as I am concerned, currently out of scope of this linter.

Thanks for the suggestion and the detailed write up! this makes sense to me. I merge this into https://github.com/astral-sh/ruff/issues/11412

Thanks a ton @MichaReiser and sorry I missed this


[FLINK-9343] [Example] Add Async Example with External Rest API call

What is the purpose of the change
Example to simulate Async GET api call on an input stream.
Brief change log

Async I/O is a good way to call External resources such as REST API and enrich the stream with external data.

Adding example to simulate Async GET api call on an input stream.

Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@StephanEwen please review

@tzulitai I would appreciate if you review this.

@zentol I would appreciate if you review this. We use this type of example for enriching our Steam data via API call which is very common use-case and I think it would be useful for other people to have an example for it.

I had a quick look at the code example, and it looks like it might not actually do asynchronous I/O.
It dispatches a synchronous HTTP request on a direct executor (onCompletes in a direct executor as well), which should result us purely synchronous operations.
Have you verified that this does in fact send off multiple requests concurrently (beyond the parallelism)?

Async I/O works best with asynchronous clients. For synchronous client, you need a threadpool or something else to concurrently fire off requests.

@StephanEwen Thanks for review.
make sense, I will update the client code to use Threadpool and will run more tests.

@StephanEwen I updated the code and used ExecutionContext.global which makes use of threadpool.
I tested it and results showed that the code sent off multiple requests concurrently (parallelism = 1).
Bellow result shows that waiting time was overlaying with sending other requests and receiving responses
Output format: (Quote Number, {Quote API response}) which Quote Number was sequential input.

Bellow result is when I called the external api within streaming API which shows the call is blocked until request got resolved

@StephanEwen PR is updated as requested! I would appreciate if you review.

@azagrebin Thanks for the review. I will go through them and update the PR accordingly

Hi @medcv, do you have some ETA for the PR changes?

Thanks for opening this PR @medcv. I'm not sure whether this example adds more value than the example on the documentation page. If I'm not overlooking something, I would suggest to close this PR. What do you think @medcv?

Closing the PR as a result of the above discussion.


add Byteball wallet 1.9.3

If there’s a checkbox you can’t complete for any reason, that's okay, just explain in detail why you weren’t able to do so.
After making all changes to the cask:

[x] brew cask audit --download {{cask_file}} is error-free.

[x] brew cask style --fix {{cask_file}} reports no offenses.

[x] The commit message includes the cask’s name and version.

[x] Named the cask according to the [token reference].

[x] brew cask install {{cask_file}} worked successfully.

[x] brew cask uninstall {{cask_file}} worked successfully.

[x] Checked there are no [open pull requests] for the same cask.

[x] Checked the cask was not already refused in [closed issues].

[x] Checked the cask is submitted to [the correct repo].

Welcome, @soupdiver. Next time, please don’t change the style of the template; it helps visually differentiate what was done.
Thank you for the contribution.


Treemap with sparkline does not work

Description

Steps to Reproduce

Create treemap
Add sparkline to true
chart labels wont show

Expected Behavior
Chart labels will show
Actual Behavior
They dont
Screenshots

Reproduction Link

I dont want to login to another service with my data .
Copy past this
var options = {
  chart: {
    height: 380,
    width: "100%",
    type: "treemap",
    sparkline: {enabled: true}
  },
  series: [
    {
      name: "Series 1",
      data: [{x: 'test', y:100}]
    }
  ]
};

var chart = new ApexCharts(document.querySelector("#chart"), options);

chart.render();

-->

The reproduction link is required as stated in the issue template.

Hi @brianlagunas  seriusly in the above link you only add a couple of lines and you see it.
var options = {
  chart: {
    height: 380,
    width: "100%",
    type: "treemap",
    sparkline: {enabled: true}
  },
  series: [
    {
      name: "Series 1",
      data: [{x: 'test', y:100}]
    }
  ]
};

For this reason you close the issue and dont take the time to mark this like a bug? Its not a proper reaction from your side


Smooth navigation when API response has not changed

Currently, when we navigate from the search results, then back to them, we re-fetch data from the API.
https://github.com/Police-Data-Accessibility-Project/data-sources-app/assets/68428039/25bdecf3-f0e5-438b-a980-4c5424262760
Let's smooth this out:

[ ] Add Cache-Control headers to API responses to let browsers know how long to keep data cached.
[ ] Handle cache validation/invalidation
[ ] Return 304 responses when data hasn't changed

This way, we don't fetch data needlessly, and we smooth the navigation experience for users.
n.b. This will likely have implications for both the API and the client

Yes, that makes sense to me @mbodeantor.

Closing, outdated.


cannot open untitled:URI , got URI but expected URI error in ubuntu and mac only

Console LOG shows : \Users\mklement\Library\Application Support\Code\User\summary.txt
as loop is using to replace the slashes
its working fine in windows but doesnt work in ubuntu and mac, this is the example of OSX 10.11.6
But when i try to parse URI using API i get the following error

threadService.ts:217[Extension Host] cannot open untitled:%5CUsers%5Cjdoe%5CLibrary%5CApplication%20Support%5CCode%5CUser%5Csummary.txt. Detail: expected URI untitled:%5CUsers%5Cjdoet%5CLibrary%5CApplication%20Support%5CCode%5CUser%5Csummary.txt BUT GOT untitled:/Users/jdoe/Library/Application%20Support/Code/User/summary.txt(anonymous function) @ threadService.ts:217

Following is the code
 while (tempURI.indexOf("/") > -1) {
            tempURI = tempURI.replace("/", "\\");
    }
console.log("FILE URI For Summary Page : " + tempURI);

var setting: vscode.Uri = vscode.Uri.parse("untitled:" + tempURI);

vscode.workspace.openTextDocument(setting).then((a: vscode.TextDocument) => { ...

In the referenced issues same behavior found even after generating new extension.
I think this might be a bug in API, or i have to do anything more to parse to correct URI ?

You should not use backslashes for the URI because that isn't seen a path separator but it will all be part of the authority. Also, note that there is Uri.file and Uri.with which help you a lot to construct a valid uri


Fix typo on firehose tracing page

@jimmielyon Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@jimmielyon Thank you for signing the Contributor License Agreement!

Thank you for updating the 3.13.x version, too.


[Footer] React & Web component - On Mobile, Footer (local modal) is zoomed in for the user - no DDS consultant

Engineering info:

HC engineer: @andy-blum
HC Jira Ticket: https://jsw.ibm.com/browse/HC-2259
DDS consulting engineer: N/A

Description
Issue:
On Mobile, Footer (local modal) is zoomed in for the user. Once the modal is closed, user has to zoom out manually.
Component(s) impacted

Browser
Safari
Carbon for IBM.com version
1.25
Business priority
Medium Priority = upcoming release but is not pressing
Application/website
Carbon for IBM
Package
@carbon/ibmdotcom-react, @carbon/ibmdotcom-web-components
CodeSandbox example
ex
Steps to reproduce the issue (if applicable)
No response
Release date (if applicable)
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I checked the current issues for duplicate issues

Preliminary research reveals that this is coming from default behavior on iOS devices. When a form element receives focus, if its font size is less than 16px, the browser will zoom into the element to increase visibility. Two taps or a manual "pinch" motion should return users to the default zoom level.
There are old stackoverflow posts and github issues that mention manipulating the <meta name="viewport"> tag to eliminate zoom-ability altogether, but that would a significant detriment to the site's accessibility, and it sounds like iOS doesn't respect those attributes anymore anyway. The best (and perhaps only) way to fix this is to increase the font size used in the text input.
We could increase the font size here, but I'm not sure if that's preferable to simply letting iOS devices do their thing.
Thoughts, @shixiedesign, @oliviaflory, @photodow?


modified regex in get_video_id() to include youtube.com/live/* urls.

Title: Enhance Regex Pattern to Include YouTube Live URLs
Description:
This pull request introduces an enhancement to the existing regex pattern in the CLI application to support extracting YouTube video IDs from URLs that contain the /live/ segment. The following changes have been made:

Updated Regex Pattern:

The regex pattern now includes support for URLs of the format https://www.youtube.com/live/VIDEO_ID.
The updated regex pattern is:pattern = r"(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=|live\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})"

Motivation and Context:
The enhancement is necessary to accommodate the increasing usage of YouTube live URLs. Previously, the regex pattern did not capture video IDs from URLs with the /live/ segment, limiting the functionality of the get_video_id function and returning a Invalid YouTube URL error.
How Has This Been Tested?
The changes have been tested locally with various YouTube URL formats to ensure the function extracts the correct video IDs.
Types of Changes:

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Additional Notes:
Please review the changes and let me know if there are any further adjustments needed. I am open to feedback and willing to make necessary modifications.
Thank you for considering my [first ever] pull request.

Moving to go. Please resubmit if this isn't fixed after the migration.


Cargo should export path to rustc for build scripts

Cargo should explicitly export RUSTC envvar to build scripts indicating path to rustc used to compile things, regardless of whether rustc comes from RUSTC envvar, PATH envvar or somewhere else.

I've often wanted this from time to time as well, yeah, and should be an easy fix!

I'd like to jump on this, but don't know where to start

Awesome! Almost all build script logic can be found in custom_build.rs and you can see where some other environment variables are set as well. This would probably involve just adding a line there.
The value of RUSTC comes from Config::rustc which should be accessible through the local context.

I think this is closable now

Thanks @munyari!


[Epic] state:modified should Actually (only) select the modified resources

We currently call out a lot of caveats to state comparison in our docs.
There are many scenarios where executing dbt list --select state:modified over or under selects the appropriate resources. This leads to:

confusion "why are these models selected as state:modified, I haven't changed them"
performance concerns "why am I running 60 models when I only changed 2"
potentially bad code sneaking it's way into production "i checked my changes using a Slim CI job, but these models weren't run, now production is broken"

While it's unlikely we can cover ever single edge case here, we should improve state:modified so that it Ideally actually only selects the modified resources.
This epic will track the relevant bugs/enhancements related to state:modified.
### Issues
- [ ] https://github.com/dbt-labs/dbt-core/issues/9548
- [ ] https://github.com/dbt-labs/dbt-core/issues/9563
- [ ] https://github.com/dbt-labs/dbt-core/issues/9564
- [ ] https://github.com/dbt-labs/dbt-core/issues/4304
- [ ] https://github.com/dbt-labs/dbt-core/issues/8727

What would be lost by disallowing env-aware logic outside the dbt_project.yml?

Lots of examples here: https://discourse.getdbt.com/t/why-are-ci-jobs-state-method-building-more-less-models-nodes-than-expected/7504
An example of env_var logic here , which seems impossible to keep out of state:modified

For those following along, would love to hear your thoughts over in this discussion https://github.com/dbt-labs/dbt-core/discussions/10518

Closing this EPIC since we wrapped the issues that will be going out in 1.9 - queued up the remaining issues for 1.10

Opened a new issue in dbt-labs/docs.getdbt.com: https://github.com/dbt-labs/docs.getdbt.com/issues/6538


[release-1.9] reduce cost of sorting k8s analysis messages

This is an automated cherry-pick of #30290

@istio-testing: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-multicluster-tests_istio_release-1.9
072b06534cf7f9b1de89da06374787b3dad87fbe
link
/test integ-pilot-multicluster-tests_istio_release-1.9

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest


[BugFix] include immintrin.h only in X86_64

Fixes #issue
What type of PR is this:

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.1
[x] 3.0
[x] 2.5
[ ] 2.4

@Mergifyio backport branch-3.0

@Mergifyio backport branch-2.5


Request for Device certificate but search for UPN not DNS

Hi,
not sure if i missed something but module seems to be enabled and working but when the requests are incoming, the subjecttype seems to be always for User Certificate and look for a UPn and not DNS name as you can see in a trace log:
[30/11/2023 11:46:57] Found matching entry in Template/Requester table.
[30/11/2023 11:46:57] Reading request extensions.
[30/11/2023 11:46:57] Found 11 extensions.
[30/11/2023 11:46:57] Found SAN extension at index 4.
[30/11/2023 11:46:57] Executing principal search from UPN.
[30/11/2023 11:46:57] No matching alternative name found in SAN extension.
[30/11/2023 11:46:57] Alternative name not found in SAN extension. Skipping.
[30/11/2023 11:46:57] Enforcing SID extension policy. Requested action: PassThrough
It should look for a dns name ...
Certificate request comes from Intune SCEP and is configured as a Device certificate request (as it always worked and still works for other things).
Any information about that?
thank you.

not sure if i missed something but module seems to be enabled and working but when the requests are incoming, the subjecttype seems to be always for User Certificate and look for a UPn and not DNS name

Every template has subject type, which can be one of: User, Computer or CA type. When policy module examines request, I'm trying to read certificate template information from request and find matching template in AD. Then reading subject type and then doing logic branching: if template subject type is user, I'm doing UPN lookup only. If template subject type is computer, I'm doing DNS lookup only. In your case it appears that template subject type is user. You can confirm subject type of your template in template properties, Extensions tab and looking into Certificate Template Information extension.

Yes, after many checks it's ok now. Maybe a little upgrade would be to add an option to look for all SAN dns attributes. Tried to fork the project and make some modifications but i am almost lost in Visual Studio conf and dependencies.... :)

i meant for device certificate, sure yes ! Not about the first reason why i opened the issue.
For device certificates, maybe an option to look for all SAN DNS entries, disabled by default but could be useful for some cases.


Fix The application badge should be updated even if the device is off… #531

Fix the badge update when the device is offline
Update of the SDK lib with its last version

The invited rooms are not counted to update the badge (need to check if the dedicated rule is enabled / disabled)


Prevent unsaved edit warning following validation errors on preview

Fixes #2602
Incorporates #2612 and #2613

Merged in 20f01407114eea0c6d82208b5ab8c429892cb50b (master) and 26d7e2732780b33438a085e6dbab112dfb8148f0 (1.4.x)


Documented size limits for FFT/Analyser are incorrect

Tone.FFT and Tone.Analyser say that size should be "a power of two in the range 32 to 32768". The actual allowable range is 16-16384. If you try to set it to 32768, you'll get an error like: Uncaught DOMException: Failed to set the 'fftSize' property on 'AnalyserNode': The FFT size provided (65536) is outside the range [32, 32768].
32-32768 is the allowable size range for AnalyserNode, but the size value that Tone.Analyser passes to its AnalyserNode is double the input size provided.
A couple options:

Stop doubling input size when setting fftSize
Change docs to reflect actual limits

Presumably number 2 would be preferable since it's a non-breaking change?
Could also consider renaming the parameter from size to something like bins. (I think this would make the semantics more clear, and make it more apparent why it's doubled to get fftSize).

thanks for the issue. the idea was to have the value given reflect the size of the values array since this feels most intuitive to use. defining a value of say 32 and only getting back 16 values seems a little strange, so best is option 2 which would just reflect the web audio limits divided by 2.


One proxy setting will be used by all instances

I'm running multiple crawlers at once with different proxy settings. However, for some reason, all my instances will use the same proxy. The one that was set the first time.
I have a factory function and a list of proxies. Agent is socks5-https-client/lib/Agent.
function (overrides, proxy = 'tor') {
    const proxyOverrides = {
        agentClass: Agent,
        agentOptions: proxies[proxy]
    }

    return new Crawler({
        maxConnections: 1,
        rateLimit: 10 * 60 * 1000, // (10 minutes)
        jQuery: false,

        ...proxyOverrides,
        ...overrides
    })
}

const crawlerA = crawler(null, 'tor')          // This will use tor
const crawlerB = crawler(null, 'proxyB')    // This will use tor as well

const crawlerA = crawler(null, 'proxyB')   // This will use proxyB
const crawlerB = crawler(null, 'tor')          // This will use proxyB as well

I have no idea. :(


Add build targets for generating mocks, protobuf files, and thrift files

cc @robskillington @mmihic
The go generate rules are now all residing in generated/, along with the auto-generated mocks, protobuf files, and thrift files.
I haven't quite found a good way of building proto compiler binaries as well as thrift-gen/thrift binaries because building proto compiler from source is a pain and I didn't spend time finding out which thrift-gen commit matches our existing thrift-gen/thrift binaries. For now I'm just relying on the host system to provide them. Let's talk if we should vendor these binaries tomorrow.

Coverage remained the same at 80.363% when pulling 2266d40eeeb02ef57ce36bcb4a8c2987f95121b0 on xichen-systematic-auto-gen into 7d663c813f81fb1bbeb5e048551d1f3eb300f2e5 on master.

Coverage increased (+0.4%) to 80.776% when pulling 0343b95f67c526b7f8ab2bc367fe6b996d9a0845 on xichen-systematic-auto-gen into 7d663c813f81fb1bbeb5e048551d1f3eb300f2e5 on master.

Coverage increased (+0.4%) to 80.776% when pulling f3be4093c55d9b7b0a42355185cbdd6edde49b22 on xichen-systematic-auto-gen into 7d663c813f81fb1bbeb5e048551d1f3eb300f2e5 on master.

LGTM

Coverage increased (+0.4%) to 80.776% when pulling bb44fdd7d9c7103d270419f969fece4b50feff53 on xichen-systematic-auto-gen into 7d663c813f81fb1bbeb5e048551d1f3eb300f2e5 on master.

Coverage increased (+0.4%) to 80.776% when pulling 492dd742d55bbbaf3628af72cbc1b6d9d3e946fd on xichen-systematic-auto-gen into 7d663c813f81fb1bbeb5e048551d1f3eb300f2e5 on master.


Can you provide the project path structure combined with alfworld? I encountered some path problems when running the project.

You can copy one from ReAct repo


Track raw containers (cgroups) on all in a kubernetes cluster

To have a complete understanding of resource usage in the cluster, heapster needs to track docker containers that do not belong to a pod and raw cgroups that exist on the system.

Can we just use the stats from root container and take a diff?

If we run the system daemons in separate cgroups, it is useful to track each of the raw cgroups separately.

True. These should be exported by Kubelet as a standard API. Otherwise, we
will end up picking lot of unrelated stuff that'll need to throw out. That
is lot of wasted bandwidth at cluster level.
On Tue, Jan 6, 2015 at 10:24 AM, Vish Kannan<EMAIL_ADDRESS>wrote:

If we run the system daemons in separate cgroups, it is useful to track
each of the raw cgroups separately.
—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/heapster/issues/30#issuecomment-68907976
.

Agreed!
On Tue, Jan 6, 2015 at 10:31 AM, Rohit Jnagal<EMAIL_ADDRESS>wrote:

True. These should be exported by Kubelet as a standard API. Otherwise, we
will end up picking lot of unrelated stuff that'll need to throw out. That
is lot of wasted bandwidth at cluster level.
On Tue, Jan 6, 2015 at 10:24 AM, Vish Kannan<EMAIL_ADDRESS>wrote:

If we run the system daemons in separate cgroups, it is useful to track
each of the raw cgroups separately.
—
Reply to this email directly or view it on GitHub
<
https://github.com/GoogleCloudPlatform/heapster/issues/30#issuecomment-68907976>

.

—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/heapster/issues/30#issuecomment-68909125
.


Extend MaterialListPreference for custom list_items

All of implemented Material*Preferences does not call to onPrepareDialogBuilder which makes hard to make customizations to dialogs.
Example: use custom Adapter for ListView in MaterialListPreference.

This library cannot do that.
The signature is:
protected void onPrepareDialogBuilder(AlertDialog.Builder builder);

MaterialDialogs does not use AlertDialog.Builder, it uses MaterialDialog.Builder.


Unable to run postgres test containers.

AuthorControllerTest > getAuthors() FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:98
        Caused by: java.util.concurrent.CompletionException at CompletableFuture.java:323
            Caused by: java.lang.IllegalStateException at DockerClientProviderStrategy.java:274

seems like - docker engine is not running
C:\Users\dell>docker ps
request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.47/containers/json, check if the server supports the requested API version

Working now.


SpdxDocumentFile: Use package.spdx.yml if no project file is provided.

Resolves #4251.
Previously, package.spdx.yml were discarded in favor of project.spdx.ymls. This was a breaking change.
In order to avoid duplicate packages, the package.spdx.yml is only used when no project.spdx.yml is amongst the definition files of the SpdxDocumentFile manager.

@tsteenbe this might be interesting for you.
And could you checkout the expected test output  to see if this aligns with your expectations


NPSP Settings: Changing Household Naming Class May Lead to Maximum Stack Depth Reached Error

Summary
When changing the Implementing Class for Household Naming within NPSP Settings, customers may encounter “Maximum Stack Depth Reached” errors. This happens regardless of whether they are entering their own Apex Class name or switching back to the npsp standard HH_NameSpec class.
Sample Stack Trace when I switched to my own class:
Maximum stack depth reached: 7
Error is in expression '{!saveSettings}' in component <apex:commandButton> in page npsp:stg_panelhouseholds: Class.JL_HouseholdNaming.getExampleName: line 16, column 1
Class.npsp.HH_HouseholdNamingSettingValidator.validateFormat: line 131, column 1
Class.npsp.HH_HouseholdNamingSettingValidator.validateFormatFields: line 108, column 1
Class.npsp.HH_HouseholdNamingSettingValidator.validate: line 66, column 1
Class.npsp.STG_PanelHouseholds_CTRL.isValidHouseholdNamingSettings: line 80, column 1
Class.npsp.STG_PanelHouseholds_CTRL.isValidSettings: line 70, column 1
Class.npsp.STG_PanelHouseholds_CTRL.saveSettings: line 109, column 1

Root Cause
Typically this occurs when there is an active User Trace configured to use a Debug Level where the Apex Code category level is set to “Finest.” This seems to be the default (at least for scratch orgs), but you can modify it by clicking on the Reset button on the SFDC Dev Console Debug Level itself, or manually editing that category for whatever debug level you are using. Switching to a level such as Debug will resolve the issue completely.
For good measure, deleting any active User Trace records from Setup→ Debug Logs may also resolve the issue.
Ultimate root cause: this may be due to a circular reference within the NPSP code that validates household naming classes. And may be related to this Salesforce Known Issue as a result:
https://trailblazer.salesforce.com/issues_view?id=a1p3A000001Gv4KQAS
Workarounds

Edit the Debug Level associated with your active User Trace in Setup → Debug Logs. Change the Apex Category to “Debug” if it’s set to “Finest”.  If the issue still occurs, delete any active User Trace entries on that page.

Alternatively, go to Setup → Custom Settings and click Manage next to Household Naming Settings. Paste the name of your Apex class in the Implementing Class field.

Steps to Repeat
First, create an Apex Class (sample name: JL_HouseholdNaming) and replace the contents of the class with the following code.
global class JL_HouseholdNaming implements npsp.HH_INaming{

    global String getHouseholdName(List<Contact> conList){
        return 'test hh name';
    }

    global String getHouseholdFormalGreeting(List<Contact> conList){
        return 'test formal greeting';
    }

    global String getHouseholdInformalGreeting(List<Contact> conList){
        return 'test informal greeting';
    }

    global String getExampleName(npsp__Household_Naming_Settings__c hns, String strField, List<Contact> conList){
        return 'test example name';
    }

    global Set<String> setHouseholdNameFieldsOnContact(){
        return new Set<String>{'FirstName', 'LastName'};
    }

}

and run these tests:
Test 1: Enter name of class in NPSP Settings.

Go to NPSP Settings → People → Households and click Edit.
Paste the name of your Apex class in the Implementing Class field. (in this case: JL_HouseholdNaming). Click Save.
The value is not saved in NPSP Settings or within the Custom Setting.

Test 2: Reset Apex Code Category to Debug

Close the Dev Console if it’s open.
Go to Setup → Debug Logs and click on the Debug Level associated with your active User Trace. Change the Apex code category to “Debug” (it’s likely set to “Finest”).
Go to NPSP Settings → People → Households and click Edit.
Paste the name of your Apex class in the Implementing Class field. (in this case: JL_HouseholdNaming). Click Save.
No errors are displayed.
Create a new Contact (FirstName = Jess; LastName = LopezTwo)
Confirm that the Account’s name is “test hh name” and NOT “LopezTwo Household”. This will confirm npsp is using our custom class for household naming.

Test 3: Enter name of class directly in  our Custom Setting

Go to NPSP Settings → People → Households and click Edit.
Change the Implementing Class to: HH_NameSpec and save.
Go to Setup → Custom Settings→ and click Manage next to Household Naming Settings.
Paste the name of your Apex class in the Implementing Class field. (in this case: JL_HouseholdNaming).
Create a new Contact (FirstName = Jess; LastName = Lopez)
Confirm that the Account’s name is “test hh name” and NOT “Lopez Household”. This will confirm npsp is using our custom class for household naming.

W-9057136

Please follow this Known Issue in the Trailblazer Community for updates.


[Bug]: Html header and footer issue, If we setting html header only , it always show default htmlfooter on pdf page

Minimal, reproducible example
PuppeteerSharp.PdfOptions pdfOptions = new PuppeteerSharp.PdfOptions();
pdfOptions.DisplayHeaderFooter = true;
pdfOptions.PrintBackground = true;
pdfOptions.MarginOptions.Left = "40";
pdfOptions.MarginOptions.Right = "40";
pdfOptions.MarginOptions.Bottom = "40";
pdfOptions.MarginOptions.Top = "40";
string text= await ImageUrlToBase64( "https://i.pinimg.com/564x/59/32/29/593229739184504afd9507cc42a9cb86.jpg");
pdfOptions.HeaderTemplate = "Karmegam";
await page.GoToAsync("https://www.google.com/");
await page.PdfAsync("sample.pdf", pdfOptions);

Error string
show default header and footer.
Bug behavior

[ ] Flaky
[X] PDF

Background
No response
Expectation
If we setting html header, I expect only header only will be add in pdf document
Reality
without setting html footer or header, it will print default value on pdf
Puppeteer configuration file (if used)
No response
Puppeteer version
10.1.2
Node version
we using console application
Package manager
npm
Package manager version
10.1.2
Operating system
Windows

are you using puppeteer-sharp? please report the issue there https://github.com/hardkoded/puppeteer-sharp if there is a pdf rendering bug, please report directly to crbug.com for Chromium.


FIRAScreenViewReporter incorrectly forces loads of parent view controller's views

Environment

Xcode version: 9.0/9.1b1
iOS version: 11.0.1
Firebase SDK version: 4.0.3
Firebase Component: Analytics

Description
Firebase hooks into UIKit to know when a UIViewController gets a -viewWillAppear: call, but this calls FIRACurrentViewControllerInStack, which seems to be accessing the parent view controller's view. In our situation, this happens when the parent view controller is in -loadView, which results in an infinite loop. It may even be the cause for https://github.com/firebase/quickstart-ios/issues/231. I noticed that the debug navigator in Xcode doesn't show the Firebase calls in the stack, but manually running backtrace in lldb does.
We've currently disabled the screen reporting, but would love to see this fixed!
Steps to reproduce:
This is difficult to do, because this may be reliant on UIPageViewController behaviour. The stack trace below should be informative enough. I can confirm, though, that this only occurs when screen reporting is enabled.

Stacktrace

    frame #3713: 0x00000001089529cc PSPDFKitUI`-[PSPDFPageCurlViewController viewDidLoad](self=0x000000010a84b200, _cmd="viewDidLoad") at PSPDFPageCurlViewController.m:65
    frame #3714: 0x000000018dc6fbfc UIKit`-[UIViewController loadViewIfRequired] + 1040
    frame #3715: 0x000000018dc6f7d4 UIKit`-[UIViewController view] + 28
    frame #3716: 0x0000000108925fc4 PSPDFKitUI`::-[PSPDFDocumentView setupScrollViewForPageViewControllerBasedLayout](self=0x0000000109f18450, _cmd="setupScrollViewForPageViewControllerBasedLayout") at PSPDFDocumentView.mm:203
    frame #3717: 0x00000001089258e4 PSPDFKitUI`::-[PSPDFDocumentView setupScrollView](self=0x0000000109f18450, _cmd="setupScrollView") at PSPDFDocumentView.mm:156
    frame #3718: 0x0000000108925350 PSPDFKitUI`::-[PSPDFDocumentView initWithFrame:layout:](self=0x0000000109f18450, _cmd="initWithFrame:layout:", frame=(origin = (x = 0, y = 0), size = (width = 414, height = 736)), layout=0x000000010a1e0ff0) at PSPDFDocumentView.mm:103
    frame #3719: 0x00000001089c4c58 PSPDFKitUI`::-[PSPDFDocumentViewController loadView](self=0x000000010a1e0c20, _cmd="loadView") at PSPDFDocumentViewController.mm:108
    frame #3720: 0x000000018dc6f8a4 UIKit`-[UIViewController loadViewIfRequired] + 184
    frame #3721: 0x000000018dc6f7d4 UIKit`-[UIViewController view] + 28
    frame #3722: 0x0000000103079604 Viewer`FIRACurrentViewControllerInStack + 1008
    frame #3723: 0x000000010307ab48 Viewer`-[FIRAScreenViewReporter viewControllerDidAppear:] + 516
    frame #3724: 0x000000010307c0a4 Viewer`-[UIViewController(FIRAScreenClassName) fira_viewDidAppear:] + 84
    frame #3725: 0x000000018dc8869c UIKit`-[UIViewController _setViewAppearState:isAnimating:] + 852
    frame #3726: 0x000000018dc88c08 UIKit`-[UIViewController _endAppearanceTransition:] + 228
    frame #3727: 0x000000018e5d8d30 UIKit`-[UIPageViewController _childEndAppearanceTransition:] + 64
    frame #3728: 0x000000018e5dd1dc UIKit`-[UIPageViewController _setViewControllers:withCurlOfType:fromLocation:direction:animated:notifyDelegate:completion:] + 1880
    frame #3729: 0x000000018e5debc4 UIKit`-[UIPageViewController setViewControllers:direction:animated:completion:] + 172
    frame #3730: 0x0000000108953810 PSPDFKitUI`-[PSPDFPageCurlViewController updateControllersForSpreadIndex:animated:](self=0x000000010b08a200, _cmd="updateControllersForSpreadIndex:animated:", spreadIndex=0, animated=NO) at PSPDFPageCurlViewController.m:141
    frame #3731: 0x00000001089529cc PSPDFKitUI`-[PSPDFPageCurlViewController viewDidLoad](self=0x000000010b08a200, _cmd="viewDidLoad") at PSPDFPageCurlViewController.m:65
    frame #3732: 0x000000018dc6fbfc UIKit`-[UIViewController loadViewIfRequired] + 1040
    frame #3733: 0x000000018dc6f7d4 UIKit`-[UIViewController view] + 28
    frame #3734: 0x0000000108925fc4 PSPDFKitUI`::-[PSPDFDocumentView setupScrollViewForPageViewControllerBasedLayout](self=0x000000010a1e6f80, _cmd="setupScrollViewForPageViewControllerBasedLayout") at PSPDFDocumentView.mm:203
    frame #3735: 0x00000001089258e4 PSPDFKitUI`::-[PSPDFDocumentView setupScrollView](self=0x000000010a1e6f80, _cmd="setupScrollView") at PSPDFDocumentView.mm:156
    frame #3736: 0x0000000108925350 PSPDFKitUI`::-[PSPDFDocumentView initWithFrame:layout:](self=0x000000010a1e6f80, _cmd="initWithFrame:layout:", frame=(origin = (x = 0, y = 0), size = (width = 414, height = 736)), layout=0x000000010a1e0ff0) at PSPDFDocumentView.mm:103
    frame #3737: 0x00000001089c4c58 PSPDFKitUI`::-[PSPDFDocumentViewController loadView](self=0x000000010a1e0c20, _cmd="loadView") at PSPDFDocumentViewController.mm:108
    frame #3738: 0x000000018dc6f8a4 UIKit`-[UIViewController loadViewIfRequired] + 184
    frame #3739: 0x000000018dc6f7d4 UIKit`-[UIViewController view] + 28
    frame #3740: 0x0000000103079604 Viewer`FIRACurrentViewControllerInStack + 1008
    frame #3741: 0x000000010307ab48 Viewer`-[FIRAScreenViewReporter viewControllerDidAppear:] + 516
    frame #3742: 0x000000010307c0a4 Viewer`-[UIViewController(FIRAScreenClassName) fira_viewDidAppear:] + 84
    frame #3743: 0x000000018dc8869c UIKit`-[UIViewController _setViewAppearState:isAnimating:] + 852
    frame #3744: 0x000000018dc88c08 UIKit`-[UIViewController _endAppearanceTransition:] + 228
    frame #3745: 0x000000018e5d8d30 UIKit`-[UIPageViewController _childEndAppearanceTransition:] + 64
    frame #3746: 0x000000018e5dd1dc UIKit`-[UIPageViewController _setViewControllers:withCurlOfType:fromLocation:direction:animated:notifyDelegate:completion:] + 1880
    frame #3747: 0x000000018e5debc4 UIKit`-[UIPageViewController setViewControllers:direction:animated:completion:] + 172
    frame #3766: 0x0000000108953810 PSPDFKitUI`-[PSPDFPageCurlViewController updateControllersForSpreadIndex:animated:](self=0x000000010a8e6e00, _cmd="updateControllersForSpreadIndex:animated:", spreadIndex=0, animated=NO) at PSPDFPageCurlViewController.m:141
    frame #3767: 0x00000001089529cc PSPDFKitUI`-[PSPDFPageCurlViewController viewDidLoad](self=0x000000010a8e6e00, _cmd="viewDidLoad") at PSPDFPageCurlViewController.m:65
    frame #3768: 0x000000018dc6fbfc UIKit`-[UIViewController loadViewIfRequired] + 1040
    frame #3769: 0x000000018dc6f7d4 UIKit`-[UIViewController view] + 28
    frame #3770: 0x0000000108925fc4 PSPDFKitUI`::-[PSPDFDocumentView setupScrollViewForPageViewControllerBasedLayout](self=0x000000010a1e1370, _cmd="setupScrollViewForPageViewControllerBasedLayout") at PSPDFDocumentView.mm:203
    frame #3771: 0x00000001089258e4 PSPDFKitUI`::-[PSPDFDocumentView setupScrollView](self=0x000000010a1e1370, _cmd="setupScrollView") at PSPDFDocumentView.mm:156
    frame #3772: 0x0000000108925350 PSPDFKitUI`::-[PSPDFDocumentView initWithFrame:layout:](self=0x000000010a1e1370, _cmd="initWithFrame:layout:", frame=(origin = (x = 0, y = 0), size = (width = 414, height = 736)), layout=0x000000010a1e0ff0) at PSPDFDocumentView.mm:103
  * frame #3773: 0x00000001089c4c58 PSPDFKitUI`::-[PSPDFDocumentViewController loadView](self=0x000000010a1e0c20, _cmd="loadView") at PSPDFDocumentViewController.mm:108

(PSPDFKit lead here)
I realize 4.3.0 is the current version - did this code change in any meaningful way, should we try to update?
With a strategically isViewLoaded in FIRACurrentViewControllerInStack this should be easy to be worked around. We can reproduce this locally in a branch of https://pdfviewer.io so we can also test custom binaries if that would help.
Alternative Fix:
It would be possible to work around this with setting flags to break on re-entry, but this seems like a band-aid and not the right thing to do. We could try to change the load-order until after loadView which could work, but again, if we hit that, other people will hit that too (and they might just disable or remove Firebase, instead of reporting this here as an issue)

We have a PR up internally that addresses this (171700365). I'll let you know when it's merged and what release it's slated for.
Thanks for flagging!

@steipete or @caughtinflux can either of you share an app that reproduces this? The fix PR should be complete pending some small tweaks, but I'd like to test to make sure it solves this particular issue.

@morganchen12 We could potentially share this under NDA... it's a rather large project and not open source. It's probably easier if you email me binaries and we test them on our side. Feel free to reach out to peter at pspdfkit.com for that.

Can you describe the VC hierarchy in the app that causes this issue? I'll see about getting you a binary to test.

At a high level, here's what's going on:
PSPDFDocumentViewController
|__ PSPDFPageCurlViewController
    |__UIPageViewController
        |__[PSPDFPageViewController]

in PSPDFDocumentViewController's -loadView, the view controller (and view) hierarchy is set up.  This trigger's -viewDidLoad on PSPDFPageCurlViewController (expected), which sets the view controllers on the UIPageViewController.
UIPageViewController takes this to mean "make these view controllers appear immediately", even though we're still in its parent's -viewDidLoad. When -viewWillAppear: is called on one of the PSPDFPageViewControllers, FIRAScreenViewReporter jumps in and tries to load all the parent views. This kicks off an infinite recursion, as seen in the stack trace.

We were able to reproduce this locally, and the patch does fix the issue. Will let you know when it's merged and which release it's slated for.

Awesome, thanks!

This has been merged, and should be out in the next release around the end of the month. If this regresses past that point, please reopen or file a new issue.
Thanks all!

Thanks for the fast turnaround! ❤

FYI I forgot to tell the Analytics team to make a release this cycle, so it'll be in the next minor point release.
Sorry all :(

This has been released. Thanks for waiting!

Hi. I have same problem. And last release don't fix this

Can you post the stack trace along with your pod versions?

Installing Firebase 4.6.0 (was 3.7.1)
Installing FirebaseAnalytics 4.0.5 (was 3.4.4)
Installing FirebaseCore 4.0.11 (was 3.4.3)
Installing FirebaseCrash 2.0.2 (was 1.0.7)
Installing FirebaseInstanceID 2.0.6 (was 1.0.9)
frame #174487: 0x000000010cfffc2e App`-[UIViewController(FIRAScreenClassName) fira_viewDidAppear:] + 33
frame #174488: 0x000000010cfffc2e App`-[UIViewController(FIRAScreenClassName) fira_viewDidAppear:] + 33
frame #174489: 0x000000010cfffc2e App`-[UIViewController(FIRAScreenClassName) fira_viewDidAppear:] + 33
frame #174490: 0x000000010cfffc2e App`-[UIViewController(FIRAScreenClassName) fira_viewDidAppear:] + 33
frame #174491: 0x0000000110ba2405 SWRevealViewController`-[SWRevealViewController viewDidAppear:](self=0x00007fec9880e000, _cmd="viewDidAppear:", animated=NO) at SWRevealViewController.m:721
frame #174492: 0x00000001129a769b UIKit`-[UIViewController _setViewAppearState:isAnimating:] + 699
frame #174493: 0x00000001129aa545 UIKit`__64-[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]_block_invoke + 42
frame #174494: 0x00000001129a8839 UIKit`-[UIViewController _executeAfterAppearanceBlock] + 86
frame #174495: 0x0000000112808761 UIKit`_runAfterCACommitDeferredBlocks + 634
frame #174496: 0x00000001127f6bc5 UIKit`_cleanUpAfterCAFlushAndRunDeferredBlocks + 280
frame #174497: 0x0000000112817d48 UIKit`__34-[UIApplication _firstCommitBlock]_block_invoke_2 + 155
frame #174498: 0x000000011213e18c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
frame #174499: 0x000000011212296b CoreFoundation`__CFRunLoopDoBlocks + 203
frame #174500: 0x0000000112122144 CoreFoundation`__CFRunLoopRun + 1300
frame #174501: 0x00000001121219b9 CoreFoundation`CFRunLoopRunSpecific + 409
frame #174502: 0x00000001178129c6 GraphicsServices`GSEventRunModal + 62
frame #174503: 0x00000001127fc5e8 UIKit`UIApplicationMain + 159
frame #174504: 0x000000010cf0eed5 App`main at main.swift:23
frame #174505: 0x0000000116690d81 libdyld.dylib`start + 1

This is a slightly different crash, since -[UIViewController view] isn't in the stack trace.
Can you file a new issue and (if possible) share the implementation of -[SWRevealViewController viewDidAppear:]?
This way we can avoid spamming the folks that aren't interested in this new crash.
Thanks!

The fix will go out with the next minor release of Firebase. Follow the milestone tag for more details.


Link to docs no longer works

Link in readme redirects to https://www.semi.technology/documentation/weaviate/current/installation.html#kubernetes which 404s.

Fixed it in a fork and made a PR because I don't have write access ;)

thank you 🙏


actionbars: Replace rActionBar

rActionBar is cool, but it's probably a good idea to write a replacement.

Closed by bf15b66168b9d1063bd0e7bc5aa4128e929a7f2d


Emit 'use strict' code for input defined via ES6 modules

ES6 modules default to running the code in the module in the strict mode. When transpiling this input into ES5 the strict mode should be preserved.
As of Typescript 1.5 beta this is not the case:
input:
export class Foo{}

transpile with: tsc --module commonjs test.ts
actual output:
var Foo = (function () {
    function Foo() {
    }
    return Foo;
})();
exports.Foo = Foo;

expected output:
'use strict';

var Foo = (function () {
    function Foo() {
    }
    return Foo;
})();
exports.Foo = Foo;

The same issue affects output for amd and system module formats.

I think #1135 covers this topic

There are two parts, 1. parse module in strict mode, and this is covered by #1135, and 2. emit a "use strict"; directive at the top of the file. i do not think 2 is needed if 1 is in place. @IgorMinar is this correct?

I think you need both.

allows you to catch issues during static analysis
ensures that the code runs with the semantics of the strict mode

good example of where 2. is needed is assigning to non-writable or frozen properties of an object, which can't be reliably detected statically (AFAIK). At runtime, such assignment fails with an error in strict mode, but in sloppy mode the error is silenced. I think it is important that this behavior is preserved between ES6 and ES5 output.

I wouldn't necessarily say it's "needed", but if you get strict mode for free in an ES6 module, is there any actual harm of writing "use strict"; at the top of your file?
As a side note, this would be helpful in verifying our JS output by ensuring that a module is properly emitted in strict mode.

Also, not everyone writing modules in TypeScript are expecting ES6 behaviours and auto-injecting "use strict;" into ES5 will likely cause breakage and surprise.

injecting "use strict;" into ES5 will likely cause breakage and surprise.

This is my fear; that someone will concat their output files in such a way that this causes everything to break. Though I don't know enough about scenarios in which one would do this with external modules.

I guess It would be a transpiler parameter

The spec mandates that es6 modules be execuated in strict mode: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-strict-mode-code
strict-mode javascript is not a subset of non-strict-mode, it has intentionally different semantics. Transpiling from es6 modules to es5 javascript strictly requires injecting "use strict;", it's really not an option.

@DanielRosenwasser es6 modules cannot be simply concatenated together. Any bundler has to ensure that each module has it's own scope.

@speigg I realized this as I opened this issue and re-read my comment.
@weswigham is doing some work in this area. I believe the new behavior is going to be that we only expect strict mode if the module target is ES6 (a new module target that is separate from the language target).
This is because if someone is purely targeting something like CommonJS, then the strict mode requirement no longer really applies, however, @weswigham can probably explain moe.

Not sure what you mean by "expecting strict mode". If the input is es6 modules and the output is also es6 modules, then "use strict;" doesn't need to be injected, it's implied. If the input is es6 modules and the output is anything other than es6 modules, then "use strict;" is required. If the input is not es6 modules, then "use strict;" is not required.

If the input is es6 modules and the output is anything other than es6 modules, then "use strict;" must be injected (even if the output is CommonJS). If the input is not es6 modules, then "use strict;" is not required (or implied).

The challenge though is in TypeScript you can mix the inputs but target a specific output:
import bar = require('bar');
import foo from 'foo';

What about that use case?  Also, just because a developer is using ES6 module syntax, but targeting AMD/UMD/CommonJS that they are expecting strict behaviour.

@speigg I opened #4963 to start a discussion on this. Our present behavior is to require strict mode everywhere when targeting any module form, however, we do not emit a "use strict"; prologue in our module emit for non-es6 module targets to match this. We could do one of two things to rectify this mismatch:

Parse non-es6 module forms in non-strict mode (So if --module is not es6, we don't parse modules in strict mode)
Emit "use strict"; prologues in non-es6 modules

Awesome! Thanks Wesley.
On Nov 24, 2015 1:59 PM, "Wesley Wigham"<EMAIL_ADDRESS>wrote:

Closed #3576 https://github.com/Microsoft/TypeScript/issues/3576 via
#5765 https://github.com/Microsoft/TypeScript/pull/5765.
—
Reply to this email directly or view it on GitHub
https://github.com/Microsoft/TypeScript/issues/3576#event-473844036.

I suspected there would be breakage with this, I just didn't expect it to happen to me.  In Dojo we have a module (core/global) that allows us to grab a reference to the global scope.  Because all modules now are being emitted with the "use strict"; prologue, this module is returning undefined now.
Anyone have a suggestion for how to grab a reference to the global scope in TypeScript modules in 1.8+?

@kitsonk you could give this a  try http://stackoverflow.com/a/3277192/4386952
TL;DR:
const globalObject: any = Function("return this")();

Is there a way to turn off the "use strict" prologue emit? This is a problem for us when working with Dojo 1.x and making calls to this.inherited(arguments).

This is a breaking change, mainly to align with the ES6 spec. that code would not run in ES6 in the future either.

This seems unexpected to me. If I'm emitting ES5 code then this should not be implicitly enabled, as I'm targeting ES5 and not ES6. I understand that my code is then not ES6 compliant, but that's the whole point of transpiling it anyway. Doing this unconditionally for the sake of ES6 strictness seems pedantic, especially because this will break actual/running code. Also, if you are worried about writing TS modules that are not ES6 compliant, then would it not be better to have the compiler error out when the target is ES6 and you use things that do not work?

You'll find that TS now aligns with other module transpilers (like babel) here - when transpiling modules, we parse the code in strict mode, per spec, and emit a use strict prologue to ensure runtime semantics match compile time ones.
When you write TS, you are not writing ES5 code - you are writing TS code, which happens to be a superset (or, strives to be) of ES6/7, which then gets transpiled to equivalent ES3/5/6. When you use ES6 module syntax, you also get ES6 module rules - it was an oversight which could have caused unexpected runtime behavior, for example:

Second, strict mode code doesn't alias properties of arguments objects created within it. In normal code within a function whose first argument is arg, setting arg also sets arguments[0], and vice versa (unless no arguments were provided or arguments[0] is deleted). arguments objects for strict mode functions store the original arguments when the function was invoked. arguments[i] does not track the value of the corresponding named argument, nor does a named argument track the value in the corresponding arguments[i]. (from MDN)

What this means is that in TS prior to 1.8, you could write this:
export function multiplyThenAdd(num){
  num = num * num;
  return num + arguments[0];
}

with the expectation that calling multiplyThenAdd(2) should return 6, since you're writing a module and TS enforces strict mode in modules - but alas, you'd have been misled, as you'd witness a result of 8, since TS didn't set strict mode to on at runtime! This fixes that.

I would think it would be better to discourage people from writing code that uses the arguments object after you've started manipulating the arguments or changing the value of the arguments that are passed in. Obviously asking the world to change how they write code isn't going to happen.
As much as I hate to suggest yet another compiler setting, I would think that an opt-in setting to turn off the emitting of use strict for either all transpiled code, or per module, would allow people that understand the consequences to proceed.
As noted, the use case is compatibility when authoring code with TS that extends legacy JS code where use strict is not permitted. For example, in Dojo 1, the declare syntax uses arguments.callee to walk the inheritance chain.

I've created a new issue for adding a compiler setting at #6819

dojo's this.inherited calls are pretty easy to fix, you can just give it an explicit {callee} object:
// strict mode incompatible
foo: function() {
    this.inherited(arguments);
}

// strict mode compatible
foo: function foo() {
    this.inherited({callee: foo}, arguments);
}

dojo's this.inherited calls are pretty easy to fix, you can just give it an explicit {callee} object

Unfortunately most of Dojo's "declared classes" (objects that use dojo/_base/declare to setup a mixin-based approach to inheritance) are not named functions, and changing thousands of such classes across Dojo isn't going to happen quickly enough, and certainly not for anyone locked on a particular version of Dojo.

You don't have to change dojo at all, only your own declare() classes.

@jeffreymorlan while it is true, only those writing TypeScript modules which are going to be emitted in strict mode would have to worry about this, it is still an arbitrary requirement that would make anyone migrating a Dojo 1 project to TypeScript probably think it wasn't worth the effort, since almost no one would be declaring their custom class methods as named functions.  Many people who use Dojo 1 have large, complex, custom classes, and having to touch all that code to just start the process of migrating to TypeScript would be untenable.

For reference, the emit is now configurable via --noImplicitUseStrict compiler flag via #6819.


Proof of Concept: Result enum & throwing in asynchronous operations

I created and implemented both of the possible options in LabComputersClient and LabComputesListViewController. Both options work so it's your preference

This change is

Reviewed 1 of 4 files at r1.
Review status: 1 of 4 files reviewed at latest revision, 1 unresolved discussion.

byuSuite/Classes/ByuRequest/ByuRequest2.swift, line 14 at r1 (raw file):

enum Result {
    case success(_: Any)
    case error(_: ByuError?)

Why optional?

Comments from Reviewable

Review status: 1 of 4 files reviewed at latest revision, 1 unresolved discussion.

byuSuite/Classes/ByuRequest/ByuRequest2.swift, line 14 at r1 (raw file):
Previously, romrell4 (Eric Romrell) wrote…
Why optional?

Because ByuResponse's error property is optional. Check out getComputerLabs2(completionHandler:) in LabComputersClient

Comments from Reviewable


log.SetLevel() has no effect on output

What am I doing wrong here? I am new to Go, am I missing something? This code:
package main
import (
	"os"
	"github.com/DramaFever/go-logging"
)

func main() {
	log, err := logging.New(logging.DebugLvl, os.Stdout, "", nil)
	if err != nil {
		panic(err)
	}
	log.SetLevel(logging.InfoLvl)
	log.Info("info message")
	log.Debug("debug message")
}

prints the following output:
2015-10-17T16:25:01 [INFO] /Users/kumar/tmp/log_level_example.go:13: info message
2015-10-17T16:25:01 [DEBUG] /Users/kumar/tmp/log_level_example.go:14: debug message

but it should not print the debug message. If I edit the New() call to log at InfoLvl then the debug message is hidden as expected.

SetLevel() doesn't mutate the existing logger, it returns a new logger with the new level. @paddyforan assures me this makes it more thread-safe (which means the onus  is now on you to swap the old logger with the new logger in a thread-safe manner).
c.f
package main
import (
    "os"
    "github.com/DramaFever/go-logging"
)

func main() {
    log, err := logging.New(logging.DebugLvl, os.Stdout, "", nil)
    if err != nil {
        panic(err)
    }
    log = log.SetLevel(logging.InfoLvl)
    log.Info("info message")
    log.Debug("debug message")
}

It occurs to me that isn't super-clear in the documentation though. =/

This is because of pass-by-value vs pass-by-reference.
In a method with the signature
func (l *Logger) SetBlah(b blah)
l is a pointer to the Logger that you were using when you called someLogger.SetBlah(b).  However, in the a method with the signature
func (l Logger)SetBlah(b Blah) Logger
l is a new copy of the calling Logger. Notice that you're returning a Logger in this one but not in the last one.

ok! That makes sense now. I squinted at the Logger return type in the docs but using it that way seemed too odd.
If the docs had some usage examples I think it would have been clear.
Isn't there a way to track the instance internally and swap it out each time you need to make a change? Anyway, feel free to close this issue.

I'll assign this one to me and make the documentation better.

Isn't there a way to track the instance internally and swap it out each time you need to make a change?

Best way to do this is for the caller to maintain a global Logger and swap it out as needed (really, in production code, how often are you changing the log level, etc, on the fly?).

You could also rename the method for clarity : log = log.NewLogWithLevel('INFO')

But my backward compatibility!
On Mon, Oct 19, 2015 at 9:30 AM Kumar McMillan<EMAIL_ADDRESS>wrote:

You could also rename the method for clarity : log =
log.NewLogWithLevel('INFO')
—
Reply to this email directly or view it on GitHub
https://github.com/DramaFever/go-logging/issues/7#issuecomment-149231726
.

I was thinking you could print a deprecation message when accessing SetLevel, something like that

We've discussed this internally, and my stance is we should do the following:

Rename SetLevel to WithLevel, following the pattern set by golang.org/x/net/context.
Have a small wrapper called SetLevel that just calls WithLevel.
Document the intended usage pattern better.
Set the GoDoc for SetLevel to indicate it's just a backwards-compatibility wrapper for WithLevel, and is deprecated.

Does this feel like a reasonable path forward, @agocs? Would this address the concerns, @kumar303?

oh yeah, log.WithLevel() would read much better


wg_engine: cross-platform support (linux)

Make an ability to run ThorVG on linux platform including wsl2 and windows platform
Also it provide changes public API for webgpu canvas interface to provide nessesary handles to native window for different platforms:
class TVG_API WgCanvas final : public Canvas
	...
	Result target(void *disp_inst, void *wind_serf, uint32_t w, uint32_t h) noexcept;

Example of usage for glfw library
// create platform defined canvas target
void createCanvasTarget(GLFWwindow* window, tvg::WgCanvas* canvas) {
    // allocate netive handles
    void* disp_inst = nullptr;
    void* wind_serf = nullptr;

    // get native handles
    #ifdef GLFW_EXPOSE_NATIVE_X11
    disp_inst = glfwGetX11Display();
    wind_serf = (void *)glfwGetX11Window(window);
    #endif
    #ifdef GLFW_EXPOSE_NATIVE_WIN32
    disp_inst = GetModuleHandle(NULL);
    wind_serf = glfwGetWin32Window(window);
    #endif

    // get window width and height
    int width{}, height{};
    glfwGetWindowSize(window, &width, &height);

    // create target
    canvas->target(disp_inst, wind_serf, width, height);
}

@SergeyLebedkin please change the status to "Ready for review"


Minor: invalid char triggers Unicode error

This is a one character change but it was triggering issues when parsing the code as UTF-8.

Which triggers this when pre-processing the source with Python's parser:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 5297: invalid start byte

A regular text editor ignores it.

Got it - thanks again!


Update build-windows.bat

Repair the exit on test failure.  We should not continue on test failures.

@swift-ci please test

Please test with following PRs:
apple/swift-llbuild#852
apple/swift-installer-scripts#158
@swift-ci please build toolchain windows platform

Please test with following PRs:
https://github.com/apple/swift-llbuild/pull/852
https://github.com/apple/swift-installer-scripts/pull/158
@swift-ci please build toolchain Linux platform

Please test with following PRs:
https://github.com/apple/swift-llbuild/pull/852
https://github.com/apple/swift-installer-scripts/pull/158
@swift-ci please build toolchain macOS platform

Please test with following PRs:
https://github.com/apple/swift-llbuild/pull/852
https://github.com/apple/swift-installer-scripts/pull/158
@swift-ci please build toolchain Liux platform

Please test with following PRs:
https://github.com/apple/swift-llbuild/pull/852
https://github.com/apple/swift-installer-scripts/pull/158
@swift-ci please build toolchain Linux platform

Please test with following PRs:
https://github.com/apple/swift-llbuild/pull/852
https://github.com/apple/swift-installer-scripts/pull/158
https://github.com/apple/swift-driver/pull/1293
@swift-ci please build toolchain Linux platform

Please test with following PRs:
https://github.com/apple/swift-llbuild/pull/852
https://github.com/apple/swift-installer-scripts/pull/158
https://github.com/apple/swift-driver/pull/1293
@swift-ci please build toolchain macOS platform


[WASM] - It is possible to import function from other modules from WASM

Given existing module webpack should be able to understand analyze and import dependencies of WASM modules. Must follow the same resolving rules for modules.
somemodule.wasm (given in .wast format)
(module
 (import “./math” “random” (func rand (result f32))
 (func
  (export "addRandom")
  (param i32)
  (result i32)
  (i32.add (get_local 0) (call rand))
 )
)

done


salt orchestration fails

When I run the salt orchestration to bootstrap a cluster, I get the following error:
      ID: etcd-setup
Function: salt.state
  Result: False
 Comment: Run failed on minions: caasp-node-afc4cf66, caasp-node-75b6cb18, caasp-node-f31e8f4a
          Failures:
              caasp-node-afc4cf66:
                  Data failed to compile:
              ----------
                  Rendering SLS 'base:ca-cert' failed: Jinja variable list object has no element 0
              ----------
                  Rendering SLS 'base:cert' failed: Jinja variable list object has no element 0
              /var/cache/salt/minion/files/base/_macros/certs.jinja(68):
              ---
              [...]
                    - file: /etc/pki

              {{ crt }}:
                caasp_retriable.retry:
                  - target: x509.certificate_managed
                  - ca_server: {{ salt['mine.get']('roles:ca', 'ca.crt', expr_form='grain').keys()[0] }} <======================
                  - signing_policy: minion
                  - public_key: {{ key }}
                {%- if cn %}
                  - CN: {{ cn|yaml_dquote }}
                {%- else %}
              [...]
              ---

It appears the mine.get call does not return the certificate as intended.  Using 'ca' instead of 'roles:ca' works. Running salt ca mine.get 'roles:ca' ca.crt grain on the salt master also returns the certificate.
Any idea?

Do you still have the orchestration output? Maybe we could see why that certificate was not generated... It would also be useful to take a look at the Salt Master output, maybe it is failing some communication channel...

 salt orchestration fails

I was trying to reproduce it for a full log, but now I'm running into a slightly different error:
14:47:13,605 [ERROR   ] Exception during resolving address: [Errno 1] Unknown host
14:47:13,607 [ERROR   ] Exception during resolving address: [Errno 1] Unknown host
14:47:13,609 [ERROR   ] Exception during resolving address: [Errno 1] Unknown host
14:47:13,610 [ERROR   ] Exception during resolving address: [Errno 1] Unknown host
14:47:13,626 [DEBUG   ] MasterEvent PUB socket URI: /var/run/salt/master/master_event_pub.ipc
14:47:13,626 [DEBUG   ] MasterEvent PULL socket URI: /var/run/salt/master/master_event_pull.ipc
14:47:13,641 [DEBUG   ] Initializing new IPCClient for path: /var/run/salt/master/master_event_pull.ipc
14:47:13,643 [DEBUG   ] Sending event: tag = salt/run/20180315144713625929/new; data = {'fun': 'runner.mine.get', 'fun_args': [{'fun': 'nodename', 'tgt_type': 'compound', 'tgt': 'G@roles:kube-minion and not G@roles:etcd'}], 'jid': '20180315144713625929', 'user': 'UNKNOWN', '_stamp': '2018-03-15T14:47:13.643016'}
14:47:13,646 [DEBUG   ] _check_compound_minions(G@roles:kube-minion and not G@roles:etcd, :, True, False)
14:47:13,648 [DEBUG   ] minions: set(['admin', 'ca', 'caasp-node-9a77639d', 'caasp-node-8530ff4c', 'caasp-node-9f00ceaa'])
14:47:13,649 [DEBUG   ] LazyLoaded localfs.init_kwargs
14:47:13,650 [DEBUG   ] Attempting to match 'kube-minion' in 'roles' using delimiter ':'
14:47:13,651 [DEBUG   ] Attempting to match 'kube-minion' in 'roles' using delimiter ':'
14:47:13,652 [DEBUG   ] Attempting to match 'kube-minion' in 'roles' using delimiter ':'
14:47:13,652 [DEBUG   ] Attempting to match 'kube-minion' in 'roles' using delimiter ':'
14:47:13,653 [DEBUG   ] Attempting to match 'kube-minion' in 'roles' using delimiter ':'
14:47:13,653 [DEBUG   ] Attempting to match 'etcd' in 'roles' using delimiter ':'
14:47:13,654 [DEBUG   ] Attempting to match 'etcd' in 'roles' using delimiter ':'
14:47:13,655 [DEBUG   ] Attempting to match 'etcd' in 'roles' using delimiter ':'
14:47:13,655 [DEBUG   ] Attempting to match 'etcd' in 'roles' using delimiter ':'
14:47:13,656 [DEBUG   ] Attempting to match 'etcd' in 'roles' using delimiter ':'
14:47:13,656 [DEBUG   ] Evaluating final compound matching expr: set(['caasp-node-9f00ceaa', 'caasp-node-9a77639d']) & ( set(['admin', 'ca', 'caasp-node-9a77639d', 'caasp-node-8530ff4c', 'caasp-node-9f00ceaa']) - set([]) )
14:47:13,657 [DEBUG   ] LazyLoaded localfs.init_kwargs
14:47:13,657 [DEBUG   ] Cache file "/var/cache/salt/master/minions/caasp-node-9f00ceaa/mine.p" does not exist
14:47:13,658 [DEBUG   ] Cache file "/var/cache/salt/master/minions/caasp-node-9a77639d/mine.p" does not exist
14:47:13,658 [DEBUG   ] Sending event: tag = salt/run/20180315144713625929/ret; data = {'fun_args': [{'fun': 'nodename', 'tgt_type': 'compound', 'tgt': 'G@roles:kube-minion and not G@roles:etcd'}], 'jid': '20180315144713625929', 'return': {}, 'success': True, '_stamp': '2018-03-15T14:47:13.658337', 'user': 'UNKNOWN', 'fun': 'runner.mine.get'}
14:47:13,661 [DEBUG   ] LazyLoaded local_cache.prep_jid
14:47:13,662 [INFO    ] Runner completed:<PHONE_NUMBER>4713625929
14:47:13,663 [DEBUG   ] CaaS: get_additional_etcd_members: taking 0 minions -> 1 missing
14:47:13,663 [ERROR   ] CaaS: get_additional_etcd_members: cannot satisfy the 1 members missing
14:47:13,664 [ERROR   ] Rendering exception occurred: Jinja variable No first item, sequence was empty.
14:47:13,665 [CRITICAL] Rendering SLS 'base:orch.kubernetes' failed: Jinja variable No first item, sequence was empty.
14:47:13,665 [DEBUG   ] Sending event: tag = salt/run/20180315144452065771/ret; data = {'fun_args': ['orch.kubernetes', {'orchestration_jid': '20180315144452065771'}], 'jid': '20180315144452065771', 'return': {'outputter': 'highstate', 'data': {'caasp-test_master': ["Rendering SLS 'base:orch.kubernetes' failed: Jinja variable No first item, sequence was empty."]}, 'retcode': 1}, 'success': False, '_stamp': '2018-03-15T14:47:13.665706', 'user': 'root', 'fun': 'runner.state.orchestrate'}
14:47:13,667 [DEBUG   ] LazyLoaded highstate.output
caasp-test_master:
    Data failed to compile:
----------
    Rendering SLS 'base:orch.kubernetes' failed: Jinja variable No first item, sequence was empty.
14:47:13,668 [DEBUG   ] LazyLoaded local_cache.prep_jid
14:47:13,669 [INFO    ] Runner completed:<PHONE_NUMBER>4452065771
14:47:13,669 [DEBUG   ] Runner return: {'outputter': 'highstate', 'retcode': 1}

I can get you the full log if you like. I'm wondering whether the exception when trying to resolve a host is what's going wrong here. It doesn't actually say which host name it tries to resolve.

caasp-test_master:
    Data failed to compile:
----------
    Rendering SLS 'base:orch.kubernetes' failed: Jinja variable No first item, sequence was empty.
14:47:13,668 [DEBUG   ] LazyLoaded local_cache.prep_jid
14:47:13,669 [INFO    ] Runner completed:<PHONE_NUMBER>4452065771
14:47:13,669 [DEBUG   ] Runner return: {'outputter': 'highstate', 'retcode': 1}

The problem here is Rendering SLS 'base:orch.kubernetes' failed: Jinja variable No first item, sequence was empty.. A list was expected somewhere, but nothing was there.
The Unknown host error is unrelated, and introduced here: https://build.suse.de/package/rdiff/SUSE:SLE-12-SP3:Update/salt?linkrev=base&rev=14 by the patch feat-add-grain-for-all-fqdns.patch.
I think having an issue open for a failed orchestration is way too generic. The last orchestration error has nothing to do with the first one, and on the first one it looks like the ca salt-minion didn't execute its mine publishing commands on startup:
https://github.com/kubic-project/salt/blob/292b025681915a6ad4d7378624385d231f2f21d4/pillar/ca.sls
I'd propose to close this bug since as I say it's too generic and we can end up discussing complete different orchestration outputs as we go because the orchestration fails.

I agree with @ereslibre. Closing...


Provide official Flatpak package

Please provide official Flatpak packages for VS Code. You already provide official snaps, but the existing Flatpak packages are unofficial and built by third parties, which brings its own can of worms. Official Flatpak packages by you would solve the problem. Flatpak is becoming the standard Linux app distribution method for all distros (except Ubuntu) in detriment of snaps.

+1. I know this issue has been brought up before, but it's nigh time VSCode officially supports flatpak. According to https://flatpak.org , it can be used with 36 distros, some of which (fedora, arch, debian, linux mint, etc.) account for a wide margin of linux users. While it admittedly would require some dev work up front to support, the end result is a more reproducible base for bug reporting and testing, not to mention the accessibility benefits to users of immutable distributions, who currently have to run vscode from a container, or in the case of something like Fedora Silverblue, give up on the 'immutable' aspect of your desktop and install the vscode package as a layer in RPM-ostree. In the future, VSCode could theoretically ship just 2 or 3 official packages - A snap, a flatpak, and a .deb (for binary reference).

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding, and happy coding!

I understand that your team may have other priorities, but I would like to present some compelling reasons why adding Flatpak support could be beneficial for both the user community and the continued success of Visual Studio Code.

Broader Reach and User Convenience:

Flatpak has gained significant traction, recently surpassing one million active users. By supporting Flatpak, Visual Studio Code can tap into this growing user base and make the development environment more accessible to a wider audience.

Distribution Agnosticism:

Flatpak provides a distribution-agnostic packaging format, eliminating compatibility concerns across different Linux distributions. This would simplify the deployment and installation process for users, making Visual Studio Code more user-friendly and inclusive.

Simplified Updates:

With Flatpak, updates to Visual Studio Code can be delivered independently of the underlying Linux distribution. This allows users to benefit from the latest features and security patches promptly, without waiting for distribution maintainers to update their packages.

Easier Maintenance and Compatibility:

Supporting a single Flatpak package could streamline the maintenance process for Visual Studio Code. It reduces the need to manage multiple package formats (deb, rpm) and ensures consistent behavior across various Linux distributions.

Community Demand:

The user community has expressed interest in having Flatpak support for Visual Studio Code. By addressing this demand, the Visual Studio Code team can demonstrate responsiveness to user needs and preferences.

I understand that development resources are finite, but I believe that the potential benefits of supporting Flatpak outweigh the investment required. This move could align with industry trends and enhance the user experience, solidifying Visual Studio Code's position as a leading choice for developers on the Linux platform.
Thank you for reconsidering this request. I appreciate your dedication to delivering an exceptional development experience, and I look forward to the possibility of seeing official Flatpak support in future releases of Visual Studio Code!

I'm curious, Snap focus on a "single" distro (yeah, I know that snap can be installed anywhere) but Flatpak is the defacto standard for installing apps on the rest of the Linux distributions.


VS Code extension still not working with flow-cli v0.24.1

Hi all, I upgraded flow-cli to the latest 0.24.1, while the error still remains~ Language Server still cannot be started, emulator cannot be started from the extension.
[Error - 7:07:21 AM] Server initialization failed.
  Message: initialization options: invalid emulator state
  Code: -32603

I have also tried to uninstall the extension from VS Code first and then install again by flow cadence install-vscode-extension so to make sure I'm having the latest extension version. But it didn't help, and the version of the cadence extension remains the same which is 0.5.0 ~

@Guisong-Fu v0.25.0 is out now, which includes the latest version of the VS Code extension.
Could you please update the CLI, update the extension using flow cadence install-vscode-extension, and see if it works for you?

@turbolent , Yes, it works!
I upgraded flow-cli to 0.25.0 and vscode-extension to '0.6.1', and everything works!
I also saw the new emulator comes with new features, really fantastic, now I can easily copy emulator account addresses by just a click!
Thanks a lot for helping out!

The emulator is still unavailable in VS Code for me. If I try to run it via the the command palette I get "Command 'Cadence: Run emulator' resulted in an error (command 'cadence.runEmulator' not found)"
M1 Mac
VS Code: 1.57.1 (Universal)
flow-cli: 0.25.0
viscode-extension: 0.6.1

@ErichWood Could you please try uninstalling the extension (if you have it installed), quit VS Code, then install the extension, and finally start VS Code?
I just followed these steps locally, and can't reproduce the error (same versions, but on a x86 Mac). Maybe it is an M1-related problem?

@ErichWood Could you please try uninstalling the extension (if you have it installed), quit VS Code, then install the extension, and finally start VS Code?
I just followed these steps locally, and can't reproduce the error (same versions, but on a x86 Mac). Maybe it is an M1-related problem?

I tried uninstall/reinstall, disable/enable, restart VS Code, restart Mac... My suspicion is that it is an M1 problem. My laptop is an M1 though and works fine with previous versions. (Not going to update that one yet.)

@ErichWood We can't reproduce the issue here, but I'm happy to help with getting this up-and-running for you. Maybe we can find some time for a short call next week?

Had a similar issue and it looks like the VSCode extension installed from CLI always broke for me.
I removed the code extension, reinstalled the CLI with brew and then installed the extension from the marketplace and it seems to work now

Had a similar issue and it looks like the VSCode extension installed from CLI always broke for me.
I removed the code extension, reinstalled the CLI with brew and then installed the extension from the marketplace and it seems to work now

Did you maybe know what was the version of the CLI that was installed when the problem was occurring?

@sideninja It's been broken for a while for me and the issue persisted with the latest version

@ErichWood We can't reproduce the issue here, but I'm happy to help with getting this up-and-running for you. Maybe we can find some time for a short call next week?

This is happening on both of my M1 Macs (office MB Air and home Mini). Would love to talk it through (I'm on NY time)

Just went through this whole process on my 2018 Mac that I haven't used for a couple months. Updates VSCode, Flow, and VSCode extension and I get the same issues. I just can't run/test with the emulator in VSCode.

Okay, we figured it out. Same issue on all four of our computers. The only way around is:

In terminal, run flow init in the Cadence directory if you haven't already from running in cli.
In VSCode, open the Cadence directory.

Whenever we try to just open a file, the error happens.

@ErichWood Thanks for your testing and report! This looks like an extension issue, not a CLI issue, so I'm going to move it to the corresponding repo.
As for the problem itself: If the extension does not find a CLI configuration, it should prompt you to run flow init for you. It looks like it doesn't show a popup if only a file is opened?


az keyvault secret list command fails with "ERROR: The challenge resource 'vault.azure.net' does not match the requested domain"

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

Describe the bug

When running "az keyvault secret list " the command fails with
"ERROR: The challenge resource 'vault.azure.net' does not match the requested domain. Pass verify_challenge_resource=False to your client's constructor to disable this verification. See https://aka.ms/azsdk/blog/vault-uri for more information."
The same command works with the 2.48.1 version
To Reproduce

Deploy environment with:

Ubuntu 20.04 VM in subscription A in VNet A-net,

remove the default cli installation
install latest cli

Keyvault "KV" with private endpoint in VNet B-net in Subscription B.
Ensure VNets are peered
Ensure that keyvault allows access from VM's subnet in VNet A-net
Ensure access policies are correct in keyvault

run
az keyvault secret list --vault-name "KV" --subscription [SUBSCRIPTION B]

Expected behavior

The secrets from the key vault "KV" should be listed
Environment summary

Since it is Ubuntu 20.04 the old cli installation is removed first with
sudo apt remove azure-cli -y
sudo apt autoremove -y
sudo apt update -y

and then the latest version is installed with
sudo curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

Additional context

If I run
sudo apt-get install azure-cli=2.48.1-1~focal -y --allow-downgrades

the
az keyvault secret list --vault-name "KV" --subscription [SUBSCRIPTION B]_

command works as expected
This is in the Microsoft Tenant so if you need access you can ping me directly

Thank you for opening this issue, we will look into it.

Running into the exact same issue when using azure cli 2.49.0

Same issue with azure cli 2.49.0

Sorry for the regression. The fix PR is ready and will be release in CLI 2.50.0 on 2023-07-04. Here's a private package for you to verify the fix and unblock your scenarios.

Hello!
I'm working for a company that use Azure Pipelines from Azure DevOps to build and deploy services to production.
Since yesterday, we are not able to that.
AzureCLI@2 task in version 2.220.0 has updated azure-cli from 2.48.1 to 2.49.0 yesterday.
Some Bash scripts run az keyvault secret list commands in our pipelines and it triggers the same error as KimForss.
The challenge resource 'vault.azure.net' does not match the requested domain.
Pass `verify_challenge_resource=False` to your client's constructor to disable this verification.
See https://aka.ms/azsdk/blog/vault-uri for more information.

We don't have the upper hand to update azure-cli bask to 2.48.1.
And waiting for 2.50.0 is too far in the future.
We cannot afford to wait almost one month to deploy our services.
Do you know whether it would be possible to create a fix version 2.49.1 including this fix?
Should I also report this to azure-pipelines-tasks repository?

We had an issue with this as well. Our workaround was to override the version of Az CLI used per job.
Add a task before using the AzCLI@2 per job.
  # Downgrade az cli to v.2.48.1
  - bash: pip install -Iv azure-cli==2.48.1 --extra-index-url https://azurecliprod.blob.core.windows.net/edge
    displayName: "Downgrade Azure CLI"

In context of the Azure Pipeline:

@VictorRos  Let me know if @dwoldo's workaround works for you. You can also overwrite the Azure CLI with the private package I shared before

Hi @evelyn-ys
Sorry for the late answer.
We found a temporary solution to fix it.
I will share it for anyone that encounter this problem aswell.
We replace the following command:
az keyvault secret list --vault-name MY-SUPER-KEY-VAULT

By this command:
# Must be in lower case!!!
az keyvault secret list --id "https://my-super-key-vault.vault.azure.net/"

This is the complete workaround we use in Bash:
keyVault="MY-SUPER-KEY-VAULT"
azureCliVersion=$(az version | jq -r '."azure-cli"')
if [ "${azureCliVersion}" = "2.49.0" ]; then
  keyVaultLower=$(echo "${keyVault}" | tr '[:upper:]' '[:lower:]')
  secretInfos=$(az keyvault secret list --id "https://${keyVaultLower}.vault.azure.net/")
else
  secretInfos=$(az keyvault secret list --vault-name "${keyVault}")
fi
echo "${secretInfos}"

FYI @dwoldo


feat: add support set/get object

Add support set/get object, array, ...

Hey thanks for your PR!
I don't think this is a good thing to add to the library, I would prefer the JSON.stringify/JSON.parse stuff to stay in user code because this is making type assumptions that simply aren't true and aren't typechecked. I'll think about it.

@mrousavy , actually when use this library, I alway create a common function to save/get object each project. i think it will help someone like me

I would also love to have an get/set equivalent to the useMMKVObject method, which in fact also uses JSON.parse and JSON.stringify under the hood (https://github.com/mrousavy/react-native-mmkv/blob/40b71fe27269ee4c0bd5bfb83ee626bf41535cba/src/hooks.ts#L178-L202).
Currently when I use the hook and also need some direct getter for an object/array, then I need to write a helper method. Types are not checked by my helper function either, but this is okay.
By the way, thank for this package, I migrated all projects from AsyncStorage to MMKV 👍 And I will use it with or without "get/setObject" 😉

@mrousavy well, recently I noticed that I don't have to JSON.stringify(object) when using set function to persist an object. I'm using 2.11.0, because when I use getString(key) and then JSON.parse it, I have to JSON.parse twice to get the original object I persisted. I read the souce code and find nothing.
is there anything I'm missing?

even the object I want to persist is an Object Array, I also don't need to JSON.stringify it. which confuses me since you said developers have to handle the parse/stringify themselves.

sorry about my comments, I'm using react-native-mmkv with atomWithStorage in jotai, setItem in createJSONStorage already stringify the value so I don't have to. which makes everything sense.

@mrousavy , actually when use this library, I alway create a common function to save/get object each project. i think it will help someone like me

Yea I know, but this is probably a good thing. If I add setObject and getObject functions, the user might assume that those objects are safely typed - which they are absolutely not. Your storage could get corrupted, someone else (notification extension? previous version of your app? etc) could write to that key, and your object might look entirely different from what the type suggests.


Add support for radius config

This adds support for setting the radius though kwmc config *-border radius.
It defaults to the old behavior (stroke width + 4) if rad isn't set. If rad is set, it uses that value (a value of 0 will turn off the border radius)

It appears that I have to use a radius value of 8 to get the same looks I had before this change.
This is not a problem or anything, just thought I'd mention it in case it should be the default value maybe instead of 4.

If you were using a width of 4 a value of 8 makes sense.
Right now the default is the previous logic: width + 4
On Sat, Feb 13, 2016 at 7:02 PM koekeishiya<EMAIL_ADDRESS>wrote:

It appears that I have to use a radius value of 8 to get the same looks I
had before this change.
This is not a problem or anything, just thought I'd mention it in case it
should be the default value maybe instead of 4.
—
Reply to this email directly or view it on GitHub
https://github.com/koekeishiya/kwm/pull/160#issuecomment-183810206.

edited last post a bit to late: I don't think the case of width+4 ever happens, because Kwm will always pass in a value for rad = 0, if the user hasnt specified one.

Ah, I wasn't aware you were sending a value of 0 if it isn't set. Let me know if you run into issues when you don't send the value.

Would it be possible to have the users just specify -1 or something like that to have it be disabled? That way 0 can make it use default behaviour (width +4), this way it's a lot easier to manage with Kwm, cause since 0 is the value of uninitialized, I don't have to create a bool or something to track if the users wanted 0 or if it was indeed uninitialized.

Technically yes it's possible. I just find it a little odd that a user would have to specify -1 if they wanted to have a border radius of 0.
If you don't want to manage that bool, could the default value of the radius inside kwm be the same width + 4 calculation that the overlay does? Then use what ever value the user specifies if it is set?

Yeah I did something similar to that, worked out just fine.


VM scaleset : support enabling auto-scale

This is currently not available in any SDK, but it may be at some point.

It is not blocked, rather we need to use resource Microsoft.Insights/autoscaleSettings to define the rule. Suggest to expose a new command auto-scale for this. I prefer not integrate with create, because it has a whole lot of arguments already

@vishrutshah I will handle the integration into the create command--just need to know what the good "default" scaleset settings should be. I think we should use the same default as your vmss autoscale set command.

@tjprescott Awesome! Based on what I see in the Azure portal and Azure gallery template, the default should look like below for vmss autoscale:
{
  "autoscale_setting_resource_name": "{MyAutoscaleSettings}",
  "location": "{location}",
  "tags": {},
  "profiles": [
    {
      "name": "Profile1",
      "capacity": {
        "minimum": "1",
        "maximum": "10",
        "default": "1"
      },
      "rules": [
        {
          "metric_trigger": {
            "metric_name": "Percentage CPU",
            "metric_resource_uri": "/subscriptions/{subscriptionID}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachineScaleSets/{VMSSName}",
            "time_grain": "PT1M",
            "statistic": "Average",
            "time_window": "PT5M",
            "time_aggregation": "Average",
            "operator": "GreaterThan",
            "threshold": 75
          },
          "scale_action": {
            "direction": "Increase",
            "type": "ChangeCount",
            "value": "1",
            "cooldown": "PT1M"
          }
        },
        {
          "metric_trigger": {
            "metric_name": "Percentage CPU",
            "metric_resource_uri": "/subscriptions/{subscriptionID}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachineScaleSets/{VMSSName}",
            "time_grain": "PT1M",
            "statistic": "Average",
            "time_window": "PT5M",
            "time_aggregation": "Average",
            "operator": "LessThan",
            "threshold": 25
          },
          "scale_action": {
            "direction": "Decrease",
            "type": "ChangeCount",
            "value": "1",
            "cooldown": "PT1M"
          }
        }
      ]
    }
  ],
  "notifications": [],
  "enabled": true,
  "target_resource_uri": "/subscriptions/{subscriptionID}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachineScaleSets/{VMSSName}"
}

Basically one profile with two rules. One for scale out and one for scale in.
Let me know if you need any more information on this!
Thanks!

//cc: @gbowerman @gatneil
We will have min support from the new monitoring commands to be in par with xplat, and this issue is for convenient command more towards VMSS

Looks reasonable #sign-off

Agreed :)

Actually, one thought:
@yugangw-msft you say "We will have min support from the new monitoring commands to be in par with xplat"; I didn't think CLI1.0 had much w/ respect to autoscale; looking at this doc: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/insights-cli-samples
it seems that you need to pass in the autoscale settings spec as a json string or create the settings object first via some other method then reference it from CLI. Is this the goal for parity? Ideally a lot of the json block for autoscale could have default values provided by CLI2.0 with the ability to override values as necessary (just like the vmss block does). Granted, if this issue is specifically for helpful autoscale commands within the vmss context, then this point is perhaps out of scope, but I figure a lot of the work for making the vmss autoscale commands easy could be re-used for autoscale commands on other autoscalable resources as well (websites, etc.).

I figure a lot of the work for making the vmss autoscale commands easy could be re-used for autoscale commands on other autoscalable resources as well (websites, etc.).

@gatneil  Agreed.  I thought about this as well this morning. When I get to the scale support for website, I might refactor a bit for common supports. At current moment, let us focus on getting the autoscale right for vmss. The vmss is all about scale, and it deserves to have its own strong type commands more than any other ones.

The plan we discussed at the monitor commands review was to expose the "generic" autoscale commands under monitor as a stop-gap, but to expose commands in each applicable area (web app, vmss, etc) that would have a tailored experience.

Pushing this to next sprint while I await recommendations on the most common autoscale scenarios for VMSS.

@tjprescott who is this waiting on?

Monitor team will be providing templates for the common VMSS autoscale patterns. The convenience command will be tailored to those scenarios (which are more than just the CPU autoscale that the portal exposes today).

//CC: @mayurid  @troydai
Once monitoring support gets consolidated, please handle this and related webapp ask