text:
Analysis: 91% of dependency updates in this repository can be merged.

Hey there :wave:Our bot, Adaptly, found that 21 out of 23 currently open dependency update PRs can be merged.That's 91% right there:View Safe to Merge PRs1. Bump object-path from 0.11.4 to 0.11.82. Bump tar from 4.4.13 to 4.4.193. Bump path-parse from 1.0.6 to 1.0.74. Bump browserslist from 4.7.1 to 4.16.65. Bump hosted-git-info from 2.8.5 to 2.8.96. Bump lodash from 4.17.15 to 4.17.217. Bump handlebars from 4.4.5 to 4.7.78. Bump ssri from 6.0.1 to 6.0.29. Bump y18n from 4.0.0 to 4.0.110. Bump elliptic from 6.5.1 to 6.5.411. Bump ini from 1.3.5 to 1.3.712. Bump node-fetch from 2.6.0 to 2.6.113. Bump yargs-parser from 15.0.0 to 15.0.114. Bump apollo-server-express from 2.9.7 to 2.14.215. Bump apollo-server-core from 2.9.7 to 2.14.216. Bump apollo-server from 2.9.7 to 2.14.217. Bump acorn from 6.3.0 to 6.4.118. Update dependency ramda to ^0.27.019. Update dependency apollo-server to v2.11.020. Update dependency cosmiconfig to v621. Pin dependencies:mag_right:   How does Adaptly know this?It analyses changelogs of dependencies updated in a PR.If no breaking changes are found in the changelogs, PR is marked as safe to merge.:sparkles: Try Adaptly yourselfFeel free to try Adaptly on your repositories and finallymerge the Dependabot PRs. Let us know if you have any questions.Best of luck with your projects,Laurislauris@adaptly.dev

@glennreyes Adaptly saw that you have merged dependency update PRs, so this might be useful to you.

repo: glennreyes/graphpack


text:
Error when launching nvim

I get this error after installing the plugin

@trebaud  which neovim verison that you used?

Im using:
NVIM v0.4.3
Build type: RelWithDebInfo
LuaJIT 2.0.5

@trebaud  you must use neovim 0.5+ .  the lua api in neovim 0.5 version above.

@glepnir  thank you :+1:

@glepnir Im sorry I installed nvim 0.5 and the plugin with vim-plug, I dont get any errors anymore, but I don't get anything either in my statusline. Is there any additionnal configuration that needs to be done that is not listed in the README? I have these set in my init.vim:
set termguicolors
set laststatus=2

Sorry I'm a bit noob when it comes to nvim and lua. Thanks!

hmm. the galaxyline only provide api and default provider . then you can build your own statusline based on your ideas. You can find examples in example folder. it has two files that show your how to build a statusline. Also you can copy it to use.
First you can create a fold called lua in ~/.config/nvim. then create a file named myline or something you like. then create your own statusline based on galaxyline api. or copy content of examples folder eviline or spaceline  to this file.
If you used vim-plug, seems like you use vim file . so you need  do like this
lua <<EOF
require('myline')
EOF

@glepnir awesome that worked, thanks! small detail the runtime was expecting a .lua file for my statusline config file, so myline.lua in my case. Thanks for the awesome work!

source: gharchive/issue

authors: glepnir trebaud

license: MIT

license_type: permissive

license_source: github-api


text:
wget returns error -- can't execute 'ssl_helper': No such file or directory

with Alpine Linux v3.4, when doing wget got errors.
ex:
bash-4.3# wget https://get.docker.com/builds/Linux/x86_64/docker-1.9.1.tgz
Connecting to get.docker.com (54.230.7.103:443)
wget: can't execute 'ssl_helper': No such file or directory
wget: error getting response: Connection reset by peer
tried
apk update
apk add ca-certificates
update-ca-certificates
But it does not help

Try adding the "openssl" package as well -- that should do the trick.
("wget" shells out to "openssl" as its "ssl_helper")

tried apk add openssl. ssl_helper error is gone. but still get error:
Connecting to get.docker.com (54.192.142.119:80)
Connecting to get.docker.com (54.230.207.99:443)
wget: error getting response: Connection reset by peer

It helped with:
apk add ca-certificates wget

@tianon but there is still the problem: why downloading a regular http link also require the ssl_helper?
As I see the default wget is a busybox version wget, can the default alpine make it able to download http links?
/ # wget http://get.docker.com/builds/Linux/x86_64/docker-1.9.1.tgz
Connecting to get.docker.com (54.192.119.104:80)
Connecting to get.docker.com (54.192.119.47:443)
wget: can't execute 'ssl_helper': No such file or directory
wget: error getting response: Connection reset by peer

/ # wget --help
BusyBox v1.24.2 (2016-06-23 08:49:16 GMT) multi-call binary.

Usage: wget [-csq] [-O FILE] [-Y on/off] [-P DIR] [-U AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

	-s	Spider mode - only check file existence
	-c	Continue retrieval of aborted transfer
	-q	Quiet
	-P DIR	Save to DIR (default .)
	-T SEC	Network read timeout is SEC seconds
	-O FILE	Save to FILE ('-' for stdout)
	-U STR	Use STR for User-Agent header
	-Y	Use proxy ('on' or 'off')

I would imagine that link is probably doing an https redirect.

right; regular http links are ok

Old thread, but just for reference: I changed the Dockerfile FROM to alpine:3.16 and it worked.

authors: c0b fxpires peterpd tianon

repo: gliderlabs/docker-alpine

license_source: bigquery


text:
Option to specify program name per container

It'd be awesome if there were a way to specify the program name per docker container via environment variables inside the container (similar to how you can set the LOGSPOUT=ignore variable inside a container) that tells logspout what name to give it when routing the log.
Use cases:
If you're using a container orchestration service (Tutum, Flynn, Dokku) in some cases you may have no control over the --name option of your containers when they're deployed. For example, Tutum assigns a GUID to the name field of each container you deploy. So when using logspout my logs in papertrail end up looking like this:

Note the program labels such as f0d9d99a-18e0-4097-91fd-1e496a451cd0 which are automatically assigned by Tutum aren't helpful, since they have no semantic meaning and change on each deploy. If I could specify an variable LOGSPOUT_NAME=my-containers-app in the container and have logspout use that instead then it would be much easier to filter logs this way.
Even if you do have control over container names, you might want to group them in a custom way. If you have multiple instances of the same service running each container has to have a unique name. So you might end up giving the names app-container-1, app-container-2 in Docker, but want to have all the logs appear under the name app-container for simplicity.
Not sure if it's possible, but I think it'd be a very useful feature to have.

In this scenario, are you running logspout or is the platform?

I'm running logspout on the platform. More specifics are in the guide they released.

I ask because that means if you have control over the logspout container, you could potentially solve this by configuring logspout once to use a different value. Logspout in master supports this with configurable syslog value templates.

I played around with the configurable options in syslog.go and found something that works well for my specific setup. For anyone curious, the options I set were:
SYSLOG_FORMAT=rfc3164
SYSLOG_HOSTNAME=<hostname of my server>
SYSLOG_TAG={{.Container.Config.Hostname}}

Since on my container orchestration platform I have control over setting the hostname for each container, I can use that as the syslog tag and the result is much prettier logs.
If these changes eventually merged into release then I should be set. Thanks for pointing me in the right direction!

Glad they work for you. Should we close this?

@renfredxh It there way to get this in dokku-logspout before released? How do I make it use the master version of logspout?

Running into a similar issue. Is there any way to configure this with ENV vars or do I need to build my own version of logspout to set these?

got it working by setting -e SYSLOG_HOSTNAME=myhost when I created the logspout container

authors: jgallen23 progrium renfredxh ypadlyak

repo: gliderlabs/logspout

license: mit


text:
🛑 INTG-APP is down

In c5e07df, INTG-APP ($SITE_6) was down:

HTTP code: 403
Response time: 232 ms

Resolved: INTG-APP is back up in 31a3af3 after 2 days, 6 hours, 39 minutes.

repo: glo-markoaular/status-navigate


text:
High capacity mof repo

added 11 MOFs have CO2 adsorption >1 mol/kg

Pull Request Test Coverage Report for Build 8699136646
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 46.221%

Totals

Change from base Build 8695252457:
0.0%

Covered Lines:
4452

Relevant Lines:
9632

💛  - Coveralls

source: gharchive/pull-request

authors: coveralls williamyxl

repo: globus-labs/mof-generation-at-scale


text:
I HAVE A PROBLEM

when i set as follow:
Please enter OVH target id: 5
Please enter OVH organ id: 6
select PTV Heart and Organs Lt Lung
Traceback (most recent call last):
File "d:/dicom_read/OVH-master/ovhcalc.py", line 176, in
main()
File "d:/dicom_read/OVH-master/ovhcalc.py", line 174, in main
ovhc=calculate_ovh(rtssfile, int(var1), int(var2), True)
File "d:/dicom_read/OVH-master/ovhcalc.py", line 68, in calculate_ovh
for k in range(0,len(ss['planes'][keyss[find_nearest_index([float(jss) for jss in keyss],z)]][0]['data'])):
TypeError: 'dict_keys' object is not subscriptable

This script is tested in Python 2. Please check.

authors: SecondhandAlgorithmEngineer glucee

repo: glucee/OVH


text:
don't delete a secret that we don't create

gk-deploy does not setup heketi with db backed up to secrets, hence it
is not right that we delete the secrets for the same.
Closes: #231
Signed-off-by: Raghavendra Talur rtalur@redhat.com

This change is

Fair enough. Looks like an artifact from when we went back to the dpeloy-heketi method.
LGTM

authors: jarrpa raghavendra-talur

repo: gluster/gluster-kubernetes


text:
Multiples mermaid diagrams are crashing

Hi,
I've tried to put two Mermaid diagrams, one by slide, and the first renders correctly but not the second : I had to refresh the page to have to second (but then the first disappears).
Example :
effacer.txt

Hello, Mermaid can be a bit complex to configure when it must deal with another JS lib/framework.
Here's my configuration script:
// Initialize Mermaid but don't render diagrams on start
mermaid.initialize({ startOnLoad: false, cloneCssStyles: false });

function initMermaid(s) {
    const elements = document.querySelectorAll(".remark-slide")[s.getSlideIndex()]
        ?.querySelectorAll('.mermaid-diagram p:not([data-processed="true"])');
    if (elements) mermaid.init(undefined, elements);
}

// Render diagrams immediately on the current slide
initMermaid(slideshow.getSlides()[slideshow.getCurrentSlideIndex()]);

// Render diagrams when there is a navigation to another slide
slideshow.on("afterShowSlide", initMermaid);

Multiple diagrams, on multiple slides, are now correctly rendered with the following syntax:
.mermaid-diagram[
sequenceDiagram
    Alice->>John: Hello John, how are you?
]

PS: don't use the "default" .mermaid class as it seems to be buggy (Mermaid sometimes seems trying to render diagrams twice when we call init() on element(s) with the .mermaid class which leads to a syntax error).

Hi, I didn't have the time to try your proposal until now and this didn't worked for me (my mermaid diagrams don't appear anymore). Can you send me a minimal working example ?

authors: GaelGirodon spe-nsi

repo: gnab/remark


text:
🛑 課程系統 is down

In 08998a6, 課程系統 (https://aps.ntut.edu.tw/course/tw/course.jsp) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 課程系統 is back up in 25e5494.

repo: gnehs/ntut-uptime


text:
remove limit order from liquidity

This PR removes LimitOrder from the Liquidity enum. This was done as a first step towards refactoring to make it easier to add new liquidity such that:

Liquidity type will eventually be all the baseline liquidity that we fetch. This will hopefully allow us to simplify the whole solver liquidity vs API liquidity issue and make it easier to compute baseline solutions in the orderbook API for bad token detection, etc.
We were grouping limit orders and AMM liquidity only to split it back up again in every solver: ([LimitOrder], [Amms]) -> Liquidity -> ([LimitOrder], [Amms])
If we add actual AMM limit orders in the future (such as 0x orders) then we would need to distinguish them between the user orders.

Test Plan
Mostly refactored for new split, should be caught by existing CI.

Codecov Report

:exclamation: No coverage uploaded for pull request base (solver-batch-interface@ca7da8d). Click here to learn what that means.
The diff coverage is n/a.

@@                    Coverage Diff                    @@
##             solver-batch-interface    #1068   +/-   ##
=========================================================
  Coverage                          ?   64.23%
=========================================================
  Files                             ?      123
  Lines                             ?    24012
  Branches                          ?        0
=========================================================
  Hits                              ?    15425
  Misses                            ?     8587
  Partials                          ?        0

authors: codecov-commenter nlordell


text:
Add Features to ChainInfo

⚠ To be merged after https://github.com/gnosis/safe-config-service/pull/291
Closes #675

Add features to ChainInfo

GET /v1/chains/<chain_id>

{
  "chainId": <string>,
  "features": [<string>] // eg.: [ "ERC721", "SAFE_APPS"]
  ...
}

Pull Request Test Coverage Report for Build 1417489687

51 of 56 (91.07%)  changed or added relevant lines in 5 files are covered.
17 unchanged lines in 3 files lost coverage.
Overall coverage increased (+0.04%) to 84.84%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/routes/chains/tests/chains.rs
44
49
89.8%

Files with Coverage Reduction
New Missed Lines
%

src/routes/chains/converters.rs
1
78.57%

src/tests/backend_url.rs
4
56.18%

src/routes/chains/tests/chains.rs
12
63.88%

Totals

Change from base Build 1416892623:
0.04%

Covered Lines:
7863

Relevant Lines:
9268

💛  - Coveralls

authors: coveralls fmrsabino

repo: gnosis/safe-client-gateway


text:
Safes 0.1.0 Show no owners when loaded

Env: mainnet https://gnosis-safe.io/app/#/load
version: 3.9.0
Issue: Loading a safe 0.1.0 is possible with our current app, but the safe is shown with 0 owners.
A 0.1.0 safe: 0x5f2b85618d790e7ba4328c19628c8587cc3d9645

0.1.0 Safes aren't critical for us, however it seems like they are allowed in the Safe address input step.
So I think the solution should be one of
(1) Display the owners properly
Or if that tedious, (2) prevent users from adding 0.1.0 Safes in the first place.

This will be solved in #2608 adding a minimum compatibility with legacy safes

Tried this in the PR2608 in the mainnet build with the safe address given in the description, but it is treated as a "unprocessable entity"
safe: 0x5f2b85618d790e7ba4328c19628c8587cc3d9645
https://pr2608--safereact.review.gnosisdev.com/mainnet/app/#/load

@francovenica could you test again today? Maybe it was a backend issue. I can load that safe perfectly in #2608

@dasanra I still have issues, even in prod mainnet. I'll check later today

0x5f2b85618d790e7ba4328c19628c8587cc3d9645 throws "not checksummed" 🤔

0x5F2b85618D790e7Ba4328c19628c8587cC3D9645
if I use this address it loads fine to me

We might need a bug report for that input not checksumming the value.

yep, it was about the checksum. I checked again and it worked.
Regarding checksum, is something we fixed last year and it worked so well during so many regressions that I just stop checking since it was time consuming just to check the checksum in all addresses inputs throughout the site. I'll Check those again and if they are not working I'll fill a ticket and add the test to the regression again

Made a ticket https://github.com/gnosis/safe-react/issues/2620 for the checksum thing

Checksumming has been fixed, and this Safe address can be loaded fine now. With owners.

authors: dasanra francovenica katspaugh mikheevm tschubotz

repo: gnosis/safe-react


text:
Goerli Testnet Version

Deploy interface also on Goerli Testnet.

Contracts are already deployed: https://github.com/gnosis/safe-contracts/blob/v1.1.1/.openzeppelin/goerli.json
Services also run on Goerli.

So only the interface has to be adapted to Goerli and be deployed at goerli.gnosis-safe.io

I'm not sure about what needs to be done in this issue to properly estimate.
I'm guessing that we need to update/create .travis.yml, and bash script files.

and also deploy the contracts

so there may be some work directly on contracts repo https://github.com/gnosis/safe-contracts

Closing this since we our testnet is Rinkeby and we currently don't plan to support Görli. Can be reopened in case there's demand.

I'd recommend multiple deploys to eth-style testnets, due to people running scripting in the different environs.
https://ethereum.stackexchange.com/questions/69592/what-is-the-purpose-of-görli-testnet has a few good justifications, but on a personal level;
massive project deploy in multiple parts, some depend on community resources (testing on uniswap amms etc.) and so sometimes require earlier deploys.
so in the middle of a pre-audit testing scenario, I needed to get the team to beta-test across a network that had compatible community tools.
after the audit, we needed to redeploy the contract due to breaking changes, and so the address (and all requisite control-flow logic that dealt with the upgrade manager) changes.
I redeployed to Goerli for the final tests.
Afterwards, I found great use for Gnosis tooling, but now I can't do a 100% replication.
I love being able to do 100% replications.

I'm trying to test the Gnosis Safe with an eth2 staking provider service and to do that I need it on Goerli... any chance this can be reopened? @tschubotz

+1 on ETH2 and Gnosis Safe. I think it's time to reconsider Goerli support :)

Closing this since we our testnet is Rinkeby and we currently don't plan to support Görli. Can be reopened in case there's demand.

This is worth reconsidering imo. Görli testnet is a huge improvement over Rinkeby (or Kovan!) and a lot of engineering teams are currently using it to test their dapps. Right now they are unable to test out complex transactions on their dapp through Safe, so it really is a blocker in that sense.

Support has been added

authors: 0xdeniz beetrootkid chris-shyft fernandomg lukasschor mikheevm rmeissner shayanb tschubotz


text:
[L2] Use MultiSendCallOnly instead of MultiSend contract

What it solves
Resolves #2339
How this PR fixes it
Using latest instance for Multisend contract and specially selecting the CallOnly version.
How to test it
Check that when we execute a Multisend transaction the CallOnly instance is used
CallOnly instance smart contract is deployed at: 0x40A2aCCbd92BCA938b02010E17A5b8929b49130D

Test that sending multiple transactions in Transaction Builder is using the instance mentioned above
Test that upgrading a safe uses the instance mentioned above
Test that enabling spending limit module and setting a new spending limit uses the multisend instance mentioned above

Test that upgrading a safe uses the instance mentioned above

How does one do it? Via the Tx Builder?

Test that upgrading a safe uses the instance mentioned above

How does one do it? Via the Tx Builder?

I cheated on this one. I run a local frontend for rinkeby and create a 1.1.1 safe. Then I run it again setting smart contract scope to v1.3.0 and test to upgrade on Settings

Tested in a safe 1.1.1 that I created and a 1.3.0 that Dani created and made me owner of it
In both it worked:
The spending limit creation
The multi tx made with the Tx builder
Snapshots:

Issue:
I only have a safe 1.0.0 to try upgrade to 1.1.1 and it didn't work. It crashes the page when I click the "Upgrade" button (See snapshot)
I tried the same in rinkeby prod with the same safe and I didn't see the same issue there, it just show the message that the safe will be upgraded (I did not upgraded it because I want to keep it as 1.0.0)
Safe used:
https://pr2474--safereact.review.gnosisdev.com/rinkeby/app/#/safes/0xeca13481F8514752dC08106c7A265c85caFa563E/balances

@francovenica I guess this issue isn't related to this PR though? Can I merge it?

@katspaugh I've seen the issue with the upgrade is only in this PR, in dev and prod was working fine. If you think the error in the console has nothing to do with the PR then go ahead, but I have no way to be sure if this PR is not messing up with the safe upgrade feature

in dev and prod was working fine

Then it's definitely related to this PR. Thanks for checking!👌

Previously a safe upgrade required a delegate call, I guess this is the reason

authors: dasanra francovenica katspaugh mikheevm


text:
Upgrade safe-deployments 1.5.0

What it solves
The interface was using an older version (0xa25b3579a295be016de5eb5F082b54B12d45F72C) of safe-deployments, it doesn't have any drawbacks but this version was meant to be used. The reason for that is that we forgot to release safe-deployments with the updated address (0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2).
How this PR fixes it
By updating safe-deployments to version 1.5.0 that uses the new address
How to test it
connect the safe to https://example.walletconnect.org/ and click use eth_sign button, the transaction pop up should call 0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2

Pull Request Test Coverage Report for Build 1545545941

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 32.466%

Totals

Change from base Build 1545526180:
0.0%

Covered Lines:
3086

Relevant Lines:
8467

💛  - Coveralls

What's up with the tests?

We are on top of it and have been fixing them but some fixes were not merged yet so the GitHub action is running still broken tests.

authors: DiogoSoaress coveralls mikheevm


text:
🛑 Forkmon ETH2 is down

In ff03b96, Forkmon ETH2 (https://eth2-forkmon.chiadochain.net/) was down:

HTTP code: 502
Response time: 191 ms

Resolved: Forkmon ETH2 is back up in a5a66c1 after 6 minutes.

repo: gnosischain/chiado-uptime


text:
🛑 RPC is down

In 3e6efa1, RPC (https://rpc.gnosischain.com/) was down:

HTTP code: 503
Response time: 243 ms

Resolved: RPC is back up in 8940590 after 273 days, 23 hours, 30 minutes.

repo: gnosischain/gnosischain-uptime


text:
🛑 GatewayFM Public RPC is down

In c0f31a4, GatewayFM Public RPC (https://rpc.gnosis.gateway.fm/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: GatewayFM Public RPC is back up in ecf7037 after 6 minutes.


text:
Wrong stack pointer offset in objc_msgSend.aarch64.S leads to register corruption

I was working on a test to fix this and stumbled upon #264. This was not trivial to find, as it was causing some random exceptions in libs-base.
diff --git a/objc_msgSend.aarch64.S b/objc_msgSend.aarch64.S
index 25cbfd6..e9e30ba 100644
--- a/objc_msgSend.aarch64.S
+++ b/objc_msgSend.aarch64.S
@@ -169,7 +169,7 @@ CDECL(objc_msgSend_stret):
        EH_NOP
        ldp    x2, x3, [sp, #32]
        EH_NOP
-       ldp    x4, x5, [sp, #64]
+       ldp    x4, x5, [sp, #48]
        EH_NOP
        ldp    x6, x7, [sp, #64]
        EH_NOP

I'll make a PR with this fix and a unit test.

This was never triggered by the tests, because clang never generated objc_msgSend calls. We cannot call objc_msgSend manually, as this would use the variadic calling convention.
We can rerun objc_msgSend.m with -Xclang -fobjc-dispatch-method=non-legacy.


text:
Provide ability to Gen openapi spec without starting the server

It seemed this use to be possible until the openapi gen function was un exported in #29. I'm curious on the motivation for this? It would be useful to be able to gen openapi spec both locally and in CI to be able to perform analysis etc. For instance my use case is generating SDKs for other langs as well as diffing for breaking changes in CI.
Describe the solution you'd like
Not married to anything, but the simplest solution would be to just expose this: https://github.com/go-fuego/fuego/blob/main/openapi.go#L38
Describe alternatives you've considered
Just run the server and get the local file. Just a bit of a pain in CI.
Thanks for the project 👍
I'm willing to make the change if it's found acceptable.

Hey! (Server).generateOpenAPI is a misleading name. The specification is generated incrementally as routes are generated, and available in (Server).OpenApiSpec.
It depends on what you're talking about.
Static generation (generate OpenAPI JSON without running go run or ./your-binary)
It's not done, and it's not on the roadmap, even though it's technically feasible. It could be a problem for a future version, but I'm not ready to work on it. Why not? Because I don't count the times when the specification isn't synchronized with the code. There's nothing to stop you having the doc for your v1.0 server and the actual server running v1.1. Generation leads to a doc that's decorrelated from the latest version, which is what we want to avoid at all costs with Fuego!
Generation before listening on the port (after running go run but before listening and handling calls)
Easy to do: we need to decouple (Server).Run from JSON generation, for example by making (Server).generateOpenAPI public. This will be done in v1.13, coming soon I think. In the meantime, you can json.Marshal the (Server).OpenApiSpec by hand yourself :)

Ah, shame on me for not looking at the implementation. Thank you for saving me a lot of time.
And yes I agree with you that the only way you should ever be able to generate a spec is to executing your binary.
Thank you for the project. Looking to help out anyway I can.
Cheers
Dylan

authors: EwenQuim dylanhitt

repo: go-fuego/fuego


text:
[Bug] Can't use Kanban board in existing repo

Gitea version (or commit ref): 1.13.0+dev-419-g4027c5dd7
Git version:
Operating system:
Database (use [x]):

[ ] PostgreSQL
[ ] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ ] No
[x] Not relevant

Log gist:

Description
I found that the Kanban board can't be used in existing repo, only when creating a new repo can we use it.
Screenshots
in existing repo

in new repo:

@6543 @adelowo Please have a look, Thanks.

I'm sorry. I haven't checked it carefully. should enable it manually a first before using the kankan Board in existing reos.

@a1012112796 this is intended
Because:

makes migration step easyer
It's easyer to enable on-demand on old as disable it on all old repos

@lunny maybe need question label. Thanks :)

repo: go-gitea/gitea


text:
☠

🚨 Read the news: https://blog.gitea.io/2022/10/open-source-sustainment-and-the-future-of-gitea/
company != community && we == owners. also see gitea on twitter speaking just in favor of what on the founders mind "I did this and we the company.. blabla future faking" 🚩
at least for now the wording is clear about it: lead by individuals forming a company this let's no room for labeling this a community project any longer and as many already left.. still the open letter by the community was left unanswered because 'they' don't care.. 🚩https://gitea-open-letter.coding.social/
from ~gogs~ 😑 to ~gitea~ ☠ now Forgejo 🐿

This makes me think we should somehow make this configurable.
One option is to maintain a custom template, but understandably that's less than ideal for this.
Another option is to somehow make this a type of config setting that's dynamic.
Nothing against vscodium, if I'm honest I also (personal opinion) don't like that we've already added a vscode link to begin with.
Perhaps we should discuss how to make this generic before we end up with another "adding webhooks for every service" problem. 😅

User preverences ...

Does VSCodium not support vscode:// urls? I think it'd be better to start there.

I think we could

Add another custom-only template like how we do for header links, etc. or;
Somehow make this a dynamic configuration option similar to external renderers

No custom templates please, they suck 😉. Maybe with config:
repo.ADDITIONAL_CLONE_SCHEMES = vscodium://,sublime://

Still, generall I think the issue is on the editors, not us.

Probably true, but I custom protocol probably lets them do other things that's specific to each editor (maybe?)
I think a config option would work fine with a little forethought

Problem with the option approach is user can not set icon, but that may be acceptable.

Well I suppose one could have a JSON value in the config option, but I don't think we do those yet.
repo.ADDITIONAL_CLONE_SCHEMES = '[{"scheme": "vscodium://", "icon": "<svg/>"}]'

Could have a config option for local image or web image.
In terms of "security", since it would be config-level, it would be up to the admin?

Would keep it simple, just SVG string support. Security should be fine as it's in the config, only admin-accessible.

Would keep it simple, just SVG string support.

For a web image, technically Gitea could even host the image in its custom dir, which would still allow users to serve it themselves without relying on another service.
And I think might be nicer than storing JSON in an ini config?

I think adding more than editor svg could be confusing later on. We can simply skip it and use a standard icon for code editor urls, and just have the text beside it.

hey @author @redwerkz can u add a test link in the description (first comment) of this issue? e.g.:
"Repositories for trial on gitea are at: https://try.gitea.io/"

Please don't talk about your opinion of community governance in a special issue.

authors: 6543 CypherpunkSamurai jolheiser lunny redwerkz silverwind yashpalgoyal1304


text:
[ERR_MODULE_NOT_FOUND]: Cannot find package 'tailwindcss'

Description
I am running into an error when upgrading from v1.21.11 to v1.22.0. I cannot get my automated scripts to work on this version, but it works on other versions. The script is just a copy+paste from the upgrade docs.
Gitea Version
v1.22.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
Here is a text output of my terminal when running webpack

Git Version
v2.34.1
Operating System
Ubuntu 22.04 on ppcel64
How are you running Gitea?
I am building from source.
Database
SQLite

I also wanted to add my script to help with the troubleshooting process.
#!/bin/bash

# This script assumes you already have a working gitea instance

# Git Directory for Gitea
GIT_DIR="/home/ubuntu/gitea"

# Script warning
RED='\033[0;31m'
YEL='\033[0;33m'
NC='\033[0m' # No Color
printf "\n${RED}Please Note:${NC} ${YEL}You must set the GIT_DIR variable before running this script${NC}\n\n"
sleep 3

# Update git and npx
git -C $GIT_DIR pull
npm exec --prefix $GIT_DIR browserslist@latest --update-db

# User enters Gitea version
git -C $GIT_DIR tag -l
printf "\n${RED}Please Enter a Gitea Version${NC}\n\n"
read VERSION

# Checkout version and build for production
# This will stop and start the gitea service
service gitea stop
git -C $GIT_DIR checkout $VERSION
cd $GIT_DIR
TAGS="bindata sqlite" make build
service gitea start
printf "\n${YEL}You are now running on version:${NC}\n"
./gitea -version

make build with environment variables of your choice is all that's needed. Make will do everything it needs. In your case, I think node_modules got corrupted somehow, so I recommend doing rm -rf node_modules once and then try your script again.

You should not run from source code in a production env. Just build a binary and run that binary.

Maybe you need to check the permission of the user running this script.
stop and start service are all failed.

Thanks @silverwind, that seemed to be the fix. I must have had a bunch of node_packages over various gitea builds.

authors: krosseyed lunny silverwind yp05327


text:
Clojure .gitignore file is not created properly.

Gitea version (or commit ref): 225c489
Git version: 2.17.1
Operating system: linux
Database (use [x]):

[x] PostgreSQL
[ ] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[x] Yes (provide example URL)
[ ] No
[ ] Not relevant

Log gist:

Description
Clojure .gitignore file is not created properly.
Show the result on URL https://try.gitea.io/abcd785/GitignoreTest/src/branch/master/.gitignore
...

It seems that the source file is a link https://github.com/github/gitignore/blob/master/Clojure.gitignore
And it wasn't well imported (empty file) in gitea https://github.com/go-gitea/gitea/blob/801843b0115e29ba2304fa6a5bea1ae169a58e02/options/gitignore/Clojure

authors: sapk soulawaker


text:
Use more toned colors for selected line

How does it look in dark theme?

@lafriks It's very subtle change for arc-green; not that the older color was ever used properly in arc-green to begin with, so...

ping LG-TM

please send backport

authors: CirnoT lafriks techknowlogick


text:
Only log Error on getLastCommitStatus error to let pull list still be visible (#15716)

Backport of #15716

:rocket:


text:
Fix incorrect CORS failure detection logic

Regression of #23495
Fixes #23838
Fixes #23850

No backport

🤖

authors: techknowlogick wxiaoguang


text:
Are Polymorphic many2many relationships possible

Your Question
Is it possible to define models that have a polymorphic many2many relationship?  The simplest example would be the following:
type Label struct {
	LabeID             uint `gorm:"primarykey"`
        Name               string
}

type Fruit struct {
	gorm.Model
	Name   string
	Labels []*Label `gorm:"many2many:labels;polymorphic:Label"`
}

type Vegetable struct {
	gorm.Model
	Name   string
	Labels []*Label `gorm:"many2many:labels;polymorphic:Label"`
}

In this scenario, a single label (A) can belong to both a fruit and vegetable entry.  And both a fruit or vegetable can have many labels.

duplicated with https://github.com/go-gorm/gorm/issues/4004

authors: AlexThurston jinzhu

repo: go-gorm/gorm


text:
[BUG] config.Scan does not scan duration types for yaml

config.Scan does not scan duration types for yaml.

What are you trying to do?
I have a struct that contains a time.Duration. I am trying to use config to Scan a yaml file into this struct.
What did you expect to happen?
I expect when using a value such as "1000s" it will create will fill the struct with a 1000 * time.Second. If I use config.Get("duration").Duration(0), I get my expected result.
What happens instead?
When using config.Scan, I get the zero value.

How to reproduce the bug:
Yaml:
duration: 1000s

Go:
package main

import (
	"fmt"
	"time"

	"github.com/micro/go-micro/v2/config"
)

type Config struct {
	Duration time.Duration
}

func main() {
	config.LoadFile("config.yaml")
	fmt.Println(config.Get("duration").Duration(0))

	var conf Config
	config.Scan(&conf)
	fmt.Println(conf)
}

Output:
16m40s
{Duration: 0s}

Environment:
go version go1.14 darwin/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/jbell/Library/Caches/go-build"
GOENV="/Users/jbell/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/jbell/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/jbell/.go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/jbell/.go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/jbell/go/src/github.com/belljustin/scratch/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/9f/w1d7k0d97mz1y7fc9cgpl8100000gp/T/go-build458731707=/tmp/go-build -gno-record-gcc-switches -fno-common"

json: cannot unmarshal string into Go struct field Config of type time.Duration.

Is this bug still open? I am a first-time contributor can I take this?

It's works with
package config

import (
	"time"

	str2duration "github.com/xhit/go-str2duration"
)

type Duration time.Duration

type Config struct {
	Loop  Duration `json:"loop"`
}

// UnmarshalText implements the text unmarshaller method
func (x *Duration) UnmarshalText(text []byte) error {
	name := string(text)
	tmp, err := str2duration.Str2Duration(name)
	if err != nil {
		return err
	}
	*x = Duration(tmp)
	return nil
}

This is the same issue as the one linked by @kaisawind . Closing this in favour of that one.

This is the same issue as the one linked by @kaisawind . Closing this in favour of that one.

Where can I find this other issue?

authors: NeonWizard ShaileshSurya belljustin kaisawind kesslerdev

repo: go-micro/go-micro


text:
Providing non-zero default for newVersion

If there are no new migrations to run, then running init or up will produce misleading output because newVersion currently defaults to 0; eg:
$ go run *.go up
Migrated from version 3 to 0

By defaulting newVersion to oldVersion, if there is nothing to do then the versions match.

Thanks, released v6.0.4

authors: vmihailenco zeroviscosity

repo: go-pg/migrations


text:
Tests failing on older YubiKeys

Yubico Yubikey NEO OTP+U2F+CCID
Applet version: piv.version{major:0x1, minor:0x0, patch:0x4}
Logs

=== RUN   TestYubiKeySignECDSA
    TestYubiKeySignECDSA: key_test.go:64: signing failed: command failed: smart card error 6982: security status not satisfied
--- FAIL: TestYubiKeySignECDSA (0.94s)
=== RUN   TestPINPrompt
=== RUN   TestPINPrompt/Never
    TestPINPrompt/Never: key_test.go:110: building private key: get attestation cert: command failed: smart card error 6d00
=== RUN   TestPINPrompt/Once
    TestPINPrompt/Once: key_test.go:110: building private key: get attestation cert: command failed: smart card error 6d00
=== RUN   TestPINPrompt/Always
    TestPINPrompt/Always: key_test.go:110: building private key: get attestation cert: command failed: smart card error 6d00
--- FAIL: TestPINPrompt (2.01s)
    --- FAIL: TestPINPrompt/Never (0.67s)
    --- FAIL: TestPINPrompt/Once (0.67s)
    --- FAIL: TestPINPrompt/Always (0.67s)
=== RUN   TestSlots
=== RUN   TestSlots/Authentication
    TestSlots/Authentication: key_test.go:153: attest: got err=command failed: smart card error 6d00, want=ErrNotFound
    TestSlots/Authentication: key_test.go:166: attest: command failed: smart card error 6d00
    TestSlots/Authentication: key_test.go:171: private key: get attestation cert: command failed: smart card error 6d00
=== RUN   TestSlots/CardAuthentication
    TestSlots/CardAuthentication: key_test.go:153: attest: got err=command failed: smart card error 6d00, want=ErrNotFound
    TestSlots/CardAuthentication: key_test.go:166: attest: command failed: smart card error 6d00
    TestSlots/CardAuthentication: key_test.go:171: private key: get attestation cert: command failed: smart card error 6d00
=== RUN   TestSlots/KeyManagement
    TestSlots/KeyManagement: key_test.go:153: attest: got err=command failed: smart card error 6d00, want=ErrNotFound
    TestSlots/KeyManagement: key_test.go:166: attest: command failed: smart card error 6d00
    TestSlots/KeyManagement: key_test.go:171: private key: get attestation cert: command failed: smart card error 6d00
=== RUN   TestSlots/Signature
    TestSlots/Signature: key_test.go:153: attest: got err=command failed: smart card error 6d00, want=ErrNotFound
    TestSlots/Signature: key_test.go:166: attest: command failed: smart card error 6d00
    TestSlots/Signature: key_test.go:171: private key: get attestation cert: command failed: smart card error 6d00
--- FAIL: TestSlots (6.84s)
    --- FAIL: TestSlots/Authentication (0.93s)
    --- FAIL: TestSlots/CardAuthentication (0.91s)
    --- FAIL: TestSlots/KeyManagement (0.91s)
    --- FAIL: TestSlots/Signature (0.91s)
=== RUN   TestYubiKeySignRSA
=== RUN   TestYubiKeySignRSA/rsa1024
    TestYubiKeySignRSA/rsa1024: key_test.go:249: signing failed: command failed: smart card error 6982: security status not satisfied
=== RUN   TestYubiKeySignRSA/rsa2048
    TestYubiKeySignRSA/rsa2048: key_test.go:249: signing failed: command failed: smart card error 6982: security status not satisfied
--- FAIL: TestYubiKeySignRSA (19.47s)
    --- FAIL: TestYubiKeySignRSA/rsa1024 (4.92s)
    --- FAIL: TestYubiKeySignRSA/rsa2048 (14.54s)
=== RUN   TestYubiKeyDecryptRSA
=== RUN   TestYubiKeyDecryptRSA/rsa1024
    TestYubiKeyDecryptRSA/rsa1024: key_test.go:305: decryption failed: command failed: smart card error 6982: security status not satisfied
=== RUN   TestYubiKeyDecryptRSA/rsa2048
    TestYubiKeyDecryptRSA/rsa2048: key_test.go:305: decryption failed: command failed: smart card error 6982: security status not satisfied
--- FAIL: TestYubiKeyDecryptRSA (36.03s)
    --- FAIL: TestYubiKeyDecryptRSA/rsa1024 (4.67s)
    --- FAIL: TestYubiKeyDecryptRSA/rsa2048 (31.36s)
=== RUN   TestYubiKeyAttestation
    TestYubiKeyAttestation: key_test.go:325: getting attestation certificate: command failed: smart card error 6a82: data object or application not found
--- FAIL: TestYubiKeyAttestation (0.03s)
=== RUN   TestYubiKeyStoreCertificate
--- PASS: TestYubiKeyStoreCertificate (3.54s)
=== RUN   TestYubiKeyGenerateKey
=== RUN   TestYubiKeyGenerateKey/ec_256
=== RUN   TestYubiKeyGenerateKey/ec_384
    TestYubiKeyGenerateKey/ec_384: key_test.go:462: generating key: command failed: smart card error 6a80: incorrect parameter in command data field
=== RUN   TestYubiKeyGenerateKey/rsa_1024
=== RUN   TestYubiKeyGenerateKey/rsa_2048
--- FAIL: TestYubiKeyGenerateKey (20.94s)
    --- PASS: TestYubiKeyGenerateKey/ec_256 (0.67s)
    --- FAIL: TestYubiKeyGenerateKey/ec_384 (0.07s)
    --- PASS: TestYubiKeyGenerateKey/rsa_1024 (5.02s)
    --- PASS: TestYubiKeyGenerateKey/rsa_2048 (15.18s)
=== RUN   TestYubiKeyPrivateKey
    TestYubiKeyPrivateKey: key_test.go:492: getting private key: get attestation cert: command failed: smart card error 6d00
--- FAIL: TestYubiKeyPrivateKey (3.36s)
=== RUN   TestYubiKeyPrivateKeyPINError
    TestYubiKeyPrivateKeyPINError: key_test.go:542: getting private key: get attestation cert: command failed: smart card error 6d00
--- FAIL: TestYubiKeyPrivateKeyPINError (0.67s)
=== RUN   TestContextClose
--- PASS: TestContextClose (0.00s)
=== RUN   TestContextListReaders
--- PASS: TestContextListReaders (0.00s)
=== RUN   TestHandle
--- PASS: TestHandle (0.00s)
=== RUN   TestTransaction
--- PASS: TestTransaction (0.00s)
=== RUN   TestErrors
--- PASS: TestErrors (0.00s)
=== RUN   TestGetVersion
--- PASS: TestGetVersion (0.02s)
=== RUN   TestCards
--- PASS: TestCards (0.00s)
=== RUN   TestNewYubiKey
--- PASS: TestNewYubiKey (0.02s)
=== RUN   TestMultipleConnections
--- PASS: TestMultipleConnections (0.02s)
=== RUN   TestYubiKeySerial
--- PASS: TestYubiKeySerial (0.05s)
=== RUN   TestYubiKeyLoginNeeded
    TestYubiKeyLoginNeeded: piv_test.go:140: expected no login needed
--- FAIL: TestYubiKeyLoginNeeded (0.07s)
=== RUN   TestYubiKeyPINRetries
--- PASS: TestYubiKeyPINRetries (0.03s)
=== RUN   TestYubiKeyReset
--- PASS: TestYubiKeyReset (3.26s)
=== RUN   TestYubiKeyLogin
--- PASS: TestYubiKeyLogin (0.05s)
=== RUN   TestYubiKeyAuthenticate
--- PASS: TestYubiKeyAuthenticate (0.07s)
=== RUN   TestYubiKeySetManagementKey
--- PASS: TestYubiKeySetManagementKey (0.19s)
=== RUN   TestYubiKeyUnblockPIN
--- PASS: TestYubiKeyUnblockPIN (0.20s)
=== RUN   TestYubiKeyChangePIN
--- PASS: TestYubiKeyChangePIN (0.15s)
=== RUN   TestYubiKeyChangePUK
--- PASS: TestYubiKeyChangePUK (0.14s)
=== RUN   TestChangeManagementKey
--- PASS: TestChangeManagementKey (0.18s)
=== RUN   TestMetadata
--- PASS: TestMetadata (3.43s)
=== RUN   TestMetadataUnmarshal
--- PASS: TestMetadataUnmarshal (0.00s)
=== RUN   TestMetadataMarshal
--- PASS: TestMetadataMarshal (0.00s)
=== RUN   TestMetadataUpdate
--- PASS: TestMetadataUpdate (0.00s)
=== RUN   TestMetadataAdditoinalFields
--- PASS: TestMetadataAdditoinalFields (0.00s)
FAIL
FAIL    github.com/go-piv/piv-go/piv    102.041s
FAIL

Maybe #50 introduced this?

https://developers.yubico.com/PIV/Introduction/PIV_attestation.html

This document describes the attestation feature added to the PIV module in YubiKey 4.3 and 5. For actual commands to work with the attestation feature, please see the yubico-piv-tool documentation.

Probably Yubikey 4.2.8 says "invalid instruction" for the get attestation command and that's why it's failing.

Yep you're right :) Sent #59

authors: ericchiang joneskoo

repo: go-piv/piv-go


text:
Add co dependent validations

Enhancements for v9 that added support for codependent field validations such as for mutually exclusive fields.
I'm brand new to Go so any and all suggestions and comments will be appreciated.
In particular, I'm uncomfortable with the function AddGroupField() being passed an interface{} when it expects it to be a *validate object. The passed object should be the FieldLevel object passed to validation functions but depends on the validate struct which isn't available externally. Perhaps there is a better way of doing this?
Make sure that you've checked the boxes below before you submit PR:

[x] Tests exist or have been written that cover this particular change.

Change Details:

Added validationFlag's to enable special treatment for custom validations (and baked-ins). These flags can be passed in when registering custom validations (or through bakedInFlags). In particular, codependent field type validations may need one or more of these flags to run properly. I defined three flags:

VFlagRunOnNil - run the validation even if the field is a nil ptr or interface;
VFlagRunOnStruct - run validation at the struct level (only required, omitempty, and struct level functions run at this level otherwise);
VFlagCoDependentErr - error should output in a different format for codependent field validations.

Added CoDependentGroups global variable to store/manage named groups of codependent fields. This variable and its functions are exported to allow custom codependent validations. Functions include:

AddGroupField() - assigns a field to a named group.
CloseGroup() - marks a group as validated (prevents adding fields to a group after it has already been validated).
ClearGroups() - removes group(s) (all groups by default or just those passed in). validator.New() calls this function, but it can be called manually if needed.
Count() - returns the number of groups defined.
Fields() - returns the slice of fields (validate objects that can be passed to Func functions) in the given group.
FieldsOk() - same as above but also returns ok to specify if the given group exists.

Updated validator code to support codependent validations:

Set certain variables prior to validation func call in order to make them available validation funcs.
Added code to run flagged validations even if the field is a nil pointer of interface.
Added code to run flagged validations at the struct level  (for codependent fields that are sub-structs). Note that groups validations never fail so validations on sub-struct fields will also run, but when at_least, no_more_than, and mutex fail, validations do not run on sub-struct fields.

Added 'kind' field to cField struct to identify the original base kind of the field (not the internal type used in most cases)
Added four baked in validation functions that run common basic codependent field validations. For purposes of these functions 'non-empty' is defined using required with two additional requirements: (a) interface{} values are evaluated as their runtime type not as interface{} and (b) slices, arrays, and maps must have a non-zero length. Functions are the following:

group - Takes a group name and adds the field to that group. This function doesn't actually validate anything so it always returns true.
at_least - Takes a group name and an optional int N. Verifies that at least N fields in the group are non-empty. N defaults to 1 if not included. Closes group so it should be specified only on the last field in the group. Further codependent validations may be run on the group, but no new fields may be added to it after running this validation. 'group' does not need to be specified on the field where this validation is specified as this function also adds the field to the group prior to testing.
no_more_than - Same as at_least except that is verifies that no more than N fields in the group are non-empty.
mutex - Takes a group name only and verifies that no more and no less than one field in a group is non-empty. Otherwise, it functions the same as at_least.

Added additional format for error output string so that all fields in a codependency group will be listed. Custom validations can access this format by passing the VFlagCoDependentErr flag on registration.
Updated doc.go
Updated tests with codependent validation tests (Noticed that some existing tests appear to fail. I verified that this was also the case before I made my changes)
_examples/custom-codependent/main.go - Added example of a custom validation implementing a codependent fields check. This check ensures that the sum of three fields is greater than or equal to a given value. The important points:

when registering the custom validation a validation flag is passed in that changes the default error message for the validation,
the validation function accesses the CoDependentGroups global variable in order to gain access to and manage the codependent fields.

@go-playground/admins

Coverage decreased (-0.3%) to 99.716% when pulling f476c96933839e75b20ddb3e849c8a312def03c0 on pantsmann:add-co-dependent-validations into 556b9da3c05f2a935bc086fb5a0bb55dd8112d2d on go-playground:v9.

Working on adding default English translations for at_least, no_more_than, and mutex.

Note: I realize that some of the functionality in this pull-request could already be done with required_without and required_without_all. The benefit of this new method is that it only runs the validation check once and only produces a single error upon failure. Reproducing mutex with required_without_all on three fields would run the validation check three times and produce three errors (one for each field).
Additionally, this pull request adds greater flexibility for custom validations through validation flags and CoDependentGroups structure.

@pantsmann thanks for the PR!
It's a lot to take in and don't want to rush integrating something like this, please be patient.

@deankarn no worries. There are still a few translation-related changes I'd like to make but I haven't been able to get around to them for a few weeks.

Closing due to age this really requires a new major version as it's a lot of changes.

authors: coveralls deankarn pantsmann

repo: go-playground/validator


text:
What 's the right way to use RedisClient?

In my benchmark testing,
when I use redisClient.Close() in test case, it has much higher qps.
when I commented Close(), it has lower qps.
But, in my core bussiness, using redisClient.Close(), it reported: "redis: client is closed".
And,
what should I do? below is my benchmark testing.
package test

import (
	"testing"
)

func pfaddPipeline() {
	pipeline := redisClient.Pipeline()
	//defer pipeline.Close()

	pipeline.PFAdd("databases", "redis", "mysql", "mongodb")
	pipeline.PFCount("databases")
	pipeline.Exec()
	redisClient.Close()
}

func pfaddPipelineDefer() {
	defer redisClient.Close()
	pipeline := redisClient.Pipeline()
	//defer pipeline.Close()

	pipeline.PFAdd("databases", "redis", "mysql", "mongodb")
	pipeline.PFCount("databases")
	pipeline.Exec()
}

func pfadd() {
	redisClient.PFAdd("databases", "redis", "mysql", "mongodb")
	redisClient.PFCount("databases")
	redisClient.Close()
}

func pfaddDefer() {
	defer redisClient.Close()

	redisClient.PFAdd("databases", "redis", "mysql", "mongodb")
	redisClient.PFCount("databases")

}

func Benchmark_pfadd(b *testing.B) {
	//use b.N for looping
	for i := 0; i < b.N; i++ {
		pfadd()
	}
}

func Benchmark_pfadd_defer(b *testing.B) {
	//use b.N for looping
	for i := 0; i < b.N; i++ {
		pfaddDefer()
	}
}

func Benchmark_pfadd_pipeline(b *testing.B) {
	//use b.N for looping
	for i := 0; i < b.N; i++ {
		pfaddPipeline()
	}
}

func Benchmark_pfadd_pipeline_defer(b *testing.B) {
	//use b.N for looping
	for i := 0; i < b.N; i++ {
		pfaddPipelineDefer()
	}
}

You definitely should not close Client. As for the benchmark - most likely you don't check for errors so you measure how fast client returns "redis: client is closed" error.

authors: eric-chao vmihailenco

repo: go-redis/redis


text:
WIP: superfluid plugin

Relates to:
Adding a Superfluid Plugin to Goat SDK
Background
Developers looking to build AI Agents using Superfluid can use Goat SDK in combination with Eliza in order to interact easily with Superfluid
What does this PR do?
This PR creates a Superfluid plugin for it to be added to the goat SDK
What kind of change is this?
Documentation changes needed?

Testing
Detailed testing steps

For plugins

[ ] I have tested this change locally with key pair wallets
[ ] I have tested this change locally with hosted wallets (e.g. Crossmint Smart Wallets, etc.)

Discord username

Closing this one for now since you mentioned you are working on a new PR :)

repo: goat-sdk/goat


text:
Alpha REPL issues

Checked on master branch, with the binary executable from make install.

Empty echo backs are shown in some cases:

showing #=> at the head of echo back would be better for usability.

exit not working (needs ^C to exit instead for now):

>> exit
UndefinedMethodError: Undefined Method 'exit' for <Instance of: Object>
ERROR: UndefinedMethodError: Undefined Method 'exit' for <Instance of: Object>

Command history with up arrow key is not working for now:

>> ^[[A^[[A

Pasting multiple lines works, but extra >> >> >> >> is shown when a multiple-line block is pasted:

Pasting statements at once returns multiple >> at the end; >> should be echo back by line instead:

Pasting Sample-1 got an error at line 20:

puts(bar.get + baz.get + foo.get) #=> 16
UndefinedMethodError: Undefined Method '+' for
ERROR: UndefinedMethodError: Undefined Method '+' for

In addition, puts(bar.get) or puts(bar) after pasting returns nothing.
Looks like current REPL works on individual statements, but discards the generated object when multiple lines.

Pasting Sample-2 returns nothing:

In addition, I guess it reveals that several methods or expressions do not return any objects.
(Sample-2 works on Ruby's irb)
Ruby's irb assumes that any expressions return objects.

@hachi8833 Thanks for the report, and currently I can just say that assignment won't return anything. But other cases I need to investigate a little bit.

@hachi8833 I just pushed a fix for this issue, pasting code should executes normally. I'm still working on fix formatting.

Confirmed exit has been implemented by now.

Empty echo backs are shown in some cases:

Confirmed the fix by now.

Pasting Sample-2 returns nothing:

Confirmed the fix by now.

Pasting Sample-1 got an error at line 20:

Confirmed the fix by now.

Pasting multiple lines works, but extra >> >> >> >> is shown when a multiple-line block is pasted:

This still persists a little bit, but the format of REPL has been getting much better.

^[[A^[[A

The priority is not high.
Thus I close the issue for now.
(I should've split the issue in chunks.)

repo: goby-lang/goby


text:
How do I find the pipeline label id ?

Hi,
Lets say I've instantiated a pipeline via the POST call. The response should tell me the pipeline label that has been kickstarted and I should be able to query on that pipeline label. I remember something similar was present earlier . Can you tell me if this requirement can be met with the current list of apis ?
Thanks

Closing, since there's a duplicate question in the gocd issue page. Questions should be asked on the mailing list. :P
Anyway, I'll answer there.

authors: arvindsv madhurranjan

repo: gocd/documentation


text:
add Default implementation to NodePath

The Default implementation will construct a NodePath from a
default GodotString.

bors try

bors retry

bors r+

repo: godot-rust/godot-rust


text:
Add a name optional argument to #[export]

This allows exporting methods to godot under a different name.
This commit implements the feature described in #732

@toasteater  Just made a new commit addressing your comments. Let me know if there's anything else!


text:
Adding nodes without root node present only works correctly when no node was ever parented previously

Operating system or device, Godot version, GPU Model and driver (if graphics related):
Current master @  bf45e56
Issue description:
https://github.com/godotengine/godot/pull/13166 was a vast improvement for how creating a node in a new scene without a root present works, but seems to still have an unhandled case:
First, it works as expected:

Drang-and-drop a file from the FileSystem pane into a empty scene
The popup asks if the new node should be created as root Sprite, Light2D, etc.
Choose one, hit OK, the node gets created as a root node, everything works

You can even click on the new node in the scene, delete it, and repeat. Works.
But: Do the following, and it no longer works:

Drang-and-drop a file from the FileSystem pane into a empty scene
The popup asks if the new node should be created as root Sprite, Light2D, etc.
Choose one, hit OK, the node gets created as a root node, everything works
Select the created node in the scene, and now drag and drop another node into the scene
The new node gets created with the previous node as the parent
Delete both
Now retry from 1, when you press OK in the popup, nothing happens, you can no longer create root nodes this way

CC @Krakean

@akien-mga @mhilbrunner
got it, will take a look today

@Krakean If you need any clarification to reproduce this or anything else from me that can help, just ask :)
Thanks for your work on this!

@mhilbrunner done #14533, test it when you will have time

authors: Krakean akien-mga mhilbrunner

repo: godotengine/godot


text:
Collision exceptions don't work with TileMap node

Godot version:
v3.0.1.stable.official
OS/device including version:
elementary OS 0.4.1 Loki
Ubuntu 16.04.3 LTS
Linux 4.13.0-36-generic
Issue description:
Using the add_collision_exception_with method of a KinematicBody2D when the other Node is a TileMap does not result in collisions being excepted.
Expected behavior that KinematicBody2D falls through TileMap.
Steps to reproduce:

Generate Tileset from scene with hierarchy

+ Node2D
  + Sprite
    + StaticBody2D
      - CollisionPolygon2D

Create new scene with a TileMap and KinematicBody2D.
Add Tileset to TileMap and create a platform for the KinematicBody2D.
On key event, attempt to add collision exception between TileMap and KinematicBody2D using add_collision_exception_with(get_node("../TileMap"))

I have the same problem :/

Still valid in 07db4d57d
Here's MRP:
ReproductionProject.zip

For anyone coming across this and looking for a mid-term solution for raycasting past a TileMap, I worked around this with a process of replacing TileMap-based exception addds with shifting the Raycast2D along its own length, then shortening the length.
So, instead of adding an exception, the Raycast2D is moved along its length by a set increment (and shortened, so that the initial distance doesn't get extended). You continue to loop as if there's an exception, and eventually you'll either get past the TileMap collision, see something else, or run out of length to increment. Seems to work fine in practice! You do need to remember to reset the raycast's length at the start of your loop.

Confirming issue still exists in 3.5 stable with RayCast2D.

For anyone coming across this and looking for a mid-term solution for raycasting past a TileMap, I worked around this with a process of replacing TileMap-based exception addds with shifting the Raycast2D along its own length, then shortening the length.
So, instead of adding an exception, the Raycast2D is moved along its length by a set increment (and shortened, so that the initial distance doesn't get extended). You continue to loop as if there's an exception, and eventually you'll either get past the TileMap collision, see something else, or run out of length to increment. Seems to work fine in practice! You do need to remember to reset the raycast's length at the start of your loop.

There's a simpler TileMap workaround in case you're looping RayCast2D collisions multiple times per frame to get all of them instead of just the first one it hits:

In the loop, check if the collision object is a TileMap and if so add it manually to a custom list of TileMap exceptions.

Each iteration check if the collision object is both a TileMap and in the exception list and if so ignore it.

Force the raycast to update in the same frame using RayCast2D#ForceRaycastUpdate.

(Don't forget to clear the exception list first, outside the loop.)
You can see my full working code for this here.

Closed by #73851.

authors: KoBeWi akien-mga danilo2205 jakefriend-dev knightofiam nmearl


text:
Pick tile shortcut on macOS

Godot version: 3.0.3.RC3

OS/device including version: macOS High Sierra

Issue description:

The "Pick Tile" shortcut is Control-Click which on macOS registers as a right click and deletes the tile instead of picking it. The Shortcuts configuration does not seem to include any option to change the key.
Steps to reproduce:
Minimal reproduction project:

@vnen that should be the behavior indeed but it looks like the macOS shortcuts are not configured correctly.

Duplicate of #10761.


text:
Directory API opens "res://" on initialization, and can be used before running any explicit open() call

Godot version:

Godot 3.0
OS/device including version:

MacBook Pro (15-inch, 2016)
MacOS Sierra
Issue description:

I'm not 100% sure what caused the error but I tried to open a directory and got a 31 back.  Now, I should have been checking this return value but I didn't.  I then proceeded to delete everything in that directory.  Due to the error though the directory that was actually opened was "res://".
Steps to reproduce:
This will make a file in res:// and then delete it even though the directory failed to open.  This seems like dangerous behavior (as I found it was since I cleared out all the files in the root of the GUT tool).  I got them back no problem but not everybody has backups and this could mess up a project real bad just b/c they forgot to check the return value.
extends SceneTree

func file_touch(path):
	print('creating ', path)
	var f = File.new()
	f.open(path, f.WRITE)
	f.close()

func delete_file(directory, file):
	print('deleting ', directory, file)
	var d = Directory.new()
	var result = d.open(directory)
	d.remove(file)
	print('result = ', result)

func _init():
	file_touch('res://delete_this_guy.txt')
	delete_file('asdf://', 'delete_this_guy.txt')
	quit()

Minimal reproduction project:

It is not that Directory opens "res://" on error. This is the default directory. You can remove this line var result = d.open(directory) and it will still delete the file. Failed open operation just means the current directory is not changed.
The correct "fix" would be not allowing any Directory operations unless you open a directory, but that sounds like "enhancement" and it's a thing for another issue.

I'm adding a mention to this "feature" in the docs with #34944.
IMO we should consider changing this behavior for 4.0 to force users to explicitly open a folder before doing any operation. This would require some refactoring of the way DirAccess is implemented in the different drivers.

So #40151 basically resolved this issue (not sure why it wasn't closed).

authors: KoBeWi akien-mga bitwes


text:
Area2D stops working when you click on an area2d node in the inspector

Godot version:

v3.1.stable.official
OS/device including version:

Windows 10
Issue description:

For some reason I noticed if an Area2D node is selected in the editor inspector and you run your game, the Area2D node that you clicked on will no longer work until you click off of it in the editor inspector and restart your game.
Steps to reproduce:

Click on an Area2D node.
Run your game.
Area2D node no longer works.

Cannot reproduce on Ubuntu 18.04 using the coins on the platformer demo.
With inspector you refer to the scene tree?

Yea im referring to the scene tree, also i forgot to mention but the Area2d node comes from a scene.

wait, the area2d no longer works in the game, or in the editor?

It no longer works in the game once you click on the Area2D node in the inspector.

I tested this out on v3.2.3 and I assume whatever bug that was happening was fixed, so I guess it's fixed.

I tested this out on v3.2.3 and I assume whatever bug that was happening was fixed, so I guess it's fixed.

authors: Flairieve eon-s girng


text:
C++ API vs documentation

I've been evaluating godot with C++ for few days now, and I have a returning problem. For example, I'd like to move a 2D character, with move_and_slide.  The parameters in the doc (https://docs.godotengine.org/en/3.1/classes/class_kinematicbody2d.html#class-kinematicbody2d-method-move-and-slide)  differs from the parameters what I read in the c++ api code (Vector2 KinematicBody2D::move_and_slide(const Vector2 linear_velocity, const Vector2 floor_normal, const bool infinite_inertia, const double slope_stop_min_velocity, const int64_t max_bounces, const double floor_max_angle) {)
I tried to follow the code I found in the C++ api, but the game just stops, so I may be misread something. So now I ask two questions:
1: is it the proper way to do things in C++?
2: is there any doc, how can I see stack trace using c++ when the game fails to run?

The C++ side of Godot is very similar to the scripting API but may have some extras or differing names. Usually you can do things the same way, but because C++ is not GDScript/C# there can be some differences related to the language and the fact you could use more internal functionality.

You can see a stack trace using a normal C++ debugger, like GDB or Visual Studio debugger (or even in QtCreator with CDB backend).

Which "C++" are you actually writing? Are you writing a module (forking Godot) or using GDNative?

Hi, thank you for the info, all clear and helpful. I'll try all of those out :)
3: I'm using GDNative
Something like this, but currently it fails:
void PlayerController::_physics_process(float delta){
    Vector2 motion = Vector2();
    motion.y += GRAVITY;

    if(Input::get_singleton()->is_action_pressed("move_right")){
        motion.x += SPEED;
    }
    else {
        motion.x = 0;
    }

    move_and_slide(motion, Vector2(0,-1), true, 0.0, 4, 0.785398);
}

I think the issue can be closed.

Oh, I thought you were coding a module.
If you use GDNative, then the API should just be the same as the script API, with some adjustments to work with C++. If something fails, try it in GDScript, and if it also fails then perhaps the issue isn't GDNative.

Well.
This is the method in the compiled KinematicBody2D.cpp:
Vector2 KinematicBody2D::move_and_slide(const Vector2 linear_velocity, const Vector2 floor_normal, const bool infinite_inertia, const double slope_stop_min_velocity, const int64_t max_bounces, const double floor_max_angle) {
	static godot_method_bind *mb = nullptr;
	if (mb == nullptr) {
		mb = godot::api->godot_method_bind_get_method("KinematicBody2D", "move_and_slide");
	}
	return ___godot_icall_Vector2_Vector2_Vector2_bool_float_int_float(mb, (const Object *) this, linear_velocity, floor_normal, infinite_inertia, slope_stop_min_velocity, max_bounces, floor_max_angle);
}

And this is in the GDScript documentation:
Vector2 move_and_slide ( Vector2 linear_velocity, Vector2 floor_normal=Vector2( 0, 0 ), bool stop_on_slope=false, int max_slides=4, float floor_max_angle=0.785398, bool infinite_inertia=true )

Note: I've followed this guy: https://github.com/GodotNativeTools/godot-cpp

Note: I've followed this guy: https://github.com/GodotNativeTools/godot-cpp

Do you have the API synced with 3.1-stable from 3 days ago? It seems like your bindings are outdated, which is why your move_and_slide implementation doesn't match the documentation.

I rebuilt a new one, and in the KinematicBody2D.hpp, the method is the same still:
Vector2 move_and_slide(const Vector2 linear_velocity, const Vector2 floor_normal = Vector2(0, 0), const bool infinite_inertia = true, const double slope_stop_min_velocity = 5, const int64_t max_bounces = 4, const double floor_max_angle = 0.785398);

CC @BastiaanOlij @karroffel, it looks like godot-cpp is not in sync with 3.1.

@akien-mga well that is why I did all that work a few days ago building 3.1 stable from the 3.1 branch and making sure all the files are updated and in doing so finding out the api.json logic was broken. But with the fix I applied as far as I'm aware the files in godot_headers are correct.
@mudlee seeing the api.json is part of godot_headers make sure you've actually pulled in all its changes, simply doing a pull on godot-cpp won't bring in the updates on submodules, you may need to do a git submodule update as well. Also make sure to regenerate the bindings or you'll just end up recompiling the previous version, I would even delete the previous files from include/gen and src/gen (leave the .gitignore file though) before regenerating the bindings just to be safe..

@BastiaanOlij I think I found the problem. I somehow referenced this as a submodule in my code: https://github.com/GodotNativeTools/godot-cpp/tree/783016677edf05faf8d5856d46f2cab931d7e3a3

@mudlee I tent to make godot-cpp a submodule in my projects as well, that in itself isn't wrong however submodules aren't always the easiest to manage especially when there are additional dependencies so if you're not careful, you end up with the wrong commit

authors: BastiaanOlij Zylann akien-mga mudlee


text:
flickering black screen at startup GLES2 (export android x86)

Godot version:
3.1.1
Target OS/device including version:
Asus K010 build WW-2.2.33.144
android 4.4.2 (32 bit)
CPU : Processeur Intel Atom® Z3745
GPU : Intel HD Graphics (Bay Trail)
OpenGL ES 3.0 - Build CL-260519-CI-15.33-24169
Issue description:
Hi,
when i start a remote debug of a GLES2 project on an Asus K010, i just get a flickering black screen.
Thanks for looking.
adb logcat -s godot:E :
E/godot   (11038): **ERROR**: SceneShaderGLES2: Vertex shader compilation failed:
E/godot   (11038): ERROR: 1:50: 'transpose' : built-in redefinition is not allowed
E/godot   (11038): ERROR: 3:199: 'vertex_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:199: '=' :  cannot convert from 'float' to '4-component vector of float'
E/godot   (11038): ERROR: 3:201: 'world_transform' : undeclared identifier
E/godot   (11038): ERROR: 3:201: '=' :  cannot convert from 'float' to '4X4 (default)row_major matrix of float'
E/godot   (11038): ERROR: 3:215: 'normal_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:215: '=' :  cannot convert from 'float' to '3-component vector of float'
E/godot   (11038): ERROR: 3:299: 'camera_inverse_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'vertex_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:29: 'normal_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:29: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:233: 'projection_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:233: 'constructor' : not enough data provided for constructi
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:129:_display_error_with_code() - SceneShaderGLES2: Vertex shader compilation failed:
E/godot   (11038): ERROR: 1:50: 'transpose' : built-in redefinition is not allowed
E/godot   (11038): ERROR: 3:199: 'vertex_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:199: '=' :  cannot convert from 'float' to '4-component vector of float'
E/godot   (11038): ERROR: 3:201: 'world_transform' : undeclared identifier
E/godot   (11038): ERROR: 3:201: '=' :  cannot convert from 'float' to '4X4 (default)row_major matrix of float'
E/godot   (11038): ERROR: 3:215: 'normal_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:215: '=' :  cannot convert from 'float' to '3-component vector of float'
E/godot   (11038): ERROR: 3:299: 'camera_inverse_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'vertex_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:29: 'normal_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:29: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:233: 'projection_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:
E/godot   (11038): **ERROR**: Method/Function Failed, returning: __null
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:288:get_current_version() - Method/Function Failed, returning: __null
E/godot   (11038): **ERROR**: Condition ' !version ' is true. returned: false
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:88:bind() - Condition ' !version ' is true. returned: false
E/godot   (11038): **ERROR**: SceneShaderGLES2: Vertex shader compilation failed:
E/godot   (11038): ERROR: 2:50: 'transpose' : built-in redefinition is not allowed
E/godot   (11038): ERROR: 4:199: 'vertex_attrib' : undeclared identifier
E/godot   (11038): ERROR: 4:199: '=' :  cannot convert from 'float' to '4-component vector of float'
E/godot   (11038): ERROR: 4:201: 'world_transform' : undeclared identifier
E/godot   (11038): ERROR: 4:201: '=' :  cannot convert from 'float' to '4X4 (default)row_major matrix of float'
E/godot   (11038): ERROR: 4:215: 'normal_attrib' : undeclared identifier
E/godot   (11038): ERROR: 4:215: '=' :  cannot convert from 'float' to '3-component vector of float'
E/godot   (11038): ERROR: 4:299: 'camera_inverse_matrix' : undeclared identifier
E/godot   (11038): ERROR: 6:28: 'vertex_interp' : undeclared identifier
E/godot   (11038): ERROR: 6:28: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 6:29: 'normal_interp' : undeclared identifier
E/godot   (11038): ERROR: 6:29: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 6:233: 'projection_matrix' : undeclared identifier
E/godot   (11038): ERROR: 6:233: 'constructor' : not enough data provided for constructi
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:129:_display_error_with_code() - SceneShaderGLES2: Vertex shader compilation failed:
E/godot   (11038): ERROR: 2:50: 'transpose' : built-in redefinition is not allowed
E/godot   (11038): ERROR: 4:199: 'vertex_attrib' : undeclared identifier
E/godot   (11038): ERROR: 4:199: '=' :  cannot convert from 'float' to '4-component vector of float'
E/godot   (11038): ERROR: 4:201: 'world_transform' : undeclared identifier
E/godot   (11038): ERROR: 4:201: '=' :  cannot convert from 'float' to '4X4 (default)row_major matrix of float'
E/godot   (11038): ERROR: 4:215: 'normal_attrib' : undeclared identifier
E/godot   (11038): ERROR: 4:215: '=' :  cannot convert from 'float' to '3-component vector of float'
E/godot   (11038): ERROR: 4:299: 'camera_inverse_matrix' : undeclared identifier
E/godot   (11038): ERROR: 6:28: 'vertex_interp' : undeclared identifier
E/godot   (11038): ERROR: 6:28: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 6:29: 'normal_interp' : undeclared identifier
E/godot   (11038): ERROR: 6:29: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 6:233: 'projection_matrix' : undeclared identifier
E/godot   (11038): ERROR: 6:
E/godot   (11038): **ERROR**: Method/Function Failed, returning: __null
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:288:get_current_version() - Method/Function Failed, returning: __null
E/godot   (11038): **ERROR**: Condition ' !version ' is true. returned: false
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:88:bind() - Condition ' !version ' is true. returned: false
E/godot   (11038): **ERROR**: SceneShaderGLES2: Vertex shader compilation failed:
E/godot   (11038): ERROR: 2:50: 'transpose' : built-in redefinition is not allowed
E/godot   (11038): ERROR: 4:199: 'vertex_attrib' : undeclared identifier
E/godot   (11038): ERROR: 4:199: '=' :  cannot convert from 'float' to '4-component vector of float'
E/godot   (11038): ERROR: 4:201: 'world_transform' : undeclared identifier
E/godot   (11038): ERROR: 4:201: '=' :  cannot convert from 'float' to '4X4 (default)row_major matrix of float'
E/godot   (11038): ERROR: 4:215: 'normal_attrib' : undeclared identifier
E/godot   (11038): ERROR: 4:215: '=' :  cannot convert from 'float' to '3-component vector of float'
E/godot   (11038): ERROR: 4:299: 'camera_inverse_matrix' : undeclared identifier
E/godot   (11038): ERROR: 6:28: 'vertex_interp' : undeclared identifier
E/godot   (11038): ERROR: 6:28: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 6:29: 'normal_interp' : undeclared identifier
E/godot   (11038): ERROR: 6:29: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 6:233: 'projection_matrix' : undeclared identifier
E/godot   (11038): ERROR: 6:233: 'constructor' : not enough data provided for constructi
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:129:_display_error_with_code() - SceneShaderGLES2: Vertex shader compilation failed:
E/godot   (11038): ERROR: 2:50: 'transpose' : built-in redefinition is not allowed
E/godot   (11038): ERROR: 4:199: 'vertex_attrib' : undeclared identifier
E/godot   (11038): ERROR: 4:199: '=' :  cannot convert from 'float' to '4-component vector of float'
E/godot   (11038): ERROR: 4:201: 'world_transform' : undeclared identifier
E/godot   (11038): ERROR: 4:201: '=' :  cannot convert from 'float' to '4X4 (default)row_major matrix of float'
E/godot   (11038): ERROR: 4:215: 'normal_attrib' : undeclared identifier
E/godot   (11038): ERROR: 4:215: '=' :  cannot convert from 'float' to '3-component vector of float'
E/godot   (11038): ERROR: 4:299: 'camera_inverse_matrix' : undeclared identifier
E/godot   (11038): ERROR: 6:28: 'vertex_interp' : undeclared identifier
E/godot   (11038): ERROR: 6:28: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 6:29: 'normal_interp' : undeclared identifier
E/godot   (11038): ERROR: 6:29: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 6:233: 'projection_matrix' : undeclared identifier
E/godot   (11038): ERROR: 6:
E/godot   (11038): **ERROR**: Method/Function Failed, returning: __null
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:288:get_current_version() - Method/Function Failed, returning: __null
E/godot   (11038): **ERROR**: Condition ' !version ' is true. returned: false
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:88:bind() - Condition ' !version ' is true. returned: false
E/godot   (11038): **ERROR**: SceneShaderGLES2: Vertex shader compilation failed:
E/godot   (11038): ERROR: 1:50: 'transpose' : built-in redefinition is not allowed
E/godot   (11038): ERROR: 3:199: 'vertex_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:199: '=' :  cannot convert from 'float' to '4-component vector of float'
E/godot   (11038): ERROR: 3:201: 'world_transform' : undeclared identifier
E/godot   (11038): ERROR: 3:201: '=' :  cannot convert from 'float' to '4X4 (default)row_major matrix of float'
E/godot   (11038): ERROR: 3:215: 'normal_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:215: '=' :  cannot convert from 'float' to '3-component vector of float'
E/godot   (11038): ERROR: 3:299: 'camera_inverse_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'vertex_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:29: 'normal_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:29: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:233: 'projection_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:233: 'constructor' : not enough data provided for constructi
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:129:_display_error_with_code() - SceneShaderGLES2: Vertex shader compilation failed:
E/godot   (11038): ERROR: 1:50: 'transpose' : built-in redefinition is not allowed
E/godot   (11038): ERROR: 3:199: 'vertex_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:199: '=' :  cannot convert from 'float' to '4-component vector of float'
E/godot   (11038): ERROR: 3:201: 'world_transform' : undeclared identifier
E/godot   (11038): ERROR: 3:201: '=' :  cannot convert from 'float' to '4X4 (default)row_major matrix of float'
E/godot   (11038): ERROR: 3:215: 'normal_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:215: '=' :  cannot convert from 'float' to '3-component vector of float'
E/godot   (11038): ERROR: 3:299: 'camera_inverse_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'vertex_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:29: 'normal_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:29: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:233: 'projection_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:
E/godot   (11038): **ERROR**: Method/Function Failed, returning: __null
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:288:get_current_version() - Method/Function Failed, returning: __null
E/godot   (11038): **ERROR**: Condition ' !version ' is true. returned: false
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:88:bind() - Condition ' !version ' is true. returned: false
E/godot   (11038): **ERROR**: SceneShaderGLES2: Vertex shader compilation failed:
E/godot   (11038): ERROR: 1:50: 'transpose' : built-in redefinition is not allowed
E/godot   (11038): ERROR: 3:199: 'vertex_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:199: '=' :  cannot convert from 'float' to '4-component vector of float'
E/godot   (11038): ERROR: 3:201: 'world_transform' : undeclared identifier
E/godot   (11038): ERROR: 3:201: '=' :  cannot convert from 'float' to '4X4 (default)row_major matrix of float'
E/godot   (11038): ERROR: 3:215: 'normal_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:215: '=' :  cannot convert from 'float' to '3-component vector of float'
E/godot   (11038): ERROR: 3:299: 'camera_inverse_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'vertex_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:29: 'normal_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:29: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:233: 'projection_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:233: 'constructor' : not enough data provided for constructi
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:129:_display_error_with_code() - SceneShaderGLES2: Vertex shader compilation failed:
E/godot   (11038): ERROR: 1:50: 'transpose' : built-in redefinition is not allowed
E/godot   (11038): ERROR: 3:199: 'vertex_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:199: '=' :  cannot convert from 'float' to '4-component vector of float'
E/godot   (11038): ERROR: 3:201: 'world_transform' : undeclared identifier
E/godot   (11038): ERROR: 3:201: '=' :  cannot convert from 'float' to '4X4 (default)row_major matrix of float'
E/godot   (11038): ERROR: 3:215: 'normal_attrib' : undeclared identifier
E/godot   (11038): ERROR: 3:215: '=' :  cannot convert from 'float' to '3-component vector of float'
E/godot   (11038): ERROR: 3:299: 'camera_inverse_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'vertex_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:28: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:29: 'normal_interp' : undeclared identifier
E/godot   (11038): ERROR: 5:29: 'assign' :  cannot convert from '3-component vector of float' to 'float'
E/godot   (11038): ERROR: 5:233: 'projection_matrix' : undeclared identifier
E/godot   (11038): ERROR: 5:
E/godot   (11038): **ERROR**: Method/Function Failed, returning: __null
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:288:get_current_version() - Method/Function Failed, returning: __null
E/godot   (11038): **ERROR**: Condition ' !version ' is true. returned: false
E/godot   (11038):    At: drivers/gles2/shader_gles2.cpp:88:bind() - Condition ' !version ' is true. returned: false

Steps to reproduce:
Create an OpenGL ES 2.0 project
Create a scene with a sprite
add the Godot icon as texture
Add export Android X 86
Remote debug
Minimal reproduction project:
gles2sprite.zip

Can anyone still reproduce this bug in Godot 3.2.3 rc3 or any later release?

Closing due to lack of update. Please comment if you can still reproduce this issue in the latest stable version of Godot.


text:
StreamPeerBuffer appears empty after writing

Godot version:
3.1.1.stable.official
OS/device including version:
Ubuntu 18.04.2 LTS
Issue description:
After writing to b: StreamPeerBuffer, b.get_available_bytes() returns zero and no data can be extracted. After assigning b.data_array = b.data_array, b.get_available_bytes() returns the correct value and data may be extracted as expected.
Steps to reproduce:
var b := StreamPeerBuffer.new()
b.put_8(123)
print(b.get_available_bytes()) # 0
print(b.get_8()) # 0
b.data_array = b.data_array
print(b.get_available_bytes()) # 1
print(b.get_8()) # 123

Minimal reproduction project:
30924.zip

Hello, this is intended when using StreamPeerBuffer, it's a buffer and when you put values, the 'cursor' position increases, if you want to check the inserted value, you need to seek back your buffer position with the method seek.
But I have to admit that the documentation is poor for this class.

Thanks for the clarification @famarques-site . I expected a stream buffer to function as a pipe or FIFO, having separate read and write cursors. If there is only one cursor, it should be used for either writing (array builder / pipe input use case) or reading (array unpacking / pipe output use case) but not both. I do not know of any use case which involves reading and writing with the same cursor. In short, if the buffer is not a FIFO, it should be either an input or an output stream.

authors: famarques-site jameskirkwood


text:
Master doesn't build on x11 with werror=yes

Godot commit
6ac6bade0af42207ae33f3d44b5d70a9a9e3a1d4
OS version
x11
Issue
The engine can't build on my machine for warning as error rule - since the CI passed I'm not sure this is a problem of my machine or an engine problem, but here the errors:
First error
In file included from ./servers/visual/rasterizer_rd/rasterizer_rd.h:35,
                 from platform/x11/os_x11.cpp:44:
./core/thread_work_pool.h:42:9: error: 'struct ThreadWorkPool::BaseWork' has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
   42 |  struct BaseWork {
      |         ^~~~~~~~

Second error
In file included from ./core/error_macros.h:34,
                 from ./core/hash_map.h:34,
                 from ./core/object.h:34,
                 from ./core/os/input.h:34,
                 from platform/x11/os_x11.h:34,
                 from platform/x11/os_x11.cpp:31:
./servers/visual/rasterizer_rd/rasterizer_storage_rd.h: In member function 'VisualServer::PrimitiveType RasterizerStorageRD::mesh_surface_get_primitive(RID, uint32_t)':
./core/error_macros.h:151:25: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
  151 |  if (unlikely((m_index) < 0 || (m_index) >= (m_size))) {                                                     \
      |               ~~~~~~~~~~^~~
./core/typedefs.h:319:41: note: in definition of macro 'unlikely'
  319 | #define unlikely(x) __builtin_expect(!!(x), 0)
      |                                         ^
./servers/visual/rasterizer_rd/rasterizer_storage_rd.h:660:3: note: in expansion of macro 'ERR_FAIL_INDEX_V'
  660 |   ERR_FAIL_INDEX_V(p_surface_index, mesh->surface_count, VS::PRIMITIVE_MAX);
      |   ^~~~~~~~~~~~~~~~
./servers/visual/rasterizer_rd/rasterizer_storage_rd.h: In member function 'void RasterizerStorageRD::mesh_surface_get_arrays_and_format(RID, uint32_t, uint32_t, RID&, RID&, RenderingDevice::VertexFormatID&)':
./core/error_macros.h:126:25: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
  126 |  if (unlikely((m_index) < 0 || (m_index) >= (m_size))) {                                                     \
      |               ~~~~~~~~~~^~~
./core/typedefs.h:319:41: note: in definition of macro 'unlikely'
  319 | #define unlikely(x) __builtin_expect(!!(x), 0)
      |                                         ^
./servers/visual/rasterizer_rd/rasterizer_storage_rd.h:668:3: note: in expansion of macro 'ERR_FAIL_INDEX'
  668 |   ERR_FAIL_INDEX(p_surface_index, mesh->surface_count);

Yes, @reduz introduced many warnings, you can't build with werror=yes currently.

Do you want to postpone the fix or can I submit a fix now?

A fix would be great, but I assume there's a lot more warnings to fix after this one :)

If you fix all warnings, please re-enable werror=yes on Travis builds.

@akien-mga yee, you are right. nevermind... even because I don't know how @reduz want to deal with comparison of unsigned expression < 0 is always false [-Werror=type-limits]

If you fix all warnings, please re-enable werror=yes on Travis builds.

Seems that also Include a lot TODO work ;-)
modules/gdnative/arvr/arvr_interface_gdnative.cpp:290:2: warning: this needs to be redone [-W#warnings]
modules/gdnative/arvr/arvr_interface_gdnative.cpp:304:2: warning: need to obtain this ID again [-W#warnings]
editor/import/editor_scene_importer_gltf.cpp:993:2: warning: line loop and triangle fan are not supported and need to be converted to lines and triangles [-W#warnings]
scene/3d/soft_body.cpp:51:2: warning: Softbody is not working, needs to be redone considering that these functions no longer exist [-W#warnings]
scene/2d/sprite.cpp:367:2: warning: this need to be obtained from CanvasItem new repeat mode (but it needs to guess it from hierarchy, need to add a function for that) [-W#warnings]
scene/resources/mesh.cpp:1113:2: warning: need to add binding to add_surface using future MeshSurfaceData object [-W#warnings]
servers/visual_server.cpp:1593:2: warning: TODO all texture methods need re-binding [-W#warnings]
servers/visual_server.cpp:1714:2: warning: TODO all giprobe methods need re-binding [-W#warnings]
servers/visual_server.cpp:1871:2: warning: TODO method bindings need to be fixed [-W#warnings]
servers/visual/rasterizer_rd/rasterizer_canvas_rd.cpp:1328:2: warning: TODO obtain from framebuffer format eventually when this is implemented [-W#warnings]
servers/visual/rasterizer_rd/rasterizer_rd.cpp:88:2: warning: TODO: likely passa bool to swap buffers to avoid display? [-W#warnings]
servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp:105:2: warning: TODO, should probably use this algorithm instead. Volunteers? - https://www.ppsloan.org/publications/ggx_filtering.pdf      / https://github.com/dariomanesku/cmft [-W#warnings]
servers/visual/rasterizer_rd/rasterizer_storage_rd.cpp:189:2: warning: TODO need to make a function in Image to swap bits for this [-W#warnings]

authors: AndreaCatania akien-mga capnm


text:
UPNP.add_port_mapping() outputs error regarding delete_port_mapping()

Godot version:
3.2.1 stable
OS/device including version:
Windows 10
The router I use is a Orange Livebox, I'm not sure what parts of the description .xml might be useful and safe to share. Also I don't have admin access to it.
Issue description:
Adding a port mapping outputs an error regarding delete_port_mapping. The port mapping seems to get properly added and can be deleted later with no error.
Issue described in this question https://godotengine.org/qa/65365/delete_port_mapping-condition-i-0-is-true
Outputs E 0:00:03.211   delete_port_mapping: Condition "i != (0)" is true. Returned: UPNP::upnp_result(i)   <C++ Source>  modules/upnp/upnp_device.cpp:90 @ delete_port_mapping()   <Stack Trace> UPNPTest.gd:8 @ _ready()
Steps to reproduce:
Run the following:
var upnp = UPNP.new()
upnp.discover()
upnp.add_port_mapping(4200)
Minimal reproduction project:
upnp bug repro.zip

This is a pretty annoying bug that is also happening in my project.

PR to fix this behaviour: https://github.com/godotengine/godot/pull/63809
Notably, this is only a cosmetic log message that shouldn't effect anything, so you can just ignore the message.

authors: Aeropulu Jose-Paulo-FaD mhilbrunner


text:
Misleading Color.from_hsv() description in documentation

Existing method(Color8()) and non-existent method(HSV()) are shown as examples in the same Description. It is written as if the HSV method existed.
https://github.com/godotengine/godot/blob/bf37ab52b3ee4b14f235cfa1ea9e48c24c616bb3/doc/classes/Color.xml#L213
https://github.com/godotengine/godot/blob/bf37ab52b3ee4b14f235cfa1ea9e48c24c616bb3/doc/classes/Color.xml#L216
I think the "HSV (210, 50, 79, 0.8) or" part is unnecessary. Delete it.

It's not a method name, it's a standard notation for colors. RGBA() is used in the same way elsewhere in the document. Though I have to admit that mixing it in the same sentence with an actual function call in the form of Color8 can be misleading.

@hazarek Thanks for pointing this out. Rather than deleting this information outright, I decided to reword that information, along with fixing other confusing RGBA comments. Feel free to review #42710 if you want.

authors: aaronfranke hazarek pycbouh