Look into changing name display in dropdown

@dingo-d did a fresh install and ran build, everything tests out fine so far.  One thing I noticed with multiple themes named the same in the dropdown - the calls for version and which is the active theme are I guess pulled from wp_get_theme - so they all remain the same.  I looked at Theme Check, and it looks like it was resolved by naming duplicates as Theme Name/folder-name.  I don't think that's a blocker though.
Originally posted by @timelsass in https://github.com/WPTRT/theme-sniffer/pull/125#issuecomment-469242495

Should we go with this? As currently the version is added to the theme name.

The issue still exists, but it probably doesn't impact many people, more of a "would be nice" to help identify when you might have multiple of the same theme added, just they have renamed folders.  The other part of this is say you copy/paste a theme folder a few times - running a scan right now - I believe the dropdown is relying on the theme's slug.  Regardless of which option you choose, the slug is the same, so it only ever runs on the one main theme folder, which can be confusing if you're temporarily renaming a folder to make/test changes.


Feature request: add a ternary expression

Doing something like:
      if value != nil {
        return *value
      }
      return defaultValue

... is pretty cumbersome for such a simple selector. There really ought to be:
         value != nil ? *value : defaultValue

... or:
       cond value != nil,  *value, defaultValue

It was an explicit design decision (for readability) that Go does not have ternary expressions.
Sometimes Go makes you write a few more lines, but we accept that cost for explicitness and legibility.

I am right now working on a piece where there are heaps of simple simple condition mapping. Ternary operator absence makes it sooo unreadable! It's so frustrating!


Issue:While implementing Gemini, getting error while using prompt template

Issue you'd like to raise.
below is my code
context_text="\n\n---\n\n".join([doc.page_content for doc in result["source_documents"]]) print(context_text,"======================") question = "Describe the Multi-head attention layer in detail?" embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001",google_api_key=GOOGLE_API_KEY) vector_index = Chroma.from_texts(texts, embeddings).as_retriever(search_kwargs={"k":5}) template = f"""Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer. Keep the answer as concise as possible. Always say "thanks for asking!" at the end of the answer. {context_text} Question: {question} Helpful Answer:""" QA_CHAIN_PROMPT = PromptTemplate.from_template(template)# Run chain qa_chain = RetrievalQA.from_chain_type(     model,     retriever=vector_index,     return_source_documents=True,     chain_type_kwargs={"prompt": QA_CHAIN_PROMPT, "document_variable_name": "source_documents"} )
below is the error I am getting
ValidationError                           Traceback (most recent call last)
 in <cell line: 9>()
7 Helpful Answer:"""
8 QA_CHAIN_PROMPT = PromptTemplate.from_template(template)# Run chain
----> 9 qa_chain = RetrievalQA.from_chain_type(
10     model,
11     retriever=vector_index,
4 frames
/usr/local/lib/python3.10/dist-packages/pydantic/main.cpython-310-x86_64-linux-gnu.so in pydantic.main.BaseModel.init()
ValidationError: 1 validation error for StuffDocumentsChain
root
document_variable_name source_documents was not found in llm_chain input_variables: [] (type=value_error)
Suggestion:
No response

document_variable_name: str

Now I am getting below error
ValidationError: 1 validation error for StuffDocumentsChain
root
document_variable_name context was not found in llm_chain input_variables: [] (type=value_error)
below is my code
`template = f"""Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer. Keep the answer as concise as possible. Always say "thanks for asking!" at the end of the answer.
{context}
Question: {question}
Helpful Answer:"""
print(template)
QA_CHAIN_PROMPT = PromptTemplate.from_template(template)
QA_CHAIN_PROMPT = PromptTemplate(
input_variables=["context_text","question"],
template=template,
)
print(QA_CHAIN_PROMPT)
qa_chain = RetrievalQA.from_chain_type(
llm=model,
retriever=vector_index,
return_source_documents=True,
chain_type="stuff",
chain_type_kwargs={"prompt": QA_CHAIN_PROMPT}
)`


Add checks CI and apply linters

I would like to introduce the CI for linters. The CI can greatly reduce the complexity of a codebase. By checking whether the Checks CI passes for each PR, the codebase can be kept simple in the future. Moreover, continuous type checking with tools like mypy can help discover hidden bugs.

It seems that the GitHub Actions is not enabled. Could you enable it and run the linter?


pull request for e2e test at 12/23/2016 03:15:08

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Switch gulp to symfony encore

In this PR:

Removes gulp
Add symfony encore
Recreate the gulp setup in encore
Removed assetic
Removes unused js/css files after move to encore/npm setup

The layout looks still ok and all behat tests still pass.
Related to #320

@tvlooy Ok will do! But I don't think I've access to the new server to start the deploy

your key is on the server so that should work. Make sure you are on master and have the latest code (it takes the code from Github but runs the deploy script that is on your machine) then run "make deploy"

Thanks ssh login works! I will merge and deploy this PR tomorrow!


[SPARK-35083][CORE] Support remote scheduler pool files

What changes were proposed in this pull request?

Use hadoop FileSystem instead of FileInputStream.
Why are the changes needed?

Make spark.scheduler.allocation.file suport remote file. When using Spark as a server (e.g. SparkThriftServer), it's hard for user to specify a local path as the scheduler pool.
Does this PR introduce any user-facing change?

Yes, a minor feature.
How was this patch tested?

Pass core/src/test/scala/org/apache/spark/scheduler/PoolSuite.scala and manul test
After add config spark.scheduler.allocation.file=hdfs:///tmp/fairscheduler.xml. We intrudoce the configed pool.

Do you have time to take a look if you don't mind ? @dongjoon-hyun @srowen @Ngone51

Test build #137394 has started for PR 32184 at commit 8bd973d.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41971/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41971/

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

looks nice, and good to have it tested per @dongjoon-hyun's suggestion

Test build #137394 has finished for PR 32184 at commit 8bd973d.

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

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

@dongjoon-hyun looked into that PR, it provided a Http server. This PR aims to support the remote file using HDFS api, seems we can not add a useful test.

Test build #137403 has started for PR 32184 at commit 4eec581.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41979/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41979/

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

Test build #137403 has finished for PR 32184 at commit 4eec581.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

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

@dongjoon-hyun looked into that PR, it provided a Http server. This PR aims to support the remote file using HDFS api, seems we can not add a useful test.
Update the pr title to make it clear.

Hi, @ulysses-you . It seems that you are underestimating your PR's contribution. :)
Hadoop API is an abstraction layer to support various file systems like the following.
scala> new org.apache.hadoop.fs.Path("file:///tmp/README.md").getFileSystem(sc.hadoopConfiguration)
res0: org.apache.hadoop.fs.FileSystem = org.apache.hadoop.hive.ql.io.ProxyLocalFileSystem@1def2d16

scala> new org.apache.hadoop.fs.Path("https://spark.apache.org/index.html").getFileSystem(sc.hadoopConfiguration)
res1: org.apache.hadoop.fs.FileSystem = org.apache.hadoop.fs.http.HttpsFileSystem@4058b398

scala> new org.apache.hadoop.fs.Path("s3a://dongjoon/README.md").getFileSystem(sc.hadoopConfiguration)
res2: org.apache.hadoop.fs.FileSystem = S3AFileSystem{uri=s3a://dongjoon,...

Have you try to put your pool file on other file systems, HTTP Webserver or S3 (or S3-compatible MinIO)? Do you mean it doesn't work for you, @ulysses-you ?

@dongjoon-hyun Thank you very much for the explanation. I have never used the http filesystem before so that not realized it was supported by hadoop FileSystem (seems form hadoop2.9 HADOOP-1438 which is an advance version for us).
I will check it and add some test.

Test build #137460 has started for PR 32184 at commit bfd2a55.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42035/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42035/

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

Test build #137460 has finished for PR 32184 at commit bfd2a55.

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

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

thanks for merging !


1.11 Changes

Implemented some new fields and features for the upcoming 1.11 release cycle.
/cc @sreenivasmrpivot

@mxplusb @sreenivasmrpivot
We are seeing conflicts on the PR, please resolve and let us know when its ready.
Also, can you detail what these fields and features are specifically meant to do?
I'm guessing its so a user can configure their own saml cert/key, but I just want to confirm and gain a little context when looking at what the PR does.
Thanks.

this pr seems to be covered by the later (https://github.com/pivotal-cf/ert-concourse/pull/5)
closing this in favor of the other for now.


powershell 快捷键太难用了。

Issue Type: Feature Request
powershell 快捷键太难用了。翻找历史命令根本找不到。。。。ctl+l 不应该是翻页吗？？ 请改成zsh或者linux 一样的快捷键
VS Code version: Code 1.65.2 (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1, 2022-03-10T14:33:55.248Z)
OS version: Windows_NT x64 6.1.7601
Restricted Mode: No

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.67.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

感谢您创建此问题！
然而，由于您没有使用英语，我们很难进行处理。如果可能，请您将此问题描述修改为英文。请您直接编辑此问题，不要提交回复或新问题。
请注意，机器翻译服务通常无法处理用于讨论软件问题所需的技术性语言，所以我们推荐您寻找一位熟悉相关技术的人来协助翻译。
如果您无法做到，没有关系。此问题已经被标记为需要翻译，等待社区成员志愿进行翻译。

Thanks for creating this issue!
Unfortunately, as the description is not in English, it's hard for us to work on. If possible, please edit the original issue to be in English.
In our experience, automatic translation services are not able to handle the technical language needed to effectively communicate about software issues, so we recommend finding a human translator who is familiar with our technology to help.
Otherwise, we have marked this as needing translation and a community member may be able to help out.

Hey @meganrogge, this issue might need further attention.
@mocowo, you can help us out by closing this issue if the problem no longer exists, or adding more information.


I can't delete the app: rancher-logging

Hello.
I can't delete the app: rancher-logging.
In the UI apps, I click Delete on the rancher-logging application.
The app is deleted, but installed again.
How to delete the app: rancher-logging ?
Thanks for help.

Useful
Info

Versions
Rancher v2.3.6 UI: v2.3.40

Route
apps-tab.index

Hi,
did you find a solution for how to delete the app?


Duplicate migration has the same version as

Hello,
I'm getting a error:
Duplicate migration - "/path/to/db/migrations/20160729121849_create_product_option_table.php" has the same version as "20160729121849"

I had installed phinx 0.6.2, I just updated to 0.9.1 and still have this problem. There really is no duplicate migration.

What If you change
https://github.com/cakephp/phinx/blob/454238f901234d31152393f5cee6b7dfc708e9be/src/Phinx/Migration/Manager.php#L680
to
$class = new \ReflectionClass($versions[$version]);
throw new \InvalidArgumentException(sprintf('Duplicate migration - "%s" has the same version as "%s"', $filePath,  $class->getFileName()));

?
I think you can see the file name that causes the exception.

Having the same issue. Not sure when this bug was introduced. I get errors in the projects first migration, originally built in 2014.
Duplicate migration - "<omitted>/migrations/20141222131514_omitted_table.php" has the same version as "20141222131514"

@stormpat Thank you for the information.
@timo002 Would the above information help you? If this issue is caused by a bug of third-party, I would like to close this issue ticket.

One more thing, the latest High Sierra update (10.13.2) fixes the NFS issue. So no need for rsync!

Thanks again.

Still a bug on the latest version.
I made the migration files on mac. Pushed the files to a build machine (gitlab) deploys them as an artifacts.
I copied the files on Windows and the same is reported.
I tried renaming the files, updating them, nothing works.


No proposal for static property in vscode

Completion doesn't work for such example:
<?
class Test {
	public static $staticProperty;
}
Test::$st|

Most probably because staticProperty label is returned without $ or reliable text edit property.

Could you clarify "doesn't work"?


feat: support logic check

Codecov Report
Patch coverage: 36.00% and project coverage change: -1.32 :warning:

Comparison is base (c1a3ae1) 96.29% compared to head (0e21e97) 94.97%.

:exclamation: Current head 0e21e97 differs from pull request most recent head cbe932f. Consider uploading reports for the commit cbe932f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #125      +/-   ##
==========================================
- Coverage   96.29%   94.97%   -1.32%
==========================================
  Files          23       23
  Lines        1810     1852      +42
  Branches      302      302
==========================================
+ Hits         1743     1759      +16
- Misses         67       93      +26

Impacted Files
Coverage Δ

src/util.ts
38.88% <28.88%> (-4.78%)
:arrow_down:

src/index.ts
100.00% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Upload Confirmation Dialog Box appears on Main monitor even though app is running on a secondary monitor

Preflight Checklist

[X] I have installed the latest version of Storage Explorer.
[X] I have checked existing resources, including the troubleshooting guide and the release notes.
[X] I have searched for similar issues.

Storage Explorer Version
1.21.2
Regression From
No response
Architecture
x64
Storage Explorer Build Number
20210924.14
Platform
Windows
OS Version
Windows 11 - 22000.194
Bug Description
Upload Confirmation Dialog Box appears on Main monitor even though app is running on a secondary monitor
Steps to Reproduce

Run Storage Explorer on a system with 2-3 monitors. Put it on Monitor 2 or 3. Close it
Run Storage Explorer. It'll appear on the remembered monitor.
Upload a blob that overwrites another blob.
Observe the "override blob" dialog appears centered in Monitor 1.

Actual Experience

Run Storage Explorer on a system with 2-3 monitors. Put it on Monitor 2 or 3. Close it
Run Storage Explorer. It'll appear on the remembered monitor.
Upload a blob that overwrites another blob.
Observe the "override blob" dialog appears centered in Monitor 1.

Expected Experience
No response
Additional Context
No response

Related: https://github.com/microsoft/AzureStorageExplorer/issues/4343

Several other Storage Explorer developers and testers were also unable to reproduce this issue. If anyone encounters this issue again, we can reopen and continue the investigation.


[PhysX] Support platforms other than Windows

PhysX supports platforms by shipping build presets (physx/buildtools/presets/public in the source tree). Following presets are included in PhysX 4.1.1:

Android-19, arm64-v8a (android-arm64-v8a.xml)
Android-19, armeabi-v7a with NEON (android.xml)
iOS Xcode PhysX general settings (ios64.xml)
Linux-aarch64 gcc (linux-aarch64.xml)
Linux clang (linux.xml)
macOS Xcode (mac64.xml)
VC12 Win32 (vc12win32.xml)
VC12 Win64 (vc12win64.xml)
VC14 Win32 (vc14win32.xml)
VC14 Win64 (vc14win64.xml)
VC15 UWP 32bit (vc15uwp32.xml)
VC15 UWP 64bit (vc15uwp64.xml)
VC15 UWP ARM 32bit (vc15uwparm32.xml)
VC15 UWP ARM 64bit (vc15uwparm64.xml)
VC15 Win32 (vc15win32.xml)
VC15 Win64 (vc15win64.xml)
VC16 Win32 (vc16win32.xml)
VC16 Win64 (vc16win64.xml)

Currently, the portfile.cmake only handles VC14+ Windows builds (not UWP) with both bit sizes (bolded). Support for UWP should be straightforward, support for Linux and macOS should be implementable along the same lines as the Windows support.
As far as I can tell, this requires extending the preset.xml generation, using CMake over MSBuild on non-MS-platforms, and fixes to some paths.

Bump
Would be super cool to get at least linux or macos working. Unfortunately I can't even do a local workaround cause it aborts during the installation due to unsupported paltform

Fixed by PR https://github.com/microsoft/vcpkg/pull/13849


Add region and time folder offset customisation

The default time and region separators sometimes don't make good sense for product, but to customise them you need to create your own whole naming convention.
This PR adds the ability to override the existing ones easily.
For instance, for an annual product you may not want a year/month/day folder offset, so you can now set it yourself:
>>> p.names.dataset_location
's3://test-bucket/ga_s2am_tester_1/023/543/years/2013/05/34'
>>> p.names.time_folder = "2013"
>>> p.names.dataset_location
's3://test-bucket/ga_s2am_tester_1/023/543/2013'

... and maybe a custom region code separator:
>>> p.names.region_folder = "x023/y543/z034"
>>> p.names.dataset_location
's3://test-bucket/ga_s2am_tester_1/x023/y543/z034/2013'

Codecov Report

Merging #180 (186905e) into eodatasets3 (13e9219) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@               Coverage Diff               @@
##           eodatasets3     #180      +/-   ##
===============================================
+ Coverage        88.10%   88.14%   +0.03%
===============================================
  Files               25       25
  Lines             3598     3610      +12
===============================================
+ Hits              3170     3182      +12
  Misses             428      428

Impacted Files
Coverage Δ

eodatasets3/assemble.py
86.95% <ø> (ø)

eodatasets3/names.py
95.22% <100.00%> (+0.18%)
:arrow_up:

Continue to review full report at Codecov.

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


How to Ignore Properties

Hi Mark,
How to ignore class properties in MarcelloDB? For Sqlite they have ignore attribute but I see only ID attribute in MarcelloDB.
Thanks,
Pravin.

Ooh. I think we can use   [JsonIgnore].

Hi Pravin,
Yes indeed, [JsonIgnore] should do it.
MarcelloDB uses Json.net internally to serialize objects to Bson. So you can control serialization using the json.net attributes.


Suggestion: "One-click & snap" connect to bluetooth/serial devices and network hosts using QR Code and Code 128

IoT devices, network equipment, servers, ... can be accessed through serial over bluetooth, telnet, ssh, etc... but they can require quite a bit of information to configure the terminal properly to connect to them.
It is possible to put labels on them with their hostname or ip address, protocol to use, or for bluetooth or serial equipment, their bluetooth address, passkey, bits per second, data bits, parity, stop bits and flow control information...
Now, imagine if you could just print a QR Code or Code 128 (depending on what is easier to stick on the equipment) containing all that information, and you could just scan the label that is on the device to connect to it automatically.
For servers with a status screen but no keyboard attached, a simple qrencode -t UTF8 "ssh://$(hostname)" displayed on its status screen could make connecting to it much easier as well.
This could be a "Scan connection barcode" option in the [+][v] (new tab menu) of the Windows Terminal, using the Windows built-in barcode library to scan the sticker using the webcam and connecting to it in a single click and snap.
Typical scenario would be tech guy walking to a network switch, IoT endpoint, etc... and, using his laptop, connecting to it without having to setup the connection manually.
Future scenario would be when the Windows Terminal works on HoloLens 2, to be able to simply say "connect using terminal" to have a floating augmented-reality terminal window connecting to the device in front of the user.

This is a really good idea. Don't think I'll have time to put it on my plate, but this is certainly something that I'd happily review a a PR from the public.
Maybe it makes more sense as an extension though.... @bitcrazed

I really want to see this

@peter-clemenko the best way to show your support for a feature is by hitting the 👍 button on this issue

That way, you avoid unnecessarily pinging everyone following this thread. Thanks!


Updated token templates to sync with master code.

The code that is in the master branch is out of sync with the templates used by gen_defaults. If you run gen_defaults on a clean tree it winds up overwriting changes that were checked into the generated code on master. This PR updates them to be back in sync.

test-exempt: code refactor with no semantic change


Cerealizing a file offset of type std::streampos?

Hello! I'm trying to serialize a std::streampos variable, but am uncertain of how I can do this. If I try and simply archive it, I am told there is no function available for serializing it. I can cast it to an int64_t and then it will serialize without issue, but then it is not able to read and store the variable properly and I am left with uninitialized variables instead of the proper std::streampos value.
Any insights would be appreciated!

Looking at https://en.cppreference.com/w/cpp/io/fpos, it seems like you should be able to initialize by casting the int to std::streamoff when calling the constructor.

Hello @AzothAmmo! Thanks for your suggestion and sorry for the late response.
What I'm currently doing is the following:
class X
{
private:
    std::streampos position{};

public:
    template <class Archive>
    void serialize(Archive & ar)
    {
        ar(static_cast<std::streamoff>(this->position));
    }
}

This seems to work, and I can both archive data and read archived data without an issue.
However, I'm curious as to what happens when I'm reading archived data. I assume the archived position of type std::streamoff is internally cast to std::streampos type, with a default mbstate_t representing the initial conversion state. Is that correct?


sp-runtime: make parity-util-mem dependency optional

parity-util-mem is only required for std so can be excluded via default-features = false.

@ordian do you think we can go further here or do you reckon this is about the best we can do in the end? I recall you removing the dependency entirely but not sure how you handled that TransactionSource type :)

@ordian do you think we can go further here or do you reckon this is about the best we can do in the end? I recall you removing the dependency entirely but not sure how you handled that TransactionSource type :)

There are a few other derive(parity_util_mem::MallocSizeOf) in that crate (alll on std)

As a lot of stuff, this MallocSizeOf stuff was added prematurely. I would try to remove it entirely from this crate and then fix the fallout around in the other crates. It should probably be removed from everywhere, but that is probably too much.

@ordian do you think we can go further here or do you reckon this is about the best we can do in the end? I recall you removing the dependency entirely but not sure how you handled that TransactionSource type :)

This is exactly what I did as well, only removing parity-util-mem from sp-core. But that wasn't enough for subxt. @ascjones have you verified patching substrate in subxt to this branch prunes parity-util-mem from Cargo.lock?

As a lot of stuff, this MallocSizeOf stuff was added prematurely. I would try to remove it entirely from this crate and then fix the fallout around in the other crates. It should probably be removed from everywhere, but that is probably too much.

Main reason appears to be in state-db memory info:
https://github.com/paritytech/substrate/blob/master/client/state-db/src/lib.rs#L500-L506
I think if we replaced that then we should be able to remove all the MallocSizeOf impls.

@ordian do you think we can go further here or do you reckon this is about the best we can do in the end? I recall you removing the dependency entirely but not sure how you handled that TransactionSource type :)

This is exactly what I did as well, only removing parity-util-mem from sp-core. But that wasn't enough for subxt. @ascjones have you verified patching substrate in subxt to this branch prunes parity-util-mem from Cargo.lock?

Yes parity-util-mem is no longer in the dependency tree: https://github.com/paritytech/subxt/pull/709

I think if we replaced that then we should be able to remove all the MallocSizeOf impls.

There's also small usage in Polkadot runtime-api cache, but it can also be estimated like https://github.com/paritytech/substrate/blob/20b5aac7e09e8b25abaa48c6781e653b36ba3ca0/client/db/src/storage_cache.rs#L62-L72
I'd be in favor or getting rid of parity-util-mem completely :)


Add more items for FreeBSD

r? @Amanieu
(rust-highfive has picked a reviewer for you, use r? to override)

This is now ready!

r? @JohnTitor

It'd be great if you could also rebase this to test with a new FreeBSD 14 CI, as it currently doesn't gate bors (I guess #2545 will be merged in an hour).

Sure! Please ping me then so I can update my PR.

@GuillaumeGomez It has been merged now!

CI is happy! \o/

Simplified consts handling as suggested. :)

Hm, seems there are still cfg'd consts, is there any reason that they should be?

Definitely not, my bad, completely missed them... Updating.

Done!

Great, thanks! @bors r+

:pushpin: Commit 441f19576f577420bd8733891845c22d8f6610fd has been approved by JohnTitor

:hourglass: Testing commit 441f19576f577420bd8733891845c22d8f6610fd with merge 73320c5f9121a68a3d8767d85eb8c0a27a557fc2...

:sunny: Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: JohnTitor
Pushing 73320c5f9121a68a3d8767d85eb8c0a27a557fc2 to master...


ESP-IDF crashes while sending more than 128bytes via UART1 using uart_write_bytes() function (IDFGH-2766)

Environment

Development Kit:     [ESP32-PICO-Kit]
Kit version (for PicoKit): [v4]
Module or chip used:  [ESP32-PICO-D4]
IDF version : 3.30300.190916 (3.3.0)
Build System:         [idf.py]
Compiler version: 2.50200.80 (5.2.0)
Operating System:     [macOS]
Using an IDE?: [Yes (PlatformIO)]
Power Supply:         [USB]

Problem Description
I'm trying to send number of APs available, their MAC addresses and their respective RSSI in one string all at once.
The code works fine if I send the string by breaking it into 128 Bytes, but crashes when I try to send the entire thing
Expected Behavior
The code works fine if I send the string by breaking it into 128 Bytes
Actual Behavior
crashes when I try to send the entire thing
Code to reproduce this issue

Debug Logs
<script src="https://gist.github.com/sumit809/368823fc8b0bf379d59e928756953794.js"></script>

Other items
it contains main.c and sdkconfig file
git uart issue Codes.zip

Hi,  @sumit809
Can you provide a log file? I cannot open the link.
thanks !!

log.txt
please have a look at it...

Hi, @sumit809
I get stack overflow error,  please use  malloc to allocate memory for a  s2 and string.
        const size_t N = sizeof(macArray) / sizeof(*macArray);
        int len1 = len * 3;
        // char s1[] = "ESP:SCANW:";
        char *s2 = malloc(len1);
        int n;
        for (size_t i = 0, j = 0;
             i < N && (n = snprintf(s2 + j, sizeof(s2) - j, "%d", macArray[i])) > 0;
             i++)
        {
            j += n;
            len1 = j;
        }
        int len2 = len1 + 11;
        char* string = malloc(len2);
        ...
        free(s2);
        free(string);

Hi, @koobest
This worked and prevented from crashing. Thanks for this!
However, I'm facing new problem i.e., the string variable is not able to hold more than 13 bytes at any case. I tried to send data by UART for two times... and these are the results
UART0 output:
Number of access points found: 11
total bytes in string variable = 13
total loops=1
remaining bytes=13
UART1 output:
ESP:SCANW:111

UART0 output:
Number of access points found: 12
total bytes in string variable = 13
total loops=1
remaining bytes=13
UART1 output:
ESP:SCANW:121
Can you tell me why this is happening. Also, why did allocating memory using malloc prevented from crashing?

Hi, @koobest
Actually the problem is I can't send more than 128 bytes at once using uart_write_bytes()
You can reproduce this issue by simply creating a string consisting of more than 128 bytes and try to send it using uart_write_bytes via UART1.
Also, I found out the reason that why it had stopped crashing after using malloc()... the reason was it was not able to cross the 128 bytes length.
Please guide if you have any Idea... Or anybody who is reading this thread.
Thanks in Advance...!

@sumit809  Are you sure you want to use your own ISR handler ?  Strongly suggest not do so.
If you really want to use your own ISR handler, strongly suggest not to mix up your ISR and the default driver API, like uart_write_bytes. Since such APIs are based on the internal ISR handler.
Back to this issue, you can see this in the log,

Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0)

which indicates that the code get stuck in your ISR handler. Probably because your code won't handler all the UART interrupt which are enabled by the default driver.(Why 128 bytes? Because that could probably triggered a fifo overflow interrupt)
My suggestion is that please read the uart example in IDF first and use the default uart driver in IDF. If the default uart driver can't meet your requirements, please let us know, we would try to provide solution. If you want to write your own driver, please don't call the default driver APIs.

Hi @costaud
Actually I want the ISR for receiving part only and not for the transmitting part. I had written the ISR assuming that it has nothing to do with FIFO overflow interrupt. So, what can I do in this case?

For now I have avoided using my own ISR and that solves this issue... But I would still want to know how are those internal ISRs are written. If anybody can show the examples... that will be great.
Thanks


Closes: #1 Updated validations.py python script.# Please enter the co…

…mmit message for your changes. Lines starting
Fixed the behavior of validate_user function in validations.py.
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

Submitted


Numpy error during plotting routine of Stage 3

Just logging this down as I'm about to sign off for the day, but I'll pick things back up next week. Stage 3 seems to be working on the NIRSpec dataset, but crashes during a plotting routine towards the end.
File "/Users/acarter/Documents/TRANSITS/EUREKA/TESTING_NIRSPEC/run_eureka.py", line 14, in <module>
   s3_meta = s3.reduceJWST(eventlabel)#, s2_meta=s2_meta)
 File "/Users/acarter/Documents/TRANSITS/EUREKA/TESTING_NIRSPEC/../eureka_s1/eureka/S3_data_reduction/s3_reduce.py", line 346, in reduceJWST
   plots_s3.optimal_spectrum(data, meta, n)
 File "/Users/acarter/Documents/TRANSITS/EUREKA/TESTING_NIRSPEC/../eureka_s1/eureka/S3_data_reduction/plots_s3.py", line 119, in optimal_spectrum
   plt.errorbar(range(subnx), optspec[n], opterr[n], fmt='-', color='C2', ecolor='C2', label='Optimal Spec')
 File "/Users/acarter/anaconda3/envs/eureka_133/lib/python3.10/site-packages/matplotlib/pyplot.py", line 2509, in errorbar
   return gca().errorbar(
 File "/Users/acarter/anaconda3/envs/eureka_133/lib/python3.10/site-packages/matplotlib/__init__.py", line 1412, in inner
   return func(ax, *map(sanitize_sequence, args), **kwargs)
 File "/Users/acarter/anaconda3/envs/eureka_133/lib/python3.10/site-packages/matplotlib/axes/_axes.py", line 3467, in errorbar
   barcols.append(lines_func(
 File "/Users/acarter/anaconda3/envs/eureka_133/lib/python3.10/site-packages/matplotlib/__init__.py", line 1412, in inner
   return func(ax, *map(sanitize_sequence, args), **kwargs)
 File "/Users/acarter/anaconda3/envs/eureka_133/lib/python3.10/site-packages/matplotlib/axes/_axes.py", line 1142, in vlines
   minx = x.min()
 File "/Users/acarter/anaconda3/envs/eureka_133/lib/python3.10/site-packages/numpy/ma/core.py", line 5703, in min
   result = self.filled(fill_value).min(
 File "/Users/acarter/anaconda3/envs/eureka_133/lib/python3.10/site-packages/numpy/core/_methods.py", line 44, in _amin
   return umr_minimum(a, axis, None, out, keepdims, initial, where)
TypeError: '<=' not supported between instances of 'int' and 'str'

Very strange, I've been running NIRSpec data through Stage 3-5 all day to fix some bugs I noticed when working on PR #101.  No idea how this kind of an error would be caused...

I just ran S2-5 on NIRCam without any such issues - I'll try NIRSpec now I guess

No such crashes encountered with the following ecfs (zipped to appease GitHub) - how do they compare to what you're using? I'm using the old NIRSpec file FYI
NIRSpec_S2-3.zip

No crashes on my end with your files and the new dataset either. However, I can reproduce the error with your .ecf by changing the following:
fittype -> smooth
window_len -> 3
isplots_S3 -> 3
A window_len of 5 and above doesn't seem to raise the error, but I can't be certain as only tested a few values. Maybe something is going wrong in the smoothing routine, still baffled as to the type change though. I can try to dig a little deeper over the next week or so, but it seems like it's an edge case issue at the moment.

Well that is very strange! Let me know here if/when you figure it out, otherwise I'll circle back around to this in a few days

FYI - I just got this same error with fittype smooth and window_len = 3. No error for larger window lengths


Broken Link, "Memory Allocation and Buffer Management"

Should the link to "Memory Allocation and Buffer Management" on this page go to:
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/_kernel/#memory-allocation-and-buffer-management
This is the link accessed by the "Memory Allocation and Buffer Management" link on the "Windows Kernel-Mode Memory Manager" page at "https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/windows-kernel-mode-memory-manager".
Thank you.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: ce947218-bd81-58a8-d89f-c3eba71c94b3
Version Independent ID: 9fc8c805-69f1-a8f5-0d38-7e6e56dfff69
Content: Memory Management for Windows Drivers - Windows drivers
Content Source: windows-driver-docs-pr/kernel/managing-memory-for-drivers.md
Product: windows-hardware
Technology: windows-devices
GitHub Login: @tedhudek
Microsoft Alias: tedhudek

Thanks @dwkaiser and apologies for the delay.  You are exactly right, that's what that link was supposed to be.  I just pushed the change, and it should be reflected on the live site within 10-15 min.  Thanks for the feedback!


pytest 5.1.0 generates incompatible xml output for catkin

From pytest 5.1.0 (2019-08-15) the xml output of pytest changed see this PR. The output looks as follows:
<testsuites>
  <testsuite tests="5" failures="3" errors="1" skip="2" time="35" name="AllTests"></testsuite>
</testsuites>'

Note that the root element does not contain a summary, which catkin expects.
I would like to contribute a PR. Against which repo should it be, pytest or catkin?

Thank you for the report.
Also thanks for offering to work on a PR. I have recently addressed the same case in colcon/colcon-test-result#31. Since implementing the change was straight forward I just went ahead and created #1033. It would be great if you could give it a try and comment if it works for you.
(Since a new catkin release is imminent I want to make sure this gets included since otherwise it would likely be several months before another release.)