text:
SSR: className do not match warning when using ssr: true option

When using ssr: true option — should that be used both on server & client?
client side .babelrc:
{
  "env": {
    "development": {
      "plugins": [
        ["babel-plugin-styled-components", {
          "displayName": true,
          "ssr": true
        }]
      ]
    }
  },
  "presets": ["react-app"],
  "plugins": [
    ["babel-plugin-styled-components", {
      "ssr": true
    }]
  ]
}

server-side .babelrc:
{
  "env": {
    "development": {
      "plugins": [
        ["babel-plugin-styled-components", {
          "displayName": true,
          "ssr": true
        }]
      ]
    }
  },
  "presets": ["env", "react", "stage-2"],
  "plugins": [
    ["babel-plugin-styled-components", {
      "ssr": true
    }]
  ]
}

Still getting this warning 🤔

Yes it should be enabled for both scenarios. Does the "react-app" preset enable file transforms that aren't present in the server-side config? If the files are materially different as a result of transpilation, that can effect how things are hashed.

So this would also be a lot easier to resolve if we may see the code before & after the transpilation :)

@marciaga some input/output files (or code rather) and more details on the transpilation would give us more to go after so we could help you 👍

@kitten I can't post the original code, but here's a minimal example that shows the issue. It seems related to the use of .extend but I couldn't find a solution in issues, though this seems like it may be on someone's radar. Regardless, it appears as though the API docs state this usage should work.
https://github.com/marciaga/ssr-sc

Closing due to non-responsiveness. Please make a new issue with reproduction if you experience a problem.

authors: kitten marciaga probablyup rpastorelle


text:
[Component ID] Stabler ID by using mtime instead of code.

Our specific situation is that the server-side source is being JIT compiled with ts-babel-node, whereas our client-side source is compiled and transformed through webpack. In the case of the client-side source, we add source map URLs to the output specifically for the browser to pickup.
This means that while the actual code is identical, the blob that this plugin receives is slightly different and thus the hash will be different, leading to the dreaded “React attempted to reuse markup in a container but the checksum was invalid.” issue.
I decided to replace the source code hashing by file mtime, which (when combined with filename) should be just as reliable, but allows for a bit more flexibility where code is semantically the same but the transformation results are slightly different.

Interesting interesting, I like it! Have you tested that this patch solves your problem?
/cc @vdanchenkov @philpl

Yup, it does 👍

Interesting, for some reason this is failing on our CI https://github.com/artsy/reaction-force/pull/168. However it does work in practice and tests locally are green, nonetheless I’ll take a look into what the issue is later today.

@mxstbr @alloy Very clever idea! I'll look into it more and think about it a little, but there shouldn't be any edge cases, I believe.

Hmm, one possible issue I just thought of is that iirc git doesn't restore mtime, which leads to different results on different machines. This is not an issue in general, except during test runs where the hash may have been recorded (e.g. jest snapshots).
Sigh. Maybe the plugin should just read the original file and hash its contents instead (which would be the TypeScript file in our case)?

Maybe the plugin should just read the original file and hash its contents instead (which would be the TypeScript file in our case)?

That could be an idea, but would make the plugin very slow, right?

Yeah indeed. I just pushed another commit that allows you to choose what type of seed to use (defaults to the previous content based version) which makes it possible to use the content based approach in tests.
I’m not a big fan of more options, but seeing as this is something you configure once rather than o each CI invocation, I think it’s not that bad.

I should amend the README to say that this isn't recommended to use in the test environment if you're recording the hash, e.g. in jest snapshots.

@alloy I don't think this is a good option tbh :/ There's a lot to consider here and I'd rather come up with something that also works well, once we integrate this stuff into webpack. It's problematic to use the original file contents for hashing purposes obviously, and multiple options could end up confusing people.
I don't think we'd like to confuse people on a plugin that will end up being "less optional" in the future ;)

Yeah that's fair. I should add that my specific case is solved by just removing the source map URL. Would you prefer to start by normalizing by getting rid of that from the input?

Ok I ended up fixing our specific issue elsewhere, because it appears that some compilation phase was accidentally leaving in the source map URL. I think there’s still room for thinking about how this could be made more fool proof, but for now I’ll close this specific PR and leave it up to you to decide what/how to go forward.

source: gharchive/pull-request

authors: alloy mxstbr philpl

license: mit

license_type: permissive

license_source: bigquery


text:
why there is no boxShadow

Summary

Basic Example

Reasoning

@bitQ2019 Without knowing the specific use case, we generally don't offer box-shadow because it wouldn't benefit from any further shorthand not already provided by CSS. We also don't handle vendor-prefixing as most CSS-in-JS libraries take care of that.

source: gharchive/issue

repo: styled-components/polished


text:
Allow updates to stylis from being used in ES bundle

Before, even when stylis had a new patch version, Webpack 2 and Rollup would use the ES Bundle, which includes stylis. This PR changes the ES Bundle to import stylis instead.

Hey, I just tested this work out on one of my projects and there's a slight hiccup. If you use npm, everything works fine, but if you use yarn, the yarn.lock file in this project is forcing the use of old packages. I.e. stylis at version 2.0.3 in the lock file which doesn't have some lovely fixes I was looking to use.
It's an easy switch to use npm for all users but forcing some users not to use yarn isn't great. Would it be okay if I provide a PR with an updated yarn.lock file?

Oh wow that's a good catch @silverlight513, please submit a PR with the latest 2.x version!

I'll get on it once I get home from work :)

authors: mxstbr philpl silverlight513

repo: styled-components/styled-components


text:
styled-system 5+ with vue-styled-components - undefined css properties

Describe the bug
When using vue-styled-components with styled-system version 5+ and you add styled-system utilities (space for example), you can see that in the CSS of the element you'll have every property of space with a value of undefined. I tested with the latest version 4 (4.2.4) of styled-system and there is no bug.
To Reproduce

Start a Vue project with packages "vue-styled-components" & "styled-system" (version 5+, this is important)
Create a styled component with prop types defined
Put that styled component in a view
Witness that all of it's prop types are in the CSS with undefined value

With styled-system version 4, no bug
https://codesandbox.io/s/vue-styledsystem-gl9z8
With styled-system version 5, with the bug
https://codesandbox.io/s/vue-styled-system-v3r91
Expected behavior
Since in Vue we need to define all prop types, the css ends up with lots of undefined values. There should be no undefined properties when these properties have no value. When a property has a value, it should end up with the correct value in the style - this part currently works.
Screenshots
Here you can see the undefined properties

@liqueflies I opened pull request #102 to fix this bug.

Solved merging  #111

authors: carldufourm liqueflies

repo: styled-components/vue-styled-components

license: MIT

license_source: github-api


text:
Add Invoice class to generate valid bank slip references

Banks have certain rules about the format of invoice references.
This information is not easily available but I found enough for:

Finland
Estonia
Norway

The implementation should be easy to append for other countries as well

Pull Request Test Coverage Report for Build 2025

13 of 39 (33.33%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.002%) to 33.926%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

test/test_determinism.rb
0
1
0.0%

test/test_invoice.rb
13
38
34.21%

Totals

Change from base Build 2023:
0.002%

Covered Lines:
1489

Relevant Lines:
4389

💛  - Coveralls

I'll fix the rubycop errors which travis mentioned soon.

@onnimonni  sure. Just run bundle exec rubocop -a and we should be ok.

authors: coveralls onnimonni vbrazo

repo: stympy/faker


text:
🛑 Cubari (reddit) is down

In acc2219, Cubari (reddit) (https://cubari.moe/read/reddit/16cj0xv/?cache_buster=$GITHUB_RUN_NUMBER) was down:

HTTP code: 500
Response time: 921 ms

Resolved: Cubari (reddit) is back up in f650210 after 12 minutes.

repo: subject-f/cubari-status-page


text:
🛑 Cubari (Catbox) is down

In 49a79a6, Cubari (Catbox) (https://cubari.moe/read/catbox/r47o8s/?cache_buster=$GITHUB_RUN_NUMBER) was down:

HTTP code: 500
Response time: 486 ms

Resolved: Cubari (Catbox) is back up in 1f8dc96 after 6 minutes.


text:
⚠ Guya.moe Proxied has degraded performance

In f65a340, Guya.moe Proxied (https://ice.guya.moe/) experienced degraded performance:

HTTP code: 200
Response time: 12334 ms

Resolved: Guya.moe Proxied performance has improved in 8815c52 after 53 minutes.

repo: subject-f/guya-status-page


text:
CS Audit, Lime 174, Improved documentation

Description
In AaveYield.sol
• The specification for the unlockShares refers to the asset as the underlying token, but the code assumes to be the Aave token.
• In _withdrawETH the comment lock collateral is incorrect.
Change Log
Erroneous documentation were corrected.
Function Signature Change
The function signature for function unlockShares was changed from
function unlockShares(address asset, uint256 amount) external returns (uint256 received);

to
function unlockShares(address asset, uint256 amount) external returns (uint256 received, address tokenReceived);

Codecov Report

Merging #260 (86e0b63) into v1-alpha (6dc2001) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##           v1-alpha     #260      +/-   ##
============================================
- Coverage     39.06%   38.99%   -0.07%
============================================
  Files            16       16
  Lines          1705     1708       +3
  Branches        290      290
============================================
  Hits            666      666
- Misses         1039     1042       +3

Impacted Files
Coverage Δ

contracts/SavingsAccount/SavingsAccount.sol
27.64% <0.00%> (+0.44%)
:arrow_up:

contracts/yield/AaveYield.sol
19.38% <0.00%> (-0.20%)
:arrow_down:

contracts/yield/CompoundYield.sol
48.68% <0.00%> (-1.32%)
:arrow_down:

contracts/yield/NoYield.sol
24.39% <0.00%> (-0.61%)
:arrow_down:

contracts/yield/YearnYield.sol
13.33% <0.00%> (-0.19%)
:arrow_down:

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 6dc2001...86e0b63. Read the comment docs.

authors: codecov-commenter saxenism


text:
Sometimes remote endpoint RTT is reported as '0'

I have deployed SM clustersset with GN on aws, gcp and azure, and sometimes RTT is reported as '0 'even though the endpoint is successfully connected and round trip is ~70mSec.
The following error is reported in GW crd [1] while I can ping manually the remote endpoint [2].
Restarting the gw pod solved the problem.
Attached is GW's pod log gwpod.txt
[1]
status:
connections:

endpoint:
backend: libreswan
backend_config:
natt-discovery-port: "4490"
preferred-server: "true"
preferred-server-timestamp: "1654000314"
udp-port: "4500"
using-loadbalancer: "true"
cable_name: submariner-cable-gcp-a-10-0-128-2
cluster_id: gcp-a
healthCheckIP: 242.2.255.254
hostname: yblb-7sv57-worker-b-7h5tq.c.gc-acm-dev.internal
nat_enabled: true
private_ip: 10.0.128.2
public_ip: 34.148.193.38
subnets:

242.2.0.0/16
latencyRTT:
average: 0s
last: 0s
max: 0s
min: 0s
stdDev: 0s
status: connected
statusMessage: 'Failed to run the pinger for the remote endpoint IP "242.2.255.254":
write ip4 0.0.0.0->242.2.255.254: sendto: object is remote'
usingIP: 34.148.193.38
usingNAT: true

[2]
sh-4.4# ping 242.2.255.254
PING 242.2.255.254 (242.2.255.254) 56(84) bytes of data.
64 bytes from 242.2.255.254: icmp_seq=1 ttl=64 time=71.5 ms
64 bytes from 242.2.255.254: icmp_seq=2 ttl=64 time=71.3 ms
64 bytes from 242.2.255.254: icmp_seq=3 ttl=64 time=71.3 ms

I also encountered this issue after my hosts was restarted.

I also encountered this issue after my hosts was restarted.

Did you notice this with Globalnet or without Globalnet deployments?

Did you notice this in Globalnet or non Globalnet deployments?

I deploy it in Globalnet. I found the time of my hosts were not sync, my Submariner has been recovered when I resync time and restart its all pods.

@yboaron @sridhargaddam how urgent this issue is? are we ok with pushing it out from 0.13?

@yboaron @sridhargaddam how urgent this issue is? are we ok with pushing it out from 0.13?

I don't think it's urgent and we have a workaround to handle this issue.
+1 for pushing it out from 0.13

@sridhargaddam @yboaron I will wait for your recommendation on whether or not we want to get this into 0.13. I have seen the issue quite often myself, but I am not sure if the proposed PR is addressing the root cause.

authors: lonelyCZ nyechiel sridhargaddam yboaron

repo: submariner-io/submariner


text:
Error Stack in Safari

Looks like Safari produce error objects with no stack information at this line: https://github.com/substack/tape/blob/master/lib/test.js#L189

@azer altho this is now on this line - if you make that change locally - wrapping it in a try/catch and throwing it - does the stack information show up in Safari? (also, which version of Safari?)

authors: azer ljharb

repo: substack/tape


text:
Improve contextual menu UI + mode switcher

It would improve usability to merge all contextual actions into one menu (displayed on the right edge of the menu bar). We'd also show the category of actions (e.g. Authors, vs Chapters actions).
Additionally I propose to move the mode switcher to the left side, and implement tabs instead of a dropdown (faster switches, and moving all navigation UI closer together).
This would mean the mode switcher is not available in mobile mode, which is acceptable for the moment. However we could have a redundant mode switcher in the regular toolbar, but only show in mobile mode.

Done via #1191

authors: michael oliver----

repo: substance/texture


text:
Edit  item

First goal is XML editing of refs. This involves the following tasks:

[ ] Add edit button to RefComponent that opens a modal
[ ] Create EditRefComponent (which exposes XML editor)
[ ] When closing modal, or confirming rendering should be updated

Needs more thinking.


text:
add update-packages script

Ok, this may work. The update-packages script will look at installed packages and what is in your package.txt and install the latest then resync packages.txt. This should keep versions in sync. Removing packages will require uninstalling the package and deleting it from packages.txt.
My thinking was that we could still use the UI to install packages and update them at the cost of it being slightly trickier to remove packages.
Of course, now that I think about it, removing packages won't really work on more than one computer. If I remove a package, how would your machine know to remove it? It'd just add it back. Soooo.. maybe I just make it so that it can only update versions, but it will actually uninstall packages that were installed via the UI that aren't in the packages.txt?
This probably won't be a huge deal if we wrote a plugin for it... there's some prior art here, but I didn't like any of them:
https://github.com/lee-dohm/package-sync
https://atom.io/packages/parcel

So I changed this to uninstall packages that aren't in packages.txt... but what if I simply made it prompt the user every time it was going to uninstall to ask if they installed it or not? That could be an easy way to work around this for now...

I'd like to see some instructions in the readme as to how to correctly add packages as part of this PR.

@radamant how's this look?

@aaronjensen looks grand!

authors: aaronjensen radamant

repo: substantial/substantial-atomfiles


text:
Fix Ubuntu install command (tutorial)

The command in the tutorial doesn't match the one in the actual setup docs: https://github.com/substrate-developer-hub/substrate-node-template/blob/main/docs/rust-setup.md . Leads to all sorts of install/compilation errors

updated upstream

authors: Chrecci NukeManDan

repo: substrate-developer-hub/substrate-docs


text:
set this as button in callback function

This will allow the user to use this.getSelected() in the function callback

Thanks again Tony!

authors: UziTech suda

repo: suda/tool-bar


text:
Refactor to use an instantiatable class

Depends on #79
Supersedes #30

Approved, but leaving to you to merge because of depends on.

@justinlittman thanks.  I rebased this on the new master (which has #79 merged in).

authors: jcoyne justinlittman

repo: sul-dlss/dor-workflow-service


text:
Update sbt-ci-release to 1.8.0

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

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.github.sbt", artifactId = "sbt-ci-release" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "com.github.sbt", artifactId = "sbt-ci-release" }
}]

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

Superseded by #286.

repo: sullis/jms-testkit


text:
🛑 MAIL HOME is down

In 97d8030, MAIL HOME (https://mail.diegorende.com.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MAIL HOME is back up in 103d7d8.


text:
dirty script 什么意思?

Hi, 我看Readme中, 提到了 Support dirty script
不知道什么意思? 还请赐教.

指包含语法错误的脚本。这个解析器可以收集脚本中的语法错误，并将没有错误的部分尽量正确的解析出来。

repo: sumneko/LuaParser


text:
请问如何在VIM使用安装呢

没文档 不知道从何入手 刚接触COC

我没有用过 VIM ，如果 VIM 的语言客户端支持LSP的话，可以用他的语言客户端启动该语言服务即可，参考 https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone) 的 5. Run

文件下载下来 3rd\luamake 这个目录下为空怎么破

请参考我上面链接文档中的步骤执行

我就按照上面来的哦

我再试试吧 之前是按照上面来的

Failed to clone '3rd/bee.lua'. Retry scheduled 还是报错哦

git 错误请自行百度

晕 我直接手动下载也是没有的这个文件的啊

C:\Users\Administrator\Desktop\lua-language-server>git submodule update --init --recursive
fatal: not a git repository: C:/Users/Administrator/Desktop/lua-language-server/3rd/bee.lua/../../.git/modules/3rd/bee.lua
Failed to clone '3rd/bee.lua'. Retry scheduled
Cloning into 'C:/Users/Administrator/Desktop/lua-language-server/3rd/lni'...
Cloning into 'C:/Users/Administrator/Desktop/lua-language-server/3rd/lpeglabel'...
Cloning into 'C:/Users/Administrator/Desktop/lua-language-server/3rd/luamake'...
Cloning into 'C:/Users/Administrator/Desktop/lua-language-server/3rd/rcedit'...
BUG: submodule considered for cloning, doesn't need cloning any more?
fatal: could not get a repository handle for submodule '3rd/bee.lua'
运行结果

麻烦大神看下怎么处理吧 我想今晚把这个LUA补全的配置好

删掉重下试试

删过一次的哦

能看下吗 这后面怎么有数字

authors: gVimer sumneko

repo: sumneko/lua-language-server


text:
缓存文件超过一定数量后一直在检查，导致VSCODE无非正常智能提示

项目LUA文件目前超过40个时，本插件会一直检查LUA文件，导致VSCODE其他插件智能提示非常缓慢

Should be fixed.


text:
Groups in Default Attribute set gone missing

Hi There,
Thanks for making this fantastic script to export and import attributes and products for magento.
I've used this script to export attributes and is done successfully.
But, when I'm importing all gone well in terminal and ends up with a successful message. but I'm getting a blank Default Attribute set in backend, even default mandatory one are not showing. Attributes are available in DB because when I'm creating one with same name it says already exist. Also, all the default attributes are available in product page left menu.
Check below screenshots.

Can you confirm if the values are added to the  tables like eav_attribute

My current magento version is 1.9.3.8.
Yes, I got new attribute entries in eav_attribute table and also respected option values in eav_attribute_option_value table.
One more thing I do not get option values for existing attribute added/updated.

@shashank-abacus
I have Fixed the issue and made some improvements to the script, remove the old code and try the new one form the repo.

authors: shashank-abacus sunel

repo: sunel/Magento-Import-Export


text:
局面図出力機能のアップデート

説明 / Description
#618
局面図の書き出し機能を以下のように更新する。

書体の選択を可能にし、明朝体を追加する。
文字画像のバンドルをやめてシステムのフォントを使用する。

チェックリスト / Checklist

MUST

[x] npm test passed
[x] npm run lint was applied without warnings
[x] changes of /docs/webapp not included (except release branch)
[x] console.log not included (except script file)

RECOMMENDED (it depends on what you change)

[ ] unit test added/updated
[x] i18n

Codecov Report
Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (97aa0ab) 70.26% compared to head (4dba3a6) 70.27%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #649      +/-   ##
==========================================
+ Coverage   70.26%   70.27%   +0.01%
==========================================
  Files          89       89
  Lines       17992    18010      +18
  Branches     2565     2566       +1
==========================================
+ Hits        12642    12657      +15
- Misses       2817     2819       +2
- Partials     2533     2534       +1

Files
Coverage Δ

src/common/i18n/locales/en.ts
99.16% <100.00%> (+<0.01%)
:arrow_up:

src/common/i18n/locales/ja.ts
98.73% <100.00%> (+<0.01%)
:arrow_up:

src/common/i18n/locales/zh_tw.ts
99.14% <100.00%> (+<0.01%)
:arrow_up:

src/common/settings/app.ts
78.61% <87.50%> (+0.16%)
:arrow_up:

src/renderer/store/setting.ts
52.24% <50.00%> (-0.04%)
:arrow_down:

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

authors: codecov-commenter sunfish-shogi

repo: sunfish-shogi/electron-shogi


text:
fastapi-skywalking-middleware使用时发现有报错，做了一些修改

在使用您的fastapi-skywalking-middleware时，发现有一些报错，在修改后现在可以正常工作了，所以想在此做一个反馈。

@Shao-jm

另外可以改一下 requirements.txt 限制一下 fastapi 的版本和 skywalking 的版本

@Shao-jm

另外可以改一下 requirements.txt 限制一下 fastapi 的版本和 skywalking 的版本

@Shao-jm

另外可以改一下 requirements.txt 限制一下 fastapi 的版本和 skywalking 的版本

好的，当时使用的版本是fastapi==0.103.2、apache-skywalking==1.0.1

@Shao-jm

Release 了～

authors: Shao-jm sunhailin-Leo


text:
怎么写这个语句

select * from b left join a on b.id=(select top 1 id from a where a.id=bid)

这个sql可以这样简化：
select * from b left join a on b.id=a.id
where a.id=bid;

或者这样也可以
select * from b left join a on b.id=a.id and a.id=bid;

这样我相信你知道怎么转换了。

repo: sunkaixuan/SqlSugar


text:
Project health ❤

This is a great project: it is definitely the best auth package for Django Rest Framework that I have found. However, it is currently very limited in its growth because there is only one active contributor with write permission (@dekoza).
To prevent the project from stagnating and dying, I recommend that more people be brought in as maintainers and given write access to the repo.

What would be your thoughts about transferring this over to @jazzband? I understand you are growing, so maybe that would lighten the load for @sunscrapers while also allowing this project to get a higher level of maintenance.

I'd also like this project to see some more activity/love. If transferring this over to @jazzband is not an option, can you give @Develatio write access too? We're willing to fix a few things.

authors: alexandernst joshua-s

repo: sunscrapers/djoser


text:
Is memory copy involved when sending Uint8List from Dart to Rust?

Hello, hope this project is doing well. I wanted to ask a question in discussions, but since I couldn't create a thread I write here.
I had a simple question just like the title says. I thought that, Uint8List would be copied before being sent to Rust as Vec<u8> because mutating the bytes in Rust should be safe, even if the Uint8List at the Dart side is not garbage collected yet. DId I get it right?

If I understand you correctly, you mean when you send a Uint8List from Dart to Rust, is there any memcopy involved? The answer depends on the implementation really, the DartVM and your code.
allo-isolate is very low-level when it comes to send data from Dart to Rust, especially on Objects/Classes/Structs ..etc.
Rust expects the things that gets sent to its functions to be C-ABI compatible; Hence when sending a Uint8List to Rust you need to send two things (ptr, len) so Rust can read the data by using std::slice::from_raw_parts.
The way you get a pointer from the Uint8List is a bit tricky, since afaik, there is no direct way to do so, since this data is managed by the GC. The only way that I know is to allocate memory in the heap, copy the bytes form the Uint8List and then send a pointer to that newly allocated memory to rust with the len, so rust can work with it.
Here is an example:
pub unsafe extern "C" fn my_rusty_function(
    port: i64,
    data: *const u8,
    len: usize,
) -> i32 {
    // check if the pointer is null first
    if data.is_null() {
        return -1;
    }
    // then read it as a slice
    let buf = std::slice::from_raw_parts(data, len);
    let isolate = allo_isolate::Isolate::new(port);
    // Do something with the buffer.
    // And return the result back to dart.
    isolate.post(true);
   0
}

To Call my_rusty_function from Dart, you need bindings that can be generated, here is a snippet of the generated code:
int my_rusty_function(
    int port,
    ffi.Pointer<ffi.Uint8> data,
    int len,
  ) {
    return _my_rusty_function(
      port,
      data,
      len,
    );
  }

final _my_rusty_functionPtr = _lookup<ffi.NativeFunction<ffi.Int32 Function(ffi.Int64, ffi.Pointer<ffi.Uint8>, ffi.Uint64)>>('my_rusty_function');
final _my_rusty_function = _my_rusty_functionPtr.asFunction<int Function(int, ffi.Pointer<ffi.Uint8>, int)>();

To call the above function with a UintList8 you will need to allocate memory on the heap and free it manually too!
final mData = Unit8List.from([1, 2, 3, 4]);
final mDataLen = myData.length;
final mDataPtr = ffi.malloc.allocate<Uint8>(mDataLen)..asTypedList(mDataLen).setAll(0, mData);
// Do not worry about these, they are for creating an isolate and get the port.
final completer = Completer<Uint8List>();
final port = singleCompletePort(completer);

final callResult = my_rusty_function(
    port.nativePort,
    mDataPtr,
    mDataLen,
  );
// do something with the callResult (i.e assert it is zero)
final response = await completer.future;
// do something with the response from Rust side.
...

// DO NOT FORGET TO FREE THE ALLOCATED BUFFER.
ffi.malloc.free(mDataPtr);

The allo-isolate does not enforce any pattern on how you would send that data, and gives you the full freedom to do so. In the previous example you can also agree and let rust free the buffer for you once it is done with it, instead of doing it on dart side, but ofc not both.

Great explanation. Thank you very much :)

authors: shekohex temeddix

repo: sunshine-protocol/allo-isolate


text:
Add a Table of Contents to the readme

I think this would make the readme easier to navigate

Hi @Programazing.
Thank you for your contributions to this repository. 😉
I totally agree that the table of contents will be useful in the README file.

Hi @Programazing.
Thank you for your contributions to this repository. 😉
I totally agree that the table of contents will be useful in the README file.

@all-contributors please add @Programazing for doc

@all-contributors please add @Programazing for doc

authors: Programazing victor-pogor

repo: sunt-programator/CodeIT


text:
feat: Check if url is an HTTP URL

What kind of change does this PR introduce?

Check if url arg is an HTTP URL.

For the test I think you'll want
with pytest.raises(...):

https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest.raises

authors: juancarlospaco olirice

license: PostgreSQL


text:
Get "Error: conn busy" when running db remote set with 0.13.0

Bug report
When running supabase db remote set <url> it prints the following error:
Error: conn busy

Describe the bug
See above.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

cd <existing project created with supabase 0.12.4>
Run supabase start
Run supabase db remote set postgresql://...
Should see error message

Expected behavior
The local database should be linked to the remote database
System information

OS: macOS
Version of supabase-js: 1.28.2
Version of Node.js: 14.16.0

I am experiencing the same behavior. Thank you for reporting.

I have the same problem, thanks for reporting too.
Version information:
➜  opinionshift git:(feat-devcontainer) ✗ supabase --version
0.15.1

Thanks for reporting! Turns out this happens irrespective of which CLI version the project was initialized with. Let me know if the issue persists.

authors: brettatoms clouedoc fponticelli soedirgo

repo: supabase/cli


text:
Table/Column with name not matching [_a-zA-Z0-9] results in error

{
  "errors": [
    "Names must only contain [_a-zA-Z0-9] but \"xxx \" does not."
  ]
}

now defaults to filtering them out. Will add a note in docs


text:
Drop stdlib

For discussion, the stdlib is unused and has stagnated.
Not having it makes supautils easier to understand plus makes the docs much shorter, we can just inline the existing functionality on the README. See here for comparison.
I think it's a good idea to keep supautils short/understandable because it's related to security.
Would warrant a v2.0.0 release.

👍 agreed - I'd first do a sweep on existing projects on the platform though before rolling this out, just to check if it's used by users somewhere.

@soedirgo Could we pick up this issue again? I'd like to clean up.
Maybe I can just merge it - we don't have to deploy this version yet.

Merging it would block future releases until we handle the breaking changes on existing projects. I think we can remove all we can for now, e.g. docs, tests related to stdlib, etc. and then remove the rest on v2.

authors: soedirgo steve-chavez

repo: supabase/supautils


text:
router.location is null on pageload

@supasate Thanks for your effort on this project, giving it a whirl to see how it goes.
I'm unsure if this is the intended behavior, but it seems that router.location is null in state until I actually navigate with a Link helper, at which point it populates with the expected data.
Is there a way to ensure this data is present on pageload from the initial route, or am I doing something wrong?
Cheers!

Thank you for reporting this issue. I will fix it.

@davekiss Already fixed in v1.0.0-alpha5! Let's try and let me know.

authors: davekiss supasate

repo: supasate/connected-react-router


text:
Address part of the confusions highlighted in #230

Please feel free to reword or ignore as you see fit.  I thought this would be a good addition to an awesome library and hopefully help reduce some of instances of this error / confusion.
Thanks for all the great work!

This definitely helps address the confusion! Thanks for your contribution!

authors: AJamesPhillips supasate


text:
Lint Go projects by directory

Fixes #3596

Proposed Changes

Implement a new mode for the Go linter to run against a directory. This is useful to lint an entire Go project, instead of linting individual files.
Introduce a new variable: VALIDATE_GO_DIRECTORY, defaults to true, to enable the previous mode.
Introduce a new variable: GO_DIRECTORY, defaults to empty, to point to the directory to lint with the Go linter. Users need to specify this to enable linting a directory with the Go linter, in addition to setting VALIDATE_GO_DIRECTORY=true.
Validate that GO_DIRECTORY exists if the user specified one.
Remove some leftover TAP reports.

Readiness Checklist
Author/Contributor

[x] I included all the needed documentation for this change.
[x] I provided the necessary tests.

Reviewing Maintainer

[x] Label as breaking if this is a large, fundamental change.
[x] Label as either: automation, bug, documentation, enhancement, infrastructure.

The variable option is not useful because of following two reasons.
(1) If the repo is a single project, its redundant
(2) If the repo is multi-language project,
(a) the code contributor can conveniently not enable it for their folder
(b) There can be multiple go-lang modules
I propose a recursive search for a go.mod file and run it against all those folders.

The variable option is not useful because of following two reasons.
(1) If the repo is a single project, its redundant

True. It's still worth having it to maintain backward compatibility with the current behavior.

(2) If the repo is multi-language project, (a) the code contributor can conveniently not enable it for their folder (b) There can be multiple go-lang modules (/directories)

I don't get (a), but (b) is true.

I propose a recursive search for a go.mod file and run it against all those folders.

That's a nice idea.

authors: anantdamle ferrarimarco

repo: super-linter/super-linter


text:
Allow customizing the names of request parameters for asynchronous requests

Asynchronous requests include the parameter names pageNumber and pageSize. Options such as pageNumberParameterName and pageSizeParameterName would allow customizing these since some backends may already be expecting parameters with certain names.

I see that there is an undocumented alias configuration parameter that allows customizing parameter names as:
$(selector).pagination({ alias : { pageNumber : "page", pageSize : "rows" } });

This is sufficient for what I am looking for. It will be useful to have this documented so that users can find this easily.

repo: superRaytin/paginationjs


text:
Q: How to add custom class for each character dialog lines?

Hi,
I would love to be able to have dedicated color for each characters names over a dialog line, so I can apply custom style (like colors) to each one of these.
Eg:
JOHN
How are you?

JACK
I'm fine, thank you!

In this case, I could have JOHN in blue and JACK in orange.
How could I inject characters name into the class?
Do you see a better method for doing what I am looking for ?
Thanks !

I tried another approach : adding new rules to Pigments.
But this is a failure so far.

Oh wait, I just succeed by taking the code in https://github.com/abe33/atom-pigments/issues/134#issuecomment-174335530 and adding my own color rules !! Awesome :P

@X-Raym, glad you figured it out! Could you give an example of the color rule you used in case someone else is looking to do the same thing? Thanks!

Ok seems good for performance with my code snippet (I added a scope so that it only track .fountain files).
Code to put in global init.js file:
atom.packages.serviceHub.consume 'pigments.api', '1.0.0', (pigmentsAPI) ->
  colorRegexp = "\\b(ZAWN|EURG|KRILG|FRUDE|PLAUDE|BERDE|FLETCHER|NARRATEUR|CHANCELIER|FERGUSON|GAYLORD)\\b(?![-\\.:=\\(])"
  registry = pigmentsAPI.getProject().getColorExpressionsRegistry()

  registry.createExpression 'my-custom-colors', colorRegexp, ['*'], (match, expression, context) ->
    colors =
      ZAWN: "#0000FF"
      EURG: "#9966CC"
      KRILG: "#FF0000"
      FRUDE: "#800000"
      PLAUDE: "#FF8080"
      BERDE: "#23B8DC"
      FLETCHER: "#B3B300"
      NARRATEUR: "#94006B"
      CHANCELIER: "#355e00"
      FERGUSON: "#ff00ff"
      GAYLORD: "#6b4794"

    [_,name] = match

    scopes: ['fountain']

    @colorExpression = @name = name
    @hex = colors[name].replace('#','')

Results:

Very handy for groups dialogs!
(note that pigments have other way to display colors)
https://github.com/abe33/atom-pigments#marker-type
There is a manual style to also put on global stylesheet to overcome an actual bug with Pigments:
https://github.com/abe33/atom-pigments/issues/369#issuecomment-373777685
Apart from that, seems to works very nicely so far!

authors: X-Raym superlou

repo: superlou/fountain-atom


text:
lib/DateTime/TimeZone/Zone/Asia/Riyadh87.pm6: No such file or directory

META6.json claims it provides such a file, but there is only Riyadh.pm6 without a number.

This has been fixed with commit 96c2ee3d4.

authors: Altai-man patrickbkr


text:
align equal signs

while reading the source it bothered me that the equal signs aren't aligned.

Thanks for the pr! However, I think this is more of a stylistic preference and I personally prefer to not align them (even more so since all the other don't align their equals signs either).
Thanks for the suggestion anyway!

👍🏻

However, if you want I could use an extra maintainer for the superwolff plugins (in-place, layouts, etc.). If you'd like I could add you to the organisation and I'd be fine with some updates to the code-style. Let me know if you're up for that!

sure I can do that. I currently work a lot and plan to continue to work with metalsmith.

Great, that would be awesome. Lately I haven't been able to find as much time as I'd like to, so any help would be greatly appreciated. 👍

I'm happy to help :) So what is to be done? Or should I just check the issues?
What is superwolve about?

Cool! Superwolff is basically where I put all the open source stuff related to metalsmith. There are still some plugins that I think metalsmith needs (like a favicon generator, which is always a pain to do manually), that I'd like to develop as well. Also some plugins that need further development, like metalsmith-cloudinary, etc.
I think the plugins I've focused on most are in-place and layouts, they get the most use. Those plugins also get a lot of first-time metalsmith users, since a lot of people use metalsmith for static site generation. That's also why I've tried to make the readme as easy as possible, to answer any questions they might have.
Philosophy wise I try to keep to metalsmith's unix philosophy of doing one thing and doing it well. I try to keep the plugins as simple and configuration free as possible, whilst still being flexible enough.
Other than that I try to keep an eye on the slack channel and the metalsmith tag on stack overflow. I've explicitly been redirecting users with questions to those channels, since a lot of issues were opened that were actually just questions. Redirecting users there makes any answers available to others as well, and creates more of a self-perpetuating community I think.
Development wise it would be great if you'd use the editorconfig plugin for any modifications you make to the code, to prevent any whitespace related issues. Hope this pile of information isn't too overwhelming :). I think it's great you wanna help, I'm very open to any suggestions and your thoughts on new plugins, which direction to develop the existing ones in, etc. I think it'll be good to bounce ideas of off eachother and it'll probably benefit the codebase a lot to have multiple people looking at it.

So yeah, just focus your attention on what you think is most important :), I definitely think that the issues are a good starting point.

The favicon one seems like a great addition. I have written one plugin that adds google analytics. I can transfer it if you like.
Keeping the issues clean an the Readme easy to follow seems like a good practice. Often the issues are related to other problems, so it is best to do that on slack or stack overflow.
The philosophic point makes a lot of sense.
My vimrc has a similar setting so I think it won't be a problem.
It is often benefital to work in a team :) how would you like to communicate? I think that growing this thread isn't the best way ;)
Then I'm going to focus on the issues first.
I like to close issues as fast as i can and reopen them if needed. I hope that is alright?

I have written one plugin that adds google analytics. I can transfer it if you like.

👍 Go ahead, I think it would be nice to manage it all under one org.

It is often benefital to work in a team :) how would you like to communicate? I think that growing this thread isn't the best way ;)

I agree :), I'll email you and we can see from there.

I like to close issues as fast as i can and reopen them if needed. I hope that is alright?

Definitely, I'm all for that. I agree that we can always reopen if necessary.

authors: doodzik ismay

repo: superwolff/metalsmith-in-place


text:
I introduced a formula plugin in the component and encountered an error.

import "katex/dist/katex.js";
Report the following error

https://github.com/surmon-china/vue-quill-editor/issues/280#issuecomment-557858024

repo: surmon-china/vue-quill-editor


text:
How to use surveyjs within a Vuejs single file component

Are you requesting a feature, reporting a bug or asking a question?
Do you have an example of using surveyjs embedded within a Vuejs single file component (.vue)?
Thank you.

@fcam77 Have you seen our Vue quick start repo?
Thank you,
Andrew

Thank you Andrew - yes I have but encountered errors in adapting it to my project. I was hoping there was a simpler example but perhaps I'm just new to Vue.
Fred

@fcam77 you can create a repo and post it here, so we can check it.

authors: andrewtelnov dmitrykurmanov fcam77

repo: surveyjs/surveyjs


text:
Appstudio update test-custom-default-branch-bcmb

Pipelines as Code configuration proposal

Pipelines as Code CI/test-custom-default-branch-bcmb-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
31 seconds
init

✅ Succeeded
28 seconds
clone-repository

✅ Succeeded
1 minute
build-container

✅ Succeeded
3 minutes
clair-scan

✅ Succeeded
2 minutes
clamav-scan

✅ Succeeded
46 seconds
deprecated-base-image-check

✅ Succeeded
47 seconds
inspect-image

✅ Succeeded
52 seconds
sbom-json-check

✅ Succeeded
24 seconds
label-check

✅ Succeeded
24 seconds
optional-label-check

✅ Succeeded
8 seconds
show-summary

✅ Succeeded
7 seconds
show-sbom

Pipelines as Code CI/test-custom-default-branch-bcmb-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
31 seconds
init

✅ Succeeded
28 seconds
clone-repository

✅ Succeeded
1 minute
build-container

✅ Succeeded
46 seconds
deprecated-base-image-check

✅ Succeeded
47 seconds
inspect-image

✅ Succeeded
2 minutes
clamav-scan

✅ Succeeded
3 minutes
clair-scan

✅ Succeeded
52 seconds
sbom-json-check

✅ Succeeded
24 seconds
optional-label-check

✅ Succeeded
24 seconds
label-check

✅ Succeeded
7 seconds
show-sbom

✅ Succeeded
8 seconds
show-summary

repo: susdas-qe/devfile-sample-hello-world


text:
Print model config after its change in kepler log

This PR is aimed to Address issue https://github.com/sustainable-computing-io/kepler-model-server/issues/141. The updated log is:
13 08:02:09.123144       1 model.go:120] Using Power Model AbsPower
I0913 08:02:09.123153       1 node_platform_energy.go:54] Using the LinearRegressor/AbsPower Power Model to estimate Node Platform Power
I0913 08:02:09.123167       1 model.go:176] Model Config NODE_COMPONENTS: {ModelType:EstimatorSidecar ModelOutputType:AbsPower TrainerName: EnergySource:rapl SelectFilter: InitModelURL:https://raw.githubusercontent.com/sustainable-computing-io/kepler-model-db/main/models/v0.6/nx12/std_v0.6/rapl/DynPower/WorkloadOnly/LinearRegressionTrainer_1.zip InitModelFilepath: IsNodePowerModel:false ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0913 08:02:09.123195       1 node_component_energy.go:43] The updated Model Config : &{ModelType:EstimatorSidecar ModelOutputType:AbsPower TrainerName: EnergySource:rapl SelectFilter: InitModelURL:https://raw.githubusercontent.com/sustainable-computing-io/kepler-model-db/main/models/v0.6/nx12/std_v0.6/rapl/DynPower/WorkloadOnly/LinearRegressionTrainer_1.zip InitModelFilepath: IsNodePowerModel:true ContainerFeatureNames:[] NodeFeatureNames:[bpf_cpu_time_us bpf_net_tx_irq bpf_net_rx_irq bpf_block_irq cgroupfs_memory_usage_bytes cgroupfs_kernel_memory_usage_bytes cgroupfs_tcp_memory_usage_bytes cgroupfs_cpu_usage_us cgroupfs_system_cpu_usage_us cgroupfs_user_cpu_usage_us cgroupfs_ioread_bytes cgroupfs_iowrite_bytes block_devices_used kubelet_cpu_usage kubelet_memory_bytes block_devices_used] SystemMetaDataFeatureNames:[cpu_architecture] SystemMetaDataFeatureValues:[Cascade Lake]}
I0913 08:02:09.222410       1 model.go:144] Using Power Model AbsPower
I0913 08:02:09.222447       1 node_component_energy.go:55] Using the EstimatorSidecar/AbsPower Power Model to estimate Node Component Power
I0913 08:02:09.222460       1 exporter.go:212] Initializing the GPU collector
I0913 08:02:15.227883       1 watcher.go:66] Using in cluster k8s config

Signed-off-by: Peng Hui Jiang jiangph@cn.ibm.com

/lgtm

@jiangphcn Thank you for the PR.
Basically, it is good as long as we can confirm the latest line of the log for the model config print.
However, it might be confused from the previous log print in https://github.com/sustainable-computing-io/kepler/blob/7ff90ba42bb89b1481c97391498f4fef3fde1ab8/pkg/model/model.go#L176.
At the same time, if we remove the log there, we need to add the log for container_total_energy and container_components_energy.
I would suggest to move the decision whether it is node level or not to model.go in the same way we do with getPowerModelOutputType and getPowerModelEnergySource.
We might add function isNodeLevel and return true for config.NodePlatformPowerKey and config.NodeComponentsPowerKey prefix and set it to modelConfig.IsNodePowerModel.

root@node1:~# kc logs kepler-exporter-9qvhq -n kepler
Defaulted container "kepler-exporter" out of: kepler-exporter, estimator
I0918 03:04:42.231998       1 gpu.go:46] Failed to init nvml, err: could not init nvml: error opening libnvidia-ml.so.1: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
I0918 03:04:42.236549       1 qat.go:35] Failed to init qat-telemtry err: could not get qat status exit status 127
I0918 03:04:42.243547       1 exporter.go:158] Kepler running on version: v0.5.4-25-g47466bc-dirty
I0918 03:04:42.243577       1 config.go:270] using gCgroup ID in the BPF program: true
I0918 03:04:42.244115       1 config.go:272] kernel version: 5.15
I0918 03:04:42.244170       1 exporter.go:170] LibbpfBuilt: false, BccBuilt: true
I0918 03:04:42.244178       1 exporter.go:189] EnabledBPFBatchDelete: true
I0918 03:04:42.244212       1 rapl_msr_util.go:129] failed to open path /dev/cpu/0/msr: no such file or directory
I0918 03:04:42.244270       1 power.go:71] Unable to obtain power, use estimate method
I0918 03:04:42.244322       1 redfish.go:169] failed to get redfish credential file path
I0918 03:04:42.244349       1 power.go:56] use acpi to obtain power
I0918 03:04:42.244945       1 acpi.go:67] Could not find any ACPI power meter path. Is it a VM?
I0918 03:04:43.557173       1 utils.go:56] Available ebpf metrics: [bpf_cpu_time_us bpf_net_tx_irq bpf_net_rx_irq bpf_block_irq]
I0918 03:04:43.557205       1 utils.go:57] Available counter metrics: []
I0918 03:04:43.557209       1 utils.go:58] Available cgroup metrics from cgroup: [cgroupfs_memory_usage_bytes cgroupfs_kernel_memory_usage_bytes cgroupfs_tcp_memory_usage_bytes cgroupfs_cpu_usage_us cgroupfs_system_cpu_usage_us cgroupfs_user_cpu_usage_us cgroupfs_ioread_bytes cgroupfs_iowrite_bytes block_devices_used]
I0918 03:04:43.557230       1 utils.go:59] Available cgroup metrics from kubelet: [kubelet_cpu_usage kubelet_memory_bytes]
I0918 03:04:43.557326       1 model.go:177] Model Config CONTAINER_TOTAL: {ModelType:Ratio ModelOutputType:DynPower TrainerName: EnergySource:acpi SelectFilter: InitModelURL: InitModelFilepath: IsNodePowerModel:false ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0918 03:04:43.557358       1 model.go:94] Using Power Model Ratio
I0918 03:04:43.557378       1 container_energy.go:109] Using the Ratio/DynPower Power Model to estimate Container Platform Power
I0918 03:04:43.557393       1 model.go:177] Model Config CONTAINER_COMPONENTS: {ModelType:Ratio ModelOutputType:DynPower TrainerName: EnergySource:rapl SelectFilter: InitModelURL: InitModelFilepath: IsNodePowerModel:false ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0918 03:04:43.557408       1 model.go:94] Using Power Model Ratio
I0918 03:04:43.557425       1 container_energy.go:118] Using the Ratio/DynPower Power Model to estimate Container Component Power
I0918 03:04:43.557440       1 model.go:177] Model Config PROCESS_TOTAL: {ModelType:Ratio ModelOutputType:DynPower TrainerName: EnergySource:acpi SelectFilter: InitModelURL: InitModelFilepath: IsNodePowerModel:false ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0918 03:04:43.557452       1 model.go:94] Using Power Model Ratio
I0918 03:04:43.557460       1 process_power.go:108] Using the Ratio/DynPower Power Model to estimate Process Platform Power
I0918 03:04:43.557471       1 model.go:177] Model Config PROCESS_COMPONENTS: {ModelType:Ratio ModelOutputType:DynPower TrainerName: EnergySource:rapl SelectFilter: InitModelURL: InitModelFilepath: IsNodePowerModel:false ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0918 03:04:43.557483       1 model.go:94] Using Power Model Ratio
I0918 03:04:43.557489       1 process_power.go:117] Using the Ratio/DynPower Power Model to estimate Process Component Power
I0918 03:04:43.557499       1 model.go:177] Model Config NODE_TOTAL: {ModelType:LinearRegressor ModelOutputType:AbsPower TrainerName: EnergySource:acpi SelectFilter: InitModelURL: InitModelFilepath: IsNodePowerModel:true ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0918 03:04:43.565566       1 lr.go:183] LR Model (AbsPower): getWeightFromServer: <nil> (error: status not ok: 400 BAD REQUEST ({[bpf_cpu_time_us bpf_net_tx_irq bpf_net_rx_irq bpf_block_irq cgroupfs_memory_usage_bytes cgroupfs_kernel_memory_usage_bytes cgroupfs_tcp_memory_usage_bytes cgroupfs_cpu_usage_us cgroupfs_system_cpu_usage_us cgroupfs_user_cpu_usage_us cgroupfs_ioread_bytes cgroupfs_iowrite_bytes block_devices_used kubelet_cpu_usage kubelet_memory_bytes block_devices_used cpu_architecture] AbsPower acpi 1 true  }))
I0918 03:04:43.565833       1 lr.go:188] LR Model (AbsPower): loadWeightFromURLorLocal(): &map[platform:{{4067.51980453514 map[] map[kubelet_cpu_usage:{8.225074882327771 61.882611238231696 128.77011809213587} kubelet_memory_bytes:{9.011536046098989e+06 4.377864223762704e+14 11.4818854701994}]}}] (error: <nil>)
I0918 03:04:43.565868       1 model.go:120] Using Power Model AbsPower
I0918 03:04:43.565876       1 node_platform_energy.go:54] Using the LinearRegressor/AbsPower Power Model to estimate Node Platform Power
I0918 03:04:43.565891       1 model.go:177] Model Config NODE_COMPONENTS: {ModelType:EstimatorSidecar ModelOutputType:AbsPower TrainerName: EnergySource:rapl SelectFilter: InitModelURL:https://raw.githubusercontent.com/sustainable-computing-io/kepler-model-db/main/models/v0.6/nx12/std_v0.6/rapl/DynPower/BPFOnly/LinearRegressionTrainer_1.zip InitModelFilepath: IsNodePowerModel:true ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0918 03:04:43.565914       1 node_component_energy.go:43] The updated Model Config : &{ModelType:EstimatorSidecar ModelOutputType:AbsPower TrainerName: EnergySource:rapl SelectFilter: InitModelURL:https://raw.githubusercontent.com/sustainable-computing-io/kepler-model-db/main/models/v0.6/nx12/std_v0.6/rapl/DynPower/BPFOnly/LinearRegressionTrainer_1.zip InitModelFilepath: IsNodePowerModel:true ContainerFeatureNames:[] NodeFeatureNames:[bpf_cpu_time_us bpf_net_tx_irq bpf_net_rx_irq bpf_block_irq cgroupfs_memory_usage_bytes cgroupfs_kernel_memory_usage_bytes cgroupfs_tcp_memory_usage_bytes cgroupfs_cpu_usage_us cgroupfs_system_cpu_usage_us cgroupfs_user_cpu_usage_us cgroupfs_ioread_bytes cgroupfs_iowrite_bytes block_devices_used kubelet_cpu_usage kubelet_memory_bytes block_devices_used] SystemMetaDataFeatureNames:[cpu_architecture] SystemMetaDataFeatureValues:[Cascade Lake]}

New log looks like

root@node1:~# kc logs kepler-exporter-9qvhq -n kepler
Defaulted container "kepler-exporter" out of: kepler-exporter, estimator
I0918 03:04:42.231998       1 gpu.go:46] Failed to init nvml, err: could not init nvml: error opening libnvidia-ml.so.1: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
I0918 03:04:42.236549       1 qat.go:35] Failed to init qat-telemtry err: could not get qat status exit status 127
I0918 03:04:42.243547       1 exporter.go:158] Kepler running on version: v0.5.4-25-g47466bc-dirty
I0918 03:04:42.243577       1 config.go:270] using gCgroup ID in the BPF program: true
I0918 03:04:42.244115       1 config.go:272] kernel version: 5.15
I0918 03:04:42.244170       1 exporter.go:170] LibbpfBuilt: false, BccBuilt: true
I0918 03:04:42.244178       1 exporter.go:189] EnabledBPFBatchDelete: true
I0918 03:04:42.244212       1 rapl_msr_util.go:129] failed to open path /dev/cpu/0/msr: no such file or directory
I0918 03:04:42.244270       1 power.go:71] Unable to obtain power, use estimate method
I0918 03:04:42.244322       1 redfish.go:169] failed to get redfish credential file path
I0918 03:04:42.244349       1 power.go:56] use acpi to obtain power
I0918 03:04:42.244945       1 acpi.go:67] Could not find any ACPI power meter path. Is it a VM?
I0918 03:04:43.557173       1 utils.go:56] Available ebpf metrics: [bpf_cpu_time_us bpf_net_tx_irq bpf_net_rx_irq bpf_block_irq]
I0918 03:04:43.557205       1 utils.go:57] Available counter metrics: []
I0918 03:04:43.557209       1 utils.go:58] Available cgroup metrics from cgroup: [cgroupfs_memory_usage_bytes cgroupfs_kernel_memory_usage_bytes cgroupfs_tcp_memory_usage_bytes cgroupfs_cpu_usage_us cgroupfs_system_cpu_usage_us cgroupfs_user_cpu_usage_us cgroupfs_ioread_bytes cgroupfs_iowrite_bytes block_devices_used]
I0918 03:04:43.557230       1 utils.go:59] Available cgroup metrics from kubelet: [kubelet_cpu_usage kubelet_memory_bytes]
I0918 03:04:43.557326       1 model.go:177] Model Config CONTAINER_TOTAL: {ModelType:Ratio ModelOutputType:DynPower TrainerName: EnergySource:acpi SelectFilter: InitModelURL: InitModelFilepath: IsNodePowerModel:false ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0918 03:04:43.557358       1 model.go:94] Using Power Model Ratio
I0918 03:04:43.557378       1 container_energy.go:109] Using the Ratio/DynPower Power Model to estimate Container Platform Power
I0918 03:04:43.557393       1 model.go:177] Model Config CONTAINER_COMPONENTS: {ModelType:Ratio ModelOutputType:DynPower TrainerName: EnergySource:rapl SelectFilter: InitModelURL: InitModelFilepath: IsNodePowerModel:false ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0918 03:04:43.557408       1 model.go:94] Using Power Model Ratio
I0918 03:04:43.557425       1 container_energy.go:118] Using the Ratio/DynPower Power Model to estimate Container Component Power
I0918 03:04:43.557440       1 model.go:177] Model Config PROCESS_TOTAL: {ModelType:Ratio ModelOutputType:DynPower TrainerName: EnergySource:acpi SelectFilter: InitModelURL: InitModelFilepath: IsNodePowerModel:false ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0918 03:04:43.557452       1 model.go:94] Using Power Model Ratio
I0918 03:04:43.557460       1 process_power.go:108] Using the Ratio/DynPower Power Model to estimate Process Platform Power
I0918 03:04:43.557471       1 model.go:177] Model Config PROCESS_COMPONENTS: {ModelType:Ratio ModelOutputType:DynPower TrainerName: EnergySource:rapl SelectFilter: InitModelURL: InitModelFilepath: IsNodePowerModel:false ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0918 03:04:43.557483       1 model.go:94] Using Power Model Ratio
I0918 03:04:43.557489       1 process_power.go:117] Using the Ratio/DynPower Power Model to estimate Process Component Power
I0918 03:04:43.557499       1 model.go:177] Model Config NODE_TOTAL: {ModelType:LinearRegressor ModelOutputType:AbsPower TrainerName: EnergySource:acpi SelectFilter: InitModelURL: InitModelFilepath: IsNodePowerModel:true ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}
I0918 03:04:43.565566       1 lr.go:183] LR Model (AbsPower): getWeightFromServer:  (error: status not ok: 400 BAD REQUEST ({[bpf_cpu_time_us bpf_net_tx_irq bpf_net_rx_irq bpf_block_irq cgroupfs_memory_usage_bytes cgroupfs_kernel_memory_usage_bytes cgroupfs_tcp_memory_usage_bytes cgroupfs_cpu_usage_us cgroupfs_system_cpu_usage_us cgroupfs_user_cpu_usage_us cgroupfs_ioread_bytes cgroupfs_iowrite_bytes block_devices_used kubelet_cpu_usage kubelet_memory_bytes block_devices_used cpu_architecture] AbsPower acpi 1 true  }))
I0918 03:04:43.565833       1 lr.go:188] LR Model (AbsPower): loadWeightFromURLorLocal(): &map[platform:{{4067.51980453514 map[] map[kubelet_cpu_usage:{8.225074882327771 61.882611238231696 128.77011809213587} kubelet_memory_bytes:{9.011536046098989e+06 4.377864223762704e+14 11.4818854701994}]}}] (error: )
I0918 03:04:43.565868       1 model.go:120] Using Power Model AbsPower
I0918 03:04:43.565876       1 node_platform_energy.go:54] Using the LinearRegressor/AbsPower Power Model to estimate Node Platform Power
I0918 03:04:43.565891       1 model.go:177] Model Config NODE_COMPONENTS: {ModelType:EstimatorSidecar ModelOutputType:AbsPower TrainerName: EnergySource:rapl SelectFilter: InitModelURL:https://raw.githubusercontent.com/sustainable-computing-io/kepler-model-db/main/models/v0.6/nx12/std_v0.6/rapl/DynPower/BPFOnly/LinearRegressionTrainer_1.zip InitModelFilepath: IsNodePowerModel:true ContainerFeatureNames:[] NodeFeatureNames:[] SystemMetaDataFeatureNames:[] SystemMetaDataFeatureValues:[]}

@sunya-ch could you please take a look again?

authors: jiangphcn jichenjc sunya-ch

repo: sustainable-computing-io/kepler


text:
add map

We now have a nice map for the PDFs. (Don't add to HTML or EPUB, too much hassle.)
https://github.com/suttacentral/publications/tree/main/sutta_publisher/src/sutta_publisher/images
Code for adding the map was committed here:
https://github.com/suttacentral/publications/commit/36059386fbec43883fc001a378b1edd2a1378107
The map code is added to the epigraph template, so if there is an epigraph there is also a map. Maybe we will want to split these out later, but this should be fine for now.
The Latex code imports the image and splits it over two pages so that it is seen as a double spread. Like this:

Here are the pdf and tex files.
map-demo.zip
Hopefully the committed code will work, but we need to test it. Especially we need to check that the path for the image is correct:
/tmp/jambudipa_map.png

Done, map is go

repo: suttacentral/publications


text:
Exiting current pcall

Is it possible to exit a pcall from a C defined function. Eg, let's have the following Javascript:
function MyTest() {
      aJavascriptfFunction();

    cDefinedFunction();  // Inside this C defined function, I want to exit from MyTest if something goes wrong

      aNotherJavascriptfFunction(); // not want to execute this if the previous function has failed
}

On the C side, I called
int rc = duk_pcall(ctx, 0); // exit from that call if any sub functions has been problematic

Is there a duk_xxx function to do that? I tried several mechanisms including exceptions, without success.

You can throw an error (see duk_throw()) but that’s about it.  The C call is just an extension of the normal flow of JS execution, so you’re basically asking “how do I return from multiple levels of function calls at once?” which is non-trivial.

Yes, I wanted this behavior; I will ask it for Christmass.
Meanwhile, I managed to get what I wanted:

Without enable C++ exceptions, it generates a whole application crash that I am not able to catch.
return DUK_RET_ERROR; from my C Code, thank you wonderful documentation :)

In that way the pcall() returns without success, exactly what I want. I love Duktape.

“Returning from multiple functions at once” is pretty much what exceptions are for.  By returning DUK_RET_ERROR this is essentially shorthand for throwing an equivalent exception using duk_throw() or duk_error(), so I don’t understand why the latter didn’t work for you.

Indeed I now understand that it is the same, duk_throw() didn't work because I enabled DUK_USE_CPP_EXCEPTIONS.
Unfortunately I was excepted to have something like this in the user code:
try {
     pcal();
} catch( std::runtime_error &e) {
}

By reading the doc, it seems that the exception option is only to transform into JS an exception in a Duktape/C function, which is not exactly what I want.

When you enable DUK_USE_CPP_EXCEPTIONS it doesn't change the way errors are handled in the Duktape API: you still use duk_pcall() (and its variants) and check the error code. C++ exceptions are used strictly internally to perform the long control transfer (from the throw site to the catch site) in a way that unwinds the C stack that supports automatic destructors etc. That internal exception, duk_internal_exception is not normally visible or caught by application code, and for that reason it also doesn't inherit from any standard exception class (to discourage trying to catch it).

So as a concrete example, regardless of whether DUK_USE_CPP_EXCEPTIONS is enabled, one would:
if (duk_pcall(...) == DUK_EXEC_SUCCESS) {
    printf("success!\n);
} else {
    printf("failure: %s\n", duk_safe_to_string(ctx, -1));
}
duk_pop(ctx);

and in the throw site, one could e.g. use:
duk_type_error(ctx, "aiee");

The only concrete application-visible effect of DUK_USE_CPP_EXCEPTIONS is that when the C stack is unwound between the throw site and the catch site (duk_pcall), the stack unwinding is C++ aware and supports automatic destructors etc.

Ok that's clear, I had mis-understanding the documentation, but with this option turned on I always had exception raised and application crash (MinGW on Windows).

Hmm, so with DUK_USE_CPP_EXCEPTIONS a duk_pcall() + duk_error() leads to a crash in your setup? What kind of crash, is there any useful information about the cause?

@arabine Any updates?

No, I have to find time to give you a simple example of this use case, can you hold on this ticket a bit?

Sure, no hurry, I was just trying to clean up some unnecessarily hanging issues.

Good to hear that the cause was found :) Can you describe what fix you concretely applied; a gcc option?

authors: arabine fatcerberus svaarala

repo: svaarala/duktape


text:
WalletConnect Mobile Registry has been deprecated

npm WARN deprecated @walletconnect/mobile-registry@1.4.0: Deprecated in favor of dynamic registry available from: https://github.com/walletconnect/walletconnect-registry
npm WARN deprecated @json-rpc-tools/provider@1.7.6: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @json-rpc-tools/utils@1.7.6: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @json-rpc-tools/types@1.7.6: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

Blog post about it here https://medium.com/walletconnect/introducing-walletconnect-cloud-registry-c17ac580f33
Their github has been archived in november

Looks like this is still an issue, Is there any temporary fix?

repo: svelte-on-solana/wallet-adapter


text:
Svelte 5: navigation issue when creating dynamic title (using derived)

Describe the bug
I have this on a route's +page.svelte,

This is a first level page with title {titleDetails.title}

<svelte:head>
    <title>{titleDetails.title}</title>
</svelte:head>

data.titleDetails is coming from the corresponding +page.server.ts
On navigating from a first level page to homepage, I am getting a Uncaught TypeError: Cannot read properties of undefined (reading 'title') because somehow titleDetails becomes undefined.
Not sure if this is bug or I am using something incorrectly.
Reproduction
Svelte 5 SvelteLab
Logs
No response
System Info
System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.3 - /usr/local/bin/pnpm
  npmPackages:
    @sveltejs/adapter-auto: ^3.0.0 => 3.1.1
    @sveltejs/kit: ^2.0.0 => 2.5.2
    @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.2
    svelte: ^5.0.0-next.70 => 5.0.0-next.70
    vite: ^5.0.0 => 5.1.4

Severity
blocking an upgrade
Additional Information
No response

This has been fixed

repo: sveltejs/kit


text:
support for throwing redirect in handle function

Describe the problem
The convenient function redirect is really useful to redirect users to another page. It can be used in a lot of different files files, except for the hooks file.
It is not that unlikely to have a logic inside the handle function that checks if the user is authorized and then redirect the user to the login page.
In order to do so someone can't throw a redirect as everything thrown inside handle will result in an 500 error. In order to redirect a proper Response object needs to be returned.
if (!authorized) {
	return new Response(null, { status: 302, headers: { Location: '/login' } })
}

Writing it like this involves writing a bit of an overhead, but I would really love to use the redirect helper function like I do in all other code parts.
I'm currently using a wrapper to handle this use case where handleRequest is the actual implementation of my handle functionality:
export const handle: Handle = async (input) => handleRequest(input)
	.catch(error => {
		// can't use instanceof `Redirect` because class get's not exported
		if (error.status && error.location) {
			return new Response(null, {
				status: error.status,
				headers: { location: error.location }
			})
		}

		// can't use instanceof `HttpError` because class get's not exported
		if (error.status && error.body) {
			return new Response(JSON.stringify(error.body), { status: error.status })
		}

		return new Response(null, { status: 500 })
	})

Here I'm catching Redirects and HttpErrors and implementing and returning custom Responses. But this has a few weak points:

user code does not have access to Redirect, so I have to check it in another way
when SvelteKit changes the implementation of the Redirect class, my code will no longer work
possible inconsistencies with framework code (I did not take a look what exactly happens when SvelteKit handles `Redirect objects)
does not handle setting cookies (related to #7611)

It would be great to have an official solution to this problem.
Describe the proposed solution
SvelteKit should catch errors from the handle function and redirect the user if a Redirect class gets thrown.
A similar thing could be done for the HttpError class thrown by the error() helper function. I guess that is related to this issue: https://github.com/sveltejs/kit/issues/7272.
At least SvelteKit could set the correct status code when someone uses the error convenient function to throw inside handle.
Alternatives considered
Leave it to users to

discover that this functionality it is not supported
figure out a way to make redirects happen

Importance
would make my life easier
Additional Information
No response

Thank you!


text:
Trouble with update or fresh install (/node_modules/sites/kit.svelte.dev/ not exist)

Describe the bug
Hi,
I'm having issue with updating my SK app, after 'npm run dev'  :
error when starting dev server:
Error: ENOENT: no such file or directory, open 'C:\Data\Svelte\fresh\node_modules\sites\kit.svelte.dev\scripts\types\special-types/$env+static+private.md'
at Object.openSync (node:fs:586:3)
at Object.readFileSync (node:fs:454:35)
at read_description (file:///C:/Data/Svelte/fresh/node_modules/@sveltejs/kit/src/core/sync/write_ambient.js:17:21)
at template (file:///C:/Data/Svelte/fresh/node_modules/@sveltejs/kit/src/core/sync/write_ambient.js:33:3)
at write_ambient (file:///C:/Data/Svelte/fresh/node_modules/@sveltejs/kit/src/core/sync/write_ambient.js:58:3)
at Module.init (file:///C:/Data/Svelte/fresh/node_modules/@sveltejs/kit/src/core/sync/sync.js:36:2)
at dev (file:///C:/Data/Svelte/fresh/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:34:7)
at configureServer (file:///C:/Data/Svelte/fresh/node_modules/@sveltejs/kit/src/exports/vite/index.js:543:17)
at createServer (file:///C:/Data/Svelte/fresh/node_modules/vite/dist/node/chunks/dep-67e7f8ab.js:61815:30)
at async CAC. (file:///C:/Data/Svelte/fresh/node_modules/vite/dist/node/cli.js:707:24)
Same error with fresh install.
Directory 'node_modules\sites\kit.svelte.dev' not exists.
Reproduction
Simple ^^
npm create svelte@latest
npm install
npm run dev
Logs
No response
System Info
Win11, node v17.9.0 and npm v8.17.0

Severity
blocking an upgrade
Additional Information
No response

This is an issue with @sveltejs/kit@1.0.0-next.566, downgrading to 565 helps.

I'm getting this error when trying to update a SvelteKit app from 528 -> 529 🤷♂

Duplicate of #7856

authors: arjarn kellenmace liborvanek


text:
Caching issue with fetch response: Incorrect behavior observed

Describe the bug
We ran into this issue while we were trying to do two similar GET requests to our API but with different headers. It seems that the caching system it's using only the URL and the body to create the key. Could you consider adding headers, too? Thanks
Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-igyc9t?file=src%2Froutes%2F%2Bpage.js,src%2Froutes%2F%2Bpage.svelte&terminal=dev
You need to download the project to don't run into a CORS issue with the API.
Logs
No response
System Info
System:
    OS: macOS 12.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 5.28 GB / 16.00 GB
    Shell: 3.5.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.119
    Safari: 15.6
  npmPackages:
    @sveltejs/adapter-auto: ^1.0.0 => 1.0.2
    @sveltejs/kit: ^1.0.0 => 1.3.1
    svelte: ^3.54.0 => 3.55.1
    vite: ^4.0.0 => 4.0.4

Severity
annoyance
Additional Information
No response

Out of curiosity, what are the headers that are different or what's a use case for this?

If the headers are not taken into account when building the caching key, the same URL and body may result in different responses depending on the headers, leading to incorrect data being served from the cache.
Or am I missing something?

One example could be same URL, same body and different cookies.

I'm not disagreeing. I was just curious to know when you actually ran into this

We attempted to retrieve a resource with a session, but received a 401 error. To fix this, we attempted a re-authentication call followed by the original resource call using the correct credentials. Then we realize that the server was returning 401 for both calls.
This is how we found the issue.

authors: alejogschwind benmccann


text:
vite dev crashes with call stack overflow on file save

Describe the bug
When I save a file (in vscode) while vite dev is running, it terminates with the following error:
Exception in PromiseRejectCallback:
file:///home/jeroen/Files/Booost/booost-extension/sveltekit/node_modules/.pnpm/vite@4.4.4_@types+node@20.4.2_sass@1.63.6/node_modules/vite/dist/node/chunks/dep-abb4f102.js:65020
    });
    ^

RangeError: Maximum call stack size exceeded

node:fs:289
function existsSync(path) {
                   ^

RangeError: Maximum call stack size exceeded
    at Object.existsSync (node:fs:289:20)
    at file:///home/jeroen/Files/Booost/booost-extension/sveltekit/node_modules/.pnpm/@sveltejs+vite-plugin-svelte@2.4.2_svelte@4.0.5_vite@4.4.4/node_modules/@sveltejs/vite-plugin-svelte/src/utils/watch.js:23:11
    at Array.forEach (<anonymous>)
    at emitChangeEventOnDependants (file:///home/jeroen/Files/Booost/booost-extension/sveltekit/node_modules/.pnpm/@sveltejs+vite-plugin-svelte@2.4.2_svelte@4.0.5_vite@4.4.4/node_modules/@sveltejs/vite-plugin-svelte/src/utils/watch.js:22:14)
    at file:///home/jeroen/Files/Booost/booost-extension/sveltekit/node_modules/.pnpm/@sveltejs+vite-plugin-svelte@2.4.2_svelte@4.0.5_vite@4.4.4/node_modules/@sveltejs/vite-plugin-svelte/src/utils/watch.js:94:66
    at Array.forEach (<anonymous>)
    at FSWatcher.<anonymous> (file:///home/jeroen/Files/Booost/booost-extension/sveltekit/node_modules/.pnpm/@sveltejs+vite-plugin-svelte@2.4.2_svelte@4.0.5_vite@4.4.4/node_modules/@sveltejs/vite-plugin-svelte/src/utils/watch.js:94:44)
    at FSWatcher.emit (node:events:523:35)
    at FSWatcher.emit (node:domain:489:12)
    at file:///home/jeroen/Files/Booost/booost-extension/sveltekit/node_modules/.pnpm/@sveltejs+vite-plugin-svelte@2.4.2_svelte@4.0.5_vite@4.4.4/node_modules/@sveltejs/vite-plugin-svelte/src/utils/watch.js:27:13

Node.js v20.1.0
 ELIFECYCLE  Command failed with exit code 1.

This refers to the following code in vite-plugin-svelte/src/utils/watch.js:
	const emitChangeEventOnDependants = (filename) => {
		const dependants = cache.getDependants(filename);
		dependants.forEach((dependant) => {
			if (fs.existsSync(dependant)) {
				log.debug(
					`emitting virtual change event for "${dependant}" because depdendency "${filename}" changed`
				);
				watcher.emit('change', dependant);
			}
		});
	};

When adding some debug logs, I see that dependants includes filename, which causes this to infinitely recurse.
Please let me know what more information I can add to clarify (and/or work around) this problem.
Reproduction URL
https://vite.new/svelte
Reproduction
I'm truly sorry for not providing a reproduction but I need help understanding in which direction to look at how to produce one for this specific symptom, and whether to look for it in this package at all.
Logs
2023-07-18T12:10:04.421Z vite:hmr [file change] src/lib/sidebar/Sidebar.svelte
2023-07-18T12:10:04.421Z vite:vite-plugin-svelte emitting virtual change event for "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" because depdendency "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" changed
2023-07-18T12:10:04.421Z vite:hmr [file change] src/lib/sidebar/Sidebar.svelte
2023-07-18T12:10:04.421Z vite:vite-plugin-svelte emitting virtual change event for "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" because depdendency "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" changed
2023-07-18T12:10:04.421Z vite:hmr [file change] src/lib/sidebar/Sidebar.svelte
2023-07-18T12:10:04.421Z vite:vite-plugin-svelte emitting virtual change event for "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" because depdendency "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" changed
2023-07-18T12:10:04.421Z vite:hmr [file change] src/lib/sidebar/Sidebar.svelte
2023-07-18T12:10:04.421Z vite:vite-plugin-svelte emitting virtual change event for "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" because depdendency "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" changed
2023-07-18T12:10:04.421Z vite:hmr [file change] src/lib/sidebar/Sidebar.svelte
2023-07-18T12:10:04.422Z vite:vite-plugin-svelte emitting virtual change event for "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" because depdendency "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" changed
2023-07-18T12:10:04.422Z vite:hmr [file change] src/lib/sidebar/Sidebar.svelte
2023-07-18T12:10:04.422Z vite:vite-plugin-svelte emitting virtual change event for "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" because depdendency "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" changed
2023-07-18T12:10:04.422Z vite:hmr [file change] src/lib/sidebar/Sidebar.svelte
2023-07-18T12:10:04.422Z vite:vite-plugin-svelte emitting virtual change event for "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" because depdendency "/home/jeroen/Files/Booost/booost-extension/sveltekit/src/lib/sidebar/Sidebar.svelte" changed
2023-07-18T12:10:04.422Z vite:hmr [file change] src/lib/sidebar/Sidebar.svelte

System Info
System:
    OS: Linux 6.2 Ubuntu 23.04 23.04 (Lunar Lobster)
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 21.46 GB / 30.87 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 20.1.0 - ~/.nvm/versions/node/v20.1.0/bin/node
    npm: 9.6.4 - ~/.nvm/versions/node/v20.1.0/bin/npm
    pnpm: 8.6.3 - ~/.local/share/pnpm/pnpm
  npmPackages:
    @sveltejs/adapter-vercel: ^3.0.2 => 3.0.2
    @sveltejs/kit: ^1.22.3 => 1.22.3
    svelte: ^4.0.5 => 4.0.5
    vite: ^4.4.4 => 4.4.4

Please provide a link to a minimal reproduction. This is required.
From your description alone it is unclear how or why a .svelte file would end up as a preprocessor dependency of itself.

Maybe it would make sense for us to skip the change event if dependant === filename? I think it's a simple enough change, but would also be nice to know how it's being triggered. Things like Svelte preprocessors can affect it.

Again sorry for not providing a reproduction yet, I haven't been able to create one because I don't understand the problem well enough. Thank you for responding anyway, it's much appreciated!
I have added an if-statement that skips dependant === filename, and then I still see an infinite loop, but it bounces back and forth between two Svelte components now. So, in addition to a file being its own dependant, it seems there can be circular dependencies in the graph in other ways.
This must mean the code that builds the dependency list/graph affects this problem, but I haven't found out where that is done and how it works yet, or how my own code is affecting it to lead to this problem. Besides this issue, my code works/builds/runs seemingly fine and there is no obvious circular dependency.

@JeroenvdV are you able to provide a reproduction for this?

@JeroenvdV
commenting out helped me ;)
watcher.emit('change', dependant);

authors: JeroenvdV andriytyurnikov bluwy dominikg

repo: sveltejs/vite-plugin-svelte


text:
Unable to use Inductor

Hello,
first of all thank you very much for your work. It's a pleasure to work with!
However I encountered a problem I cannot deal with. Whenever I use an inductor and check the circuit a null reference exception is thrown.
I cannot simulate or check even this simple circuit using your 1.1.0 release:
Circuit ckt = new Circuit();
      var src = new Voltagesource("V1", "A", "GND", 0);
      src.VSRCacMag.Set(12);
      ckt.Objects.Add(
        src,
        new Resistor("R1", "A", "B", 10),
        new Inductor("L1", "B", "GND", 0.000018));

      ckt.Check();

System.NullReferenceException
HResult=0x80004003
Source=SpiceSharp
StackTrace:
at SpiceSharp.Components.Inductor.Setup(Circuit ckt)
at SpiceSharp.Circuit.Setup()
at SpiceSharp.Circuits.CircuitCheck.Check(Circuit ckt)
at SpiceSharp.Circuit.Check()
at test.Program.Main(String[] args) in G:\Můj disk\schu\c#\2\test\Program.cs:line 166

What am I doing wrong? Thank you very much.

Inductors should work now. Closing this ussue.

authors: neonxc svenboulanger

repo: svenboulanger/SpiceSharp


text:
Text no rendering correctly, .svg works in Edge and Chrome

Description
Rendering the attached .svg file fails with the text shown as black rectangles. Image looks ok in Chrome and Edge, the text should be a sans serif font. It was exported from OpenOffice Draw.
Example data

Used Versions
Svg v3.4.7 from nuget
Windows 10
.net 8.0

Could you better explain the issue?
As far as I understand . You export a svg from openoffice. Then you want to import it via SVG.net in a c# application, but the text is not shown. Are the text elements missing? Or are they just not visible because the background has the same color as the text.
And what do you mean by "image looks ok in edge", does it have the same text-missing error in firefox?

The .svg is attached to this Issue.
The C# application using svg.net shows:

Edge, Chrome and Firefox all render the .svg as shown here:

How do you view the SVG in VS?
And you save this via svg.net and then it is shown correctly?
Did you inspect the single SVG elements after reading in VS? Do the text areas have a background-color or sth. suspicious?

How do you view the SVG in VS?

Visual Studio? In code?
SvgDocument svg= SvgDocument.Open(path);
float width = SvgDocument.Width - SvgDocument.X;
float height = SvgDocument.Height - SvgDocument.Y;
Bitmap bitmap = svg.Draw((int)width, (int)height);

And you save this via svg.net and then it is shown correctly?

Still broken if view saved with svg.Write(savepath)

Did you inspect the single SVG elements after reading in VS? Do the text areas have a background-color or sth. suspicious?

I’m not doing any inspection just converting to a Bitmap and displaying.

repo: svg-net/SVG

license: MS-PL


text:
RemoveAttrs plugins matches only tags name

Currently, I cannot use removeAttrs plugin with RegExp that match or exclude certain classes, or smth specific other then tag name. Would be really useful to be able to somehow exclude from rule certain svg  files.
I'd like to use smth like this:
'removeAttrs': {
attrs: '._path(?!._class="filled").*:fill'
}

Technically, it's quite complicated and since the plugin is a byproduct by a third-party committer it's unlikely that someone will improve it.

You can use custom plugin
const plugin = {
  type: 'visitor',
  name: 'remove-my-attrs',
  fn: () => {
    return {
      element: {
        enter: node => {
          if (node.name === 'path') {
            if (node.attributes.class.split(/\s+/).includes('filled')) {
              delete node.attributes.fill
            }
          }
        }
      }
    }
  }
}

authors: GreLI TrySound fr-ench

repo: svg/svgo


text:
[Question] how to use this together with redux-thunk?

Hi, I'm currently looking for a way to reduce much duplicate code from my action creators and I think this project could help me.
I'm currently using redux-thunk for all my async action creators. Is it possible to dispatch a standard action when a request fails?

Shoot me an example of one of your thunks and I can help you out.

Here is an example of my thunk. Be aware that the first dispatch is handled by middleware which allows batching actions. When a request would fail I would love to have a standard action that will be dispatched (see .catch())
export const fetchSomeStuff = (requestArray) => (dispatch) => {
	dispatch(requestArray.map(item => requestItem(item)));

	new Promise(resolve => setTimeout(resolve, 500))
		.then(() => {
			dispatch(/* stuff */);
			return request;
		})
		.catch((error) => dispatch(standardErrrorAction(error)));
};

Okay your code is a bit strange as you are not returning your promise.  Why are you using a timeout?  Try to give a real world example.  Are you trying to understand just how this middleware works in general or a specific use case for you?

@nmaves sorry for the confusion, I'm using the timeout for simulating network delay and in my case I do return the promise... Don't know why I haven't included it in the example.

Not sure I understand what you are looking for but I can take a stab at it.  I can try and give you a complex example and see where we can go from there.  Below is a thunk that returns a new Promise.  Next, you can dispatch a login request.  When that is complete we can issue two more requests in parallel and wait for their results to then finally fulfill the original promise with the user object from the first request.
export const login(username, password) {

  return (dispatch) => {
    return new Promise(resolve => {
      dispatch({
        type: 'LOGIN',
        payload: {
          request: {
            url: '/login'
          }
        }
      }).then(response => {
        const {
          user
        } = response.data
        Promise.all([
          dispatch({
            type: 'FETCH_USER_SETTINGS',
            payload: {
              request: {
                url: '/user/settings'
              }
            }
          }),
          dispatch({
            type: 'FETCH_USER_FAVORITES',
            payload: {
              request: {
                url: '/user/favorites'
              }
            }
          })
        ]).then(([
          userSettingsResponse,
          userFavoritesResponse
        ]) => {
          resolve(user)
        })
      })
    })
  }

}

@nealoke does this answer your question?

Closing this at there was no response from the OP.

@nmaves sorry for the delayed response (was on vacation) :). But I kinda moved to simpler approach, so I'm not using this anymore. Thanks for the effort and time! 👍

authors: nealoke nmaves

repo: svrcekmichal/redux-axios-middleware


text:
Same-name files not detected in multi-root workspace

Steps to reproduce.

Create a multi-root workspace with "Add folder to workspace". The workspace will now have two folders in its root, unrelated to each other (as example, C:\FolderA and C:\FolderB).
Save a note with the same name in both folders (say a.md). Type different texts inside them just to tell them apart.
Type [[: autocomplete will show both notes, but the actual linking will use the short location.
When clicking on the link, only one of the note (I assume "the one that comes first after paths sorting", as explained in this issue) will actually open.

The description of the memo.links.format mentions "unique across the workspace", but from the behaviour I described, it feels like it is only checks "within the same folder".

Hi, I think current behavior that it will use the first inferred workspace amongst workspaces, I haven't tested it with multiple workspaces, also there was no solid use-case to support it, f.ex my knowledge base resides in a single workspace.

authors: dnabb svsool

repo: svsool/vscode-memo


text:
Update Guava to latest release

Hi,
It's possible to update guava to latest release, or at least 20+?

Hi @slinkydeveloper  in which version?

authors: gracekarina slinkydeveloper

repo: swagger-api/swagger-parser


text:
Added swagger-express for Node.js

Thanks @webron

Do you have a twitter handle for the announcement?

Hi Ron,
I am sorry as I dun have a Twitter 😄
On Sat, Jan 31, 2015 at 12:43 AM Ron notifications@github.com wrote:

Do you have a twitter handle for the announcement?
—
Reply to this email directly or view it on GitHub
https://github.com/swagger-api/swagger-spec/pull/257#issuecomment-72230363
.

authors: fliptoo webron

repo: swagger-api/swagger-spec


text:
how to discriminate the example in the same model

expect have different tag for example success and how can i make it now ?
type Responce struct {
Code: string, success-example: "200", fail-example: "400"
Data: interface
}

This is a silly question. Swagger documentation is about describing request and response types.

authors: seayuns ubogdan

repo: swaggo/swag


text:
V2: Fix tests after module upgrade

Describe the PR
As guessed, some tests broke after the upgrade of the module to v2.
This fixes all tests that broke during that process
Also fixes #1554

@Nerzal I tried to rebase from the master branch, and I believe something went wrong.

authors: Nerzal ubogdan


text:
Update Tracker Does Not Show Settings Option Nor Work When Enabled

Hi,
I recently installed the Plugin Update Tracker (version 1.5.0). into Obsidian version 1.3.4 on a Windows 10 computer. I had not used this plugin before so it is a fresh install.
After enabling the plugin, there is no option to adjust settings as you can see in the screenshot below:

Additionally, the plugin doesn't show any updates for any plugins. Some updates for my other plugins have been released since installing the update tracked but there has been no notification or anything like that about these updates.
I have tried replicating it in a completely fresh vault on the same PC with no other plugins or changes to settings and it still does not show any way of accessing the settings page.

Thanks for reporting this and trying to debug the issue
The bug's fixed in the latest version 1.5.1

Great, just tested it and it works. Thanks for the quick fix. 😄


text:
✨ issue #141 solved ✨

Pull Request Format
PR Title
Issue #0 : issue @141
Type of PR

Add X in the box to specify the improvement type.
[ ] Bug fix
[X] Feature enhancement
[ ] Documentation update
[ ] Other (specify): ___________

issue#141 solved and hero section code added back.
@swaraj-das please review this PR.
Checklist

Add X in the box to specify.
[X] I have performed a self-review of my code.
[X] I have tested the changes thoroughly before submitting this pull request.
[X] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[X] I have commented my code, particularly in hard-to-understand areas.

Thank you for reviewing my pull request!

@swaraj-das i have fixed the code as per u asked. can you please review this.

@swaraj-das if you can accept this merge i can work on other issues i raised.

repo: swaraj-das/Collect-your-GamingTools


text:
text-input: Don't reject enable requests when unfocused

The prevoius implementation would always raise an error in the following sequence:

→ enter
→ leave
← enable

The text-input type is not equipped to manage the validity of clents' requests, which should be handled in the compositor, as rootston does.
There is one scenario where this error should stay; namely immediately after creating the text input, but handling it introduces additional state and complexity, so I decided against it.
This should also make terminals work again, fixing https://gitlab.gnome.org/GNOME/gtk/merge_requests/369 from the other side.

Thanks!

Thanks for the quick merge!

authors: SirCmpwn dcz-purism

repo: swaywm/wlroots


text:
batched version for users with predefined schedule

👥

Cinnabarrushbicycle780

repo: sweatco/sweat-near-lockup

license: Unlicense


text:
Fix massive memory leak by breaking retain cycle

Any instance of the GenericKubernetesClient is never deallocated because there is a retain cycle between the client and its jsonDecoder through the date decoding closure which references self. This causes massive memory leak, since everything the client creates, will never be freed from memory (most notably the underlying HTTPClient).
My first idea was to use [unowned self] to break the retain cycle. But this is only safe if the decoder will never outlive the client instance. Since the decoder is a package internal property we cannot guarantee it. We could make it private, but then we might as well hide the whole date formatting internals. So, this PR just makes the date formatters owned only by the decoder. This breaks the retain cycle.
Happy New Year ;)

@t089 Hey 👋 thanks for the PR and Happy New Year to you too 🎊 🎉
As you said, the internal jsonDecoder could be private, however, I'll merge this for now and let's see in what direction the internals will develop 👍

@t089 Hey 👋 thanks for the PR and Happy New Year to you too 🎊 🎉
As you said, the internal jsonDecoder could be private, however, I'll merge this for now and let's see in what direction the internals will develop 👍

repo: swiftkube/client


text:
Passing objects between threads

javaMethodLookup() uses the environment attached to the object, probably it should use the ambient (thread-specific) environment.
java_vm_ext.cc:599] JNI DETECTED ERROR IN APPLICATION: thread Thread[23,tid=1783,Native,Thread*=0xb40000718be7eb40,peer=0x1449d000,"Thread-4"] using JNIEnv* from thread Thread[1,tid=1631,Native,Thread*=0xb40000718be307b0,peer=0x72c1eb68,"main"]
                                                                                java_vm_ext.cc:599]     in call to GetObjectClass

It's not a huge issue because I can schedule things on the main thread but, would be nice to not need to do this.

NB: we can also do something Android-specific if necessary, as Android guarantees only one JVM per process.

I just did this for now – https://github.com/PADL/swift-java/commit/2d8c5955d73dce199a343872f05c3efc63e8518c – but obviously it's a workaround. I think I need upstream input as to what the right solution is, whether we remove javaEnvironment completely and always use the ambient environment.

repo: swiftlang/swift-java


text:
Promote _Concurrency and StringProcessing to core subset of the stdlib

This is needed to support Apple internal configurations.
Addresses rdar://125909114

@swift-ci please test

@swift-ci please build toolchain

@swift-ci please test WebAssembly

Yeah, let's go ahead and get rid of EXPERIMENTAL if it makes sense to do so here.

I'd say that a follow up change is better - that allows us to get this change in (possibly cherry-picked to release) while we fix the option naming and test it to ensure that nothing else is dependent on the option name (e.g. windows ci caches).

@swift-ci please test Windows

@swift-ci please build macOS toolchain

@swift-ci please build toolchain macOS

authors: compnerd edymtt stephentyrone

repo: swiftlang/swift


text:
--noop causes DivideByZero many (but not all) times

running scenarios with --noop often (but not always) generates this error:
INFO:Calculating statistics...
Traceback (most recent call last):
File "/usr/local/bin/ssbench-master", line 597, in
args.func(args)
File "/usr/local/bin/ssbench-master", line 256, in run_scenario
report_scenario(args)
File "/usr/local/bin/ssbench-master", line 304, in report_scenario
format_numbers=format_numbers)
File "/usr/local/lib/python2.7/site-packages/ssbench/reporter.py", line 38, in read_results
self.stats = self.calculate_scenario_stats(nth_pctile, format_numbers)
File "/usr/local/lib/python2.7/site-packages/ssbench/reporter.py", line 407, in calculate_scenario_stats
self._compute_req_per_sec(size_stats)
File "/usr/local/lib/python2.7/site-packages/ssbench/reporter.py", line 445, in _compute_req_per_sec
stat_dict['req_count'] / delta_t,
ZeroDivisionError: float division by zero

This occurs when there is only one request reported for a given worker, as all requests will have the start/end time to be the same, this results in the division by zero (1 request/0 seconds to run it). I'll change ssbench to print out inf in such cases.

@timuralp  N/A or undefined might be more appropriate than inf?

@zackmdavis agreed, although "inf" can be represented as a float, whereas the alternative is to configure the report to expect strings and floats for the average requests per second. I'll check how hard that is and if it's non-trivial, I think using "inf" is a reasonable compromise.

Looking at the template, there is no obviously good way to handle this, unless we format the float and store it as a string prior to calling the render_template() method. That would be bad as the majority of numbers would be formatted in the template and one outside of it.
I'm going to fix the immediate badness by using inf and we can do more (lower priority) work if that is too confusing.

authors: ctennis timuralp zackmdavis

repo: swiftstack/ssbench


text:
Add existing thermostat

I have an existing thermostat from Tado and am very satisfied with it. It just can't cool. it would be nice if an existing thermostat could be set for heating then adding a cooling switch for cooling.

Yes, that would be cool. This component can do both without tado.

repo: swingerman/ha-dual-smart-thermostat


text:
Swoft\Rpc\Server\Request getParamsMap方法

Q
A

Bug report?
yes

Feature request?
yes

Swoft version
2.0.7

Swoole version
4.4.16

PHP version
7.2.13

Runtime environment
Mac

Describe the bug
Swoft\Rpc\Server\Request::getParamsMap方法获取的值都是同一个，都是index=0的值
php code
/**
     * @return array
     * @throws ReflectionException
     */
    public function getParamsMap(): array
    {
        $rc       = BeanFactory::getReflection($this->interface);
        $rxParams = $rc['methods'][$this->method]['params'];

        $index     = 0;
        $paramsMap = [];
        foreach ($rxParams as $methodParams) {
            if (!isset($this->params[$index])) {
                break;
            }

            [$name] = $methodParams;
            $paramsMap[$name] = $this->params[$index];
        }
        return $paramsMap;
    }

从以上代码可以看出, $index一直都是0

@stelin

authors: ChangeChe inhere

repo: swoft-cloud/swoft