move missingMandatoryParameters closer to where it's used

https://github.com/KirkMunro/SnippetPx/blob/assembly/SnippetPx/InvokeSnippetCommand.cs#L52
This should probably right above foreach (PSObject psObject in results)
https://github.com/KirkMunro/SnippetPx/blob/assembly/SnippetPx/InvokeSnippetCommand.cs#L66
There's no need to create this list if the else is not executed.

Yeah, you might find a similar issue here or there where I didn't move variable definitions around after adding error handling that I skipped over when implementing the core logic.  I've changed it locally on my system, it will be added to GitHub later.


portfolio websocket

Please provide portfolio websocket example with implementation or else provide proper swagger document what is input and what is out

Kindly locate the sample code for a portfolio WebSocket at the following GitHub repository link:
Portfolio Websocket Example Code
Please refer readme file and examine the contents of the OrderUpdatesClient.java file. Feel free to inform us about any challenges during the implementation process.


Fixed issue with Podfile in Example project

Changes in this pull request
Fixed issue with Podfile in Example project #152

Coverage remained the same at 86.297% when pulling 52aeedb6cfcd7faa06ae54636d492406c3096e14 on shuhrat10:Fixed_152 into d34a8aa9a578a1226bba529fb23afd320e1fffaa on Instagram:master.


SummarizationMetric and empty set of assessment_questions

Hi,
I am using the SummarizationMetric to evaluate the output of a LLM.
In the blog post example here you say that If assessment_questions is not provided, we will generate a set of assessment_questions for you at evaluation time.
However, I wasn't able to find where these questions are generated in the code and, on my side, I always end up with assessment_question being None; thus an inclusion_score of 1 from this line.
Could you help me on this issue?
Thanks
Edit: I am using latest version 0.20.68

Hey @qgrail ! Yes, we got complaints that the generated questions were too arbitrary and so removed it for the time being. It is the blog that needs updating (or unless we have a better way to make the generated assessment questions more aligned with expectations)

Understand, thanks for the clarification.

@qgrail actually bringing the inclusion score back tomorrow with auto generated assessment questions, but also renaming it to coverage score (inclusion will be used for diversity & inclusion instead)


Night mode: Android bottom navigation is not in dark mode on Android 9

On my Galaxy S9 with Android 9, Zulip in night mode has a light Android system bottom navigation bar. Signal, on the contrary, has the dark one.

Are you using the website in a mobile browser (this repository), or the app from Play Store (zulip-mobile repository)?
This may be the same issue as zulip/zulip-mobile#3402.

Yes I am using the app client and it is the same issue as the one you mentioned. I'm closing this one, sorry for the noise.


info_overlay: Fix keyboard accessibility of keyboard shortcuts modal.

Commit 03393631bdded3be89c935f2151b74eebbf29034 (#14142) regressed the keyboard accessibility of the keyboard shortcuts modal.  Fix it by moving tabindex="0" to the scrolling element of the SimpleBar.
Fixes #14320.
Testing Plan: Dev server.

As I mentioned on chat, I'd have a slight preference to merge this as two commits.  Revert the initial commit, then have a clean commit that does all the simplebar stuff correctly at once.

I think it's more readable this way than with the revert approach.


Package request: tremc

Project description
A remote client for the Transmission daemon with a curses interface.
Metadata

source URL: https://github.com/tremc/tremc
license: GPL-3.0
platforms: unix, linux, darwin

Fixed by #85323


It's useless to set doneButton.tintColor

I downloaded your demo to test 'showCustomImagePicker',but I found that setting doneButton.tintColor is not useful at all.

@ChokShen  If you want to change tint color of Done button then go to the PhotosViewController
and change color in updateDoneButton


Add support for documenting class properties and methods

Sometimes you may want to document class attributes for a component, directive, module or service (particularly for services associated with storybook components i.e. MyIconRegistry)
Adding support for something like this may be useful.

Properties
className:  get string
The class name applied to the DOM element

Initial PR #12

Duplicate of #6

Wait. I don't know why I thought this was a duplicate... sorry.


Document handling.py

Needs descriptive doc strings.

This seems to be the most confusing part of the code currently, so I've cleaned it up. Basically there are two parts; creating the parameter grid and log (done once), and picking a round configuration (done repeatedly). There is also the third case of reduction, but I'm going to ignore that for now.
I've created a class ParamGrid which handles the first part. Then for the second part we just have one easy to understand function round_params(). I will document both as part of the process.

Ok this is done now and will be included in the next merge I do with dev, which should be tomorrow.


Install fails if python is not installed

After updating to<EMAIL_ADDRESS>when trying to install knip in an environment (i.e. docker) where you don't have python installed you get an error. The readme doesn't seem to indicate that having python installed is a requirement. Not sure if this is a bug report or a request to update the readme?
Log example
 .../node_modules/tree-sitter-bash install$ prebuild-install || node-gyp rebuild
 .../node_modules/tree-sitter install$ prebuild-install || node-gyp rebuild
 .../node_modules/tree-sitter-bash install: prebuild-install warn install No prebuilt binaries found (target=18.17.1 runtime=node arch=x64 libc= platform=linux)
 .../node_modules/tree-sitter-bash install: gyp info it worked if it ends with ok
 .../node_modules/tree-sitter-bash install: gyp info using<EMAIL_ADDRESS> .../node_modules/tree-sitter-bash install: gyp info using<EMAIL_ADDRESS>| linux | x64
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python Python is not set from command line or npm configuration
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python Python is not set from environment variable PYTHON
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python checking if "python3" can be used
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python - "python3" is not in PATH or produced an error
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python checking if "python" can be used
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python - "python" is not in PATH or produced an error
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python **********************************************************
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python You need to install the latest version of Python.
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python you can try one of the following options:
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python   (accepted by both node-gyp and npm)
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python - Set the environment variable PYTHON
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python - Set the npm configuration variable python:
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python For more information consult the documentation at:
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python **********************************************************
 .../node_modules/tree-sitter-bash install: gyp ERR! find Python
 .../node_modules/tree-sitter-bash install: gyp ERR! configure error
 .../node_modules/tree-sitter-bash install: gyp ERR! stack Error: Could not find any Python installation to use

That's a bit of a surprise. I've replaced bash-parser with tree-sitter-node + tree-sitter-bash in v2.19.6. Didn't notice this in their docs and this wasn't clear to me when adding it to Knip.
I've opened https://github.com/tree-sitter/tree-sitter-bash/issues/188 over there, maybe it's just an overlook with their v0.20.0 release (I could downgrade to v0.19.0 if necessary).

Update: https://github.com/tree-sitter/tree-sitter-bash/issues/134#issuecomment-1686523590


chore: drop dependency on ruby2_keywords

Now that Ruby below 2.7 is not supported (#389, https://github.com/open-telemetry/opentelemetry-ruby-contrib/commit/38b083aa41b93bcc8f900cd65bc922c97fe26e5d) this is not needed anymore

The ruby2_keywords methods are natively defined in ruby versions after 2.6, all this dependency does is define empty shims for compatibility with older versions (see https://github.com/ruby/ruby2_keywords/blob/3882dac4c9bc784183d7d4cf7374edd56017746f/lib/ruby2_keywords.rb)
Removing these from existing code would change behaviour in some way and I can't say what that entails. It would be better kept for a separate PR.


Incorrect assumption: Files to diff are not actually encoded according to the current locale

Text.IO.readFile uses the system's locale (which usually will be UTF-8):

The functions in this module obey the runtime system's locale, character set encoding, and line ending conversion settings.

Files that will be diffed may be any files imported into the nix store by virtue of being referenced as Nix path in a derivation. One example of this which likely many will run into is the gzipped patch file pkgs/development/libraries/glibc/2.33-master.patch.gz from nixpkgs. Any diff involving any such file will cause nix-diff to fail with an exception.
A simple fix for this would probably be catching the exception while reading leftText and rightText and re-reading them as ByteStrings if one is thrown. Then it'd possible to simply print whether the binary files differ or not.

Much more tricky to fix is the incorrect assumption that derivation files will be encoded according to the current locale: This is not true, in fact derivation are not guaranteed to be properly encoded at all, since Nix strings can contain arbitrary byte sequences. By virtue of nix-derivation assuming a derivation may (as an intermediate form) be representable as Text, nix-diff also has to assume some Unicode-compatible  encoding, which won't work in all cases:
$ printf '\x51\xf9\xe2\x31' > bytes
$ nix-instantiate -E 'with import <nixpkgs> {}; stdenv.mkDerivation { name = "bar"; foo = builtins.readFile ./bytes; }'
/nix/store/j95dilq8rnf3vv79vh70ic3blhr3zn6l-bar.drv
$ ghci
GHCi, version 8.10.7: https://www.haskell.org/ghc/  :? for help
Prelude> import qualified Data.Text.Encoding as E
Prelude E> import qualified Data.ByteString as B
Prelude E B> E.decodeUtf8 <$> B.readFile "/nix/store/j95dilq8rnf3vv79vh70ic3blhr3zn6l-bar.drv"
"*** Exception: Cannot decode byte '\xf9': Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 stream

This is probably not a huge concern for real-world use cases and not necessarily an issue fixable in nix-diff, but something to be aware of.

This is probably not a huge concern for real-world use cases and not necessarily an issue fixable in nix-diff, but something to be aware of.

I wouldn’t say so, as even a simple
builtins.readFile ./foo

will inline the file into the drv, and if it contains any binary data that is not unicode, nix-diff fails currently.
I think the easiest fix here is to use Data.Text.Encoding.decodeUtf8With Data.Text.Encoding.Error.lenientDecode and use the resulting text. This will replace all non-utf8 bytes with the unicode replacement character and we can go on and use the nix-derivation parser on the result.

I’m gonna prepare a PR.


Possible issue when used with build-storybook

Hi,
I encountered an issue when using build-storybook script and then copying over the storybook-static directory that gets created over to gitlab pages . We use gitlab pages to host our internal storybooks.
Inside one of the iframe bundles is var DEFAULT_START_OPTIONS={serviceWorker:{url:"/mockServiceWorker.js",options:null}
The problem: But that leading forward slash causes it to look for  the mockServiceWorker.js at root level instead of the where it actually is which is the directory where I moved the storybook-static directory, which is inside a storybook directory inside the actual project directory on gitlab. So it doesn't load and MSW therefore doesn't work.
I have no idea where this gets bundled, maybe it's the responsibility of Storybook itself? And I also have no idea if the slash is there for a reason, but I remove it via a find and replace script in the CI before moving it to its final location and everything seems to work okay.
Thanks for your time,
Jason.

You can pass start options to override the default. If you use ./ it'll use the current directory.
initializeMsw({
  serviceWorker: {
    url: './mockServiceWorker.js',
  },
});

Thanks!


APIErrorException: (InvalidRequest) Invalid request has been sent.

Afternoon,
After many many attempts and hours of research, I simply cant get this tutorial to work. I have tried many other examples online and thought I'd go through MS Docs to go back to basics. Yet, still same error.
Seems the API doesnt like the .create request.
face_client.person_group.create(person_group_id=PERSON_GROUP_ID, name=PERSON_GROUP_ID, recognition_model='recognition_04')
error;
File "lasttest.py", line 41, in
face_client.person_group.create(person_group_id=PERSON_GROUP_ID, name=PERSON_GROUP_ID, recognition_model='recognition_04')
File "/home/scouse/.pyenv/versions/3.8.10/lib/python3.8/site-packages/azure/cognitiveservices/vision/face/operations/_person_group_operations.py", line 121, in create
raise models.APIErrorException(self._deserialize, response)
azure.cognitiveservices.vision.face.models._models_py3.APIErrorException: (InvalidRequest) Invalid request has been sent.
any help will be much appreciated

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

ID: 24f2953b-2900-322d-dbfd-a53846e75940
Version Independent ID: 25af9875-58cf-69d5-478d-08fb888d12dc
Content: Quickstart: Use the Face service - Azure Cognitive Services
Content Source: articles/cognitive-services/Computer-vision/quickstarts-sdk/identity-client-library.md
Service: cognitive-services
Sub-service: face-api
GitHub Login: @PatrickFarley
Microsoft Alias: pafarley

Hello @kyleharperSAIT
Thanks for reaching out to us and sorry for your experience. You should have received an email from us about the Face API limitation- https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-limited-access
Face service access is limited based on eligibility and usage criteria in order to support our Responsible AI principles. You got this error since what you are trying to call is now limited access to them because you have not been approved to use that capability. Face service is only available to Microsoft managed customers and partners. Please use the Face Recognition intake form to apply for access- aka.ms/facerecognition.
I hope this helps.
Regards,
Yutong

Would it not be beneficial to amend the responses to limited services to detail this rather than "invalid request"?
I've spend wasted days thinking my code was at fault.


[SR-15436] Publish SwiftMarkdown as a CocoaPod

Previous ID
SR-15436

Radar
None

Original Reporter
@kylebshr

Type
New Feature

Additional Detail from JIRA

Votes
0

Component/s
Swift-Markdown

Labels
New Feature, SwiftMarkdown

Assignee
None

Priority
Medium

md5: ce40b1f3bca40cc5f750f648c051caea

Issue Description:
Many thousands of developers use CocoaPods for dependency management, and it would be excellent if those developers could consume SwiftMarkdown as a CocoaPod.

@franklinsch Hi, Franklin! Can we transfer this issue to swift-markdown?


[SPARK-14899] [ML] [PySpark] Remove spark.ml HashingTF hashingAlg option

What changes were proposed in this pull request?
Since SPARK-10574 breaks behavior of HashingTF, we should try to enforce good practice by removing the "native" hashAlgorithm option in spark.ml and pyspark.ml. We can leave spark.mllib and pyspark.mllib alone.
How was this patch tested?
Unit tests.
cc @jkbradley

Test build #57002 has started for PR 12702 at commit 19e051d.

Small comments, otherwise LGTM pending tests.

Test build #57002 has finished for PR 12702 at commit 19e051d.

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

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57002/
Test PASSed.

I would recommend just removing the hashAlgorithm Param altogether.  There isn't a real need to keep it, and it would eliminate some code.

Test build #57120 has started for PR 12702 at commit ae90187.

Test build #57120 has finished for PR 12702 at commit ae90187.

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

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57120/
Test PASSed.

@yanboliang Thanks for reverting this!  LGTM
Merging with master


Terminal looks weird when resizing the window

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: 1.71
OS Version: MacOS Big Sur

Steps to Reproduce:

Open a terminal
Resize the window

having the same issue. also, some of my coworkers are experiencing this.

Hey, looks like this is a duplicate of https://github.com/microsoft/vscode/issues/157585 and it was fixed on https://github.com/microsoft/vscode/pull/160706. Maybe this issue can be closed?

But it stills happen! on my VSCODE 1.71.2

it works fine when increase the window, but not when it is being shrinked

/duplicate https://github.com/microsoft/vscode/issues/157585

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!


Spread operator in combination with a set is incorrectly transpiled

The following statement...
console.log([...new Set([1,2,2])]);
// => [1, 2]

...is unfortunately transpiled by Buble the code into:
console.log([].concat( new Set([1,2,3]) ));
// => [Set(3)]

But the statements are functionally not equivalent. I would expect Buble to either handle the spread operator correctly or throw a warning or error.
This is potentially related to #81

This topic has been discussed somewhat in #81.

Closing this in favor of #131.


8229 fix aligments

@javierarce could you take a look?
Fix https://github.com/CartoDB/cartodb/issues/8229
cc/ @urbanphes

Also put 'Add widget' button in the right position

👍


📃: Add a Translation Tool

I want to add a Translation Tool(all language) properly.
@iamrahulmahato  PA please assign me this task.

@iamrahulmahato


Linking to another file breaks navigation

When clicking a link to another file (that is also in the documentation structure), it breaks the navigation.
What happens:

The linked file is loaded and displayed as markdown, as expected (and intended, I assume). The TOC is updated as well.
The navigation in the left pane is not updated. The item where was linked from, is still selected.
The breadcrumbs are empty. There's only a "copy url" button.

What I'd expect:

The navigation in the left is updated - the file that was linked to, should be selected if it's there.
The breadcrumbs should be updated accordingly.

Please provide me with some steps so I can reproduce the issue: link to the documentation project, also which links do not work.
Otherwise I can't reproduce it easily based just on the generic description alone...


Avenir-Next Font

We might want to add a section in the README.md regarding the dependency on avenir-next and the licensing requirements.

Small mention in readme
#697


NoMethodError: undefined method `oid'

Environment

Ruby 2.4.0 (rvm)
Rails 5.1.4
Devise 4.4.1
PostgreSQL 9.5 (ubuntu 16.04)

Current behavior
When i want to run a default Devise migration (no changes to the file) I am getting:
NoMethodError: undefined method `oid' for  # ActiveRecord::ConnectionAdapters::ColumnDefinition:0x00000005817360>
Expected behavior
Migration should run w/o problems.
Can please someone let me know if this is something with devise, pm gem, postgres version, rails version or some other configuration. I have no idea where to start solving this.
Some previous migrations from other gems are successfully migrated.

Ok, so my users migration works normaly with sqlite3, also mysql, but not postgresql which i need. All other migrations work just fine on PG, which indicates there trully is something going on devise vise.
Please, any suggestions?

Hi @Svashta, thanks for your report.
I did a quick search and found some issues a Rails about it: https://github.com/rails/rails/issues/26137
Could you take a look to see if it's the same thing?
Thank you.

I'm closing this issue because it has not had recent activity.
If you're still facing this on the latest version, please open a new one with all the information requested in the template.
Thank you!


use $unset instead of $set, update error

use $unset instead of $set to remove service is more precise.
meteor error don't need to be 500(server error) since you want the client know what it is.
I didn't test the code. please check if it runs well.

Good call.  However this package hasnt require es6 yet. I will add that before merge this in


lang edits (careful merging w/upstream comments)

I guess on the EIPs repo un-requested reviewers can't just request changes on any old line so I had to open a PR... but I think I was pulling against an older master branch (maybe you've been accepting suggestions or pushing commits direct to your branch on ethereum/eips?), so this might be an exercise in chaos.  i'll keep my local branch in case it's easier to just resubmit elsewhere/otherwise (i.e., just request my review over there if it saves you time!)

Yeah I've been trying to use feature branches. Can you do this PR against the kdh/eip-6963-updates branch instead which is the one I'm PRing against EIP repo? I'll grant you permissions on this repo as well to make it easier.

closed in leiu of #4


DecodeUlawRead and DecodeAlawRead to accept buffer instead returning

Add
DecodeUlaw and DecodeAlaw  as one more alternative where you accept buffer for PC instead returning it.
Caller can make reuse of buffer memory, considering this are uncompressed formats and size can be calculated.
Should be small fix to add?

aah sorry noticed now encoders and decoders

It will be addressed here: https://github.com/zaf/g711/pull/3
It introduces functions that use user defined buffers:
BenchmarkEncodeUlaw-4     	   13824	     86166 ns/op	 472.39 MB/s	   20480 B/op	       1 allocs/op
BenchmarkEncodeUlawTo-4   	   14311	     82727 ns/op	 492.03 MB/s	       0 B/op	       0 allocs/op
BenchmarkDecodeUlaw-4     	   35204	     33762 ns/op	 602.82 MB/s	   40960 B/op	       1 allocs/op
BenchmarkDecodeUlawTo-4   	   45838	     25614 ns/op	 794.58 MB/s	       0 B/op	       0 allocs/op
BenchmarkUlaw2Alaw-4      	   78462	     14701 ns/op	1384.36 MB/s	   20480 B/op	       1 allocs/op
BenchmarkUlaw2AlawTo-4    	  101139	     11891 ns/op	1711.47 MB/s	       0 B/op	       0 allocs/op


unexpected end of stream on Connection

Some images are not loading i am using the php server

If there is spaces in image name and any special character then image can not load.

No the url is correct and there is no special character

whats the url?


Add contextual parsing for Dart?

Dart's syntax relevant to contextual parsing (i.e. comments and strings) is basically the same as other C-like languages.
Comments:
// This is a comment
/*
  This is
  a multi-line
  comment. */

Strings:
"This is a string"
'This is also a string'

It has been added to 0.10.7. Please let me know if there are any issues.


Analyze class problem

{"error":{"root_cause":[{"type":"json_parse_exception","reason":"Unrecognized token 'io': was expecting ('true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@65552bfa; line: 1, column: 4]"}],"type":"json_parse_exception","reason":"Unrecognized token 'io': was expecting ('true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@65552bfa; line: 1, column: 4]"},"status":500}

What version of Jest do you use, and can you give the code lines you use that give the error?


Disallow installing transformers >= 4.41

Duplicate of https://github.com/foundation-model-stack/fms-hf-tuning/pull/202
transformers >= 4.41 appears to create a performance regression in the fms-hf-training fine tuning jobs.
This PR prevents the regression to happen in the fms-hf-tuning image by disallowing the installation of transformers >= 4.41, meaning that transformers == 4.40 will be installed.
This fix has been performance tested. It reverts the performance to the level prior to the publication of transformers 4.41

with the regression

with the fix

See also: RHOAIENG-8551
Closes #201

/lgtm


Error: Giliner Training data

I am facing the error in the Training data arguments in the dataset in this line {
training_args = TrainingArguments(
output_dir="models",
learning_rate=5e-6,
weight_decay=0.01,
others_lr=1e-5,
others_weight_decay=0.01,
lr_scheduler_type="linear", #cosine
warmup_ratio=0.1,
per_device_train_batch_size=8,
per_device_eval_batch_size=8,
num_train_epochs=3,
evaluation_strategy="epoch",
save_steps = 1000,
save_total_limit=10,
dataloader_num_workers = 8,
use_cpu = True,
report_to="none",
)
trainer = Trainer(
model=model,
args=training_args,
train_dataset=train_dataset,
eval_dataset=test_dataset,
tokenizer=model.data_processor.transformer_tokenizer,
data_collator=data_collator,
)
trainer.train()
}
Iam getting an error: BackendCompilerFailed: backend='inductor' raised:
CppCompileError: C++ compile error
Output:
/tmp/torchinductor_ubuntu/tw/ctwif4gnjxuyqq47csmx5l4wpoyqgb6kbcqb556l2sakhglmvmzd.cpp: In function ‘void kernel(float*, const long int*, const float*, const float*, float*, long int, long int)’:
/tmp/torchinductor_ubuntu/tw/ctwif4gnjxuyqq47csmx5l4wpoyqgb6kbcqb556l2sakhglmvmzd.cpp:32:46: error: no match for ‘operator==’ (operand types are ‘at::vec::CPU_CAPABILITY::VectorizedN<long int, 2>’ and ‘int’)
32 |                             auto tmp5 = tmp4 == 0;
  |                                         ~~~~ ^~ ~

  |                                         |       |

  |                                         |       int

  |                                         at::vec::CPU_CAPABILITY::VectorizedN<long int, 2>

Hi, can retry without compiling the model ?

Same problem, trying to perform fine tuning:
29%|██▉       | 7/24 [06:40<16:11, 57.15s/it]
0%|          | 0/24 [00:00<?, ?it/s]
{
"name": "KeyError",
"message": "Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)  # type: ignore[possibly-undefined]
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/torch/utils/data/_utils/fetch.py", line 54, in fetch
return self.collate_fn(data)
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/transformers/trainer_utils.py", line 809, in call
return self.data_collator(features)
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/gliner/data_processing/collator.py", line 20, in call
raw_batch = self.data_processor.collate_raw_batch(input_x)
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/gliner/data_processing/processor.py", line 171, in collate_raw_batch
class_to_ids, id_to_classes = self.batch_generate_class_mappings(batch_list, negatives)
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/gliner/data_processing/processor.py", line 147, in batch_generate_class_mappings
negatives = self.get_negatives(batch_list, 100)
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/gliner/data_processing/processor.py", line 74, in get_negatives
types = set([el[-1] for el in b['ner']])
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/transformers/tokenization_utils_base.py", line 254, in getitem
return self.data[item]
KeyError: 'ner'
",
"stack": "---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Cell In[13], line 28
1 training_args = TrainingArguments(
2     output_dir="models",
3     learning_rate=5e-6,
(...)
17     report_to="none",
18     )
20 trainer = Trainer(
21     model=model,
22     args=training_args,
(...)
26     data_collator=data_collator,
27 )
---> 28 trainer.train()
File ~/Library/Python/3.9/lib/python/site-packages/transformers/trainer.py:1885, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs)
1883         hf_hub_utils.enable_progress_bars()
1884 else:
-> 1885     return inner_training_loop(
1886         args=args,
1887         resume_from_checkpoint=resume_from_checkpoint,
1888         trial=trial,
1889         ignore_keys_for_eval=ignore_keys_for_eval,
1890     )
File ~/Library/Python/3.9/lib/python/site-packages/transformers/trainer.py:2178, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval)
2175     rng_to_sync = True
2177 step = -1
-> 2178 for step, inputs in enumerate(epoch_iterator):
2179     total_batched_samples += 1
2181     if self.args.include_num_input_tokens_seen:
File ~/Library/Python/3.9/lib/python/site-packages/accelerate/data_loader.py:454, in DataLoaderShard.iter(self)
452 # We iterate one batch ahead to check when we are at the end
453 try:
--> 454     current_batch = next(dataloader_iter)
455 except StopIteration:
456     yield
File ~/Library/Python/3.9/lib/python/site-packages/torch/utils/data/dataloader.py:631, in _BaseDataLoaderIter.next(self)
628 if self._sampler_iter is None:
629     # TODO(https://github.com/pytorch/pytorch/issues/76750)
630     self._reset()  # type: ignore[call-arg]
--> 631 data = self._next_data()
632 self._num_yielded += 1
633 if self._dataset_kind == _DatasetKind.Iterable and \
634         self._IterableDataset_len_called is not None and \
635         self._num_yielded > self._IterableDataset_len_called:
File ~/Library/Python/3.9/lib/python/site-packages/torch/utils/data/dataloader.py:1346, in _MultiProcessingDataLoaderIter._next_data(self)
1344 else:
1345     del self._task_info[idx]
-> 1346     return self._process_data(data)
File ~/Library/Python/3.9/lib/python/site-packages/torch/utils/data/dataloader.py:1372, in _MultiProcessingDataLoaderIter._process_data(self, data)
1370 self._try_put_index()
1371 if isinstance(data, ExceptionWrapper):
-> 1372     data.reraise()
1373 return data
File ~/Library/Python/3.9/lib/python/site-packages/torch/_utils.py:705, in ExceptionWrapper.reraise(self)
701 except TypeError:
702     # If the exception takes multiple arguments, don't try to
703     # instantiate since we don't know how to
704     raise RuntimeError(msg) from None
--> 705 raise exception
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)  # type: ignore[possibly-undefined]
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/torch/utils/data/_utils/fetch.py", line 54, in fetch
return self.collate_fn(data)
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/transformers/trainer_utils.py", line 809, in call
return self.data_collator(features)
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/gliner/data_processing/collator.py", line 20, in call
raw_batch = self.data_processor.collate_raw_batch(input_x)
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/gliner/data_processing/processor.py", line 171, in collate_raw_batch
class_to_ids, id_to_classes = self.batch_generate_class_mappings(batch_list, negatives)
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/gliner/data_processing/processor.py", line 147, in batch_generate_class_mappings
negatives = self.get_negatives(batch_list, 100)
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/gliner/data_processing/processor.py", line 74, in get_negatives
types = set([el[-1] for el in b['ner']])
File "/Users/gianpaolotobia/Library/Python/3.9/lib/python/site-packages/transformers/tokenization_utils_base.py", line 254, in getitem
return self.data[item]
KeyError: 'ner'
"
}


Start Solving For Type Variables (Locally)

Adds two new forms of shorthand for closures.  This necessitated modeling type variables and starting the most rudimentary of solvers in the TypeChecker.

Hm, so this removes the ability to "coerce".

Can you also add an example to demonstrate what this will allow?

Pardon my ignorance, but what's the benefit of propagating the canonical types directly?

Propagating sugar down the context is better for debugging, but means every access to the type needs to be guarded by a canonicalize call.  Really, it's a modeling problem.  We should be able to retain annotated types and all their sugar, solve constraint systems with canonical types, then apply and get rid of the propagation call.

I actually think we should remove that. It makes type checker errors worse by stripping the sugar in diagnostics.

I eventually want to be able to say:
error: cannot convert value of type 'Foo' (aka 'Array<(Int, String)>') to type 'Bar' (aka String)

Starting work on the solver.  We're going OutsideIn light (no GADTs, no existentials, no generalization).

@segiddins I appreciate the review, but nothing here works yet!

Understood, just trying to understand it 😅


Not running on a NodeMCU V3

Loaded 0x00000.bin and 0x00001.bin on a NodeMCU v3 with the ESP flashtool. Power cycled it by unplugging the USB cable. When monitoring the COM Port with putty I get a message.
 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

ets_main.c

double tripple checked the flashtool settings are correct

It is 0x10000.bin (not 0x00001.bin) and the respective address - guess you made this right? Did you try the 1.5.4 Firmware

I'm sure its a typo in my original message. Will most certainly try again tonight :-) ,Have not tried the 1.5.4 firmware. If all fails i have a couple of ESP12s that I can  salvage from an old project .

I can confirm my original message had a type i was supposed to write 0x10000 instead of 0x00001
I tried the 1.5.4 firmware aswell getting a different message using1.5.4
ets Jan  8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 31148, room 16
tail 12
chksum 0xef
ho 0 tail 12 room 4
load 0x00000000, len 0, room 12
tail 0
chksum 0xef
load 0x00000000, len 0, room 4
tail 0
chksum 0xef
csum 0xef
csum err
ets_main.c
also tried 0x10000 ass opposed to  0x40000

Can also confirm the NodeMCU is working fine because I can write custom code that host's a working access point using the Arduino IDE

Flash it in DIO mode.

Mr Karawin.
You are the man! it worked

THANK YOU

Thanks for the support!


Kill Mob stage not working

(Required) What is your Quests version / build number ("3.2.4-b255")?
(Required) Please describe the problem and how to replicate it. Any console errors?
No matter what I do the Kill Mob stage (#12) does not work. I kill the mobs and nothing happens, it does not register it. I tried with a bow, a sword, my fist, spells, nothing works. I also tried on two separate servers (my actual server and my test server) to see if the issue was just based on the servers setup. There are no console errors of any sort available.
(Optional) Can you provide an example quest from quests.yml using Pastebin.com?
https://pastebin.com/D1edskDx

The stage works for me and my friend. Are you running the correct server version? Sometimes code changes throughout versions and that can mess things up.

My server is on the  newest spigot and the Quest build is the one I just specified. I killed like 100 horses nothing happened. If you want to come on the server I can show you what I mean, the ip is mc.amscraft.co.

It seems this is caused by the fix for #257. Will push an alternative solution.


Add project settings to nvim

https://andrew.stwrt.ca/posts/project-specific-vimrc/
Add nvim settings to repo in order to run tests easily

This actually works out of the box for testing (once vim-test is added). There is a bug in the stack runner, or at least it's not super specific about what it runs, it only takes the nearest describer e.g context, describe or it and does not specify the test file, so could match more than expected.


Noahcoder11 branch

Create preliminary books page with cards for each book in a given object/dictionary database.

There is a minor bug when I hover over a card. The background image also moves!
Make that right and rest.
Everything is perfect! Great Work!
I will merge it after the problem is resolved.

On firefox, it does not move for me. What browser is it happening on? (so I can use that one for fixing)

On firefox, it does not move for me. What browser is it happening on? (so I can use that one for fixing)

On Google Chrome.

I fixed it, I just had to remove width and translation, and simply replace with 'scale: 1.1'

Might be good to add another category attribute to the books in the list though to put them in different genres for recommendation and such if it will eventually be an account based system

Great Work @noahcoder11!
Yes, sure, that can be done. You kinda mean a book recommendation system!

Yeah, that’s what I meant
Are you planning on setting up a backend and incorporating accounts so that people can put books in their “Cart” and have personalized recommendations?

I was basically thinking of incorporating a ML model to suggest books, on the basis of their recent reads of genre!

Alright, nice (I actually just contributed to an ML repository, that’s funny), are you planning to make a backend so that people can have accounts?

Yes, but I'll have to learn backend for it!
It is a good suggestion :)


First prototype: Random commit message generator

Ready to be merged?

Ah yes. Forgot the [MRG]

:tada:


Fix OverlordClient to read reports as a concrete ReportMap object instead of a generic map

Follow up to #16217
Changes

Update OverlordClient.getReportAsMap() to return TaskReport.ReportMap
Move the following classes to org.apache.druid.indexer.report in the druid-processing module

Pending

Add tests

This PR has:

[ ] been self-reviewed.

[ ] using the concurrency checklist (Remove this item if the PR doesn't have any relation to concurrency.)

[ ] added documentation for new or modified features or behaviors.
[ ] a release note entry in the PR description.
[ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
[ ] added or updated version, license, or notice information in licenses.yaml
[ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
[ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
[ ] added integration tests.
[ ] been tested in a test Druid cluster.

The changes look good to me overall! Just needs CI checks to pass and conflicts resolved. Also, did you intend to add more tests in this patch as noted "pending" in the PR description?

The changes look good to me overall! Just needs CI checks to pass and conflicts resolved. Also, did you intend to add more tests in this patch as noted "pending" in the PR description?

Added tests to verify report of running tasks.

Thanks a lot for the review, @abhishekrb19 !


Theme is not applied to icon.

Theme was not applied to Icon component. iconFontFamily always defaulted to Ionicons

Thanks @chaitanya0bhagvan


Allow requestBody for the DELETE method.

I would like the specification to allow a requestBody in the DELETE method and other methods without explicitly defined semantics.
One of the answers in this StackOverflow  post states: "The spec does not explicitly forbid or discourage it, so I would tend to say it is allowed."
I would agree with that statement.
Currently the OpenAPI spec says "The requestBody is only supported in HTTP methods where the HTTP 1.1 specification RFC7231 has explicitly defined semantics for request bodies."
I think this should raise a notice, but not be unsupported and raise an error.
Addendum:
As I mentioned in a comment below, if you do choose to create a batch delete method on your API, whether or not anyone recommends it, make sure to check your cache settings and think about how these settings will interact with DELETE requests. Calling DELETE on /users  with data [3,4]  will not invalidate the cache for /users/3 or /users/4, so a GET request to either of them may return invalid data depending on cache settings. My comment below describes methods of mitigating this.

@darrelmiller

While I understand the desire to be able to describe existing APIs that have less than ideal behavior, we have to balance that with opening the door for more people to create new APIs that make this same mistake because we allow it.

I wouldn't expect people to creating APIs to constrain themselves by OpenAPI. when I create an API, first comes the needed functionality, and documenting it with OpenAPI or whatever tool I am using, that comes after. I wouldn't worry about "opening the door" for unencouraged behavior as that's not really OpenAPI's door to hold.
I'm using OpenAPI to document an API that does use delete with a request body, and is not going to change. seems to me I should be able to describe this API with a valid OpenAPI document.

{json:api} explicitly defines a DELETE request body for updating to-many relationships and it has quite well-defined semantics: Remove only the supplied set of resource identifier objects from the (potentially larger) full list of related resource identifier objects.
I am unable to fully represent a {json:api} schema with OAS if it explicitly prohibits what RFC 7231 allows (as undefined but not prohibited). Please (re)consider allowing a request body for DELETE.

@n2ygk Very interesting....

If one does want to support a request body in their API, they must consider the caching consequences. As stated in RFC7234:

A cache MUST invalidate the effective Request URI (Section 5.5 of
[RFC7230]) as well as the URI(s) in the Location and Content-Location
response header fields (if present) when a non-error status code is
received in response to an unsafe request method.

So, using the example in {json:api}:
DELETE /articles/1/relationships/comments HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json

{
  "data": [
    { "type": "comments", "id": "12" },
    { "type": "comments", "id": "13" }
  ]
}

The cache for the resource `/articles/1/relationships/comments` will be cleared. Which is not a desired side effect. Imagine this sequence of events:

1. GET `/articles/1/relationships/comments`
2. Server returns 1000 comments
3. GET  `/articles/1/relationships/comments`
4. Browser uses cached resource and saves time and energy.
5. The above example DELETE request is made and it deletes objects 12 and 13 and returns 200.
6. The browser interprets this as having deleted the resource at `/articles/1/relationships/comments` and it clears the cache.
7. GET  `/articles/1/relationships/comments`
8. Browser fetches 998 comments.

Originally I thought this might be a problem that the cache is being messed with, but really it's a good thing, since you don't want it to use the cached 1000 comments when there are only 998. So having it invalidate the base resource is good. However, it will not invalidate `/articles/1/relationships/comments/12` and  `/articles/1/relationships/comments/13`. Therefore fetching a single comment may return invalid results if they were previously requested, cached, deleted via a batch request, and requested again, since the cache may be used.

Overall, if you do choose to create a batch delete method on your API, whether or not anyone recommends it, make sure to check your cache settings and think about how these settings will interact with DELETE requests.

To mitigate this you could disable caching of individual resources, but the client would then have to fetch every time. Using standard HTTP/1 you can't invalidate arbitrary caches, so deleting 12, and 13 in a batch wouldn't clear their cache, as mentioned before, unless you [HTTP/2 server push](https://en.wikipedia.org/wiki/HTTP/2_Server_Push) which allows you to send arbitrary other resources along with the response for another request, so your response to a batch delete could pack with it the invalidation of those two resources.

There's a lot to consider here. I do think that it would be great to support a batch delete operation in multiple standards and protocols, but it needs to be thoroughly discussed and everyone would have to cooperate on the appropriate course of action.

It is also interesting to consider that using a custom method, which is the commonly recommended way to perform a batch delete request, such as POST `/deleteComments`, will also not invalidate any caches associated with the resources that your request intended to delete.

Tiny fact that is missing from this discussion and totally worth mentioning since it can be an obstacle on a path of upgrading from Swagger v2 to Open API v3 is that with Swagger v2 one can declare payload for DELETE method.
Swagger UI can render DELETE endpoint with payload.

This is a gentle bump to see if you are any closer to deciding on this issue?
We are in the process of migrating from Swagger v2 to Open API v3, we have some services that provides DELETE endpoints that currently rely on a request body. This is currently stopping us from fully adapting Open API v3 which has a lot of benefits over v2 for us.
Is there anything we can do from our end to help accelerate and resolve this issue?

@mikaeldanielsson I added it to the TSC agenda for Thursday.

@mikaeldanielsson According to my reading of https://www.openapis.org/participate/how-to-contribute this needs to become a "next proposal" which only the TSC members can label as such.
Am I correct @darrelmiller that this is the formal process for bringing issues to the TSC? (I "picked on" you since you appear to be the main committer of much of the TSC process documentation; Apologies if you are not the best contact for this and please do indicate the appropriate mechanism).
Does the TSC need a more formally-written request to consider this issue? At this point it appears to be:

A requirement for backward-compatibility with Swagger 2 per @keenle
A requirement for certain pre-existing API frameworks including https://jsonapi.org
Not explicitly disallowed ("MUST NOT", "SHALL NOT" nor even "NOT RECOMMENDED" or "SHOULD NOT") by RFC 7231.
Was not explicitly disallowed in RAML 1.0 which was also an input to OAS 3 (@usarid  ?)

Language in the OAS could certainly be written to warn against use of the requestBody with DELETE.
I would be happy to collaborate on writing a more formal request or spec document PR.

As this is not a new feature, nor one that requires significant updates to the spec, I think a PR would be sufficient.  We will discuss on Thursday's meeting and see if we think this is a fix that should be made.  If we get consensus there then a PR would be gratefully accepted.

@darrelmiller per the TSC call, I'll begin working on a PR.
Is v3.0.3-dev the correct branch to base the PR on?

See #1929 (TSC Open Meeting of 2019-05-30) where this was discussed.

The issues/PRs mentioned here have been merged or are in progress and tracked in more current meeting agendas.

Oops too many tabs open, closed the wrong one, sorry!

Actually, looks like this issue's PR was also merged so I should have just left it closed 😆

RFC 9110 was proposed in 2018 and accepted in 2022. Its language is similar.

Thanks for the news @dmyersturnbull
This part seems to indicate that content is still okay for clients if the server specifies that content would be supported:

A client SHOULD NOT generate content in a DELETE request unless it is made directly to an origin server that has previously indicated, in or out of band, that such a request has a purpose and will be adequately supported.

, although this part seems to indicate that servers should avoid doing it because "intermediaries" might mess things up:

An origin server SHOULD NOT rely on private agreements to receive content, since participants in HTTP communication are often unaware of intermediaries along the request chain.

So, those two sentences seem to be slightly contradictory, but they use the words "SHOULD" instead of "MUST", so it's not recommended to put any content in a DELETE, or accept any content in a DELETE, but it's still permitted either way.


What are the future plans for this?

Will this project will ever be updated or maintained?

@jwilander

Yes, we are currently working on updates to coincide with our major plugin changes and it will be maintained afterwards. For plugins there is also https://github.com/mattermost/mattermost-plugin-sample and https://github.com/mattermost/mattermost-plugin-demo you can use as starting points as well

@jwilander glad to hear that!


Some doc fixes

[Current coverage][cc-pull] is 84.35%

Merging [#17][cc-pull] into [rolling][cc-base-branch] will not change coverage

@@            rolling        #17   diff @@
==========================================
  Files           138        138
  Lines         51166      51166
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits          43160      43160
  Misses         8006       8006
  Partials          0          0

Powered by Codecov. Last updated by [4d4baa2...9e069cb][cc-compare]
[cc-base-branch]: https://codecov.io/gh/jreback/pandas/branch/rolling?src=pr
[cc-compare]: https://codecov.io/gh/jreback/pandas/compare/4d4baa2b89b676580684a17fe593c44059702711...9e069cb30450e50369d2906d63d18172cee558f5
[cc-pull]: https://codecov.io/gh/jreback/pandas/pull/17?src=pr

ty @jorisvandenbossche


[JSDoc] Add missing documentation for botbuilder-azure

Addresses # 2602
Description
This PR replaces warn with error in the jsdoc/require-jsdoc rule in .eslintrc.json file for botbuilder-azure and adds all the missing documentation based on the errors thrown.
Some documentation is ported and adapted from botbuilder-dotnet
Specific Changes

Updated jsdoc/require-jsdoc in .eslintrc.json from warn to error.
Added JSDoc comments in all public methods and some of the private ones.

Testing
The following image shows the ESLint Report with no JSDoc errors.

Promoted


Transforms.cosineSim() with INDArray [0.00, 0.00 ... 0.00] gives NaN

Issue Description
Calling Transforms.cosineSim(n, s) where either of n or s is an INDArray consisting only of 0.00 returns NaN.
Works great if change any single value of vector in 1e-5.

That is pretty much expected, as the L2 Norm of a Zero Vector is 0 you will get a division by zero.

Mathematically, it is undefined, and (according to a very quick search) it looks like there isn't a standard convention for handling this case.
I'm going to close this as something we won't fix (unless someone can make a reasonable proposal of how this edge case should be handled).


Update mainnet and testnet to v2.2.0-stable

This is scheduled to go live at 10:30am today (11/4).

Missing second change, hang on.


Prepare to add k8s-server to Spring Initializr

Change k8s-server POM to inherit from Spring Boot parent

Add a BOM for kubernetes server

Move server configs to starter project

Part of #126
Resolves #135
Resolves #136
Resolves #125

Squashed and merged as ba9cef3


the macOS frameless windows can't track the mouse

The macOS backend is not able to track the mouse movements, probably because we do not quite do things by the book

Fixed as of e5cdee876365f8834ef709b6f06d1f934ee57f48


Security Riot Shields

Description
As of now there's no way to buckle down and stop people from running past you. A riot shield should:

Have an action to enable blocking other players, in exchange for losing your movement unless you stop blocking (avoiding prediction cbt, yay!)
Reduce damage somewhat, and significantly when blocking.

It should not require being wielded imo.

(avoiding prediction cbt, yay!)

This is something else I can look into. Are there any free keys to have as a block key. And if so, where would I look to find an example of it?


New entries needed in gaf-eco-mapping.txt

Can you please add the following entries to gaf-eco-mapping.txt:
IEA	GO_REF:0000107	ECO:0000256
IEA	GO_REF:0000108	ECO:0000363
Thanks very much,
Tony

Hi Tony,
The two entries have been added in gaf-eco-mapping.txt file and xref'ed in edo-edit.obo file. Closing the ticket but pls reopen if needed.
Thanks,
Suvvi

Thanks, Suvvi.
Cheers,
Tony
On 18/03/16 15:04, nsuvarnaiari wrote:

Hi Tony,
The two entries have been added in gaf-eco-mapping.txt file and
xref'ed in edo-edit.obo file. Closing the ticket but pls reopen if needed.
Thanks,
Suvvi
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/evidenceontology/evidenceontology/issues/86#issuecomment-198400109


Geted marketplace/361 funiques errors are not descriptive

Make fruniques errors more descriptive
Overview
This change improves understanding of failures by making error messages more descriptive.
Err(NotAuthorized) + context --> Err(UserNotInCollection)

Tickets

[ ] Fix #361

Implementation notes
It does not change functionality
Interesting/controversial decisions
We are assuming that if someone does not have Mint permission it means that the user is not in the given collection which could change in the future...an alternative approach is to make the error message "UserDoesNotHaveMintPermission" but that message does not suggest that the solution to the error is to invite the user to the collection.
Also the aim was to address all error messages of the pallet but that one was the only one not descriptive enough already

Create block_user extrinsic
Overview
This change introduces a new extrinsic called block_user that allows for the admin of a marketplace to block any user that is not a participant of the marketplace already (whether or not the user has previously applied to the marketplace) such that a blocked user cannot longer join the marketplace without an admin unblocking him first, once a user is blocked all its applications data (if any) related to the marketplace is deleted.
Also, the expiration date for offers has been removed per #87.

Tickets

[ ] Fix #87

Implementation notes
Creates a StorageMap called BlockedUsersByMarketplace.
Creates a function called do_block user to block (add to BlockedUsersByMarketplace) or unblock (remove from BlockedUsersByMarketplace) a user.
Creates is_this_user_blocked helper function to ensure that apply, reapply, invite, and addAuthority extrinsics only works when the user is not blocked.
Creates unit tests for the extrinsic.
Interesting/controversial decisions
In the scope of the block_user extrinsic, the user is understood to not be a participant of the marketplace already, that is, the block_user extrinsic doesn't work as an "eliminate_participant" extrinsic.


BROOKLYN-627: fix okhttp/kubernetes startup issue

See description in https://issues.apache.org/jira/browse/BROOKLYN-627, which this is intended to fix.
I wrote a little script to loop round, starting Brooklyn and tearing it down again (deleting the data dir each time) to see if I could reproduce the error reported in BROOKLYN-627. I could not do so locally, and it continued to work after this fix!
I think it's worth including this fix, speculatively, as it could plausibly fix the non-deterministic issue.

LGTM


Reuse sidebar on narrow screens script

It would be useful for #221, but anyway it's good to keep scrips in one place, if possible.
Btw, there were subtle differences between scripts. One version had:
if (document.getElementsByClassName('navbar__menu')[0]) {
    document.getElementsByClassName('navbar__menu')[0].classList.remove('is-active');
}
if (document.getElementsByClassName('mobile-search')[0]) {
    document.getElementsByClassName('mobile-search')[0].classList.add('hide');
}

while another just:
document.getElementsByClassName('navbar__menu')[0].classList.remove('is-active');
document.getElementsByClassName('mobile-search')[0].classList.add('hide');

I kept the first version as it seems to be safer and probably just hasn't been backported to other places.

Thanks!


Should use uppper case when encoding

https://en.wikipedia.org/wiki/Base32#Crockford's_Base32 suggests that the encoded string should only use upper case characters.

Not sure if this would be a breaking change.

I think that'd be a breaking change now, and for very little benefit. Maybe adding an extra method or a parameter to them?

I disagree with the "very little benefit" part. By using lower case, the output is non-compliant and therefore incorrect.

I disagree with the "very little benefit" part. By using lower case, the output is non-compliant and therefore incorrect.

#7 would now break all the codes that rely on the lowercase ids that this code generates. I know at least two apps that use it such way, and their database is case sensitive.
If the code is only soft-compliant, I am willing to live with it.


IGVF-1540-rename-import-items

I booted up a local demo and the assignment of the permission "admin_only" seems to work just the same as "import_items".


"missing import" error reported as something else for packages

If I do requires {}{ main : Task.Task {} * } and I forget to add the Task module to imports, I get this error:
The Task module does not expose a Task value

...rather than "the Task module is not imported" - which is the real problem in this case!

The following program now seems to give a correct error message:
app "test"
    packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.4.0/DI4lqn7LIZs8ZrCDUgLK-tHHpQmxGF1ZrlevRKq5LXk.tar.br" }
    imports [
        pf.Stdout,
    ]
    provides [main] to pf

main =
    foo = {a: 1, b: 2}
    foo.a + foo.b |>  Num.toStr |>
       Task.putLine

namely:
── MODULE NOT IMPORTED ───────────────────────────────────────────── test2.roc ─
The Task module is not imported:
14│         Task.putLine
^^^^^^^^^^^^
Did you mean to import it?
────────────────────────────────────────────────────────────────────
1 error and 1 warning found in 33 ms.
It seems this issue can be closed now? @Anton-4?


fix(csrf): do not check for origin if no authentication cookie is passed

Some users are adding Origin and Referer headers to non browser calls to the API
(using e.g. basic or token auth).
As the csrf filter first checks for the origin header before checking if an authentication
cookie has been passed, those calls end up with an HTTP 403 response due to our CSRF filter.
As there is no need to enforce CSRF protection in that case, this revision changes the CSRF request
matcher to first check if there is an authentication cookie, then check if there is a Referer or a
Origin header.

🚀 CI was able to deploy the build of this PR, so you can now try it directly here
Notes: The deployed app is linked to the management API of APIM master. (Same login and password as APIM master)

Is it still something to validate ?
Anyway, I'm not sure to be completely in phase regarding the provided fix. Why considering the auth cookie as mandatory to protect against csrf attacks?
Maybe I didn't well understand the issue but for me it is more about the way the call is made while they are not in a browser:

they use cookie auth while they certainly should use another auth token type (basic auth, Authorization bearer token)
they add Origin and Referer headers while they should not if they are not in a browser

IMHO, being authenticated should not be mandatory to protect the user against crsf. An attacker could be able to issue a request for a non-authenticated user on an application that is normally not accessible from outside and bypass some security policy such as ip filtering. Given that, I think the fix could be considered as a vulnerability.
Maybe something to clarify or re-challenge?

@jhaeyaert closing this one as it was originating from a support ticket that has been closed without any need to fix on our side.


Old screenshots?

Hi team,
I moved this from here: https://github.com/MicrosoftDocs/azure-docs.nl-nl/issues/543
@D3nnisd commented 9 hours ago — with docs.microsoft.com
Hi,
This page seem to have old screenshots. Or is this a new version/theme?
Thanks,

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

ID: 89177180-caeb-e2e1-5614-60719f593672
Version Independent ID: a3352be5-2343-ae87-38d0-32312a62d2b1
Content: Create schedule triggers in Azure Data Factory
Content Source: articles/data-factory/how-to-create-schedule-trigger.md
Service: data-factory
GitHub Login: @djpmsft
Microsoft Alias: daperlov

This is outdated, I can create a work item to update these. Given other priorities, cannot commit to an ETA

Closing this issue as we have a tracked work item within the product group.
#please-close


UriFormatException

when read a xlsm file I got an error:
UriFormatException: URI scheme must start with a letter and must.......
how can i do with it?
Thanks for helping me

Hi! I believe the UriFormatException is thrown by the System.Uri constructor, but ExcelDataReader does not use the Uri class anywhere.
Can you please share your code and the full stack trace of the error? If you can provide the .xlsm file that could be helpful as well


CCLA DocuSign "Sign Request For " pulling wrong user.

Summary
When a cla manager goes to sign a ccla from the corporate console, the wrong user is sometimes shown in the "sign request for " in docusign.
Background

Go to corporate.lfcla.com
Click on "sign new cla" and choose any cla.
Get redirected to docusign and observe the "sign request for " email is not the cla manager who initiated the signing.

Expected behavior
The sign request should match the cla manager who initiated the request.
Screenshots

\

Environment
STAGING AND PROD
Assumptions
This is reproduced when I changed the cla manager id  in the companies table to david's user id in staging.

This looks to be using the company_manager_id in the companies table and not the person going to sign the ccla.
Even if the user corrects it in docusign as they're signing the ccla, the email sent after signing is still sent to the company_manager

Task not complete - moved to the next sprint.

Pushed an update to DEV via PR: https://github.com/communitybridge/easycla/pull/1294. Needs validation.

Pushed an update to DEV via PR: https://github.com/communitybridge/easycla/pull/1323.  This update sends the confirmation email to the CLA manager (not the company admin).  We also add an event log entry in this update.

Verified and observed that the issue is fixed
CLA Manager who created company is<EMAIL_ADDRESS>However details of CLA Signatory who initiated the signature is displayed


Revised tags

Added Education and Bitcoin Core tags

For reference purposes to confirm
https://bitcoin.org/en/release/v0.20.0#documentation
https://github.com/bitcoin/bitcoin/pull/17393


Add GenerateDocumentationFile to the xsd

The property DocumentationFile is in the xsd but GenerateDocumentationFile is not, making it hard to discover. Since this is the property set by project.json>csproj migration, it should at least show up in IntelliSense.

This still isn't showing up in IntelliSense with VS 15.9.1


Rename image for NGINX sm

Description
Rename docker image name for NGINX service mesh in the docker-compose.yml
Current image
local/meshery-nginx-sm:stable-latest
Expected image
layer5/meshery-nginx-sm:stable-latest
Environment:

Host OS:
Meshery Version:
Kubernetes Version:
Browser:

@kumarabd Please check and merge

@kumarabd Please check and merge


Absolute paths of bibfiles

Latextools does not seem to know about absolute paths for bibfiles. Thus:
\bibliography{../../bibfiles/myrefs}   works properly, whereas
\bibliography{/Users/gkv/bibfiles/myrefs} does not.  The autocomplete of \cite{ fails, and latexmk does not build properly.
However, latex and latexmk do know about the absolute paths,  as compiling from the terminal with a command line works fine (and so does using the 'script' package for Atom).

The fix seems to work, thanks.


Added unimplemented expression cases in the ASTPrinter

Part of #61601
Filled out the remaining expression cases for ASTPrinter, which were left out after in the PR #40691.

@hamishknight I have implemented one of the functions for you to review if I have done it the right way.

How would visitTypeJoinExpr be handled?

How would visitTypeJoinExpr, visitClosureExpr, ... be handled?

Sorry, I shouldn't have included TypeJoinExpr and OneWayExpr in the list, they only exist during constraint solving, so I don't think we need any printing logic for them (TypeJoinExpr isn't even really representable as source code anyway).
ClosureExpr should print a closure e.g { <body> } if there are no params, { <param>, ... in <body> } if there are params, { (<param>, ...) -> <Result> in <body>} if there is an explicit result type, { (<param>: <Type>, ...) in } if there is an explicit param type. Note you'll also need to handle CaptureListExpr, which also prints a closure, but with a capture list e.g { [<capture>, ...] <param>, ... in }.

How would visitTypeJoinExpr, visitClosureExpr, ... be handled?

Sorry, I shouldn't have included TypeJoinExpr and OneWayExpr in the list, they only exist during constraint solving, so I don't think we need any printing logic for them (TypeJoinExpr isn't even really representable as source code anyway).
ClosureExpr should print a closure e.g { <body> } if there are no params, { <param>, ... in <body> } if there are params, { (<param>, ...) -> <Result> in <body>} if there is an explicit result type, { (<param>: <Type>, ...) in } if there is an explicit param type. Note you'll also need to handle CaptureListExpr, which also prints a closure, but with a capture list e.g { [<capture>, ...] <param>, ... in }.

Alright! If I correctly understand, the capture in closures is similar to lambda capture in C++, just that in Swift it's handled by weak self?
Also after the recent update in Swift, I presume we no longer have to use self keyword inside the body (to reference a capture variable) once it's guarded.

Alright! If I correctly understand, the capture in closures is similar to lambda capture in C++, just that in Swift it's handled by weak self?

Yes they are similar to lambda captures (specifically captures by value). weak and unowned can be used as ownership modifiers in a capture list, yes, but they can be applied to any capture, e.g:
class C {}
var c = C()
let fn = { [weak c] in }

And without them, the capture is by a strong reference:
class C {}
var c = C()
let fn = { [c] in }

@hamishknight I have made some changes, please let me know if it's the right approach.

Please look into this thread

Few queries:

For visitSubscriptExpr(), how do we print the member via getMember()?
(Ex. In the expression a[i], I am able to print the subscript itself, but not 'a'.)

Hint for starting visitSequenceExpr().

In visitKeyPathExpr(), what's the next step in the switch case part (in commit).

Sorry for not getting back to this sooner, I should be able to take a look tomorrow. Note the feedback regarding adding test cases remains :)

Hey that's fine!
Thanks for your reply, please checkout this issue.

Hint for starting visitSequenceExpr().

Should be able to print each of the elements in turn, with a space between them.

In visitKeyPathExpr(), what's the next step in the switch case part (in commit).

You shouldn't need to do anything for Identity, CodeCompletion, and OptionalWrap.

(Unresolved)Property is for a property component, e.g \X.y
(Unresolved)Subscript is for a subscript e.g \X.y[5]
OptionalForce is for a force unwrap e.g \X.y!
OptionalChain is for an optional chain, e.g \X.y?.z
Identity is for e.g \X.self
TupleElement is for e.g \(Int, Int).0
DictionaryKey has a different semantic meaning, but it has the same syntax as a property component, so that's how it should print

You should be able to use printType for that

That didn't work, I actually got it to work using rootType->print(Printer, PrintOptions()).

What error did you get with printType? It's better to use printType, because that will use a consistent set of options that is shared by the rest of the ASTPrinter

The visit() function throws unexpected errors when passing the rootType (i.e. expr->getRootType()) , although it does allow a TypeRepr.
error: no member named 'visitTypeRepr' in '(anonymous namespace)::PrintAST'

Here.

No viable conversion from 'swift::TypeRepr *' to 'swift::Type'

Ah sorry, in that case you'll want to use printTypeLoc

That works!
By the way, I have started adding tests.

Sure, I guess I will finish the main ones first, we may then discuss about the rest.

I need a little description about the following expressions:

visitEnumIsCaseExpr
visitKeyPathDotExpr

There are few more which I would ping you about later!

Sorry for the delay on this!

visitEnumIsCaseExpr

This is synthesized in certain cases when type-checking <expr> is <Type>, we turn it into (<expr> as? <Type>) != nil. A faithful printing implementation could print it as that, but I think ideally we'd try and print it using the is syntax instead.

visitKeyPathDotExpr

This is constructed by the parser to represent the initial . in a keypath. You should be able to just print it as ..

Keeping the below list for reference to what is complete (or close):

[x] IsExpr
[x] ArrowExpr
[x] CoerceExpr
[x] TenaryExpr
[x] ClosureExpr
[ ] CaptureListExpr
[x] KeyPathExpr
[ ] KeyPathApplicationExpr
[ ] SubscriptExpr
[ ] BindOptionalExpr
[ ] ForceValueExpr
[ ] OptionalTryExpr
[ ] PrefixUnaryExpr
[ ] PostfixUnaryExpr
[ ] TupleElementExpr
[ ] InterpolatedStringLiteralExpr
[ ] TapExpr
[ ] SuperRefExpr
[ ] DynamicTypeExpr
[ ] ObjCSelectorExpr
[ ] ObjectLiteralExpr
[ ] MagicIdentifierLiteralExpr
[ ] DynamicMemberRefExpr
[ ] DynamicSubscriptExpr
[ ] EnumIsCaseExpr
[ ] KeyPathDotExpr
[ ] UnresolvedMemberExpr
[ ] EditorPlaceholderExpr
[ ] OverloadedDeclRefExpr
[ ] SequenceExpr
[ ] UnresolvedDeclRefExpr
[ ] UnresolvedPatternExpr
[ ] DotSyntaxBaseIgnoredExpr
[ ] OtherConstructorDeclRefExpr
[ ] RebindSelfInConstructorExpr
[ ] MakeTemporarilyEscapableExpr
[ ] All the ImplicitConversionExpr subclasses, we should stamp out their definitions as printing their sub-expression using a macro

@hamishknight
I have made few more changes, regarding few tests, I am unsure of some of the kind of expressions, while I am progressively adding the ones I am clear with.

@Rajveer100 Would you like me to do another review pass over what you have so far? Adding more tests for the additional AST nodes you've implemented printing logic for is definitely a good idea, as it will expose any issues with the implementation, which you can iterate on. Let me know if you have any questions regarding what syntax particular AST nodes have.

@hamishknight
I am making few more changes for the respective methods before you can do another pass of review!
I will reach to you in case I have any specific queries for the AST expressions!

Could you briefly describe these expressions:

RebindSelfInConstructorExpr
MakeTemporarilyEscapableExpr

Once I implement them, I will query the next expressions. (probably in 2s)

@Rajveer100 Sorry again for the late reply! Printing the expr->getFn() is correct, to fix the printing of Int.-x, you'll want to change the printing logic of DotSyntaxCallExpr, we should be checking to see if expr->getFn() is for an operator decl, and if so we shouldn't print the base. You can call ->getReferencedDecl() to get the referenced decl from the expression, and then check for ->isOperator() on the returned decl.

Cool, Thanks!

Below statement throws an error (BAD_ACCESS), specifically when calling getDecl():
auto decl = expr->getReferencedDecl().getDecl();
Used above to get the isOperator().

@Rajveer100 I don't think calling getDecl() should cause a crash, but calling isOperator() on a null Decl would certainly cause a crash, you'll want to check for nullptr before checking isOperator(), as there may not be a directly referenced decl available (in which case it definitely isn't for an operator).

Well, getDecl() is in fact causing the crash, I re-confirmed it to be sure!

Hmm, does the crash still happen if you change the code to the following?
  auto decl = expr->getFn()->getReferencedDecl().getDecl();
  if (decl && !decl->isOperator())

Note also you need to check expr->getFn() for the DotSyntaxCallExpr

Hey that works, although I was wondering, there already exists a visitXXX for DotSyntaxBaseIgnoredExpr, so why doesn't the compiler implicitly use that instead of calling the DotSyntaxExpr.
Could we possibly improve this?

Hey that works, although I was wondering, there already exists a visitXXX for DotSyntaxBaseIgnoredExpr, so why doesn't the compiler implicitly use that (if it knows it's an operator) instead of calling the DotSyntaxExpr.

Due to the way we currently model static methods, SILGen expects us to provide a metatype value for self, so DotSyntaxBaseIgnoredExpr wouldn't be correct as we'd be throwing away self. We could introduce a new node specifically for operators, but that's probably not worth it.

For the InterpolatedStringLiteralExpr, how can we retrieve the respective tokens (i.e. \(..)), and the regular literals itself within the string? Are there methods that specifically differentiate between them while traversing?

@hamishknight
I think it's time for a review, you may refer the checklist for an overview. It would be great if you could briefly describe the unchecked items. I have also left few blank lines where I was unsure of some AST Expr. While I am continually adding tests for validation I might have missed out a few!

Let me maintain my own list of nodes I have approved the implementation of :) Just to help subsequent reviews so I don't have to look at everything again.

[ ] IsExpr
[ ] ArrowExpr
[ ] CoerceExpr
[ ] TenaryExpr
[ ] ClosureExpr
[ ] CaptureListExpr
[ ] KeyPathExpr
[ ] KeyPathApplicationExpr
[ ] SubscriptExpr
[ ] BindOptionalExpr
[ ] ForceValueExpr
[ ] OptionalTryExpr
[ ] PrefixUnaryExpr
[ ] PostfixUnaryExpr
[ ] TupleElementExpr
[ ] InterpolatedStringLiteralExpr
[ ] TapExpr
[ ] SuperRefExpr
[ ] DynamicTypeExpr
[ ] ObjCSelectorExpr
[ ] ObjectLiteralExpr
[ ] MagicIdentifierLiteralExpr
[ ] DynamicMemberRefExpr
[ ] DynamicSubscriptExpr
[ ] EnumIsCaseExpr
[ ] KeyPathDotExpr
[ ] UnresolvedMemberExpr
[ ] EditorPlaceholderExpr
[ ] OverloadedDeclRefExpr
[ ] SequenceExpr
[ ] UnresolvedDeclRefExpr
[ ] UnresolvedPatternExpr
[ ] DotSyntaxBaseIgnoredExpr
[ ] OtherConstructorDeclRefExpr
[ ] RebindSelfInConstructorExpr
[ ] MakeTemporarilyEscapableExpr
[ ] All the ImplicitConversionExpr subclasses

KeyPathApplicationExpr

This is an application of a key path that has the form x[keyPath: kp]

TupleElementExpr

An element access on a tuple e.g x.0

InterpolatedStringLiteralExpr

An interpolated string e.g "literal \(expr) more literal \(anotherExpr)"

TapExpr

This should be handled as a part of the interpolated string literal printing, it doesn't have a printed representation outside of that

ObjCSelectorExpr

This is #selector(...), I think you already have this one

ObjectLiteralExpr

This is a magic literal such as #colorLiteral(...), you should be able to print using getLiteralKindRawName, plus printing the argument list

MagicIdentifierLiteralExpr

This is a magic literal such as #file, you should be able to print using MagicIdentifierLiteralExpr::getKindString

DynamicMemberRefExpr

This is for a member access on an AnyObject base, it should be printed the same as a regular member lookup

DynamicSubscriptExpr

This is for a subscript on an AnyObject base, it should be printed the same as a normal subscript

KeyPathDotExpr

This represents a . in a key path before its components are resolved

UnresolvedMemberExpr

This is for an unresolved dot lookup, e.g .foo

EditorPlaceholderExpr

This is for an editor placeholder <#placeholder#>, they can also include a type, in which case they print as <#T##placeholder##Type#> where placeholder can be any text, and Type is a type.

OverloadedDeclRefExpr

This is a reference to a set of overloaded decls, it should be printable as the base name of the first decl in the list, though we probably ought to also check for getNameLoc()->isCompound(), and print the full name with argument labels in that case.

SequenceExpr

This is for an operator chain prior to type-checking where it gets folded, as mentioned previously it should be printable as the elements separated by a space.

OtherConstructorDeclRefExpr

This is a reference to an initializer within another initializer, I think it should be printable as init.

RebindSelfInConstructorExpr

This is synthesized and wraps calls to self.init in initializers, as previously mentioned, I don't think we need special printing logic for it, we should just have to print the underlying node.

MakeTemporarilyEscapableExpr

This is created by the type-checker to represent a call to the standard library function, e.g:

func foo(_ fn: () -> Void) {
    withoutActuallyEscaping(fn) { fn in
        // ...
    }
}

All the ImplicitConversionExpr subclasses

As previously discussed, these should be stamped out with macros, and should just print the underlying node.

FYI I'm out on vacation this week, I'll be sure to reply to your comments next week :)

Sure!

Could you potentially provide a documentation/guide to the compiler architecture, so I can meanwhile grasp about the source code while I contribute?
This would help me in knowing each of the individual units and make me more familiar!

@hamishknight @hamishknight
I am currently refactoring the printing logic of KeyPathExpr and at the moment the visitXXXExpr definitions are under the PrintAST namespace, so how what would be the right way to create a function like printKeyPathComponents.
My idea is to add a new #define creating the definition like the visit methods using macros, what's your suggestion?

I am currently refactoring the printing logic of KeyPathExpr and at the moment the visitXXXExpr definitions are under the PrintAST namespace, so how what would be the right way to create a function like printKeyPathComponents, since I cannot use the Printer and many more such private members.

I think you should be able to define them as members of PrintAST, see e.g printAccess

Could you potentially provide a doc/guide to the compiler architecture, so I can meanwhile grasp about the source code while I contribute?

While mainly focussed on the generics system, https://download.swift.org/docs/assets/generics.pdf has a good overview of the overall compiler pipeline in chapter 2, which you may be interested in. There are also a bunch of useful links in https://github.com/apple/swift/blob/main/docs/ExternalResources.md for articles on various parts of the compiler.

Thanks!

@hamishknight
What's the right way to pass arguments for using objc selectors, I used the following:
/Debug.swift -print-ast -disable-objc-attr-requires-foundation-module

error: import the 'ObjectiveC' module to use '#selector'
let action = #selector(MyViewController.tappedButton)
             ^

Also, how do we use #colorliteral, since that also causes errors:
could not infer type of color literal
let myColor = #colorLiteral(red: 0.292, green: 0.081, blue: 0.6, alpha: 255)
              ^

Also, here's the updated checklist from my end, with just a few expressions left out and tests for some of them.

What's the right way to pass arguments for using objc selectors, I used the following:
/Debug.swift -print-ast -disable-objc-attr-requires-foundation-module

error: import the 'ObjectiveC' module to use '#selector'
let action = #selector(MyViewController.tappedButton)
             ^

Oh interesting looks like I was mistaken. In that case you'll want to split out selector printing into a separate test file, and there you can do import ObjectiveC, and add // REQUIRES: objc_interop to the test. That should be sufficient to get the test working.

Also, how do we use #colorliteral, since that also causes errors:

You should be able to define a mock color type in the test, e.g:
struct FakeColor: _ExpressibleByColorLiteral {
  init(_colorLiteralRed: Float, green: Float, blue: Float, alpha: Float) {}
}
typealias _ColorLiteralType = FakeColor

That should solve the issue.

You should be able to define a mock color type in the test, e.g:
struct FakeColor: _ExpressibleByColorLiteral {
  init(_colorLiteralRed: Float, green: Float, blue: Float, alpha: Float) {}
}
typealias _ColorLiteralType = FakeColor

That should solve the issue.

Is there an addition to this?
This itself doesn't reflect any change by the visit method for the expression when commenting out the implementation.
I get the same result as is.

Does it not resolve the could not infer type of color literal error? Or is the issue that the printing isn't working? Because that sounds like a different issue

Yes, the previous issue is resolved, this the next issue where I am unable to test my implementation.

No, that's not the issue, what I meant is, when I comment out my implementation, I see no difference in the output for the snippet you shared above when I uncomment the same.

No, that's not the issue, what I meant is, when I comment out my implementation, I see no difference in the output for the snippet you shared above when I uncomment the same.

I might be misunderstanding you, but the snippet I shared is only necessary to avoid the compiler error, it otherwise doesn't affect the printing of a #colorLiteral. Likewise, the printing logic of #colorLiteral won't affect the printed output for the FakeColor struct (and you don't have to test the printing of that since it's only needed to assist the testing of #colorLiteral printing).

What's the suitable test for this expression though? As directly using #colorliteral didn't work out and the snippet you shared though resolves the compile error doesn't allow me to test for the same

What issue are you running into? AFAIK you should be able to test the same way the other expressions are tested

Apologies!
I misunderstood the entire thing, ok so just to summarise what I interpreted from the snippet is that you are created your own custom colour literal that conforms to the protocol, and I would initialise a new variable this way:
let color = FakeColor(_colorLiteralRed: 0.1, green: 1.0, blue: 1.1, alpha: 2.3)

When I tested the code, the visit function didn't even affect the output at all, because I just replaced my previous snippet with this, i.e, removed it which means I thought your snippet is an entire replacement, since we cannot use the following statement and the only possible way test is by using our own custom initialiser:
let myColor = #colorLiteral(red: 0.292, green: 0.081, blue: 0.6, alpha: 255)

I then realised that it's in fact an addition, which allows us to use #colorliteral for declaration, which if I correctly understand, due to the creation of thetypealias.
:)

Yes that's correct, sorry I probably should have explained a bit more of what the snippet did :)

Can you have a look at the changes for EditorPlaceholderExpr which I have recently pushed, not sure if that's the intended implementation?
Also, these are few things that remain from my perspective:

TapExpr
printClosure (for ClosureExpr and CaptureExpr as a common printing logic)
Sequence expression for ForEachStmt Expr
Few remaining tests
Handling ImplicitConversionExpr and other subclasses

Let me know if I am missing out here!

@hamishknight

Sorry again, I should have some time today to take a look :)

Reposting the list of nodes I've approved so I don't have to scroll up for it

[x] IsExpr
[x] ArrowExpr
[x] CoerceExpr
[x] TenaryExpr
[ ] ClosureExpr
[ ] CaptureListExpr
[ ] KeyPathExpr
[ ] KeyPathApplicationExpr
[ ] SubscriptExpr
[x] BindOptionalExpr
[x] ForceValueExpr
[x] OptionalTryExpr
[x] PrefixUnaryExpr
[x] PostfixUnaryExpr
[ ] TupleElementExpr
[ ] InterpolatedStringLiteralExpr
[ ] TapExpr
[ ] SuperRefExpr
[ ] DynamicTypeExpr
[ ] ObjCSelectorExpr
[ ] ObjectLiteralExpr
[ ] MagicIdentifierLiteralExpr
[ ] DynamicMemberRefExpr
[ ] DynamicSubscriptExpr
[ ] EnumIsCaseExpr
[ ] KeyPathDotExpr
[ ] UnresolvedMemberExpr
[ ] EditorPlaceholderExpr
[ ] OverloadedDeclRefExpr
[ ] SequenceExpr
[x] UnresolvedDeclRefExpr
[ ] UnresolvedPatternExpr
[ ] DotSyntaxBaseIgnoredExpr
[ ] OtherConstructorDeclRefExpr
[ ] RebindSelfInConstructorExpr
[ ] MakeTemporarilyEscapableExpr
[ ] All the ImplicitConversionExpr subclasses

I am facing a small issue related to LLDB:
**An executable path doesn't exist.**

The local path is “(null)”.

LLDB reports that it doesn't exist. Check that the executable remains on disk.

Never faced this issue earlier.

PS: I fixed it, I had actually migrated the project to a different directory so the executable had to be changed.

Could you provide tests for these expressions, I believe I have added tests for rest all expressions:

DynamicMemberRefExpr
EditorPlaceholderExpr
OverloadedDeclRefExpr
DotSyntaxBaseIgnoredExpr

For KeyPathExpr, I had added the tests earlier, although let me know if I am missing out on any specific cases.

Could you provide tests for these expressions, I believe I have added tests for rest all expressions:

DynamicMemberRefExpr

This is for AnyObject lookup, something like e.g:

class C {
  @objc
  var foo = 0
}

func foo(_ x: AnyObject) {
  let y = x.foo
}

EditorPlaceholderExpr

I gave you examples of this in https://github.com/apple/swift/pull/64667#issuecomment-1674524262 :)

This is for an editor placeholder <#placeholder#>, they can also include a type, in which case they print as <#T##placeholder##Type#> where placeholder can be any text, and Type is a type.

OverloadedDeclRefExpr

This is only present in un-typechecked code, so I wouldn't worry about it (I don't think we currently allow printing AST for invalid code)

DotSyntaxBaseIgnoredExpr

This is used for e.g curried references, e.g:
struct S {
  func foo() {}
}
let fn = S.foo

This is used for e.g curried references, e.g:

For DotSyntaxBaseIgnoredExpr, how do we avoid printing self, at the moment I print the LHS and RHS and I get this:
S.self.foo()

@hamishknight
Let's wrap this!

Sorry for dropping the ball on this, I'll try have a look this week

@swift-ci Please smoke test

Given that this PR has been open for so long and nothing depends on ASTPrinter output of expressions, we should probably merge it. No reason it has to be perfect before merging. This would be useful to have when debugging and I'd rather have the option of imperfect output than just the s-expression ASTDumper output! :)

Sounds good, the remaining work can be continued as you said!

I think apart from TapExpr and it's dependent visit functions, we could finish out the rest?

Note you will also need to fixup test/expr/print/protocol.swift to drop the access modifiers from the local vars:
  // CHECK: internal func cast(_ a: Any) {
- // CHECK:   @_hasInitialValue private let conditional: (any Archivable)? = a as? any Archivable
- // CHECK:   @_hasInitialValue private let forced: any Archivable = a as! any Archivable
+ // CHECK:   @_hasInitialValue let conditional: (any Archivable)? = a as? any Archivable
+ // CHECK:   @_hasInitialValue let forced: any Archivable = a as! any Archivable
  // CHECK: }

KeyPathExpr is complete right, or there some significant changes to do still?

KeyPathExpr is complete right, or are there some significant changes to do still?

See https://github.com/apple/swift/pull/64667#discussion_r1384793411, the components still need printing

KeyPathExpr is complete right, or are there some significant changes to do still?

See #64667 (comment), the components still need printing

Under printKeyPathComponents, which components are missing?

Under printKeyPathComponents, which components are missing?

The individual components are good, but you're not calling into printKeyPathComponents for regular key paths, and you're missing the dots between components.

The individual components are good, but you're not calling into printKeyPathComponents for regular key paths, and you're missing the dots between components.

IIUC, we need to call this irrespective of any of the conditions (like ObjC or if root exists or not)?

IIUC, we need to call this irrespective of any of the conditions (like ObjC or if root exists or not)?

Yes, that's correct. FWIW it looks like the getParsedRoot() path is also missing the leading \. I would do the expr->isObjC() check as an early return, then print the \, then have the if statement where you print the root, then print the components. Happy for this to be done in a follow-up though if you leave it as a FIXME.

@swift-ci please test

Tests pass locally, I have pushed again, maybe a rebase should solve this, as there's few other tests not part of my changes that also fail?

@swift-ci please test

Regressions macOS Platform:
Failed Tests (2):
  Swift(macosx-x86_64) :: decl/enum/derived_hashable_equatable_macos.swift
  Swift(macosx-x86_64) :: expr/print/func_closures.swift

@swift-ci please test macOS

Looks like a couple more test tweaks are needed:
test/decl/enum/derived_hashable_equatable_macos.swift:
@@ -25,7 +25,7 @@ enum HasElementsWithAvailability: Hashable {
   case introduced10_50

   // CHECK:       @_implements(Equatable, ==(_:_:)) internal static func __derived_enum_equals(_ a: HasElementsWithAvailability, _ b: HasElementsWithAvailability) -> Bool {
-  // CHECK-NEXT:    private var index_a: Int
+  // CHECK-NEXT:    var index_a: Int
   // CHECK-NEXT:    switch a {
   // CHECK-NEXT:    case .alwaysAvailable:
   // CHECK-NEXT:      index_a = 0
@@ -40,7 +40,7 @@ enum HasElementsWithAvailability: Hashable {
   // CHECK-NEXT:    case .introduced10_50:
   // CHECK-NEXT:      index_a = 2
   // CHECK-NEXT:    }
-  // CHECK-NEXT:    private var index_b: Int
+  // CHECK-NEXT:    var index_b: Int
   // CHECK-NEXT:    switch b {
   // CHECK-NEXT:    case .alwaysAvailable:
   // CHECK-NEXT:      index_b = 0
@@ -59,7 +59,7 @@ enum HasElementsWithAvailability: Hashable {
   // CHECK-NEXT:  }

   // CHECK:       internal func hash(into hasher: inout Hasher) {
-  // CHECK-NEXT:    private var discriminator: Int
+  // CHECK-NEXT:    var discriminator: Int
   // CHECK-NEXT:    switch self {
   // CHECK-NEXT:    case .alwaysAvailable:
   // CHECK-NEXT:      discriminator = 0

test/expr/print/func_closures.swift:
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -print-ast %s 2>&1 | %FileCheck %s
+// RUN: %target-swift-frontend -print-ast -disable-availability-checking %s 2>&1 | %FileCheck %s

 func fetch() async throws -> String {
 }

@swift-ci please test

CI looks good!

Welcome!


Enable watchDepth option for individual props

Fixes #155.
Here's an example from the docs:
app.directive('hello', function(reactDirective) {
  return reactDirective(HelloComponent, [
    'person', // takes on the watch-depth of the entire directive
    ['place', {watchDepth: 'reference'}],
    ['things', {watchDepth: 'collection'}],
    ['ideas', {watchDepth: 'value'}]
  ]);
});

It's fully backwards-compatible with the current usage of props (i.e., ['fname', 'lname']) without adding another parameter to reactDirective. Array/options wrapper is inspired by Browserify transforms and Babel plugins.

This also provides an easy API path forward for #129. $apply or wrappedInApply or something similar could be another option that gets defined per prop, just like watchDepth. I imagine I'll be needing that soon, so I can open a separate PR for that functionality if desired.

@rosston thanks looks good I'll take a closer look in within a few days

@kasperp No rush on this, but have you had a chance to take a closer look? I'm happy to make any changes.

There is now a 0.4.0 on npm thanks for the contribution 👍

Awesome, thank you!


option to have a card limit

idrk how to code or even make a proper pull request. i'd like to propose a feature where you can set a maximum number of cards. once you reach it, the screen just goes blank. idk how to properly .set and .get data for chrome extensions. I'll figure it out when I'm not too busy.
i made it so that each time a card is answered, the counter goes up by one until it reaches the limit. then, it's done.

Great addition! Tomorrow I'll test this PR and provide feedback

Thanks for the contribution! I've seen that you've started some work on making the new behaviour that you are introducing through this PR configurable by the user, but some parts are missing, could you polish that a little bit more before we merge it?


Update dependencies to make it usable with php 8.

Pull request type
What kind of pull request is this? Put an x in all the boxes that apply:

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

What does it change?
Only added newer version requirements for php and phpunit in composer.json. Code is compatible with both these new versions.
Why this PR?
I'm migrating to php 8.0 and using this package in a project, so I need it to declare itself compatible with php 8
How has this been tested?
Included tests run successfully, functionality I'm using in my project shows no regression in tests I've made.

Hi @imliam 👋
Any chance do merge this PR?

@antoinelame In case you're not aware you can include this PR in composer with the following line:
"imliam/php-indefinite-article": "dev-php80"

@madpilot78 Thank you, yes it is what I did using your repo :)


Add Language Argument to DeployCC Calls

Signed-off-by: Julian Castrence<EMAIL_ADDRESS>

Type of change

Improvement (improvement to code, performance, etc)
Documentation update

Description

DeployCC calls should now require chaincode name, chaincode path, and chaincode language arguments. Added missing chaincode language arguments to deployCC calls.

@mergify backport release-2.3

@mergifyio backport release-2.2


Can decorator @anywidget.experimental.command be used on ASYNC method?

Documentation Link
No response
Issue
So far, all the examples using the decorator of @anywidget.experimental.command use synchronous methods only.
I tried slightly changed official demo with asynchronous method:
%pip install anywidget
import anywidget
import traitlets

class CounterWidget(anywidget.AnyWidget):
    _esm = """
    export default {
      async render({ model, el, experimental }) {
        let button = document.createElement("button");
        button.innerHTML = `count is ${model.get("value")}`;
        button.addEventListener("click", async () => {
          let [msg, buffers] = await experimental.invoke("_calculate", model.get("value"));
          button.innerHTML = `Result is ${msg}`;
          model.set("value", msg);
        });
        el.appendChild(button);
      },
    };
    """
    _css = """
    .counter-button {
      background-image: linear-gradient(to right, #a1c4fd, #c2e9fb);
      border: 0;
      border-radius: 10px;
      padding: 10px 50px;
      color: white;
    }
    """
    value = traitlets.Int(0).tag(sync=True)

    @anywidget.experimental.command
    async def _calculate(self, value, buffers):
        print("Start fetching data...")
        # Simulating a network delay with asyncio.sleep
        await asyncio.sleep(2)
        print("Data fetched from server!")
        return value + 1, buffers

w=CounterWidget(value=22)
w

and I met the issue of "Uncaught (in promise) TimeoutError: signal timed out".
I am wondering whether the decorator can be used on ASYNC method.
Please clarify.
Thanks,
Recommended improvement
If yes, please provide an example with related document.
If not yet but possible, please add such a kind of feature in future.
If not possible, please mention the limit.

This is an experimental API, so there isn't official documentation available at this time. The @anywidget.experimental.command decorator does not currently support asynchronous commands. The limitation stems from the fact that these callbacks are executed by Jupyter, which has its own asynchronous event loop, introducing significant challenges when trying to integrate async methods.
It's worth noting that the command decorator is essentially syntactic sugar to tie together existing APIs that anywidget exposes to you as a widget developer. It goal to simplify the most common use cases and reduce boilerplate code. For scenarios requiring concurrent API calls, the command decorator may not be sufficient due to the complexity involved in handling async or threaded operations within the Jupyter environment (which are difficult to generalize).
If you need to implement concurrent API calls, I recommend looking into the implementation of command itself. This can be done without us making the simple command implementation more complicated.


Fix issues with contract server

The build is good and I'm seeing 1 +1s from the following folks:

tdfischer

As such, I'll attempt to merge and close this pull request.