Best practice to share components style for web and native

Hi there!
I am trying out styled-components for the first time and want to figure out how to share the styles for web and RN. Only the styles, not the components, at least not at this time (unless anyone have a good way for it).
Any suggestions of how to do this better?  #(https://github.com/styled-components/styled-components/issues/315) did not give my any answers
Web
import styled from 'styled-components';
import styles from 'styles.js';

const Wrapper = styled.section`${styles.wrapper}`;

React Native
import styled from 'styled-components/native';
import styles from 'styles.js';

const Wrapper = styled.View`${styles.wrapper}`;

styles.js (shared for web and RN)
const styles = {
  wrapper: {
    background-color: red;
  }
};

export default styles;

I see now that styled-components is supposed to be collocated, but what is the best way to share code for web and native?

import { css } from 'styled-components'

const wrapperStyles = css`
 background-color: red;
`

const Wrapper = styled.View`
  ${wrapperStyles}
`

const Wrapper = styled.div`
  ${wrapperStyles}
`

Thanks for answering, @mxstbr :)
That look like it will do the job, but not only am I wondering about the technical stuff, but best practice to create universal app. I'm starting on a new project with a almost identical web and native, and I want to get it right from the beginning so updating and changing the app on both platforms in the future will be easy :)

#(#315) did not give me any answers

@robbue have you tried the react-native-web project?

@brunolemos I have not tried it, but definitely something I should look further into. Only concern is that it may not be a 1:1 solution(?) or that web and native will be so different in logic that the only thing to share is the styles. But for now this is what what I ended on (for future reference):
styles.js
import { css } from 'styled-components'

// normalize function to give unitless dimensions in RN and px/rem on web
import { normalize } from '../../shared/helpers/commonFunctions'

// env as a static variable (probably a better solution for this)
import settings from '../../settings'

const styles = css`
  width: ${normalize(100)};
  height: ${normalize(100)};
  ${(settings.env === 'web') ? 'background: red;' : 'background: blue;'}
`

export default styles

index.js
import styled from 'styled-components'
import styles from './styles'

export default Box = styled.div`${styles}`

index.native.js (RN platform file extensions)
import styled from 'styled-components/native'
import styles from './styles'

export default Box = styled.View`${styles}`

We've announced an experimental release of styled-components/primitives which makes truly universal components possible.
Read the announcement blog post to learn more, I'll close this issue for now since it's resolved!  https://medium.com/styled-components/announcing-primitives-support-for-truly-universal-component-systems-5772c7d14bc7

Can we re-open this issue for support of react-native-web? Works for me by installing react-native-web and then wrapping react-native components with styled(Text), however, it looks like all of my props are going straight to the DOM node, causing warnings like

React does not recognize the propName prop on a DOM element.

Anyway, great progress so far!

react-primitives, is not the same as react-native-web, stylecomponents primitives is compatible with react-native-web? I do not see anywhere documentation documentation should be created so that people know how to use it.
a greeting

I agree this should be more clear in the documentation. Wrapping RNW components (aliased as RN components be default) with styled() does work, but there arise issues with prop whitelisting not working properly, which causes many props to be forwarded to the DOM. This has caused is all sorts of issues. Using a styled-system approach and especially clean-tag has fixed this and made our universal repo much more productive.

@brunolemos I have not tried it, but definitely something I should look further into. Only concern is that it may not be a 1:1 solution(?) or that web and native will be so different in logic that the only thing to share is the styles. But for now this is what what I ended on (for future reference):
styles.js
import { css } from 'styled-components'

// normalize function to give unitless dimensions in RN and px/rem on web
import { normalize } from '../../shared/helpers/commonFunctions'

// env as a static variable (probably a better solution for this)
import settings from '../../settings'

const styles = css`
  width: ${normalize(100)};
  height: ${normalize(100)};
  ${(settings.env === 'web') ? 'background: red;' : 'background: blue;'}
`

export default styles

index.js
import styled from 'styled-components'
import styles from './styles'

export default Box = styled.div`${styles}`

index.native.js (RN platform file extensions)
import styled from 'styled-components/native'
import styles from './styles'

export default Box = styled.View`${styles}`

Awesome solution.


UI: Prevent listing network offering with external LB for VPC tiers if a n/w already exists

Description
Fixes https://github.com/apache/cloudstack/issues/4985

Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[X] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity
Bug Severity

[ ] BLOCKER
[ ] Critical
[ ] Major
[X] Minor
[ ] Trivial

Screenshots (if appropriate):
How Has This Been Tested?

@blueorangutan ui

@Pearl1594 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

UI build: :heavy_check_mark:
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/4989 (SL-JID-124)

@blueorangutan help

@rhtyd I understand these words: "help", "hello", "thanks", "package", "test"
Test command usage: test [mgmt os] [hypervisor] [keepEnv]
Mgmt OS options: ['centos6', 'centos7', 'centos8', 'ubuntu18', 'ubuntu20']
Hypervisor options: ['kvm-centos6', 'kvm-centos7', 'kvm-centos8', 'kvm-ubuntu18', 'kvm-ubuntu20', 'xenserver-71', 'xenserver-65sp1', 'vmware-70u1', 'vmware-67u3', 'vmware-65u2', 'vmware-60u2', 'vmware-55u3', 'xcpng76', 'xcpng80', 'xcpng81', 'xenserver-74', 'xcpng74']
Note: when keepEnv is passed, you need to specify mgmt server os and hypervisor or use the matrix command.
Blessed contributors for kicking Trillian test jobs: ['rhtyd', 'nvazquez', 'PaulAngus', 'borisstoyanov', 'DaanHoogland', 'shwstppr', 'andrijapanicsb', 'Spaceman1984', 'Pearl1594', 'davidjumani', 'harikrishna-patnala', 'vladimirpetrov', 'sureshanaparti', 'weizhouapache']


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
INFO: /tmp/abs_90povh762_/clone/recipe/meta.yaml:0: gui_app: This may be a GUI application. It is advised to test the GUI.
ERROR: /tmp/abs_90povh762_/clone/recipe/meta.yaml:29: patch_must_be_in_build: patch must be in build when source/patches is set.
ERROR: /tmp/abs_90povh762_/clone/recipe/meta.yaml:34: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_90povh762_/clone/recipe/meta.yaml:35: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_90povh762_/clone/recipe/meta.yaml:35: host_section_needs_exact_pinnings: Packages in host must have exact version pinnings, except python build tools.
ERROR: /tmp/abs_90povh762_/clone/recipe/meta.yaml:35: missing_wheel: For pypi packages, wheel should be present in the host section
WARNING: /tmp/abs_90povh762_/clone/recipe/meta.yaml:75: build_tools_must_be_in_build: The build tool git is not in the build section.
ERROR: /tmp/abs_90povh762_/clone/recipe/meta.yaml:103: missing_pip_check: For pypi packages, pip check should be present in the test commands
ERROR: /tmp/abs_90povh762_/clone/recipe/meta.yaml:126: missing_dev_url: The recipe is missing a dev_url
ERROR: /tmp/abs_90povh762_/clone/recipe/meta.yaml:126: missing_documentation: The recipe is missing a doc_url or doc_source_url
Errors were found


HTML Tag IMG

Is it possible to implement images insertion with IMG tag?
For example, I have a big HTML that I already transform to PDF, and now, I need some feature to transform the same HTML to Doc. This HTML has some  tags with external url.

I would certainly say it is possible to do and implementing the AST class would probably be pretty easy for basic usage. However, the main reason I did not implement it was that inserting an image into a document requires a very large amount of XML markup. This test fixture is an example of the content required for a very simple image with no formatting or alterations.
Now nearly all of that XML is appears to simply be boilerplate markup that doesn't really change from image to image for my version of Microsoft Word. I have no idea how portable that markup is across newer and older versions of MS Word nor the full breadth of attributes that would need to be supported to cover the majority of use cases.

Has anybody got a basic image node working for HTML conversion?


testing eggs-mom

I'm testing your menu for eggs mom, will be nice to use together same tool,
This is about all commands we need for eggs, I need something to put flags too, but at the moment this is not so important.
I added a field descr: as description
syntax is OK, I prefere to use yaml so I installed yq and create mom.json
Well tell me when You have news

No great steps, but perhaps can be interesting the eggs side.
After create a quite complete eggs.json I realized who every build I made I get a .oclif.manifest.json with all the commands, flags, etc.
To have such system can be good for a lot of peoples, oclif is used in very much cases to create CLI tools with nodejs.


gemini init

New gemini folder and notebooks

LGTM. One comment: If we keep the output then also the output for installing the libraries is there.


CircleCI OIDC provider and role

Describe the solution you'd like.

Would you accept a pull request implementing CircleCI OIDC provider and role like for GHA?
Describe alternatives you've considered.

Keeping it to myself, rather than sharing with the community :)
Additional context

As the PR is open, should we keep this one?

We can have a PR for the generic support and close this issue.


Error CS0176: Member 'ImagesClass.ImagesLoaded' cannot be accessed with an instance reference; qualify it with a type name instead

On Build, a fatal error with Code CS0176 and Description "Member 'ImagesClass.ImagesLoaded' cannot be accessed with an instance reference; qualify it with a type name instead" shows up in WPFMultiImage\slnWPFMultiImage\WPFMultiImage\MainCode.cs at Line 13 Column 9.

Thanks for letting me know. I'm not code complete yet. I know it doesn't work.Should I have waited to update GitHub until it did?Or mentioned that on Twitter?-Wm
On Friday, January 14, 2022, 12:12:07 PM EST, Pierre Plourde @.***> wrote:
On Build, a fatal error with Code CS0176 and Description "Member 'ImagesClass.ImagesLoaded' cannot be accessed with an instance reference; qualify it with a type name instead" shows up in WPFMultiImage\slnWPFMultiImage\WPFMultiImage\MainCode.cs at Line 13 Column 9.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

I would not have committed code that didn't build. Keep in mind that if you scaffold out a method but can't get to the actual meat of it, you can just say "throw new NotImplementedException()" and your code will build just fine. No need to wait for it to run to commit, but it should at least build, generally, at least in my opinion.


init-tls-secret image exec /bin/sh: exec format error

Describe the bug
A clear and concise description of what the bug is.
init-tls-secret image does not appear to be multi-arch by default.
To Reproduce
Steps to reproduce the behavior:

Attempt helm install on an arm64 cluster

Expected behavior
Helm chart installs without issue
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The default image appears to be alpine/openssl, which not only is not multiarch, but has not been built in more than 3 years.
If you need a prebuilt container with openssl installed, the docker nginx container is relatively small, is multiarch, has openssl, and is updated frequently.
Alternatively I'd be happy to submit a PR that uses GitHub actions to regularly build a multi-arch alpine-based openssl container and stores it in GitHub container registry.

Yeah I know , I noticed it when I implemented the feature that's why you can configure this under customTls.image.repository
I was a bit lazy 😁
Feel free to maybe create a repo with what you suggest , if you don't want to own it you can transfer the ownership to me.
I think it best to separate the container creation from this chart and have them into separate repo


Files and directories are invisible to SWC plugins

Describe the bug
I'm trying to create/write a file from my SWC plugin executed by Next.js, but I keep getting the same error Os { code: 44, kind: NotFound, message: "No such file or directory" }. Is it possible, in the first place, to read/write files with SWC plugins run by Next.js?
Input code
No response
Config
No response
Playground link
No response
Expected behavior
As mentioned.
Actual behavior
No response
Version
swc_core: 0.28.15, next: 12.3.2-canary.16
Additional context
No response

Solved thanks to this https://github.com/swc-project/swc/discussions/4997.


Helper features for Name and Type

CI fails on macOS :thinking:
error: failed to run custom build command for `libfuzzer-sys v0.4.7`
[…]
  cargo:warning=libfuzzer/FuzzerDefs.h:14:10: fatal error: 'cassert' file not found
[…]
  error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "--target=x86_64-apple-darwin" "-mmacosx-version-min=10.7" "-Wall" "-Wextra" "-std=c++17" "-fno-omit-frame-pointer" "-w" "-o" "/Users/distiller/project/target/debug/build/libfuzzer-sys-82fe81b55dd69567/out/libfuzzer/FuzzerTracePC.o" "-c" "libfuzzer/FuzzerTracePC.cpp" with args "c++" did not execute successfully (status code exit status: 1).

This also happens on main: https://github.com/apollographql/apollo-rs/issues/740


Issue with Inserter and wrong count of total rows in Clickhouse

Hi, i have noticed a problem, but not sure is it related to lib, or to my misunderstanding of Clickhouse.
This is what i do

I have a producer that produces event to Kafka.
I have consumer that consumes events from Kafka, and insert them to Clickhouse with Inserter (endless inserter).
I produced exactly one million of messages.
Consumer reads exactly one million of messages.
Logger logs that Clickhouse inserted one million messages!
When i query COUNT(*), i get about 1/3 of them (383718 rows).

How consumer works
Consumer works as following:

Loop
Read event from Kafka
Transform it to struct that will be inserted into Clickhouse
Call write().await
Call commit().await (for every message)
Log result of commit, if some rows was inserted.

This is a function that logs commit calls:
pub fn log_inserted_records(v: clickhouse::error::Result<Quantities>) {
    match v {
        Ok(Quantities { entries: 0, transactions: 0 }) => debug!("nothing to insert"),
        Ok(Quantities { entries, transactions }) => /* if entries > 0 || transactions > 0 => */ {
            info!("inserted {} entries in {} transactions", entries, transactions)
        }
        Err(e) => error!("error while inserting rows: {e}"),
        _ => panic!("BUG: must not get here"),
    }
}

The most interesting part, is that as per logs, i've got a exactly 1 million of messages inserted. However, when i query Clickhouse, i got about 1/3 of them (383718 rows).
Also, i have a tokio ticker, that ticks every 5 seconds, so when a batch of inserts is incomplete, i will call commit to flush them due to interval.
Clickhouse setup
Clickhouse works in cluster mode with two shards, and one node in each shard. I insert all data into Distributed table, and it splits with rand() insertion to ReplicatedMergeTree tables.
I run all queries through distributed table (both SELECT and INSERT). When i query physical table (ReplicatedMergeTree, bypassing Distributed), a have 190480 rows, that is 1/2 of all rows that returned by Distributed table.
What i have tried

OPTIMIZE TABLE my_physical_table FINAL; on both shards. No success.
Each message contains increment number, to exclude COUNT() issues, but i see that messages has gaps (999999, 999995, 999991, etc.)
Checked Clickhouse logs, nothing interesting, level=WARN.

Context

clickhouse/clickhouse-server:latest
Crate version: clickhouse = "0.11.5"

Questions
Any ideas what could be the reason, and what else can i check?

I simply forget that my MergeTree table has a TTL 90 days, and my faker that generates fake data that generates data older than 90 days, so 1/3 of rows was simply expired and dropped immediately. Close due to my fault.


feat: replace mpstat with reading /prc/stat

Description

This PR changes following:

replaces mpstat command with reading /proc/stat for performance.
Treads that publish /diagnostics and reading cpu information are separated.

Related links

Tests performed
Confirmed that memory information is almost same as mpstat command.
Confirmed that publish /diagnostics at 1 Hz even when reading some information is timed out.
(This is confirmed by inserting sleep() in function reading some information.)

Confirmed that cpu usage information is almost same as mpstat command.
TODO: exception handling, performance
Notes for reviewers

Interface changes

Effects on system behavior

If it takes long time to read some cpu information, /diagnotics is not the most up-to-date information.
In the case, timeout can be determined only after reading process is completed.
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[ ] I've confirmed the contribution guidelines.
[ ] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR follows the pull request guidelines.
[ ] The PR has been properly tested.
[ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@TetsuKawa @ito-san Do you still need this modification?

@mitsudome-r
This is deprecated change.
Thank you for your announcement！


Cursor jump and scroll when switching between splits -- and highlights intervening code

The set up: vertical split, same file in both panes, but different positions in file.
The problem: clicking† in a pane switch focus panes sometimes‡ causes the cursor to jump, and sometimes selects the code in between the original cursor position and the jumped-to position.
† switching focused split via keyboard shortcut never causes this problem
‡ maybe 10% of the time, and in half of those the selection issue also occurs
I doubt the "10%" is random; there must be something concrete causing it to happen (like maybe something is selected in the un-focused pane), but all I've discovered so far is that it's only tied to click-switching.
When did it start?  At least a month ago.
Related issues: searching for this issue revealed sort-of-maybe-related issues in conjunction with VSCode Vim, but I'm not using that, or the Vim extension.  I'll list them here, just in case:
https://github.com/VSCodeVim/Vim/issues/2688
https://github.com/VSCodeVim/Vim/issues/3455
https://www.reddit.com/r/vscode/comments/8tv41k/independent_cursors_with_split_panes_on_the_same/
I wish I could give 100% reproducible steps... any suggestions for how to test this issue more systematically are welcome!
OS X 10.13.6
VSCode Version: 1.40.1
Commit: 8795a9889db74563ddd43eb0a897a2384129a619
Date: 2019-11-13T16:47:44.719Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 17.7.0

/needsMoreInfo Can you reproduce the problem when you have all extensions disabled?

Update: I've working with extensions disabled today, and I am not experiencing the problem.
However, the problem is intermittent, so I can't be sure that extensions-disabled is "proof" that it's an extension-related problem.
Any suggestions for how I can provide more information or systematic testing are welcome.

@ultraGentle thanks for following-up. The VIM issues you are referring to have already been fixed in the VS Code VIM extension,  so they are not related.
Can you include the extensions you are using (code --list-extensions).

Extensions below.
Another hypothesis is that the "jump" could be related to the setting "Cursor: surrounding lines," which I have set to "10."  Some small evidence for this is that the number of lines erroneously selected is always roughly 10 or fewer -- never more than a full screen's worth, certainly.
That said, as requested:
Installed extensions (not all of these are enabled, but I didn't see a way to filter for that):
2gua.rainbow-brackets
albert.TabOut
albymor.increment-selection
Anjali.clipboard-history
arthurwhite.white
benjavr.jshintrc-generator
bierner.comment-tagged-templates
cdes.wrap-with-template-string
chunsen.bracket-select
closedcontour.very-smart-select
cmstead.jsrefactor
CoenraadS.bracket-pair-colorizer-2
dbaeumer.jshint
dbaeumer.vscode-eslint
donjayamanne.githistory
eamodio.gitlens
ecmel.vscode-html-css
eg2.tslint
esbenp.prettier-vscode
formulahendry.auto-rename-tag
formulahendry.code-runner
fosshaas.fontsize-shortcuts
gebilaoxiong.vscode-flatland-icon-theme
gerane.Theme-Github
Gruntfuggly.activitusbar
Gruntfuggly.scoper
Gruntfuggly.todo-tree
Gruntfuggly.ubertab
gtwsky.oolory
HookyQR.minify
huizhou.githd
ispushkin.pushkin-is-white-theme
jasonlhy.vscode-browser-sync
jeremyrajan.browsersync
josee9988.minifyall
letrieu.expand-region
lukapetrovic.image-resizer
mhutchie.git-graph
morissonmaciel.typescript-auto-compiler
mrmlnc.vscode-autoprefixer
ms-vscode.vscode-typescript-tslint-plugin
msjsdiag.debugger-for-chrome
olback.es6-css-minify
ow.vscode-subword-navigation
plibither8.remove-comments
pranaygp.vscode-css-peek
pustelto.bracketeer
ritwickdey.LiveServer
ryu1kn.partial-diff
ryuta46.multi-command
sashaweiss.bracket-jumper
saviorisdead.Theme-GitHubCleanWhite
Shan.code-settings-sync
SirTori.indenticator
sohamkamani.code-eol
sporiley.css-auto-prefix
streetsidesoftware.code-spell-checker
thomaspink.theme-github
toba.vsfire
usernamehw.errorlens
v4run.transpose
vincaslt.highlight-matching-tag
VisualStudioExptTeam.vscodeintellicode
vittorioromeo.expand-selection-to-scope
vmsynkov.colonize
WallabyJs.quokka-vscode
webreflection.literally-html
xyz.local-history
yuichinukiyama.vscode-preview-server

Just to follow up, this cursor-jump behavior sounds similar to #70306.
As suggested in that thread, I have have attempted disabling user settings related to "global find clipboard," to see if this is the same bug, or a different one.

@ultraGentle let me know if disabling global find clipboard works for you.

It has not happened since I disabled "global find clipboard."

Best workaround I've found so far is to only enable one of these settings:
    "search.globalFindClipboard": false,
    "editor.find.globalFindClipboard": true,

This issue was triggered by sharing find query in multiple find widgets and automatic search.


Padding issue with latest waybar?

There're multiple issues created but with current 0.9.15-2 on archlinux, still not fixed for me.
I had to downgrade both spdlog from 1.11 to 1.10.0-3 and waybar from 0.9.15-2 to 0.9.13-2.
idk why most of issues closed, but I'd rather keep this here to track the issue.

For others in the same position, here's a single command to downgrade on Arch:
sudo pacman -U https://archive.archlinux.org/packages/w/waybar/waybar-0.9.13-2-x86_64.pkg.tar.zst https://archive.archlinux.org/packages/s/spdlog/spdlog-1.10.0-3-x86_64.pkg.tar.zst

to downgrade without local files: paru -Sy downgrade; sudo downgrade spdlog; sudo downgrade waybar

Closed as reverted


⚠ Bofrost.at has degraded performance

In 47ff2bd, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1089 ms

Resolved: Bofrost.at performance has improved in 7ca218f.


CI Pipeline should validate swagger

Is your feature request related to a problem? Please describe.

We should add a step to our CI pipeline that validates the swagger.yaml
E.g. https://github.com/go-swagger/go-swagger/blob/master/docs/usage/validate.md
Describe the solution you'd like

Describe alternatives you've considered

Additional context

I am closing this as I no longer think it is a high priority.


lncli openchannel fix

A minor fix which resulted from https://github.com/lightningnetwork/lnd/pull/8896.
Basically when opening a channel in the non-blocking case we would still keep a goroutine open on the LND server side although the lncli part would already have been exited after the funding transaction was broadcasted to the mempool. For this case we should use the OpenChannelSync API rather than the async call.
I verified the behavior on regtest and we would indeed keep a goroutine until the channel reached its MinDepthHeight.
EDIT: Moreover we add a itest for the OpenChannelSync cmd.

@bitromortac: review reminder
@yyforyongyu: review reminder

@bitromortac: review reminder
@yyforyongyu: review reminder

@bitromortac: review reminder
@yyforyongyu: review reminder

@bitromortac: review reminder
@yyforyongyu: review reminder

@yyforyongyu: review reminder
@bitromortac: review reminder

@yyforyongyu: review reminder
@bitromortac: review reminder

!lightninglabs-deploy mute


OpenAPI agents did not execute tools

I'm using OpenAPI agents to access my own APIs. and the LLM I'm using is OpenAI's GPT-4.
When I queried something, LLM just answered not only Action and Action Input, but also Observation and even Final Answer with fake data under API_ORCHESTRATOR_PROMPT.
So the agent did not work with api_planner and api_controller tools.
I am wondering is API_ORCHESTRATOR_PROMPT or FORMAT_INSTRUCTIONS prompt stable?
I tested the Agent Getting Started, and got bad answer from llm directly without tools sometimes, ether.
or am i missing something important?
or should i rewrite the prompt?
thanks

@dosu-beta I faced the similar issue, I was connect to IBM watsonx with langchain agent. In the past, it worked fine, but I tried to update langchain to the latest version, the tool was not triggered. And the answer is coming from big language model. Please let me know what I missed? Thank you!

Hey @wangqiang-kubota as of now Dosu only responds to the author of issues. Can you share a code snippet? In general, the downside of agents are that they are probabilistic. It's not uncommon for tool use to fail even with larger models. I suggest modifying the prompts (or tool descriptions) if possible


How to extend display to entire screen on an 800x480 screen

Question
Is there a way to set up the display to take up all the space on an 800x480 screen with the Squareline Simple Wi-Fi Clock Example?
It is stated that the example is suitable for 800x480 resolution, but this does not appear to be the case. In fact, the graphic interface occupies only the central part of the screen.
https://github.com/esp-arduino-libs/ESP32_Display_Panel/blob/9d1cc1e0319d03a2b215d5b1588f11054c30d3f0/examples/SquareLine/v8/WiFiClock/README.md?plain=1#L3
Tested with CrowPanel 7.0" board

Hi @lboue, I'm really sorry. This example is mainly used to demonstrate how to develop using the UI exported by Squareline. Initially, to be compatible with the 320x240 resolution, the UI elements are relatively small. Even if we extend their positions to fit the entire 800x480 screen, it would look uncoordinated.

Hi @lboue, I'm really sorry. This example is mainly used to demonstrate how to develop using the UI exported by Squareline. Initially, to be compatible with the 320x240 resolution, the UI elements are relatively small. Even if we extend their positions to fit the entire 800x480 screen, it would look uncoordinated.

If this is the case, shouldn't the explanations in the README file be modified?

You are right. We can add some explanations to remind users about this issue.


Julia package not listed in Atom

Hello
I have a similar problem to what it was reported in https://github.com/JunoLab/atom-julia-client/blob/master/keymaps/julia-client.cson#L76
To wrap up: I have the Julia client and language-julia packages installed but Atom in not showing the Julia folder under Packages --> Julia. I tried to open the console with the commands cmd+j cmd+o/ctrl+j ctrl+o but I was not able to succeed. I also tried to uninstall/reinstall the packages with no success.
Any suggestion?
Thanks!

It seems like I forgot to erase some of the "hidden" files from Atom. I have now cleaned it following the process in: https://discuss.atom.io/t/how-to-completely-uninstall-atom-for-mac/9084


Refactoring Support of external Files

Using Change All Occurrences in vscode refactors code base within the file. But other classes from external source that is referencing the class is not in the scope of the said action. After clicking Change All Occurrences   only local file are affected. This may cause a discrepancy in other file that uses this class.

"Change All Occurences" has no corresponding LSP method, the language server cannot provide any help here. There are open issues at the LSP repo for refactoring support, I suggest you direct your feedback there


fennel stdio client in conjure cause neovim to block forever?

Steps to reproduce
Here's the minimal init.lua to reproduce:
require('packer').startup( {function()
  -- Packer can manage itself
  use 'wbthomason/packer.nvim'
  use {'Olical/conjure', commit="8dedf17ad815ce78122c22d25e93777e3f2d8cfe"}
end, config = {
  git = {
    default_url_format = "https://hub.fastgit.org/%s"}}})

vim.g["conjure#filetype#fennel"] = "conjure.client.fennel.stdio"

Then start neovim and install all plugins, and open some fennel file, then the neovim get stucks and nothing will happen, except I manually stop neovim with <C-c>, even the UI rendered by neovim is left in the terminal...
Some information

neovim version:

NVIM v0.6.0-dev+98-ga5c25e4f3
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az87-30

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info

fennel: Fennel 0.10.0-dev on Lua 5.4
OS : Linux arch 5.13.6-arch1-1 #1 SMP PREEMPT Thu, 29 Jul 2021 00:21:06 +0000 x86_64 GNU/Linux

Hmm this is working absolutely fine for me 🤔 do you have fennel installed through luarocks, added it to your path and have a working lua instance?

I've installed it through AUR, which can be required from lua REPL.
I just tired out install fennel via luarocks
sudo luarocks install fennel

However, this results in the same bug ...

So if you run fennel in your terminal it launches the REPL fine?

Yep

I've found that it's not blocking all the way, but make every key stroke lags, and most of the keystrokes are not responded...
Here's a video

Hmm, could you share the output from your Fennel REPL? Mine is:
Welcome to Fennel 0.10.0 on Lua 5.2!
Use ,help to see available commands.
Try installing readline via luarocks for a better repl experience.

I'm wondering if that readline part is an important difference 🤔 I'm also wondering if this is related to https://github.com/Olical/aniseed/issues/53
I can't reproduce either, so maybe if I can find a similarity between the two I can spot the issue. Or at least have some sort of clue.

I'm having the same issue.  It seems to only happen when the stdio REPL is used (which I just tried for the first time today):
vim.g["conjure#filetype#fennel"] = "conjure.client.fennel.stdio"
When run through Aniseed it seems to work for the most part.  I also have readline installed @Olical but that doesn't seem to help.  Here's my welcome message:
; Sponsored by @martinklepsch ❤
; --------------------------------------------------------------------------------
; "fennel" (started)
Welcome to Fennel 0.10.0 on Lua 5.4!
Use ,help to see available commands.

The reason I tried using the stdio REPL is because require wasn't working for me.  I'll open another ticket on it.

Ahh actually readline is the issue.  I tried uninstalling it and it works great.  The relative .fnl require also works for me now.
I wonder if there's an easy way to start fennel without loading readline?

I just asked about this on their Matrix channel and the main developer of Fennel (technomancy) about this and he said:

conjure should be setting TERM=dumb if it's running in a context that can't handle readline

Fantastic! Thank you for finding this! Will do.
On Thu, 12 Aug 2021, 18:50 Thiru, @.***> wrote:

I just asked about this on their Matrix channel and the main developer of
Fennel (technomancy) about this and he said:
conjure should be setting TERM=dumb if it's running in a context that
can't handle readline
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Olical/conjure/issues/232#issuecomment-897839310, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AACM6XLX4V3BC6QJCZPBKX3T4QCVPANCNFSM5BLNEQCA
.

I've pushed a change to develop that hopefully addresses this in a fairly blanket way. Let me know if it looks better for you on the develop branch!

A lot better! Thanks a lot!

Excellent! Thank you!


delete obsolete doc data

what happens to the digest?

Per out-of-band conversation, it was decided that using the latest z-stream release of the ubi-minimal:8.4 base image was acceptable.  This is performed here: https://github.com/redhat-et/microshift/blob/a3c8051cf1bbe5c70eede8dc9073984a96bcc077/Makefile#L88 when maked is called by release.sh.


UI Elements Overlap on iOS 14 and 15

Hi,
Firstly, thanks for your work on this library - it's been incredibly useful.
I've noticed an issue where UI elements are overlapping when the library is used on iOS 14 and 15. The same problem doesn't appear on iOS 16. Here are some screenshots to illustrate:
See iOS version at the top of each simulator, from left to right (iOS 14.x, iOS 15.x, iOS 16.x)

                WrapLayout(horizontalSpacing: 4, verticalSpacing: 8) {
                    Text("First")

                    HStack(alignment: .center, spacing: 0) {
                        Text("Top content")

                        Text(",")
                    }

                    HStack(alignment: .center, spacing: 0) {
                        Button {

                        } label: {
                            Text("Underlined 1.")
                                .underline()
                        }
                        Text(",")
                    }

                    Text("and")
                    Button {

                    } label: {
                        Text("Underlined 2")
                            .underline()
                    }

                    Text("Post prefix text")
                }

If you could suggest any possible workarounds, that'd be very helpful. Alternatively, if you could point me to the relevant part of the codebase, I'd be more than happy to look into a fix.
Looking forward to your response.

I have added code sample for the attached screenshots above.
Mind having a look?  @muukii


use with library with radio receiver

I'm trying to use this library to receive signals with generic 433mhz receiver (sender is a door sensor operating on the same freq). it seems like set_async_interrupt runs a lambda on another thread and will reset interrupt handler back to none, so that next interrupt doesnt trigger any lambda.
However radio receiver will trigger many interrupts, so I was wondering if you could provide a useful example of how to handle these signals

Thanks for giving rppal a try! I'm not sure I correctly understand the issue. Normally you would call set_async_interrupt only once to configure the appropriate trigger and handler, after which the handler will execute on another thread any time the interrupt triggers. Are you calling that function multiple times instead?
Alternatively, you can use synchronous interrupts instead and block the current thread if that's more appropriate for your situation. In that case, you would call set_interrupt once to configure the interrupt trigger, and then call poll_interrupt any time you would like to block until it's triggered.
If I'm misunderstanding the problem, please include a snippet of the code you're currently using and a description of what you expected to happen, and what is actually occurring.
Thanks!

Thank you for a quick reply. I refer to this snippet in the documentation:
Any previously configured (a)synchronous interrupt triggers for this pin are cleared when set_async_interrupt is called, or when InputPin goes out of scope. - which gave me the impression that interrupt trigger would only be called once, then cleared, and so if I want it to continuously keep triggering I need to call set_async_interrupt again and again after each trigger.. maybe I'm misunderstanding API ?

Ah I understand your confusion now. Perhaps I need to rephrase that part of the documentation to make it more clear.
You only need to call set_async_interrupt once to configure the interrupt trigger. After that, it will keep getting triggered and execute the callback until clear_async_interrupt is called or the InputPin goes out of scope, so you don't have to call it again yourself.

Thank you for your explanation, I'm happy to close the issue, or keep it open until you update documentation.

Let's keep it open for now as a reminder to update the documentation. 😁


iOS: Back button double overlaid on iPhone

This screenshot came from TestFlight feedback. No idea how they got it there but some code path may be missing an iPhone check.

I can't reproduce this, or determine a way it could occur (obviously it did, but no idea how). Maybe it was some edge case that has already been fixed. So I'll close it; feel free to re-open if anyone else reports it.


The message text shows as messy code after inputting a specific message with 'Encode message body in Base64' unchecked

Storage Explorer Version: 1.8.0_20190425.8
Platform/OS: Linux Ubuntu/macOS High Sierra/Windows 10
Architecture: ia32/x64
Commit: f43a9ee4
Regression From: Not a regression
Steps to reproduce:

Expand a storage account -> Queues -> Create a new queue.
Select 'Add Message' -> Input a specific message like '123q' and uncheck 'Encode message body in Base64' -> Click 'OK'.
Select 'View Message' -> check the 'View Message' dialog.

Expect Experience:
No messy code shows and indicate 'This message is stored with no encoding'.
Actual Experience:
Show messy code and still indicate 'This message is encoded in Base64'.

Seems to only repro if the message starts with a number.

Putting feature request tag back on. Basicially, we use a regex to see if a string is a valid base 64 string. It's not impossible that a user would store a string in a queue message that is not supposed to be a base 64 string but looks like one to our regex. So, to "fix" this issue, we could add a option in the 'View Message' dialog to alternate between raw and base 64 decoded views.
So, moving this to a later milestone.


General info, project goals, status

From @austindrenski on Monday, September 4, 2017 8:49:33 PM
I'm working on some reverse proxy middleware for my day job and wanted to get an understanding of where this project is at—and where it is going—to see if there is potential to get involved.
After looking through the samples/unit tests/issues, I have a few questions about the goal of the project and its current status.
Project goals
#20 from April 2016:

This implements a reverse proxy for forwarding incoming requests to back-end services

From the samples and unit tests, it looks like this middleware would be configured for an edge server that would pass requests back to one port on one host identified by the ProxyOptions class.
If this is the case, how would one hook multiple back-end services into the edge server?
For example. given services A, B, and C running on different hosts—and for that matter listening on different ports—how would I use the current project to hook them into a single endpoint
Project status
I can see there are a handful of active contributors and a pair of lengthy PRs in progress. But the last Nuget package went out 10 months ago.
Does the project team see this repo as moving toward a production version, or is this for experimentation? If it is moving toward production, is there a target for a 1.0 package release? Or a list of features/issues that need to be built/fixed before then?
Copied from original issue: aspnet/Proxy#67

From @muratg on Thursday, September 28, 2017 10:30:21 AM
cc @glennc @DamianEdwards

Unintentional close caused by merging unrelated git history. Re-opening and moving to AspLabs.


Move the definition of function parseFile to where it is called

The only place that calls parseFile, which is in parser/interface.go, is parser/parse.go.  This PR moved the function definition of parseFile to parser/parse.go.
This PR also moves type Mode to parser.go and removes the commented out function definition of parseExpFrom.  By doing so, we can remove the file parser/interface.go, and left two files:

parser/parse.go, and
parser/parser.go.

The latter is by-definition a parser, and the former is indeed a source code rewriter, which rewrites the Go+ source code into a form that is acceptable by the Go parser, which is used by parser.go.

The value of PR is not clear enough.


Unclear how choose 'ngx-translate.lookup.resourcesPath'

I don't understand what can I type for relative path for  'ngx-translate.lookup.resourcesPath'?
structure of my project:
Project folder( with package.json)/src/app/assets/i18n/en_US.json
(src, app - standart structure of angular project)

I haven't tested it with relative paths, all usages have been full path. I can provide this though.

I have published a new extension version 1.1.2 for this PR. Thanks

Oh, cool! Thank you. Now it became clear.


Add support for SPDX SBOM format

What would you like to be added:  Please add support for SPDX
Why is this needed:  There is an ecosystem of open source projects that have adopted this format, and it would be great to let this community be able to work with your tools as well.
Additional context:
Details on the format can be found at: https://spdx.github.io/spdx-spec/
Happy to work with anyone interested in doing the port,  I just lack the "go" programming chops to submit a PR in myself.

@kestewart we're definitely interested in getting SPDX support in syft. Lucky for us it seems there is a go package for expressing packages and other artifacts in memory as well as writing them to a document.
The tasks at hand are:

Create a new "presenter" object that implements the Presenter interface. There are examples of various implementations here in subdirectories. This is where most of the work would be, but essentially it's about translating fields from the pkg.Package struct for each package in the catalog and adding it to a new spdx. Package2_2  struct, and adding these new structs to a spdx. Document2_2 struct.
Add a new presenter option and corresponding case to the switch statement
Add a unit test for scanning an image as well as another for scanning a directory (the other presenters have examples of how to load test data and invoke the presenters).
Update the README.md to let folks know it exists :)

We haven't prioritized this work yet, but happy to work with you on a PR if you're itching to dive into some go-code! Feel free to reach out on the toolbox-dev slack channel for a more realtime chat about it as well.

Just curious if there's been any updates here.    Unfortunately,  I don't have the right go-code chops to pull together a PR,  but happy to collaborate with anyone interested in working on this, and helping on the how to express this in SPDX.

Hi @kestewart! No movement on this yet, but this is definitely something we want to add. We're hoping to get some time to look at this soon...

@luhring @kestewart  I've started a branch with draft support for spdx at https://github.com/anchore/syft/compare/add-spdx-support
go run main.go my-image:latest -o spdx

There is still a lot of missing information and a lot of opportunity to add already cataloged metadata, but it's a start!

@wagoodman - any questions you need answered to help move this forward?   In case you don't know, there's https://tools.spdx.org/app/validate/ which will let you validate any doc you're generating.

@kestewart thanks for the heads up with the validate tool --definitely used that during development. After going through plugfest and getting feed back from other conversations, we're going to tackle adding SPDX support in a couple different ways. First by adding basic package support, then a follow up to enhance the output by adding more optional fields (rich package-to-package relationships, files owned, etc.). This issue will represent the former with initial SPDX support for the Tag-Value and JSON formats, making another issue shortly to capture a follow up.
Right now I'm adding tests and polish to the draft implementation that was used for plugfest and hope to get a PR opened soon 🎉 .


Support describe all and show proc command for hudi table

What type of PR is this：

[ ] bug
[x] feature
[ ] enhancement
[ ] others

Problem Summary(Required) ：

support describe <hudi_table >all command
support show proc <hudi_table> command

[FE PR Coverage check]
:disappointed: fail : 3 / 23 (13.04%)
file detail

path
covered line
new line
coverage

:large_blue_circle:
com/starrocks/common/proc/TableProcDir.java
0
3
00.00%

:large_blue_circle:
com/starrocks/common/proc/HMSTablePartitionsProcDir.java
0
10
00.00%

:large_blue_circle:
com/starrocks/catalog/HudiTable.java
0
1
00.00%

:large_blue_circle:
com/starrocks/external/hive/events/MetastoreEventsProcessor.java
0
2
00.00%

:large_blue_circle:
com/starrocks/sql/optimizer/OptimizerTraceUtil.java
0
2
00.00%

:large_blue_circle:
com/starrocks/sql/Explain.java
0
1
00.00%

:large_blue_circle:
com/starrocks/catalog/Catalog.java
0
1
00.00%

:large_blue_circle:
com/starrocks/common/proc/TablesProcDir.java
1
1
100.00%

:large_blue_circle:
com/starrocks/catalog/HiveTable.java
1
1
100.00%

:large_blue_circle:
com/starrocks/analysis/DescribeStmt.java
1
1
100.00%


[Bug Report]: MultiCompiler crashes with parallelism = infinity

System Info
All
Details
The MultiCompiler currently sets parallelism to INFINITY, which makes the Rspack Compiler go into an inconsistent state and spawns threads until it run of threads and crashes.
We can set parallelism = 1 to fix this.
Relates to

https://github.com/web-infra-dev/rspack/issues/2448
https://github.com/web-infra-dev/rspack/issues/2431

Reproduce link
https://github.com/tbranyen/rspack-webpack-example/commit/22b741f5080a3a64da044cb58b7f4642fbfd5b58
Reproduce Steps
See repro in https://github.com/web-infra-dev/rspack/issues/2448

we should separate this to two tasks:

workaround multi-compiler problems by set parallelism @Boshen
investigate multi compiler instance coexist problem @h-a-n-a


Identify section of texts which need to be updated for Harvard and propose the needed text

Please comb through the static ui pages at pass.jhu.edu and identify places that are currently JHU specific. These are the places we'll need to swap out/update to make the UI appropriate for Harvard instance.
Where needed, please propose Harvard specific text to be used on the instance.
Please record the work of this ticket here https://docs.google.com/document/d/1JAUPKianBeQO-IC82waBPg1mdsU9kTDc0YQth2ptcac/edit

Some comments on these pages have been recorded in the above document.

thank you @jrmartino

thank you. this was helpful.


Column support for array_to_string

Which issue does this PR close?

Ref https://github.com/apache/arrow-datafusion/issues/6804
Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Note
Revert array.slt changed by #6595

I think those are good suggestions but as you said we could improve them
iteratively. I think we can merge this PR for now! 🙂
On Sat, Jul 15, 2023, 4:58 AM Andrew Lamb @.***> wrote:

@.**** approved this pull request.
Thank you @jayzhan211 https://github.com/jayzhan211 and @izveigor
https://github.com/izveigor
I think there are some improvements / issues with the code in this PR.
However, I think it is a step forward for datafusion and I think we can
merge it and keep iterating on master.
I defer to your preference. Let me know what you want to do
In datafusion/physical-expr/src/array_expressions.rs
https://github.com/apache/arrow-datafusion/pull/6940#discussion_r1264167397
:

           let s = s.strip_suffix(delimeter).unwrap().to_string();

           res.push(Some(s));

I am not quite sure if it is sure that delimiter is always present. If it
is not, this code will panic.
Perhaps it could be something like the following to aavoid the unwrap?
⬇ Suggested change

           let s = s.strip_suffix(delimeter).unwrap().to_string();

           res.push(Some(s));

           let s = s.strip_suffix(delimeter).unwrap_or(s).to_string();

           res.push(Some(s));

In datafusion/physical-expr/src/array_expressions.rs
https://github.com/apache/arrow-datafusion/pull/6940#discussion_r1264170324
:

@@ -1195,21 +1195,56 @@ pub fn array_to_string(args: &[ArrayRef]) -> Result {
}

 let mut arg = String::from("");

let mut res = compute_array_to_string(

   &mut arg,

   arr.clone(),

   delimeter.clone(),

   null_string,

   with_null_string,

)?
.clone();
match res.as_str() {

   "" => Ok(Arc::new(StringArray::from(vec![Some(res)]))),

let mut res: Vec<Option> = Vec::new();

match arr.data_type() {

   DataType::List(_) | DataType::LargeList(_) | DataType::FixedSizeList(_, _) => {

       let list_array = arr.as_list::<i32>();

I don't think this is going to work (will panic) for LargeList as it
should be i64 -- we would probably have to make a generic version of this
function.
However, for now I think it looks reasonable and a step forward to me
—
Reply to this email directly, view it on GitHub
https://github.com/apache/arrow-datafusion/pull/6940#pullrequestreview-1531032030,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADZCLRZDJ4OSGW3BQA6Y27TXQGXITANCNFSM6AAAAAA2IIUBZI
.
You are receiving this because you were mentioned.Message ID:
@.***>

Thanks @izveigor  and @jayzhan211


Improve device-tree overlay support

Now allows applying external overlays either in form of
.dts file, literal dts contents added to store or precompiled .dtbo file.
If overlays are defined, kernel device-trees are compiled with -@
so the .dtb files contain symbols which we can reference in our
overlays.
Since fdtoverlay doesn't respect / compatible by itself
we query compatible strings of both dtb and dtbo(verlay)
and apply only if latter is substring of the former.
Also adds support for filtering .dtb files (as there are now nearly 1k
dtbs).
Mashup of

@georgewhewell's https://gist.github.com/georgewhewell/b359404255f3bce6e54f980b0c092702
and #67989

Introduces a breaking change for users of hardware.deviceTree.base which is now renamed to hardware.deviceTree.kernelPackage and requires actual kernel package for dtc recompilation to work.

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

I don't have the setup to test, exactly, but I do have some hardware I should setup to test.
Otherwise, at a glance this looks fine, though not super thrilled about any breaking change, but the change is for the best considering it allows multiple representations of device trees to be used here.

You can test on rPi with https://gist.github.com/sorki/c72dfbf1af51f7a42693622fbd020f07
I think that the previous hardware.deviceTree.base package was used mainly with deviceTree_rpi (which should probably be removed as well as in #67989). Provided you don't need to apply overlays you can still set hardware.deviceTree.kernelPackage to custom derivation. I guess that not many people are using their custom dtbs instead of one provided by kernel + overlays as that would require a lot of maintenance.

We'll need the release notes to show the breaking change.

Release note added

Ah, cc @bennofs who played with out of tree DTBs recently. Might have some thoughts about this.

When I said "hardware to test" I meant I have a raspberry pi touch screen I can test this with, still hadn't looked at how to make it work. My main issue is that I would prefer the mainline kernel, but there's a dire lack of documentation about "raspberry pi special hardware" and mainline.

I don't like the testing for /compatible, I feel like trying to apply an overlay to an incompatible device-tree should give a visible error rather than being silently ignored. Any thoughts from others?

At first I've tried applying overlays to all devices but that results in tons of errors on the output as most are incompatible (I've thought fdtoverlay respects compatible automatically but that's not the case).
Then my second version had overlay.match POSIX regex for find but that looked needlessly complicated and redundant to compatible strings in dts itself so I've stripped that and used fdtget instead to query both. It now results in following log output:
Applying overlay spi to bcm2835-rpi-zero-w.dtb
Applying overlay pps to bcm2835-rpi-zero-w.dtb
Applying overlay spi to bcm2836-rpi-2-b.dtb
Applying overlay pps to bcm2836-rpi-2-b.dtb
...

Which I think is better than seeing bunch of errors due to incompatibilities.

Would it make sense to do the filtering in filterDtbs? Something like:
filterDtbs = {
  name = "...";
  compatible = "...";
}

And then only copying based on fdtget output?
Pros:

Lets you avoid errors on applying overlays to device-trees you don't mean to
Gives explicit errors when overlays unexpectedly don't apply due to compatibility

Cons:

Need to specify compatibility twice (once in overlay, once in nixpkgs)
Doesn't work if you have multiple overlays that are meant to apply to distinct subsets of your .dtb collection. I'm not sure if this is a common use-case?

I'm not 100% opposed to the current solution, it is very flexible.

Would it make sense to do the filtering in filterDtbs? Something like:

Not sure if that would be an improvement - often you want to patch only few files but preserve the rest, filterDTBs is good for saving some CPU time or if you only need DTBs for one specific board and don't care about the rest. I'm not a big fan of duplicating compatible + another filter which is why I've scraped that attempt - the implementation was also becoming too complicated compared to current state.

Removed option is now addressed via mkRemovedOptionModule.

OK, I'm convinced by the current approach for compatible. I'll try and test it tomorrow.

Hmm, this is a bit annoying...
Either:

We have the authorization by @NixOS/nixos-release-managers to backport this feature change to 20.03.
The release notes are moved to 20.09.

Otherwise looks fine to me.

I've moved release note to 20.09 and fixed one bug - if no filters or overlays were applied the default path was missing /dtbs suffix.

Hmm, this is a bit annoying...
Either:
* We have the authorization by @NixOS/nixos-release-managers to backport this mildly-breaking change to 20.03.

* The release notes are moved to 20.09.

Otherwise looks fine to me.

20.03 is starting to look like a lot of work to get to the official release :rofl: So I'd rather be super strict about freeze exceptions.

Anyway it looks like @sorki is fine with bumping to 20.09, thanks anyway @worldofpeace  :).

Thank you all for the review, I've addressed your suggestions and tested natively, cross build is still running.
If you're looking for mainline compatible overlays similar to rasberrypi-fw take a look at https://github.com/afaerber/dt-overlays
While updating this I've realized it would be nice to have rPi specific modules and device tree overlays collected somewhere in nixpkgs but I'm not sure what would be a good namespace for those.

Fixed an issue I've found today with linux 5.7 by adding patchShebangs to dtbsWithSymbols.

This PR looks really good and I have a raspberry Pi which now runs Debian because support for overlays was missing at the time I tried NixOS. I'm subscribed to updates here but I don't have time to test it yet. Never the less thanks for putting work into this @sorki :rocket:.

I've tested the new updates, still all good.

If you're looking for mainline compatible overlays similar to rasberrypi-fw take a look at https://github.com/afaerber/dt-overlays

Good tip! I've been looking for exactly that.

Actually, I'm seeing serious issues with a missing fdt. I'm trying to track it down now, it might be due to me re-basing these patches wrong.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/raspberry-pi-4-add-i2c-to-device-tree/7380/2

Rebased and added suggestions. Tested lightly on my armv7 notebook, will test with rPI later as my room is too hot right now for cross compiling :)
I've tried to make a NixOS test for this but it seems a bit contrived - build a VM with overlay applied and just boot it (and only applicable to armv7l/aarch64). Maybe we can expose few examples for Hydra to build instead but that also requires some restructuring I think.

I've been testing this (rebased onto 20.03 but otherwise unchanged). LGTM.

Retested, found one issue where patchShebangs was missing an argument, now corrected to patchShebangs scripts/*.
Should be good to go now.

@Infinisil worked with me yesterday to get this PR patched onto my nixpkgs install (I am running NixOS 20.09 on a Pinebook Pro). I used it to patch in a single dtbo file and it worked as expected applying only to the specific context I cared about.

I think the order in which overlays are applied could matter - for example
if I include vendor.dtb, which adds a device with some sensible defaults,
and then customization.dtb, which overwrites some of these with my
specific configuration. Though I have to admit I'm not actually doing this
right now, but it's a use-case I could imagine. IMO it would be better to
leave this as a list until the ordering issue mentioned above is figured
out.
On Fri, 7 Aug 2020 at 13:59, Richard Marko<EMAIL_ADDRESS>wrote:

@sorki commented on this pull request.
In nixos/modules/hardware/device-tree.nix
https://github.com/NixOS/nixpkgs/pull/79370#discussion_r467024303:

     example = literalExample

       "[\"\${pkgs.device-tree_rpi.overlays}/w1-gpio.dtbo\"]";

     type = types.listOf types.path;

     example = literalExample ''

       [

         { name = "pps"; dtsFile = ./dts/pps.dts; }

         { name = "spi";

           dtsText = "...";

         }

         { name = "precompiled"; dtboFile = ./dtbos/example.dtbo; }

       ]

     '';

     type = types.listOf overlayType;

Looks good, thanks! I'll try to incorporate this and switch to attrsOf
since the name is exactly attr name. Best to do it now rather than
introducing another breaking change later.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/NixOS/nixpkgs/pull/79370#discussion_r467024303, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AASPNNRIU7X4A6Q4TN6ZFI3R7P3D5ANCNFSM4KRBKD5Q
.

I've been using this with a precompiled RPi firmware overlay as well as a custom one compiled from source and it has worked well.

Thanks @Infinisil for being prompt to help. TBH I haven't ran a nix-build command yet since I had some trouble understanding the rewrite of the overlays  option. Now I do understand it (mostly), but I figured out that in order to build such an SD image with my x86_64 machine, I would need to setup a qemu builder and I haven't got there yet. This, plus the fact that I just bought a new Laptop, and I'd like to use it + my previous computer as nix builders and there's lots of other changes to these machines' configurations, has delayed my progress with this task. But I sure hope to reach there on the next few days and I'll report here if I experience any issues. Thanks again.
1 detail that's still missing for me from this PR, is: How to add parameters to an overlay such as explained here:
https://github.com/raspberrypi/firmware/blob/031e8d26610874cc43a5726cb07feef15c919052/boot/overlays/README#L440-L458

@doronbehar qemu-user / binfmt is not necessarily needed (and people report hangs of the VMs when building certain packages)
You can try cross-compiling the image instead, using something like https://gist.github.com/sorki/548de08f621b066c94f0c36a7a78cc41 - unless you need graphics it's a viable way to build images, provided you pick working commit (master is almost working for me except for failing texinfo build due to smartmontools -> mailutils -> texinfo dep chain, where smartmontools is pulled from nixos/modules/profiles/base.nix which can be patched directly in checkout or overridden somehow properly I guess.
Regarding parameters I'm not quite sure how these are implemented but I've tried to decompile the one you've posted (https://github.com/raspberrypi/firmware/blob/master/boot/overlays/allo-piano-dac-plus-pcm512x-audio.dtbo) with dtc -I dtb -O dts < allo-piano-dac-plus-pcm512x-audio.dtbo and there's basically this part
__overrides__ {
	24db_digital_gain = <0x00>;
	glb_mclk = <0x00>;
}

which could be templated using Nix if you provide the overlay as Nix string.

Thank you all for testing. Updated with the suggestion by @Infinisil

IIRC device-tree parameters are a feature of the raspberry pi bootloader, and don't work with the standard device-tree toolchain (including dtc). I usually just copy the source for the overlay and manually insert the parameter.
I'd quite like to have this in for 20.09, is that looking likely?

@kwohlfahrt:

device-tree parameters are a feature of the raspberry pi bootloader, and don't work with the standard device-tree toolchain (including dtc). I usually just copy the source for the overlay and manually insert the parameter.

@sorki:

basically this part [..] which could be templated using Nix if you provide the overlay as Nix string.

I don't know a thing about decompiling dt overlays and manually inserting such parameters. Do you think it'd be possible to add another option to the overlays submodule that will do what you described? You have contributed a lot already so I hope this is not too much to ask.

I don't know a thing about decompiling dt overlays and manually inserting such parameters. Do you think it'd be possible to add another option to the overlays submodule that will do what you described? You have contributed a lot already so I hope this is not too much to ask.

I'm not sure if it's even viable way to do it since dtbo files are products built for specific kernel version (and the ones that are part of raspberrypi/linux aren't compatible with mainline).
I think it would be better to find the dts (device tree overlay source file) used to produce the dtbo and just template that. We might want to maintain such (upstream compatible) overlays (for example based on https://github.com/afaerber/dt-overlays) as part of nixos-hardware.
Preferably I would keep that as a future feature (when we figure it out) as I too would like this to land for 20.09.

I think it would be better to find the dts (device tree overlay source file) used to produce the dtbo and just template that.

I see. The overlay I am interested in is not open source so I don't think there is a dts... :/.

I think it would be better to find the dts (device tree overlay source file) used to produce the dtbo and just template that.

I see. The overlay I am interested in is not open source so I don't think there is a dts... :/.

Found it - https://github.com/raspberrypi/linux/blob/rpi-5.4.y/arch/arm/boot/dts/overlays/allo-piano-dac-plus-pcm512x-audio-overlay.dts
Was looking for it yesterday but only found the dtbo.

@jonringer do you think we can get this merged and cherry-picked to 20.09?

ZHF hasn't really started yet, I think it would be okay if it got in soon (today). The release notes may need to changed slightly if there's conflicts

I'm cool with this being brought into alpha since we haven't reached the beta freeze just yet (and it was supposed to be in the last release anyways)

Be sure to direct requests to releases managers via the team @NixOS/nixos-release-managers

Ah wait, I think this commit should be
nixos/device-tree: improve support

Ah wait, I think this commit should be
nixos/device-tree: improve support

Changed to nixos/device-tree: improve overlays support, thanks!

@sorki Okay, merged.

I believe the merge of this PR has broken the "With GPU" instructions on the wiki (https://nixos.wiki/wiki/NixOS_on_ARM/Raspberry_Pi_4#With_GPU).  I get the following error now:
# nixos-rebuild switch
building Nix...
building the system configuration...
error:
Failed assertions:
- The option definition `hardware.deviceTree.base' in `/etc/nixos/configuration.nix' no longer has any effect; please remove it.
Use hardware.deviceTree.kernelPackage instead

(use '--show-trace' to show detailed location information)

I tried deleting the hardware.deviceTree.base option but now X complains that it can't find /dev/dri/card0 and fails to start.  What should I should provide for the hardware.deviceTree.kernelPackage option to produce the same behavior provided by base = pkgs.device-tree_rpi;?

cc @samueldr @NixOS/exotic-platform-maintainers

I too am struggling with these changes. It's not clear to me how the wiki instructions for using the RPi4 GPU should be now, and separately I'm trying to apply a dtbo file but finding it hard.
  hardware.deviceTree.overlays = [{
    name = "hyperpixel4";
    dtboFile = "${pkgs.hyperpixel4}/share/overlays/hyperpixel4.dtbo";
  }];

I thought this would be sufficient (with hardware.deviceTree.enable = true) but the dtbo is not applied.

During build, you should see a line saying Applying overlay xyz to .... If that's not the case decompile the .dtbo file with dtc -I dtb -O dts < some.dtbo (using dtc from nix-shell -p dtc) and check its toplevel compatible directive which should say something like compatible = "brcm,bcm2835"; or compatible = "raspberrypi".
vc4-fkms-v3d.dtbo looks good to me, not sure about the hyperpixel one.
Setting a kernel package shouldn't be needed but I have some trouble reproducing this (wiki vp4 instructions) with linuxPackages_rpi4 as it gives me an error during make ... dtbs cross compilation (kernel package itself seems to cross fine):
gcc: error: unrecognized argument in option '-mabi=aapcs-linux'
gcc: note: valid arguments to '-mabi=' are: ms sysv
gcc: error: unrecognized command line option '-mlittle-endian'
gcc: error: unrecognized command line option '-mfpu=vfp'
make[1]: *** [Kbuild:21: kernel/bounds.s] Error 1

I'll try native build later.

I'm trying to use these changes on a Raspberry Pi 3B to mirror the effect of a dtparam=spi=on (if I were on Raspbian), but I'm shooting a bit in the dark to be honest. On f0f88be1eabf2504736debb418d1f164b3228c8e with
# Unkown if needed, but read in some relevant thread that RPI overlays do not merge with mainline.
boot.kernelPackages = pkgs.linuxPackages_rpi3;

hardware.deviceTree = {
  enable = true;
  filter = "*-rpi-*.dtb";
  overlays = [{
    name = "spi";
    dtboFile = "${pkgs.device-tree_rpi.overlays}/spi0-hw-cs.dtbo";
}];

the image from sd-image-aarch64.nix builds and boots, but the build output did not contain any mention of overlay application, and I have no /dev/spi* files. The dtb file I presume is being used is bcm2837-rpi-3-b.dtb which contains compatible = "raspberrypi,3-model-b\0brcm,bcm2837"; while the dtbo contains compatible = "brcm,bcm2835";. But after boot dmesg contains some bcm2835 entries. Is there some minor revision mismatch only in the DT files? Is that why it didn't apply?

@tmplt If there's no specific reason to use linuxPackages_rpi3 you can use my SPI overlay with upstream kernel:

https://github.com/hexamon-tech/nixos-lorawan-gateway/blob/master/modules/dts/spi.dts
https://github.com/hexamon-tech/nixos-lorawan-gateway/blob/master/modules/kernel.nix#L11

If you switch compatible of the overlay to "raspberrypi" or "brcm,bcm2837" it would apply it.
I'm now a bit worried we need some fallback way to handle these unfortunate rpi foundation kernels and overlays.

@sorki I'm trying to build with that overlay using nixpkgs.crossSystem.system = "aarch64-linux", but it seems dtbs-with-symbols-aarch64-* fails to build with gcc: error: unrecognized command line option '-mlittle-endian'. Do you use armv7l-linux in the configuration you linked? Does this derivation only build for a set of supported archs?
I also have a aarch64-linux cross-compilation in progress via binfmt, but it's taking ages to build on my local system. I don't know if it works yet, but it did not stumble upon the error mentioned above.

@tmplt It contains cross compilation parts and it works for me with mainline kernels (yes I'm mostly using armv7l, will test on aarch64 as well). Do you use it with mainline kernel or _rpi one? I've seen similar errors with _rpi kernel.

@sorki Mainline linuxPackages_4_19. I just tried with linuxPackages_latest which passes the build, but it does not boot: uboot reports ERROR: Did not find a cmdline Flattened Device Tree. I do not know if this is caused by the 5.8 kernel or the DT overlay.

I also have a aarch64-linux cross-compilation in progress via binfmt

It finished, and it works: spidev and spi_bcm2835 are loaded and /dev/spi0.{0,1} exists. There is some differences between the  expessions used for the binfmt build vis-a-vis the nixpkgs.crossSystem.system = "aarch64-linux" one. I'll dig them up if you need them.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/enabling-spi-on-the-raspberry-pi-3/9122/4

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/cross-compiling-problem-with-devicetree-on-armv6/9254/1

I had another excursion into building device tree overlays with NixOS.
I wanted to use GPIO_ACTIVE_LOW and include #include <dt-bindings/gpio/gpio.h> for this.
After some time of debugging and dtc complaining about syntax errors, I realized #include directives are resolved in the kernel and u-boot by the C preprocessor, and dtc doesn't know anything about it.
I tried adding support for this into nixos/modules/hardware/device-tree.nix, essentially just running $CC -E -I$kernelSrc/scripts/dtc/include-prefixes before running dtc, but gave up in finding the right set of cli arguments to pass to $CC by staring at other Makefiles.
Maybe someone in here feels a bit more brave and wants to add this. It'd certainly be very useful.

I have a device tree overlay (hifiberry-dacplus.dtbo from raspberrypifw) that is not compatible with fdtoverlay, but however it is compatible with dtmerge from libraspberrypi.
ftdoverlay exits with FDT_ERR_NOTFOUND.
I created my own device tree file and copied it to the /boot/nixos/ directory and it worked.
On the nixos-20.09 channel it is possible to say base = ./.; and name = ./my.dtb. Is there an equivalent configuration in the new deviceTree module?

I have a device tree overlay (hifiberry-dacplus.dtbo from raspberrypifw) that is not compatible with fdtoverlay, but however it is compatible with dtmerge from libraspberrypi.
ftdoverlay exits with FDT_ERR_NOTFOUND.
I created my own device tree file and copied it to the /boot/nixos/ directory and it worked.
On the nixos-20.09 channel it is possible to say base = ./.; and name = ./my.dtb. Is there an equivalent configuration in the new deviceTree module?

@leifhelm see https://github.com/NixOS/nixpkgs/pull/107637#issuecomment-752788529 - the raspberry-pi provided device tree overlays don't compile with the kernel-provided dtc, and the NixOS module doesn't have support to use other device tree compilers now.
As written in that comment, there's https://github.com/kwohlfahrt/nixpkgs/commit/7ba456e500addef74ca30f7bcefecbef1f94ae96, which could probably be upstreamed to nixpkgs and provide an alternative mechanism of compiling device tree overlays.

@leifhelm see https://github.com/NixOS/nixpkgs/pull/107637#issuecomment-752788529 - the raspberry-pi provided device tree overlays don't compile with the kernel-provided dtc, and the NixOS module doesn't have support to use other device tree compilers now.
As written in that comment, there's https://github.com/kwohlfahrt/nixpkgs/commit/7ba456e500addef74ca30f7bcefecbef1f94ae96, which could probably be upstreamed to nixpkgs and provide an alternative mechanism of compiling device tree overlays.

I tried adding support for this into nixos/modules/hardware/device-tree.nix, essentially just running $CC -E -I$kernelSrc/scripts/dtc/include-prefixes before running dtc, but gave up in finding the right set of cli arguments to pass to $CC by staring at other Makefiles.
Maybe someone in here feels a bit more brave and wants to add this. It'd certainly be very useful.

That would be welcome addition and was discussed on IRC some time ago. I might try to incorporate it to the next PR related to this and raspberrypi support - I'm considering adding something like hardware.deviceTree.raspberryPi that would use dtmerge.

I have a device tree overlay (hifiberry-dacplus.dtbo from raspberrypifw) that is not compatible with fdtoverlay, but however it is compatible with dtmerge from libraspberrypi.
ftdoverlay exits with FDT_ERR_NOTFOUND.
I created my own device tree file and copied it to the /boot/nixos/ directory and it worked.
On the nixos-20.09 channel it is possible to say base = ./.; and name = ./my.dtb. Is there an equivalent configuration in the new deviceTree module?

I think you can craft hardware.deviceTree.package manually. Module won't populate it if you set hardware.deviceTree.enable = false but it will be picked up by activation:
        ${optionalString (config.hardware.deviceTree.package != null) ''
          ln -s ${config.hardware.deviceTree.package} $out/dtbs
        ''}

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/boot-config-txt-related-questions-for-raspbarry-pi/3650/3

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/fdt-err-notfound-when-trying-to-apply-device-tree-overlay-on-raspberry-pi-4/19650/2


Fix typos and small errors throughout the documentation

This commit fixes some typos and small errors throughout documentation files
under docs/.
Signed-off-by: Renê de Souza Pinto<EMAIL_ADDRESS>

Updates in this PR:

Fix one typo found by Yetus.


:do_not_litter: Remove unused name script

Coverage remained the same at 98.897% when pulling c1dee49cf9b74107ec2120daa5676bc299a0f543 on fix/unused-script into c0b844919b654f7bd6d7fb2abcff7a875228392f on master.

Coverage remained the same at 98.897% when pulling cedc6b75ce18e016980174433ad991a8eb908582 on fix/unused-script into bb398e8c016edf93597b2f8369f3172a2a89df8e on master.


How to delete a user?

How to remove the user from OneSignal when the user logs out?

Hi @THPubs , what do you mean by saying "remove the user".

@THPubs this should answer your question.
http://stackoverflow.com/questions/40367689/is-there-a-way-to-delete-a-user-via-api-for-onesignal


fix missing symbols when cross-compiling

fixes #581

I am actually reverting a change I've done in https://github.com/snowleopard/hadrian/pull/401/files. I tried to understand what is my motivation but found it hard to justify this by comparing to the latest HEAD. I think we can merge this as long as CI passed and no one jumps out and objects it.

I think we should just make CI fail if there are any warnings. In this case there are warnings about unused code, which is difficult to spot while reviewing a PR, but easy to check by the compiler. Perhaps, we could also hook up @ndmitchell's Weeder :)

@izgzhen Thanks, merged!


#1103 java.lang.NullPointerException

java.lang.NullPointerException while decrypting due to value is null and still looking for cipher string. #1103

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

@ramaiahkk Thank you for signing the Contributor License Agreement!

Codecov Report

Merging #1104 into master will increase coverage by 0.16%.
The diff coverage is 50%.

@@             Coverage Diff              @@
##             master    #1104      +/-   ##
============================================
+ Coverage        78%   78.16%   +0.16%
- Complexity      936      937       +1
============================================
  Files           109      109
  Lines          3341     3343       +2
  Branches        469      470       +1
============================================
+ Hits           2606     2613       +7
+ Misses          561      552       -9
- Partials        174      178       +4

Impacted Files
Coverage Δ
Complexity Δ

.../server/encryption/CipherEnvironmentEncryptor.java
68.42% <50%> (-3.81%)
7 <0> (ø)

...rk/cloud/config/client/ConfigClientProperties.java
91.37% <0%> (+1.72%)
41% <0%> (+1%)
:arrow_up:

...fig/client/ConfigServicePropertySourceLocator.java
69.5% <0%> (+3.54%)
25% <0%> (ø)
: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 513353b...a071662. Read the comment docs.

@ryanjbaxter Test added to check if null returns null


Balance proposition: syndicate rocket launcher

i couldnt find an ideaguys channel so im putting this here lololololol
Description

On the nukie planet, nukies will get a free rocket launcher with one spare rocket and no way to obtain more, intended to be used as an entry device to instantly destroy reinforced windows or regular walls.
(from memory it doesn't even completely destroy regular walls, just turns them into girders)
It could also be used in combat but you only get two total shots and its hard to store
Also, it would be really funny for them to slip and have the clown shoot them with it

React to the Dev Channel role in #welcome and the ideaguys forum will appear for you.

I like this idea

React to the Dev Channel role in #welcome and the ideaguys forum will appear for you.

thanks

This got you banned from the wizden repo didn't it?

This got you banned from the wizden repo didn't it?

no, that would be the syndicate RCD textures

What about a single use rocket launcher that cannot be reloaded and can be purchased by nukies for 150 TC?


[PROPOSAL] Standarize custom facet naming

Purpose:
Main motivation of this proposal is making sure that custom facets in different implementations of OpenLineage clients for the same data source have the same name. Another advantage will be decreased chance of different facets name colliding.
Proposed implementation
I propose that custom facets should follow name pattern {prefix}{name}{entity}Facet PascalCased, where

Prefix must be distinct identifier named after the project
Name is the desired facet name
Entity is the core OpenLineage entity for which the facet will be attached

Important aspect for OpenLineage consumers is standarizing JSON key naming.
I propose to follow pattern {prefix}_{name} snakeCased.
Example of custom facet following both patterns: BigQueryStatisticsJobFacet and bigQuery_statistics

Added proposed spec change: https://github.com/OpenLineage/OpenLineage/pull/46


How can I change what folder the .sol save data file is in? (SOURCE CODE)

Describe your problem here.
I would like to change where the .sol save data is located but I got no clue how I can do that, can anyone help me?
Are you modding a build from source or with Lua?
Source
What is your build target?
Windows x86/x32
Did you edit anything in this build? If so, mention or summarize your changes.
No response

you can change the package name in the project.xml at line 5
packageName="com.shadowmario.psychengine" package="com.shadowmario.psychengine"


Last tree item has a little tail line.

Last tree item must have a squared corner, not a tail.

corrigido.


Simplify and reharmonize crystal vs molecule data types

Had made allowances earlier for Z'>1 which are now requiring lots of specific catches to fix.

Partially addressed via concatenation method, but probably needs a full database refactor

done - there was a full database refactor


Updated to 1.0.0

Hi @softinio @mijicd !
Just updated to 1.0.0 version. Can we have next release after merging it?

Hmm linting phase fails with:
Downloading sbt launcher for 1.3.13:
  From  http://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt-launch/1.3.13/sbt-launch.jar
    To  /home/circleci/.sbt/launchers/1.3.13/sbt-launch.jar
Download failed.

@mtsokol can you run it locally? It might be either a glitch or a stale version of sbt launcher.

@mtsokol I think this #249 fix that problem

@mijicd hm ./sbt ++${SCALA_VERSION}! check also fails locally for me (also for e.g. zio-keeper project).

@riosgabriel Thanks! Then it might need to be fixed across all zio org projects?

@mtsokol i find it odd for keeper, as we're running it actively and it doesn't fail, but.. Glitches happen :).

@mtsokol I think so. They changed all repositories urls to https

@mtsokol I think #249 could fix that problem

@mtsokol Just merged above PR, rebase and lets see what happens

@softinio ok, now it works 😄. @riosgabriel thanks once again for solution!

Linting still a problem


fix some Farsi translations

[x] Changes have been thoroughly tested to not break existing functionality.
[x] New functionality has been documented or existing documentation has been updated to reflect changes.
[x] Visual changes are explained in the PR description using a screenshot/recording of before and after.

Hi @mokhosh , Thanks for feedback.
I try to fix


Do not set defattr on the files

If in default value it is equal to what rpm already does -> less lines.

@scarabeusiv , this introduces a warning for SLE12 packages.
Should I add something in my project config or rpmlintrc to avoid it?

For SLE11, it even breaks build

That is on purpose, the warning on SLE12 is nill and was there only for sle11 compatibility.
As having support in spec-files prepared for SLE15 to build them on sle11 is bit overkill we always plan to support -1 of the codestreams. You can fix this by projectcfg declaration in obs to make even sle11 work, it just does not have the default value that is present since openSUSE 12.0.


TypeError: Cannot convert 7.071428571428571e-05 to EagerTensor of dtype int64

Tried implementing the transformers_asr model and faced this issue.
The code is
class CustomSchedule(keras.optimizers.schedules.LearningRateSchedule):
    def __init__(
        self,
        init_lr=0.00001,
        lr_after_warmup=0.001,
        final_lr=0.00001,
        warmup_epochs=15,
        decay_epochs=85,
        steps_per_epoch=203,
    ):
        super().__init__()
        self.init_lr = init_lr
        self.lr_after_warmup = lr_after_warmup
        self.final_lr = final_lr
        self.warmup_epochs = warmup_epochs
        self.decay_epochs = decay_epochs
        self.steps_per_epoch = steps_per_epoch
    def calculate_lr(self, epoch):
        """ linear warm up - linear decay """
        warmup_lr = (
            self.init_lr
            + ((self.lr_after_warmup - self.init_lr) / (self.warmup_epochs - 1)) * epoch
        )
        decay_lr = tf.math.maximum(
            self.final_lr,
            self.lr_after_warmup
            - (epoch - self.warmup_epochs)
            * (self.lr_after_warmup - self.final_lr)
            / (self.decay_epochs),
        )
        return tf.math.minimum(warmup_lr, decay_lr)
    def __call__(self, step):
        epoch = step // self.steps_per_epoch
        return self.calculate_lr(epoch)

batch = next(iter(val_ds))

idx_to_char = vectorizer.get_vocabulary()
display_cb = DisplayOutputs(
    batch, idx_to_char, target_start_token_idx=2, target_end_token_idx=3
)  # set the arguments as per vocabulary index for '<' and '>'

model = Transformer(
    num_hid=200,
    num_head=2,
    num_feed_forward=400,
    target_maxlen=max_target_len,
    num_layers_enc=4,
    num_layers_dec=1,
    num_classes=34,
)
loss_fn = tf.keras.losses.CategoricalCrossentropy(
    from_logits=True, label_smoothing=0.1,
)

learning_rate = CustomSchedule(
    init_lr=0.00001,
    lr_after_warmup=0.001,
    final_lr=0.00001,
    warmup_epochs=15,
    decay_epochs=85,
    steps_per_epoch=len(ds),
)
optimizer = keras.optimizers.Adam(learning_rate)
model.compile(optimizer=optimizer, loss=loss_fn, metrics=["accuracy"])

history = model.fit(ds, validation_data=val_ds, callbacks=[display_cb], epochs=100)

and getting the error while initializing the optimizer.
TypeError                                 Traceback (most recent call last)

[<ipython-input-14-5cc47724e28c>](https://localhost:8080/#) in <cell line: 31>()
     29     steps_per_epoch=len(ds),
     30 )
---> 31 optimizer = keras.optimizers.Adam(learning_rate)
     32 model.compile(optimizer=optimizer, loss=loss_fn, metrics=["accuracy"])
     33

5 frames

[/usr/local/lib/python3.10/dist-packages/keras/optimizers/adam.py](https://localhost:8080/#) in __init__(self, learning_rate, beta_1, beta_2, epsilon, amsgrad, weight_decay, clipnorm, clipvalue, global_clipnorm, use_ema, ema_momentum, ema_overwrite_frequency, jit_compile, name, **kwargs)
    114             **kwargs
    115         )
--> 116         self._learning_rate = self._build_learning_rate(learning_rate)
    117         self.beta_1 = beta_1
    118         self.beta_2 = beta_2

[/usr/local/lib/python3.10/dist-packages/keras/optimizers/optimizer.py](https://localhost:8080/#) in _build_learning_rate(self, learning_rate)
    382                 # Create a variable to hold the current learning rate.
    383                 current_learning_rate = tf.convert_to_tensor(
--> 384                     learning_rate(self.iterations)
    385                 )
    386                 self._current_learning_rate = tf.Variable(

[<ipython-input-9-0f410ff14f30>](https://localhost:8080/#) in __call__(self, step)
     49     def __call__(self, step):
     50         epoch = step // self.steps_per_epoch
---> 51         return float(self.calculate_lr(epoch))

[<ipython-input-9-0f410ff14f30>](https://localhost:8080/#) in calculate_lr(self, epoch)
     21         warmup_lr = (
     22             self.init_lr
---> 23             + ((self.lr_after_warmup - self.init_lr) / (self.warmup_epochs - 1)) * epoch
     24         )
     25         decay_lr = tf.math.maximum(

[/usr/local/lib/python3.10/dist-packages/tensorflow/python/util/traceback_utils.py](https://localhost:8080/#) in error_handler(*args, **kwargs)
    151     except Exception as e:
    152       filtered_tb = _process_traceback_frames(e.__traceback__)
--> 153       raise e.with_traceback(filtered_tb) from None
    154     finally:
    155       del filtered_tb

[/usr/local/lib/python3.10/dist-packages/tensorflow/python/framework/constant_op.py](https://localhost:8080/#) in convert_to_eager_tensor(value, ctx, dtype)
    101       dtype = dtypes.as_dtype(dtype).as_datatype_enum
    102   ctx.ensure_initialized()
--> 103   return ops.EagerTensor(value, ctx.device_name, dtype)
    104
    105

TypeError: Cannot convert 7.071428571428571e-05 to EagerTensor of dtype int64

Hi @andevishnuvardhan ,
I can't run the code as there are dependencies/dataset missing in the code snippet attached.
From the Error generated I understand that the problem might be due to multiplication operation between int64 tensor with float scalar.
The problematic code seems this as mentioned below.
  warmup_lr = (
      self.init_lr
      + ((self.lr_after_warmup - self.init_lr) / (self.warmup_epochs - 1)) * epoch
  )

In the above code the epoch is being passed by TF as a Tensor as it is generated from step(a scalar Tensor) but others are user input parameters which are floats.
May be changing the epoch to tf.cast(epoch,tf.float32) might works.
  warmup_lr = (
      self.init_lr
      + ((self.lr_after_warmup - self.init_lr) / (self.warmup_epochs - 1)) * tf.cast(epoch,tf.float32)
  )

I have replicated the reported error with above piece of code and the proposed solution eliminated the error. May please refer to attached gist.
Thanks!

Actually, that was not the issue and the actual error was not resolved.
The actual error faced was while defining the optimizer.
refer to this  collab for the actual notebook and help me resolve this error.
Updated Code
class CustomSchedule(keras.optimizers.schedules.LearningRateSchedule):
    def __init__(
        self,
        init_lr=0.00001,
        lr_after_warmup=0.001,
        final_lr=0.00001,
        warmup_epochs=15,
        decay_epochs=85,
        steps_per_epoch=203,
    ):
        super().__init__()
        self.init_lr = init_lr
        self.lr_after_warmup = lr_after_warmup
        self.final_lr = final_lr
        self.warmup_epochs = warmup_epochs
        self.decay_epochs = decay_epochs
        self.steps_per_epoch = steps_per_epoch

    def calculate_lr(self, epoch):
        """ linear warm up - linear decay """
        warmup_lr = (
              self.init_lr
              + ((self.lr_after_warmup - self.init_lr) / (self.warmup_epochs - 1)) * tf.cast(epoch,tf.float32)
          )
        decay_lr = tf.math.maximum(
            self.final_lr,
            self.lr_after_warmup
            - (epoch - self.warmup_epochs)
            * (self.lr_after_warmup - self.final_lr)
            / self.decay_epochs,
        )
        return tf.math.minimum(warmup_lr, decay_lr)

    def __call__(self, step):
        epoch = step // self.steps_per_epoch
        return self.calculate_lr(epoch)

batch = next(iter(val_ds))

# The vocabulary to convert predicted indices into characters
idx_to_char = vectorizer.get_vocabulary()
display_cb = DisplayOutputs(
    batch, idx_to_char, target_start_token_idx=2, target_end_token_idx=3
)  # set the arguments as per vocabulary index for '<' and '>'

model = Transformer(
    num_hid=200,
    num_head=2,
    num_feed_forward=400,
    target_maxlen=max_target_len,
    num_layers_enc=4,
    num_layers_dec=1,
    num_classes=34,
)
loss_fn = tf.keras.losses.CategoricalCrossentropy(
    from_logits=True, label_smoothing=0.1,
)

learning_rate = CustomSchedule(
    init_lr=0.00001,
    lr_after_warmup=0.001,
    final_lr=0.00001,
    warmup_epochs=15,
    decay_epochs=85,
    steps_per_epoch=len(ds),
)
optimizer = keras.optimizers.Adam(learning_rate)
model.compile(optimizer=optimizer, loss=loss_fn)

history = model.fit(ds, validation_data=val_ds, callbacks=[display_cb], epochs=1)

New Error
TypeError                                 Traceback (most recent call last)

[<ipython-input-16-a50bedeeafd7>](https://localhost:8080/#) in <cell line: 30>()
     28     steps_per_epoch=len(ds),
     29 )
---> 30 optimizer = keras.optimizers.Adam(learning_rate)
     31 model.compile(optimizer=optimizer, loss=loss_fn)
     32

5 frames

[/usr/local/lib/python3.10/dist-packages/tensorflow/python/ops/gen_math_ops.py](https://localhost:8080/#) in mul(x, y, name)
   6574   if tld.is_eager:
   6575     try:
-> 6576       _result = pywrap_tfe.TFE_Py_FastPathExecute(
   6577         _ctx, "Mul", name, x, y)
   6578       return _result

TypeError: Cannot convert 0.00099 to EagerTensor of dtype int64

All the dependencies and entire code are available in the notebook.
Please refer to the notebook and help me resolve this error.
Thank you.

i am also getting the same error please resolve it

Hey i'm also using this on Colab and if you are in a hurry, i found a way around this Error by assigning epoch manually in the code block by assigning 100 epoch like this:
 def calculate_lr(self, epoch):
        """ linear warm up - linear decay """
        warmup_lr = (
              self.init_lr
              + ((self.lr_after_warmup - self.init_lr) / (self.warmup_epochs - 1)) * 100
          )
        decay_lr = tf.math.maximum(
            self.final_lr,
            self.lr_after_warmup
            - (100 - self.warmup_epochs)
            * (self.lr_after_warmup - self.final_lr)
            / self.decay_epochs,
        )
        return tf.math.minimum(warmup_lr, decay_lr)

Also if you must assign the same epoch number in the model.fit too :
 history = model.fit(ds, validation_data=val_ds, callbacks=[display_cb], epochs=100)
You could adjust the number of epoch to suit your needs.

Cannot convert 0.00099 to EagerTensor of dtype int64--it is raising error like this

@SuryanarayanaY brother I think you didn't catch my problem.
Here my problem is with the learning_rate value, and I am getting that error because the learning_rate value is generated by Custom_Scheduler and it is generating a custom scheduler object instead of an int or float value. The error can be resolved by converting the value returned by the Custom_Scheduler class to int64.
Thanks for the response and support, Help me with this.


Add vscode extensions

Need this fork for testing the changes as I don't have push access to the UCLH-Foundry repo. Not tested yet.

Ah sorry I missed this last week, now running locally to see if it works. Will review when I can check it!


Improve UI for schema requests per topic

Description
When a user is on the topic details view / schema, we show a "button" "Request new version/schema". It's a link to the schema request form and it will add the environment to a query:

(please note that the environment for the topic is TST while the related schema environment is TST_SCH -> this is intentionally and will be fixed at some point, we're using the schema-env for the forms at the moment, bc the endpoints still expect them, but will switch to using one env for all)
This env (TST_SCH) is passed to be used as prefilled readonly value in the request-schema form. To make sure we're using a correct environment, we're calling endpoint /getEnvsForSchemaRequests and see if the id or name of the environment is a valid one. If not, we'll redirect the user back to where they come from:
queryFn: () => getEnvironmentsForSchemaRequest(),
    onSuccess: (environments) => {
      if (presetEnvironment) {
        const validEnv = environments.find(
          (env) =>
            presetEnvironment === env.id || presetEnvironment === env.name
        );

        // Allows to pass environment name as well as environment id as search param
        if (validEnv && isNaN(Number(presetEnvironment))) {
          form.setValue("environment", validEnv.id);
          return;
        }

        if (validEnv === undefined) {
          navigate(-1);
        }
      }
    },

This is correct - we want to make sure that a user can only fill out and sent the form with a valid env from the URL and not for example use an old link with an env that is no longer valid (or try to just change the value in the url).
BUT we've enabled superadmin user in Klaw to add a lot of settings (which is good 😅 ),. One of those is that superadmin can prevent user from being to able to make a schema request against an environment and instead enforce them to create a schema at the lowest env and work their way up (aka promote the schema).
We want to make that more clear in the UI:

the endpoint /getSchemaOfTopic will add a property to SchemaOverview to determine if a user can actually request a schema on a higher env or if this schema is "promoteable only"  (naming will backend do better than me :D)
if this is implemented, the UI will use this property to decide wether to show the button OR a short information about why the button is missing (input from @harshini-rangaswamy  is needed for a good text and Mustafa for a useful layout)

BE part: https://github.com/Aiven-Open/klaw/pull/1596