text:
Remote add -p not work with hub.protocol = https

I can't set ssh protocol for remote even if specifying -p option explicitly with hub.protocol = https.
For me, this is an unexpected. Is this a bug or expected behavior?
% hub --version
git version 1.9.1
hub version 2.2.9

# .gitconfig
[hub]
	protocol = https

% hub remote -v
origin  https://github.com/jsk-ros-pkg/jsk_recognition.git (fetch)
origin  https://github.com/jsk-ros-pkg/jsk_recognition.git (push)

% echo $GITHUB_USER
wkentaro

% hub remote add -p wkentaro

% hub remote -v
origin  https://github.com/jsk-ros-pkg/jsk_recognition.git (fetch)
origin  https://github.com/jsk-ros-pkg/jsk_recognition.git (push)
wkentaro        https://github.com/wkentaro/jsk_recognition.git (fetch)
wkentaro        https://github.com/wkentaro/jsk_recognition.git (push)

Of cource it works if I removed the config of hub.protocol from my .gitconfig, but what I want to do is setting https as the default and ssh with explicit specification.
This is because I want to use ssh my local PCs, but don't want to use ssh on servers or shared PCs because the sshkey is usually not registered to GitHub.

I'm sorry this was unclear. The -p never meant "use SSH protocol". It meant "use a writeable protocol" (as opposed to git: protocol). In the case then HTTPS is the default, -p does nothing and is deprecated. See https://github.com/github/hub/issues/1270#issuecomment-247323843
The solution for you is to do HUB_PROTOCOL=ssh hub remote add wkentaro.

This is unexpected behavior for me as well and the documentation seems to be at odds with what you're saying above. RE docs for git clone [-p]:

Use -p to select the ssh protocol unconditionally.

Is there a way to configure hub to default to the ssh protocol? I've tried...
$ git config --global hub.protocol ssh
...but that still prompts for my GH creds.
I'm not sure what I'm missing here. I've even tried...
$ HUB_PROTOCOL=ssh git clone 'user/repo'
...and this also prompts me for my GH creds. Any pointers would be helpful.

@wpcarro Is this the first time you use a hub command, by any chance? On first use, hub (not git) will ask you for your GitHub username and password so it can use the GitHub API. This happens before the repository has even started to be cloned, so it has nothing to do with git's own transport. You only have to do this once.
After that, HUB_PROTOCOL=ssh git clone user/repo should definitely use the ssh protocol for clone operation, provided that you run a fairly up-to-date version of hub.

authors: mislav wkentaro wpcarro

repo: github/hub


text:
Hub tries to create PR against upstream remote automatically. Origin & Upstream owned by same owner.

So I've been reading and found that hub does some magic using the "upstream" remote as the default remote for doing a PR. In all the cases where someone has asked about this, they are told to use the verbose OWNER:branch syntax... In this case, my organization owns both the upstream AND the origin repositories. The usecase is like this... We have a custom "Pantheon Upstream" for our drupal sites. We also build our drupal sites. I'm trying to automate the pull of the pantheon upstream into all the sites. It so happens I use the name "upstream" and was expecting this to go to origin or at least the remote the branch was tracking against...
Is there any way to specify the remote specifically or at least the repository?
This is different than #1618 and the comment in https://github.com/github/hub/issues/381#issuecomment-23617252 is flat out wrong when you have this usecase.

FYI, the work around here is rename my remotes from upstream to drupal_upstream and it goes about it's business using origin. Since this is scripted... this isn't a big deal but usability and workflow that has been establish has to change for the tool to work.

Do you have at least hub version 2.7.0? If "upstream" is pointing to a repository that's not on GitHub, then it will be ignored. If Drupal upstream is indeed a URL to GitHub, then it's true: the only way for you to choose a different remote, unfortunately, is the -b OWNER:branch syntax (or rename the "upstream" remote, which I don't recommend because it breaks your existing conventions).
I hope that some sort of configuration option exists for this in the next release, but I haven't yet been inspired on how to properly implement this.

Yes both repos are on github under the same owner "fourkitchens" in this case. I'll make it work and only have the remote name change for scripted instances and just make sure it's a documented process that of they use hub for cli PRs that this is the current case.
For clarity a facsimile of my situation is as follows
Upstream is git@github.com:fourkitchens/upstream.git
Origin is git@github.com:fourkitchens/origin.git

Any chance this is getting picked up again? I'm running into the exact same issue, but simply renaming upstream isn't a desirable workaround for me. Maybe this could be solved by a simple flag eg. hub pull-request --force-remote "origin" as an intermediary solution?
Thanks.

source: gharchive/issue

authors: bendulum generalredneck mislav

license: mit

license_type: permissive

license_source: bigquery


text:
Github listing as JavaScript when it should be c#

Hi,
The programming language listed for the repo below says JavaScript but its actually C# - can this be changed please?
https://github.com/asudbury/spectrum
thanks
adrian.

When you filed this, there should have been a list of steps to help you resolve this issue yourself.
What happened to them?

i read those articles - didn't make a lot of sense!
its not that important - please close this issue if it cant easily be resolved.
I love github and im not trying to be awkward!
thanks
adrian.

i read those articles - didn't make a lot of sense!

Could you detail what you think doesn't make much sense? That would help us improve our templates and guidelines for future contributors.
Now, given your issue, I'd recommend reading My repository is detected as the wrong language in the README.

Hi,
First of all i didn't know what the 'language stats bar' was! i do know after googling it :-)
I think if you had included some sort of graphic it in the article to explain where to find it - it might be obvious to you, it might be obvious to a lot of people but it wasn't to me.
Following the article you provided a link for - it mentions moving files to a vendor - i cant do that.
I had assumed it would be a github setting to override the language - i know now that not the case.
You can close this issue.
thanks
adrian.

Thanks for the suggestion. I'll look into it!

If you see files that you didn't write in the search results, consider moving the files into one of the paths for vendored code, or use the manual overrides feature to ignore them.

You might want to pay closer attention to the third phrase of this sentence ;)
You do have more option than moving files to a vendor directory: https://github.com/github/linguist#overrides.

authors: Alhadis asudbury pchaigno

repo: github/linguist

license: MIT

license_source: github-api


text:
setup.py requires ipaddress on Python 3

"ipaddress" should be required on Python 2, and maybe early Python 3, but not on recent Python 3

I believe this was addressed in https://github.com/github/octodns/pull/569 a couple months back. There hasn't been a release cut since that point though. Will before too long.

authors: jayvdb ross

repo: github/octodns


text:
Switch from X-Auth-{Email,Key} to Authorization for Cloudflare

https://api.cloudflare.com/#getting-started-requests

API Tokens provide a new way to authenticate with the Cloudflare API. They allow for scoped and permissioned access to resources and use the RFC compliant Authorization Bearer Token Header.

This PR LGTM. I'm going to give it a whirl with a new API token on Jekyll's DNS.

Thanks for this fix. Tested it and works for me.
What has to be done to get this merged?

What has to be done to get this merged?

Looks like there's some python2/3 issues since this PR predates that work. After that if CI is passing we'd need to make a pass through the code for final review and ship if it's there.

I'd really love to see this merged, but I'm afraid I'm not sure how to approach the Python 3 CI errors. @mamercad, are you able to grok the failures? They appear to come from the new test file you added.

Busy with $DAYJOB lately, I’ll try and have a look this weekend.

On Feb 14, 2020, at 13:57, Parker Moore notifications@github.com wrote:

I'd really love to see this merged, but I'm afraid I'm not sure how to approach the Python 3 CI errors. @mamercad, are you able to grok the failures? They appear to come from the new test file you added.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

High level it doesn't really make sense to copy the full Cloudflare provider tests just to test the no email case since all of the auth bits are stubbed out anyway. There were a number of Python 3 fixes in that file and looks like this PR happened prior to that. I'll push up a commit shortly that should get things working.

Thank you so much, @ross!

Thanks much @ross!

source: gharchive/pull-request

authors: jrenggli mamercad parkr ross


text:
Actions: GitHub Actions on GitHub AE (Beta)

Summary
GitHub Actions is available in Beta on GitHub AE (GHAE).
Intended Outcome
GitHub AE Customers can now use a beta of GitHub Actions.
How will it work?
GitHub Actions on AE uses a new AE hosted runner, only available on GitHub AE, that enables you to customize the size, image, and networking configuration of the runners. These runners are a finished-service CI compute environment with auto-scaling and management done by GitHub. During the beta, the use of AE hosted runners is free of charge. For more information, see "Adding AE hosted runners.".

https://docs.github.com/en/github-ae@latest/admin/overview/github-ae-release-notes

authors: alexcnichols github-product-roadmap

repo: github/roadmap


text:
Ability to add a project to a project

Summary
In order to help teams plan and track at different levels, it will be possible to add a project as an item to another project. This will help teams build up an explorable graph of work.

This issue is being closed as outdated. For more information, please check out this Discussion post. Stay tuned for new additions to our refreshed public roadmap!

We wanted to provide more details on why we removed this from the roadmap. We understand the importance of this work and have made some improvements with the introduction of sub-issues. We're removing this specific feature from our roadmap while we develop more definition and certainty on our scope and timelines for this pain point.
Check out our dedicated sub-issues feedback discussion, share your thoughts and help us shape this feature or create a new discussion if needed!

authors: ankneis github-product-roadmap


text:
Secret scanning: Surface GitHub token metadata in alert view

Summary
The UI for a secret scanning alert will surface metadata about any leaked GitHub token.
Intended Outcome
Metadata on tokens can help users decide whether or not they should revoke a detected token or when. Certain metadata, like token owner, can also aid quicker remediation action.
How will it work?
When a user navigates to their alert for a detected GitHub token, they will see metadata about the token in that alert view.

This has shipped with GHES 3.10: https://github.blog/2023-08-29-github-enterprise-server-3-10-is-now-generally-available/


text:
Como ser buscada

Meu telefone foi bloqueado, pela data, parece ser internacionalmente por investigações e denúncias

Meu telefone foi bloqueado, pela data, parece ser internacionalmente por investigações e denúncias

Inovando  🌎

repo: github/site-policy


text:
Request: Seeking Support for Testing TypeScript GraphQL API

I am seeking assistance with testing a TypeScript GraphQL API that interacts with MongoDB. Can you provide guidance, including relevant code samples and accompanying tests?
Furthermore, I would like to inquire about the potential code coverage achievable through TestPilot for this type of testing (out of 100%).
If support for this specific scenario is not presently available, could you provide an estimate of when it might be released?

See answer to https://github.com/githubnext/testpilot/issues/7.

authors: akhilender-bongirwar max-schaefer

repo: githubnext/testpilot


text:
Add support for dry-run to print out only the things that will be changed

Hi. We are faced with a problem when we're running dry-run with verbosity and gitlabform shows diff in cases where nothing is going to be changed.
Output example:
                                  default_branch: "master"   => "master"
           only_allow_merge_if_pipeline_succeeds: true       => true
only_allow_merge_if_all_discussions_are_resolved: true       => true
               resolve_outdated_diff_discussions: true       => true
             printing_merge_request_link_enabled: true       => true
                           snippets_access_level: "disabled" => "disabled"
                               wiki_access_level: "enabled"  => "enabled"
                                    wiki_enabled: true       => true
                                    merge_method: "ff"       => "ff"
                                      visibility: "private"  => "private"
                remove_source_branch_after_merge: true       => true
Skipping section 'project_push_rules' - not in config.
Processing section 'merge_requests' in dry-run mode.

GitLabForm version
2.5.0
GitLab version
14.0.0-ee

up

Hi @mkryva, sorry for the long response time!
This is actually how this feature has always worked...

As a workaround I use this when running it in CI:
# sed explanation:
# 1. Removes all lines with not in config. It adds nothing valuable
# 2. Removes all lines stating processing in dry-run mode.
# 3. Removes all lines which indicate no change, for example true => true
# 4. Adds color coding to lines that do change
gitlabform ALL_DEFINED ${DRY_RUN:+--noop} --verbose \
  | sed -e '/not in config.$/d' \
  | sed -e '/in dry-run mode.$/d' \
  | sed -re '/:\s(\S*|".*")\s+=>\s\1/d' \
  | sed -re 's,.*=>.*,\x1B[1;33m&\x1B[0m,'

We are also trying to use --noop in a CI pipeline with gitlabform 3.4.1. In our case we hope to use the dry-run in branch pipelines as a way to show what might be changed, so having a way to limit the output to only the expected changes would be very useful. The last two sed tricks used by @tmeijn in the comment above don't work in our case because the ghcr.io Docker image for gitlabform is based on Alpine, and sed behaves differently under POSIX.
+1 on this issue; it would be great if we had a way to see only changes in the output, with the option to colorize it, using the official Docker image.

That's is a good remark @lmaughan-ep. In my case I just run apk add sed before executing GitLabForm which installs the gnu-sed IIRC. Also using the official image btw, no custom build.

Does the issue title/description need to be adjusted?
I only asked, because to me it sounds like the ask is:
Can the functionality be added to support printing out only the things that will be changed
Seems that is the case, based on the others who've commented about using sed to clear up the output 😄

I'd sure love to try! Might be a few days before I come back with anything reasonable though 😎

authors: Shackelford-Arden gdubicki lmaughan-ep mkryva otani88 tmeijn

repo: gitlabform/gitlabform


text:
fix(localization): pull-list.screen.js copy/paste mistake

This PR fixes an Issue in the pull-list.screen.js
See below.
But this needs to be done than to every language file in the future.
Its probably just a copy/paste mistake.
Its my first PR so please give me any feedback you have! 😄
I will add myself to the contributors list with my next PR with german translation.

You apparently do not work git hooks for you? We follow the git commit guidelines by Angular.

@lex111 no i dont i will take a look and take care of it for my next pr

repo: gitpoint/git-point


text:
Install failing on wizard/step1

I'm running MacOS (10.12.6) and PHP 7.1.11. I followed the setup instructions exactly as listed for github. After the oAuth callback, I get the error Trying to get property of non-object on the wizard/step1 page. It is throwing the error for the $repo object that is getting passed in Github.php:line39. When I check what the $repo variable contains, it has a string Not Found. Any idea what is happening?

Go to github.php, and find line 205
Change:
$branches = collect(Helper::request('https://api.github.com/repos/'.$owner.DIRECTORY_SEPARATOR.$repo.'/branches?page='.$page));

To:
$branches = collect(Helper::request("https://api.github.com/repos/{$owner}/{$repo}/branches?page=$page"));

authors: dlopezNBC filtration

repo: gitscrum-community/laravel-gitscrum


text:
🛑 API 2 Needs is down

In 3f2700e, API 2 Needs (https://www.givefood.org.uk/api/2/needs/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: API 2 Needs is back up in d2b1973 after 10 minutes.

repo: givefood/upptime


text:
add user signup functionality and fix bugs

The most amazing changes ever seen in an app

"The most amazing changes ever seen in an app" lgtm!

authors: Jeffreydne JordanFerrario

repo: gjudilla/nekro-files


text:
DB/1 Store suggested sentences as separate entries with separate ids (all corresponding to the same sentence id)

Currently, all suggested sentences are under one id. In JSON file, they appear as just one entry, comma-spearated. This is not ideal for further data processing.
We want to store the suggested sentences as separate entries (a sentence per JSON line) with separate ids.

PR #38

While there are some issues with this PR I will commit it as it includes a couple important architectural changes that should be in main. The ticket should be kept open to fix a couple remaining issues as a new PR:
We still need a good database setup script. We have the schema file now, but it is not runnable (if you just pass it into postgres it will throw syntax errors), and is missing setup of the seed data (the initial sentences)

We should be using IDs throughout. There are two places where this becomes important:

In the selected_suggestion column we still store the full suggestion. This should be the id of the relevant entry in thesuggestion table
We send the full sentence to the frontend but not it's ID. Then, when we click a suggestion we send the full sentence back and ask the Database to find it's ID. What we should do is send both the sentence AND it's ID to the frontend, and the frontend should send BOTH back. The database can then look up the sentence by ID (and verify it is correct by matching it to the sentence). This will be still safe, but also performant. (Note that sending back the full sentence is not actually technically necessary, the ID is enough for most purposes)

When getting a sentence from the database we query the entirety of the database and selecting a random one from that. Postgres is clever enough to have features (please have a look on your own) to provide you with a single random sentence - use that feature. The current implementation would lose performance once the sentence database gets huge.

authors: AppolinFotso sztupy

license: ISC


text:
🛑 Schoelcher is down

In 52b0c64, Schoelcher (https://www.mairie-schoelcher.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Schoelcher is back up in 99e3353.

repo: glefait/martinique-public-websites


text:
🛑 Saint-Pierre is down

In adb3a02, Saint-Pierre (https://saintpierre-mq.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Saint-Pierre is back up in df88ad6 after 22 minutes.


text:
🛑 Saint-Pierre is down

In d59c718, Saint-Pierre (https://saintpierre-mq.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Saint-Pierre is back up in c01ffc2 after 5 minutes.


text:
🛑 Saint-Pierre is down

In f212420, Saint-Pierre (https://saintpierre-mq.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Saint-Pierre is back up in 1a84abc after 11 minutes.


text:
🛑 Le Lamentin is down

In 0a98124, Le Lamentin (http://www.mairie-lelamentin.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Le Lamentin is back up in 411fe91 after 7 minutes.


text:
🛑 Comite Martiniquais du tourisme is down

In a269d11, Comite Martiniquais du tourisme (https://www.martinique.org) was down:

HTTP code: 500
Response time: 1134 ms

Resolved: Comite Martiniquais du tourisme is back up in 9239cef after 1 hour, 18 minutes.


text:
🛑 Schoelcher is down

In 7cd72f6, Schoelcher (https://www.mairie-schoelcher.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Schoelcher is back up in 208036d.


text:
🛑 Schoelcher is down

In 4a2b0a7, Schoelcher (https://www.mairie-schoelcher.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Schoelcher is back up in 2cb2ffe.


text:
🛑 Schoelcher is down

In 9b5de29, Schoelcher (https://www.mairie-schoelcher.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Schoelcher is back up in 2bbbb13.


text:
🛑 Schoelcher is down

In fb08994, Schoelcher (https://www.mairie-schoelcher.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Schoelcher is back up in e2d5f97.


text:
🛑 Schoelcher is down

In 346c4aa, Schoelcher (https://www.mairie-schoelcher.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Schoelcher is back up in 84f4f65.


text:
Animate scoring with flying letters

When a turn is complete, letters should fly to the scoreboard and be added incrementally if correct, or drop to the floor if incorrect.  Lots of opportunity for creativity here...

Correct answers pop to a larger size with players background color and fly to the scoreboard.  Incorrect answers pop to a larger size before turning red and dropping to the floor, bouncing once before they disappear.  I'm happy with this for now, closing the issue.

repo: glennsimon/cwwf


text:
Request: Add support for more than just section_left and section_right

Hi, thanks for galaxyline! :+1:
See the subject line: Would you consider adding support for more than section_left/right? It looks like both are concatenated using %= anyways, so I hope it wouldn't be too hard to add some other section.
My use case: I used to have a statusline that had most stuff displayed in the middle instead of the left and right, so having another section would be convenient. :)

yep . it can be support.

yep . it can be support.

Good to hear :) How about this:

If there are no unnamed sections in sections, just concatenate section_left/right using %= (as it is done now)
Concatenate all unnamed sections in sections, in order, with %=
If section_left/section_right exist, prepend/append them using %= too

That would keep current configs working.
Does that sound reasonable?

Good to hear :) How about this:

If there are no unnamed sections in sections, just concatenate section_left/right using %= (as it is done now)
Concatenate all unnamed sections in sections, in order, with %=
If section_left/section_right exist, prepend/append them using %= too

That would keep current configs working.
Does that sound reasonable?

@runiq  Hey can you provide a min statusline code snippet that set some text in statusline mid

@glepnir could you add new section for inactive statusline ? i think this very userfull if someone want change style diferent between section.short_line_left and inactive statusline
thanks

now it's support but a little troublesome . do it in provider
provider = function()
  -- if true in special buffer
   if hasvalue(shortlist,vim.bo.filetype) then
       show some text
   else
       -- it will show in inactive statusline
       show text
  end
end

like i do it in here https://github.com/glepnir/galaxyline.nvim/blob/dd1cd3098f95423fa744be5d65b61132caae51b5/lua/galaxyline/provider_fileinfo.lua#L178
work like this.

so you can config inactive line in short_line.

@glepnir nice its work

@mnabila  a tips that you can use vim.fn.index function. like
if vim.fn.index(short_list,vim.bo.filetype) ~= -1 then

@glepnir  thanks for your tips :+1:

@glepnir adding mid options in section  short_line :laughing:
:runner:  :runner:  :runner:  :runner:  :runner:

Sorry I didn't ever get around to this @glepnir :( Thanks a lot for implementing it!

It's okay .my person usage

Any chance of centering the middle section relative to the buffer instead of the other two sections? If we know the width of the left section, middle section and window width we could compute the correct amount of padding to do it.
Theoretically we could then do something like line = left_section..padding..mid_section..right_section.
What do you think about that?

yep can get the padding value . But I want to know how it is different from the current behavior

Here's an example:

Top is centered on the whole bar, bottom is centered between the mode indicator and the pink branch logo. There's more of a difference with left and right sections that are lopsided.

default behavior is a bit to the right.  If there are too many components in the left area. The window just accommodates all the components. Then the behavior of centering the buffer will make the left side appear a bit crowded.In the second way, we need to recalculate the value of pad when the width of the buffer window changes. This requires binding some autocmd

It appears that the status line is already redrawn on size changes, so no need to worry about that.

authors: glepnir mnabila niloco runiq


text:
Add typescript definitions

Hi !
I am using Typescript, so I wrote the definitions for this lib.
Hope they suit you.

@fmauquie Thanks for PR. Could you resolve the conflicts?

I didn't see @ifiokjr PR before submitting this one.
I updated the PR to add the missing config option & update ViewProps usage

authors: JeffGuKang fmauquie

repo: glepur/react-native-swipe-gestures


text:
green gear is transparent

The green gear on the gears example is partially fully transparent
Graphics card GTX980M
Windows 10, version 1803
First image is with no code changes

Second image with transparent framebuffer off

Third image is after changing from
            SetLayeredWindowAttributes(window->win32.handle,
                                       RGB(0, 193, 48), 255, LWA_COLORKEY);

to
            SetLayeredWindowAttributes(window->win32.handle,
                                       RGB(0, 0, 1), 255, LWA_COLORKEY);

on line:
https://github.com/glfw/glfw/blob/d834f01ca43c0f5ddd31b00a7fc2f48abbafa3da/src/win32_window.c#L414

There is a comment saying this bit of code is a bit hacky
Its just a massive coincidence that the green cog in its initial position happens to be the same color as rgb(0,193,48)

obviously my change is still vulnerable to this issue, i wonder what other's thoughts about fixing this would be.
Furthermore, the comment mentions leaving it at rgb(0,0,0) causes trailing backgrounds. This doesn't happen on my machine, however a neat side-effect is i can click through the transparency

Yup, that's a bug, thank you! Not sure if there's a good solution, but the least we could do is pick a more suitable color.

Would 0xFF00FF be appropriate? I typically use that as a to-become-transparent colour.

@tombsar Yeah, that or something like 0x010101.

I cannot reproduce the trailing issue that the color key code is supposed to work around on either Windows 7 (Intel and Nvidia) or Windows 10 (Intel and Nvidia). I'm inclined to say it was a bug in earlier versions of Windows 10 and remove the workaround altogether.

Is this workaround still needed ? I had a hole in my window because i was rendering a pink image (testing some opengl shader), I thought it was a bug in my shader.
Maybe this should be mentioned in the GLFW window guide.

@BFavier Good point. It really needs to be.

It is mentioned here.

So, after coming to GLFW after using Direct2D, I feel obligated to point out that WS_EX_LAYERED hasn't been required for transparency for a while. If you simply don't set WS_EX_LAYERED (or remove it after creating the window), everything works fine, because now windows ignores the color key and correctly composites. I'm pretty sure whatever bug this was working around only applied before Windows 7.

@ErikMcClure Ooh, I will look into this. Thank you! We do still support Windows XP but hopefully not for much longer.

Even if you are supporting XP, surely you could at least put in a compile switch to disable this behavior? Or even dynamically detect whether or not the system is XP and only enable the flag if it is XP.

@ErikMcClure I cannot reproduce the issue that led to the color key hack on either Windows 7 or 10 on any GPU, so I'd be fine with removing it and seeing if any issues pop up.

No, never mind, the bug is still there.
I tried to figure out why this bug happens but failed.  I did however figure out more about when it happens, which is on Windows 7 when DWM is enabled but transparency effects are disabled. The win32-colorization-opacity branch is the result and my proposal for resolving this issue.

That fix seems reasonable and should keep weird behavior from happening in windows 10

Isn't this change already in v3.3? https://github.com/glfw/glfw/blob/3.3-stable/src/win32_window.c#L367-L400

@hajimehoshi So it is! I've moved this to 3.3.3. Thank you!

authors: BFavier ErikMcClure bradder555 elmindreda hajimehoshi tombsar

repo: glfw/glfw

license: Zlib


text:
Implement NSTextInputClient protocol on OS X

This implementation provides support for IME character composition (Fix #456)

I have tested my proposal on OS X 10.11.1 with the US layout (e.g. Option+E and following character), the 3-Set Korean layout and the German layout.

Thank you, will review this and possibly combine with #41.

Hi guys,
I am testing PR branch. I think the following code is little better.
diff --git a/src/cocoa_window.m b/src/cocoa_window.m
index 472ca92..9c32798 100644
--- a/src/cocoa_window.m
+++ b/src/cocoa_window.m
@@ -649,7 +649,10 @@ static const NSRange kEmptyRange = {NSNotFound, 0};
 - (NSRect)firstRectForCharacterRange:(NSRange)aRange
                          actualRange:(NSRangePointer)actualRange
 {
-    return NSMakeRect(0, 0, 0, 0);
+    int x, y;
+    _glfwPlatformGetWindowPos(window, &x, &y);
+    const NSRect contentRect = [window->ns.view frame];
+    return NSMakeRect(x, transformY(y+contentRect.size.height), 0, 0);
 }

Position (0, 0) means bottom-left corner of the most left display (Mac OS X has logical axis that combines all display workspaces). Even if the application runs on right display, input method window appears on another display. The above code returns left bottom corner position of current window.

Sounds and looks good imho.
Didn't think about that. I will try this out :)

Merged, with @shibukawa's suggestions. Thank you!

authors: elmindreda nether-cat shibukawa


text:
Adding support for custom header cells

Would it be possible to add support for custom rendering of the header cells as well?
Ideally I'd like to be able to have the capability to do something like this within the header cells:
https://codesandbox.io/s/9m9qs
I imagine the easiest way to implement this would be an additional prop such as the following:
drawHeaderCell?: (args) => boolean;
Otherwise, this library is perfect for my needs. Fantastic job.

I'll add a draw callback, will need to sit down and work out the details

Support has shipped in 3.1.3-alpha6. Please give it a try. There is an example committed to storybook for how to use it. You can return true to prevent the default drawing from happening, or you can just draw a background and return false to let the default foreground draw.

There will probably be some additional args added to handle dropdown menus but I wanted to give you a chance to test.

Impressive how quickly you are able to build in features!
What is the name of the example in Storybook? I am flipping through each of the examples and I am not able to find it.
Thank you for your hard work.

You would need to look in the 3.1.3 branch. The production storybook wont update until I merge 3.1.3 to the main branch.

repo: glideapps/glide-data-grid


text:
Show multiline text in cell

Is there a way to show multiple lines of text in a cell? I can make my my rows grow as needed with rowHeight, but I don't see a straightforward way to render all of the text into the additional space.
I imagine I could do this with a custom cell renderer, but I'd rather not duplicate all of the existing behavior of text cells just to add extra lines if there's a way to avoid it.

Creating a multi-line text cell is possible but it's far from cheap.  We will want to architect in a layout cache for string/font combos to avoid performing the same layout many times in a row with a LRU eviction policy to avoid bloat. If you want to work on this together I'm more than happy for the help.

https://github.com/glideapps/glide-data-grid/pull/373

So I did this. Still has some problems. The cache does not ever get evicted so it's effectively a memory leak.
The placement algorithm is not really great yet
No control for line height externally
The line segmentation algorithm which I extracted and improved from canvas-txt is actually extremely inefficient. We need to binary search the line length with some kind of bias. The fewer measurements the better.
There isn't a storybook story to really play with this yet.

This implementation also requires clipping per cell with potential vertical overflow. I don't think I can fix that and it does impact performance if you do a lot of these.

Thanks for looking at this. If it helps with the segmentation issue, I'm not primarily trying to do text wrapping by width--I'm looking to split the text on newlines (ideally although not required, in a way that auto column sizing still works). So, for my use case, perhaps you could split the text on newlines and then just do what is currently done for only the first line for every line?

This implementation also requires clipping per cell with potential vertical overflow. I don't think I can fix that and it does impact performance if you do a lot of these.

Since in my use case I know what the row height will be, clipping wouldn't necessarily be a requirement, although it's true that I imagine consumers of a multiline text cell would expect it to clip rather than overflow.
If you were only implementing split on newlines, though, rather than text wrapping, then I'm guessing you could just see how much vertical space you have left in the cell and stop rendering rows if there isn't enough?

Okay I've fixed all the remaining outstanding issues in my PR. I just need to add some tests and it should be ready to merge. The original canvas-txt implementation I based on is shockingly inefficient. It would be nice if we could contribute back the performance increase to be good samaritans.
The only problem is I think that lib has been unmaintained for 2 years now, maybe we can extract and make a fork that will better server the community.

I've taken this some steps further by adding a concept I am calling hyperWrapping. If experimental.hyperWrapping is set to true, once the grid has rendered 50k wrapped characters and collected enough metrics, it generates a hyper-map which it can then use to perform pretty good wrapping without doing any text measurement. This reduces the performance overhead of wrapping to near zero with the tradeoff that it sometimes will wrap a word too early.
I think most users should consider enabling the flag if they are heavily using wrapping when this is released, it should also be enabled if you know your grid will never need native wrapping and only needs newline character support. In this case hyperwrapping will work perfectly and have zero overhead once warmed.

Another extra swanky thing we could do for hyper speed wrapping

Spin up a web worker with an offscreen canvas.
Generate lots of sample strings.
Measure sample strings and backprop changes into a character map.

This approach would yield even more accurate results with very low spin up time and the generation of random strings could be offloaded to the user so they can optimize for their data set and language.

Thanks for your work on this! If you put out an alpha release with these changes once you're done with them, I can test them for our usage, if you'd like.

Fixed in 4.1.1, alpha with this going out today

authors: awesomeunleashed jassmith


text:
Missing startup_dir results in glidein_startup.sh file leak

In glidien_cleanup (sic), cleanup gets skipped if the glidein can't cd into the startup_dir. This logic was added in a big refactor commit https://github.com/glideinWMS/glideinwms/commit/79cb6ff2360fd15ed580329cd4ddf5ec680a2cb7 but there doesn't seem to be any indication of why it was added.
An HTCondor bug appears to result in the CE removing the startup_dir shortly after the job gets the SIGTERM so we end up leaking user job sandboxes.
We think that the glidein should continue with cleanup, even if the startup_dir doesn't exist

I agree this is a bad behavior on HTCondor's part. It affects Hosted-CE configurations (i.e. bosco-style ssh access to the site), and doesn't affect installs where the CE is on the site submit point.

Fixed in PR. As I mentioned in the PR info and Glidein exit status will be completely lost after cleanup because the start dir is no more available and cleanup will remove the rest. But I guess it is the lesser evil.

authors: JaimeFrey brianhlin mambelli

repo: glideinWMS/glideinwms


text:
🛑 INTG-APP is down

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

HTTP code: 0
Response time: 0 ms

Resolved: INTG-APP is back up in 6d7313c.

repo: glo-markoaular/status-navigate


text:
Separa las vistas de notas en dos, credito y debito.

#188

@k31kur0n0

[ ] Agregar columna Nº Recibo en ND antes de Motivo
[ ] Mover la columna Afecta Stock antes de Motivo

repo: globo-technology/sic-ops


text:
🛑 Secret Site is down

In 23d20c5, Secret Site ($SECRET_SITE) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Secret Site is back up in afa4401.

repo: glongzh/upptime


text:
[ERROR] [BUG] "Unreachable" on Production

Repo: https://github.com/ducflair/duc/blob/main/packages/core/scripts/buildPackage.js
On this project, when I build locally, there is no problems, it runs without any error, however when I deploy to Vercel or run a Github Action for example I get this:
rm -rf dist && bun run ../scripts/buildPackage.js && bun run gen:types
✘ [ERROR] [BUG] Unreachable [plugin sass-plugin]
 components/footer/FooterCenter.tsx:3:7:
   3 │ import "./FooterCenter.scss";
     ╵        ~~~~~~~~~~~~~~~~~~~~~

✘ [ERROR] [BUG] Unreachable [plugin sass-plugin]
 components/Tooltip.tsx:1:7:
   1 │ import "./Tooltip.scss";
     ╵        ~~~~~~~~~~~~~~~~

✘ [ERROR] [BUG] Unreachable [plugin sass-plugin]
 components/main-menu/DefaultItems.tsx:31:7:§
   31 │ import "./DefaultItems.scss";
      ╵        ~~~~~~~~~~~~~~~~~~~~~

✘ [ERROR] [BUG] Unreachable [plugin sass-plugin]
 components/UserList.tsx:1:7:
   1 │ import "./UserList.scss";
     ╵        ~~~~~~~~~~~~~~~~~

✘ [ERROR] [BUG] Unreachable [plugin sass-plugin]
 components/Sidebar/Sidebar.tsx:32:7:
   32 │ import "./Sidebar.scss";
      ╵        ~~~~~~~~~~~~~~~~

and it goes on and on, this error is raised on every .scss import inside packages/core/canvas
More logs:
1645 |     let { file, line, column } = e.location;
1646 |     let pluginText = e.pluginName ? [plugin: ${e.pluginName}]  : "";
1647 |     return  1648 | ${file}:${line}:${column}: ERROR: ${pluginText}${e.text};
1649 |   }).join("");
1650 |   let error = new Error(text);
^
error: Build failed with 45 errors:
actions/actionExport.tsx:21:7: ERROR: [plugin: sass-plugin] [BUG] Unreachable
components/Button.tsx:4:7: ERROR: [plugin: sass-plugin] [BUG] Unreachable
components/CheckboxItem.tsx:5:7: ERROR: [plugin: sass-plugin] [BUG] Unreachable
components/ColorPicker/ColorPicker.tsx:22:7: ERROR: [plugin: sass-plugin] [BUG] Unreachable
components/ConfirmDialog.tsx:4:7: ERROR: [plugin: sass-plugin] [BUG] Unreachable
...
errors: [
{
"id": "",
"location": {
"column": 7,
"file": "actions/actionExport.tsx",
"length": 29,
"line": 21,
"lineText": "import "../components/ToolIcon.scss";",
"namespace": "",
"suggestion": ""
},
"notes": [],
"pluginName": "sass-plugin",
"text": "[BUG] Unreachable"
},
{
"id": "",
"location": {
"column": 7,
"file": "components/Button.tsx",
"length": 15,
"line": 4,
"lineText": "import "./Button.scss";",
"namespace": "",
"suggestion": ""
},
"notes": [],
"pluginName": "sass-plugin",
"text": "[BUG] Unreachable"
},
{
"id": "",
"location": {
"column": 7,
"file": "components/CheckboxItem.tsx",
"length": 21,
"line": 5,
"lineText": "import "./CheckboxItem.scss";",
"namespace": "",
"suggestion": ""
},
"notes": [],
"pluginName": "sass-plugin",
"text": "[BUG] Unreachable"
},
{
"id": "",
"location": {
"column": 7,
"file": "components/ColorPicker/ColorPicker.tsx",
"length": 20,
"line": 22,
"lineText": "import "./ColorPicker.scss";",
"namespace": "",
"suggestion": ""
},
"notes": [],
"pluginName": "sass-plugin",
"text": "[BUG] Unreachable"
},
  at failureErrorWithLog (/home/runner/work/duc/duc/node_modules/esbuild/lib/main.js:1650:15)
  at /home/runner/work/duc/duc/node_modules/esbuild/lib/main.js:1058:25
  at buildResponseToResult (/home/runner/work/duc/duc/node_modules/esbuild/lib/main.js:1056:7)
  at /home/runner/work/duc/duc/node_modules/esbuild/lib/main.js:703:9
  at handleIncomingPacket (/home/runner/work/duc/duc/node_modules/esbuild/lib/main.js:763:9)
  at readFromStdout (/home/runner/work/duc/duc/node_modules/esbuild/lib/main.js:679:7)
  at emit (node:events:183:48)
  at addChunk (node:stream:1914:22)
  at readableAddChunk (node:stream:1868:30)
  at node:stream:32:51

Bun v1.1.30 (Linux x64 baseline)
error: script "build:esm" exited with code 1
error: script "build" exited with code 1
Error:  command finished with error: command (/home/runner/work/duc/duc/packages/core/canvas) /home/runner/.bun/bin/bun run build exited (1)

Hello @jorgedanisc
I've check you repo. I guess, we may miss option loadPaths. If you not explicitly specify this option, it will take default from process.cwd() and it is may not the source root as we expected on github action or Vercel build tasks.
My suggestion:

Update file buildPackage.js.

 plugins: [sassPlugin({
    type: 'css',
    loadPaths: ['.']
  })],

If this not work. You may move file buildPackage.js into folder packages/core/canvas.

Update import source of css, scss files.

- @import "open-color/open-color";
+ @import "~open-color/open-color"; // `esbuild-sass-plugin` resolve package from `node_modules` with prefix `~`

Hope this help.

Thank you for the help! I had already solved this issue yesterday by doing some backward compatibility with a working build I had in the past and got it to work.
However I wanted to keep this issue open so that this error would be addressed as I haven't seen anybody with this error message in particular. I will be closing it now, and if I face this problem again will attempt to make these changes so thank you.

authors: dungjk jorgedanisc

repo: glromeo/esbuild-sass-plugin


text:
glscopeclient chrome not drawn after changing applications

I'm using glscopeclient 81fa6c6009a on Ubuntu 20.04 with an AMD Radeon RX550, running Awesome WM on X11:
OpenGL renderer string: Radeon RX550/550 Series (POLARIS12, DRM 3.35.0, 5.4.0-58-generic, LLVM 10.0.0)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.8
OpenGL core profile shading language version string: 4.60

Occasionally when swapping between virtual desktops and back to glscopeclient, only the currently-updated parts of the GUI are drawn, and the rest show whatever window was previously active:

Minimising and re-showing glscopeclient or resizing its window triggers a full redraw.

I think I've seen this once or twice on Linux after using OBS to do screen recordings. Unsure if same root cause or not.

Wontfix in glscopeclient, should be fixed in ngscopeclient since we're redrawing every frame at 60 Hz. Reopen if we see it in ngscopeclient.

authors: adamgreig azonenberg

repo: glscopeclient/scopehal-apps


text:
Implement round function in ast_builder

Issue
resolves #641
Description
implement round function in ast_builder

Pull Request Test Coverage Report for Build 2685924990

21 of 21 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.002%) to 97.8%

Totals

Change from base Build 2682097662:
0.002%

Covered Lines:
28635

Relevant Lines:
29279

💛  - Coveralls

authors: coveralls ding-young

repo: gluesql/gluesql


text:
Refactor function's return type in evaluate_function()

Description
All existing functions operating in evaluate are evaluated by enum Value without having to have an intermediate value,
Evaluated. However, if it is used in a future query builder, if it is a chained structure in a function such as a substring that should always hold an intermediate value, an overhead may occur by repeating the clone.
In this case, it can be solved by string slicing to keep the intermediate value. Modify the return values for this structure.
Tasks

[x] change return type Result<Value> to Result<Evaluated>

Pull Request Test Coverage Report for Build 3303727743

143 of 144 (99.31%)  changed or added relevant lines in 3 files are covered.
6 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.008%) to 97.806%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

core/src/executor/evaluate/function.rs
137
138
99.28%

Files with Coverage Reduction
New Missed Lines
%

core/src/ast_builder/expr/function.rs
1
99.9%

core/src/executor/evaluate/function.rs
1
98.9%

core/src/executor/context/filter_context.rs
4
93.44%

Totals

Change from base Build 3303016498:
-0.008%

Covered Lines:
38300

Relevant Lines:
39159

💛  - Coveralls

authors: coveralls zmrdltl


text:
Update contact info. in README

Update contact info. in README
Signed-off-by: Saravanakumar sarumuga@redhat.com

This change is

@jarrpa, I fully agree!

authors: SaravanaStorageNetwork obnoxxx

repo: gluster/gluster-kubernetes


text:
CHANGELOG: Sort entries in reverse date order

Signed-off-by: Gianpaolo Macario gianpaolo_macario@mentor.com

LGTM, merging

repo: gmacario/easy-jenkins


text:
reload scripts or functions

Hello,
I noticed that using this fantastic script on some pages do not load some of my functions containing animations.
is there a way (other than to call incoming functions for new pages) to force loading?
thank you

Hi and sorry for late reply.
To load/run scripts after the page transition, it is best to use the swup events. In particular, the pageView or contentReplaced events.
Would that work for your needs?

Hi @gmrchk , no problems!
at the moment I have this configuration:
const options = {
LINK_SELECTOR: '.lnk',
FORM_SELECTOR: '.js-form',
elements: ['#swup'],
animations: {
'*': {
out: function(next){
var t4 = new TimelineMax({onComplete: next});
//my animations
                    },
                    in: function(next){

                       var t3 = new TimelineMax({onComplete: next});
                     //my animations

                       my calls at the functions

                    }
                 },

                cache: true,
                pageClassPrefix: '',
                scroll: false,
                doScrollingRightAway: false,
                debugMode: true,
                preload: true,
                support: false,
                skipPopStateHandling: function(event){
                if (event.state && event.state.source == "swup") {
                return false;
                }
                return true;
                },
                animateHistoryBrowsing: true,
                }

                const swup = new Swupjs(options);

How should I proceed with your suggestions?

authors: esseifforte gmrchk

repo: gmrchk/swupjs


text:
🛑 Rekam Indonesia is down

In 072cbb4, Rekam Indonesia (https://www.rekamindonesia.id) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Rekam Indonesia is back up in f2ec999 after 8 minutes.

repo: gnfi/status


text:
Use zeroex liquidity in http solver

Fixes #1663
Added basic machinery to utilize 0x limit orders as liquidity.
For that a new type of liquidity was introduced Liquidity::LimitOrder(LimitOrder) which is just a wrapper around our usual LimitOrder type.
Also ZeroExInteraction was added which just generates call data for IZeroEx::fillOrKillLimitOrder() as its encoding strategy.
The http solver takes advantage of the new liquidity limit orders by adding them to the list of solvable orders of the auction.
Note that the Baseline solver does not take advantage of the new liquidity yet.
Test Plan
Manual test where I ran the driver locally configured to use quasimodo until a winning settlement was found which included a ZeroExInteraction. (call stack includes fillOrKillLimitOrder())
I didn't add a unit test for generating the call data (as opposed to other interactions) because this is done with a crate which is hopefully properly tested.
Release notes
Added liquidity of 0x limit orders to quasimodo

Codecov Report

Merging #1710 (bd51625) into zeroex-order-correct-types (1ede091) will decrease coverage by 0.19%.
The diff coverage is 0.00%.

@@                      Coverage Diff                       @@
##           zeroex-order-correct-types    #1710      +/-   ##
==============================================================
- Coverage                       65.69%   65.50%   -0.20%
==============================================================
  Files                             179      181       +2
  Lines                           36046    36147     +101
==============================================================
- Hits                            23681    23678       -3
- Misses                          12365    12469     +104

I make the http solver take advantage of the new liquidity by

This sentence cuts off.

This PR showed that some work has to be done on the solver side in order to not sometimes cause settlement simulation failures. The progress on the solver side is captured here.

This PR showed that some work has to be done on the solver side in order to not sometimes cause settlement simulation failures.

Maybe we can highjack this PR to already add the has_atomic_execution flag to limit orders that need to get passed to the solver? Can also be separate - not sure how much extra code it would add.

Maybe we can highjack this PR to already add the has_atomic_execution flag to limit orders...

I'm already in the process of doing that. It's not much work I just got sidetracked a little.

Another thing to consider is having a custom "cost-model" that more closely captures the actual gas usage of a 0x order.

Yeah, I think so too. Since they don't provide gas cost with their OrderRecords I think we will have to simulate each order, no? Not sure if that is too much work to do for every 0x order.
Also @marcovc brought up that we should probably also send those orders during price estimation to get a representative estimate. This seems to involve either reimplementing a bunch of code or moving liquidity related code into from the solver crate into shared. I would do that in another PR because this would blow up this one too much.

I think we will have to simulate each order, no?

IMO its fine to just use the mean gas cost for calling fillOrKillLimitOrder on the 0x contract.

With the help of @bh2smith we were able to establish a lower bound for a trade on 0x (min over last 2 months).
This is the query we used.

Also @marcovc brought up that we should probably also send those orders during price estimation to get a representative estimate. This seems to involve either reimplementing a bunch of code or moving liquidity related code into from the solver crate into shared.

YES! This has been something in the backlog for ages! The liquidity we use in the API is different than in the solver. That would be awesome to tackle (but quite an extensive task with a long thread of small changes to pull on).

Why did you chose a lower bound?

It looks like gas_model.rs uses lower bounds for all gas calculations so I thought it wouldn't be fair to use a different measurement for zeroex.

Also, this seems to be using the event which includes fillLimitOrder calls which I don't think we want...

We were aware of this issue but is was our best idea to get some estimate. If you have a good alternative query I'm happy to use that instead.

If you have a good alternative query I'm happy to use that instead.

Likely need to search the transaction table by sighash (first 4 bytes of calldata).

I did a manual test where I checked simulations of a driver on this branch using a solver on the corresponding branch.
In order to verify that complex multi-hop settlements don't produce simulation errors I made the solver assume that 0x trades don't incur any gas costs. This results in solutions which are way more complex than we would normally generate but that gives me more confidence in the test.
simulation with 3 user orders, 2 uni v2 hops and 9 0x hops.
Before carefully ordering the execution plan simulations with as few as 2 0x hops already produced errors. I think it's safe to merge this PR now.

Very thorough testing.
Lets merge it!

Updated the query to calculate the min gas cost per 0x transaction.
Previously we used the minimum of all transactions which created a LimitOrderFilled event which can also be emitted by the slightly cheaper fillLimitOrder() function (as opposed to fillOrKillLimitOrder()).

authors: MartinquaXD codecov-commenter nlordell vkgnosis


text:
🛑 Bill Bags is down

In ad65676, Bill Bags (https://bills-bags.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Bill Bags is back up in e4e2cae.


text:
🛑 Ethstats is down

In 4eac53c, Ethstats (https://ethstats.chiadochain.net/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Ethstats is back up in 320ac06 after 4 minutes.

repo: gnosischain/chiado-uptime


text:
🛑 Bridge Explorer is down

In 5fb5cd1, Bridge Explorer (https://bridge-explorer.gnosischain.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Bridge Explorer is back up in 48af919 after 5 minutes.

repo: gnosischain/gnosischain-uptime


text:
🛑 RPC is down

In 096c506, RPC (https://rpc.gnosischain.com/) was down:

HTTP code: 502
Response time: 409 ms

Resolved: RPC is back up in 315e70d.


text:
🛑 Beacon RPC is down

In a22115c, Beacon RPC (https://rpc-gbc.gnosischain.com/eth/v1/beacon/headers) was down:

HTTP code: 503
Response time: 188 ms

Resolved: Beacon RPC is back up in 945c66c after 6 minutes.


text:
Please include weblabels for javascript

This is follow up of the issue wrongly filed here:
https://gitea.com/gitea/website/issues/99#issuecomment-119899
Solution on how to do it is here:
https://www.gnu.org/software/librejs/free-your-javascript.html
Many users of FSf endorsed distributions use LibreJS and many other GNU/Linux users. It is desirable for new users coming to the website to know that javascript is also free software. Those users may not be able to find licenses or crawl the site to find details, browser may warn them or give a green light.
It would be very nice if you include that as that may influence thousands of people in future and other projects as well. Thank you.

Problem is that imho there is no way we can generate it with webpack automatically and keeping it updated manually for each javascript library we use takes too much work. If you can suggest any way to do that automatically we are open to PR on that

ref https://forge.softwareheritage.org/source/swh-web/browse/master/swh/web/assets/config/webpack-plugins/generate-weblabels-webpack-plugin/

I use a hack-ish script in one of my projects and it seems to do the job. I could adapt it to Gitea, thoughts?
aside: the page @6543 linked to no longer exists, here's an old archive.org snapshot of the same.

Is there any progress on that? I really want gitea to be LibreJS compatible

Even if complete LibreJS support isn't done, can some workaround be made to do something to make it easier for curious people to find the corresponding source code to the minified JS that Gitea serves?
Basically, some direction to the relevant source projects that facilitates this so that people don't have to struggle to search around to find obscure links…

I think we already have https://gitea.com/assets/licenses.txt , and a link has been displayed under footer of Gitea. So we just need a tool do convert it the suitable format?

I think we already have https://gitea.com/assets/licenses.txt , and a link has been displayed under footer of every Gitea instance. So we just need a tool do convert it the suitable format?

I have a hard time reading that and knowing: does it contain (or is it generated by something that has) all the info not just about license but about the source files? What I'm most obviously missing in licenses.txt is a way to find the associated non-minified source code. I only see stuff like brace-expansion@2.0.1 with a license, and that doesn't tell me where to find the source code for that.

All js package could be searched on npmjs.org, all go package can be visited directly with the package url. I know it's not convinent like a html and links. But we need a suitable tool to generate that format.

Would it be easy enough for the licenses.txt file to have a note added to it that says that the source files are available on npmjs.org?
What about maybe changing the generated file so that brace-expansion@2.0.1 has a link to https://www.npmjs.com/package/brace-expansion/v/2.0.1 ?
Anyway, it seems indeed the full weblabels support would work with just a tool to convert licenses.txt appropriately. I guess it does have all the necessary information, yeah?

authors: 6543 gnusupport iambeingtracked lafriks lunny realaravinth wolftune

repo: go-gitea/gitea


text:
Uploading files to a web page will cause the repository instance to crash

Description
Click Submit changes when the file is over 3MB, will corrupt the repository instance, want to fix this Bug and change the single file size limit for web uploads to a configuration item instead of the fixed 3MB limit
Gitea Version
v1.20.0、v1.20.2
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots

Git Version
git version 2.37.1.windows.1
Operating System
Ubuntu18.04LTS
How are you running Gitea?
Binary file
http://ip:port
Database
SQLite

File upload size can be set in the configuration file, the default is 3MB
https://docs.gitea.com/zh-cn/next/administration/config-cheat-sheet#仓库---文件上传-repositoryupload

File upload size can be set in the configuration file, the default is 3MB https://docs.gitea.com/zh-cn/next/administration/config-cheat-sheet#仓库---文件上传-repositoryupload

Which is the configuration item?

;[repository.upload]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Whether repository file uploads are enabled. Defaults to `true`
;ENABLED = true
;;
;; Path for uploads. Defaults to `data/tmp/uploads` (content gets deleted on gitea restart)
;TEMP_PATH = data/tmp/uploads
;;
;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
;ALLOWED_TYPES =
;;
;; Max size of each file in megabytes. Defaults to 3MB
;FILE_MAX_SIZE = 3
;;
;; Max number of files per upload. Defaults to 5
;MAX_FILES = 5

;[repository.upload]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Whether repository file uploads are enabled. Defaults to `true`
;ENABLED = true
;;
;; Path for uploads. Defaults to `data/tmp/uploads` (content gets deleted on gitea restart)
;TEMP_PATH = data/tmp/uploads
;;
;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
;ALLOWED_TYPES =
;;
;; Max size of each file in megabytes. Defaults to 3MB
;FILE_MAX_SIZE = 3
;;
;; Max number of files per upload. Defaults to 5
;MAX_FILES = 5

Thank you very much!

Maybe we need a check for commit changes in the background when user uploaded a big size file over the limit?

Maybe we need a check for commit changes in the background when user uploaded a big size file over the limit?

Let me modify the Bug description

Click Submit changes when the file is over 3MB, will corrupt the repository instance, want to fix this Bug

how to reproduce it? I tried  it in my local server and nothing happens

Click Submit changes when the file is over 3MB, will corrupt the repository instance, want to fix this Bug

how to reproduce it? I tried it in my local server and nothing happens

Try it with a file of about 300MB

Try it with a file of about 300MB

I try a file with 200MB , nothing happens . please contact me in qq group 328432459

Try it with a file of about 300MB

I try a file with 200MB , nothing happens . please contact me in qq group 328432459

Yes. Go through

So, if you add and issue attachment - it will just show size cap error,
if you add new file as a part of commit, it will show error and will break repository?

So, if you add an issue`s attachment - it will just show size cap error, if you add new file as a part of commit, it will show error and will break repository?

Yes

Reproduce Steps

Create an empty repo(without init)
Upload a File

Screenshot

Logs
2023/08/15 16:48:58 .../context_response.go:68:HTML() [D] Template: repo/editor/upload
2023/08/15 16:48:58 ...eb/routing/logger.go:102:func1() [I] router: completed GET /caicandong/test/_upload/main/ for 127.0.0.1:63337, 200 OK in 172.7ms @ repo/editor.go:583(repo.UploadFile)
2023/08/15 16:48:58 ...eb/routing/logger.go:102:func1() [I] router: completed GET /avatar/2a1b1ab96878ebecbbb2fbc271332297?size=96 for [::1]:63365, 303 See Other in 7.9ms @ user/avatar.go:48(user.AvatarByEmailHash)
2023/08/15 16:49:04 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= rev-parse
2023/08/15 16:49:04 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= cat-file --batch
2023/08/15 16:49:04 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= for-each-ref "--format=%(objectname) %(refname)" refs/heads/ --sort=-committerdate
2023/08/15 16:49:04 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= symbolic-ref HEAD
2023/08/15 16:49:04 ...ules/context/repo.go:993:func1() [D] RepoRef invalid repo: branch or tag not exist:
2023/08/15 16:49:04 .../context_response.go:68:HTML() [D] Template: status/404
2023/08/15 16:49:04 ...eb/routing/logger.go:102:func1() [I] router: completed GET /caicandong/test/src/branch/main/ for [::1]:63365, 404 Not Found in 259.8ms @ context/repo.go:878(web.registerRoutes.func39.20.RepoRefByType)
2023/08/15 16:49:06 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= rev-parse
2023/08/15 16:49:06 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= cat-file --batch
2023/08/15 16:49:06 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= cat-file --batch-check
2023/08/15 16:49:06 ...repository/branch.go:25:SyncRepoBranches() [D] SyncRepoBranches: in Repo[35:caicandong/test]
2023/08/15 16:49:06 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= rev-parse
2023/08/15 16:49:06 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= cat-file --batch
2023/08/15 16:49:06 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= cat-file --batch-check
2023/08/15 16:49:06 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= for-each-ref "--format=%(objectname) %(refname)" refs/heads/ --sort=-committerdate
2023/08/15 16:49:07 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= symbolic-ref HEAD
2023/08/15 16:49:07 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git): "C:\\Program Files\\Git\\cmd\\git.exe" -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= for-each-ref "--format=%(objectname) %(refname)" refs/heads/ --sort=-committerdate
2023/08/15 16:49:07 ...ules/context/repo.go:917:func4() [E] No branches in non-empty repository D:\code\golang_code\gitea\data\gitea-repositories\caicandong\test.git
2023/08/15 16:49:07 ...ules/context/repo.go:931:func4() [E] GetBranchCommit: object does not exist [id: refs/heads/main, rel_path: ]

authors: CaiCandong KazzmanK Lingoing yp05327


text:
Bug: The error message box aligned left but center

Will be fixed by  Check if reverse proxy is correctly configured #30890  together, rewrite some error message detections

authors: lunny wxiaoguang


text:
Write Access Team Members can't add Labels while add new Issue

Gitea version (or commit ref): 1.5.0
Git version: 2.18.0
Operating system: windows
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
only the member in 'Owners'  can add label to an issue,  when i create another team in the same organization with write access  can not add label to an issue, is that the way it is?

is my fault ,i should add repository to the team


text:
Remove test binary from binary installation docs

Even simply testing Gitea will create files and directories, some of which may cause confusion or other problems further along in installation.
I propose to remove the Test section from the binary installation docs. Users can still test their binary if they use the command detailed further down in the docs, which should be a more accurate environment assuming the rest of the docs were followed.

make lg-tm work

authors: jolheiser zeripath


text:
WIP: Fix creating new org teams

regression from #18518
TODO

[ ] didn't check yet for uses of other changed function signatures in the templates, there may be more.

replaced by #19288

authors: lunny noerw


text:
Add support for file-based environment variables in environment-to-ini

Improve environment-to-ini to allow for file content to be set as the value of an environment variable.
Useful when using docker secret and were the secret is mounted as a file in /run/secrets/<SECRET_NAME>.
Any settings in app.ini can be set or overridden with the content of a file by defining an environment variable of the form: GITEA__section_name__KEY_NAME__FILE that points to a file.
Fixes #19856

Fixes https://github.com/go-gitea/gitea/issues/10311

Any reason why this PR was discontinued? This change would be extremely useful imho.

I agree, this is a key functionality for a lot of production environments. Having it embedded in the code is far better than implementing potentially unsafe workarounds.

Maybe another prefix like GITEA__FILE__ is better than suffix.

Maybe another prefix like GITEA__FILE__ is better than suffix.

I found suffixed version to be quite standard with some other Docker containers, but I don't have a strong opinion. Could you land this change for us, @lunny ? It looks like you are a member.
Then, I was writing my own wrapper now, based a previous issue that was discussed here, which works as a workaround for me for now. Here's the code for completion (I modified the original prosposal to be compliant with /bin/sh syntax.
# This file has been copied from the original Docker container, as follows:
# docker run gitea/gitea:1.18.0
# docker exec <container_name>> cat /usr/bin/entrypoint > gitea.entrypoint.sh

# The patch starts here. It's a rewritten form of what was posted here
# https://github.com/go-gitea/gitea/issues/10311.
# >>> SNIP
export_secret_as_env_var()
{
    secret=$1
    envFile="${secret}_FILE"
    envFileName="$(printenv "${envFile}")"
    if [ -n "${envFileName}" ]; then
        if [ -f "${envFileName}" ]; then
          val=$(cat "${envFileName}")
          export "${secret}"="$val"
          echo "${secret} environment variable was set via secret ${envFileName}"
        else
          >&2 echo "Error: Secret ${secret} cannot be set via secret ${envFileName}. Not a file"
        fi
    else
        echo "Warn: ${secret} environment variable ist not defined in secret"
    fi
}

# Set environment variables by their respective secrets
export_secret_as_env_var "GITEA__database__PASSWD"
export_secret_as_env_var "GITEA__database__USER"
export_secret_as_env_var "GITEA__mailer__USER"
export_secret_as_env_var "GITEA__mailer__PASSWD"
# <<< SNAP

It seemed though, that the GITEA__database__PASSWD was already supported, maybe that's worthwhile to check.
I think a username should be protected, too, though. Adds yet another layer, even if it's small.
Cherrs and thanks for reading this far :)

Although there are some conflicts, I think this PR could be fine-tuned and merged.
Could maintainers with writer permission do some helps?

Generally I think that what environment-to-ini does needs to move to the main application so that environment variables are recognized everywhere, not just with the docker container because docker is just one of many deployment option. If someone wants to use systemd with env vars, they should be able to.

Replaced by  Make environment-to-ini support loading key value from file #24832

authors: Doddophonique KarolNi aminosbh lunny nesono silverwind wxiaoguang


text:
Update go dev dependencies

air is updated to the commit that added include_file which allows watching main.go
golangci-lint deprecated a bunch of linters, removed them.

Lint now passes so it should be ready for review now.

air is updated to the commit that added include_file which allows watching main.go

golangci-lint deprecated a bunch of linters, removed them.

Air is not a released version?

No because auther hasn't released in a while, but I guess I will revert, it's a minor issue.

Reverted air and squashed.

authors: lunny silverwind


text:
List all Debian package versions in Packages

Closes #27783
This PR lists all and not only the latest package versions in the Packages index.

MSSQL failure related.

The test runs too fast and the ORDER BY created produces unstable results then.


text:
Fix Web notification icon not updated once you read said notifications (go-gitea#29065)

Fix #29065
Remove status filtering from GetUIDsAndNotificationCounts sql.

Could you add some details about how it fixes the problem? TBH I haven't caught the point 🤣

I'm sorry, of course 🙂
When the number of unread notifications becomes 0, the original SQL query does not return the user's row.
As a result, there will not be a new notification-count event to update the icon. With this modification, the user's row will be included in the result with 0 count, and the event will be triggered.
The event generation :
uidCounts, err := activities_model.GetUIDsAndNotificationCounts(ctx, then, now)
if err != nil {
	log.Error("Unable to get UIDcounts: %v", err)
}
for _, uidCount := range uidCounts {
	m.SendMessage(uidCount.UserID, &Event{
		Name: "notification-count",
		Data: uidCount,
	})
}

I need to find out how to get the missing UIDs, but I am going to try.
Thanks for the idea!

Read the code again, it seems that it is impossible to figure out the non-existing IDs quickly.
So current method should be good enough. Let's try it.


text:
Added doc for 'IMPORT_LOCAL_PATHS'

I've added the documentation for the security 'import_local_paths' option.

see also #2501

LGTM

authors: domrim lunny


text:
Remove MTecknology from MAINTAINERS

I no longer have faith in the direction or longevity of this project and have become inactive... making it official.
So long, and thanks for all the fish.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@b0b3549). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #5599   +/-   ##
=========================================
  Coverage          ?   37.56%
=========================================
  Files             ?      321
  Lines             ?    47206
  Branches          ?        0
=========================================
  Hits              ?    17731
  Misses            ?    26929
  Partials          ?     2546

Continue to review full report at Codecov.

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

authors: MTecknology codecov-io


text:
feat: add rand function #811

#811

[x] Do only one thing

[x] Non breaking API changes

[x] Tested

What did this pull request do?

To implement order by rand()

User Case Description

May I ask when to merge? What can I do to implement it without merging

repo: go-gorm/gen


text:
WithContext timeouts do not work

ctx, cancel := context.WithTimeout(context.Background(), time.Second*1)
defer cancel()

return db.WithContext(ctx).Exec("SELECT pg_sleep(10)").Error

In the example above I would expect a deadline exceeded error returned, however the full 10 seconds elapse, and no error is returned.

If this is an issue with the underlying github/lib/pq library, maybe consider using https://github.com/jackc/pgx

Switched to pgx as default driver, please upgrade gorm/postgres to v0.2.5

authors: ItsLeeOwen jinzhu

repo: go-gorm/gorm


text:
Panic on a simple Delete with Where

GORM Playground Link

https://github.com/go-gorm/playground/pull/244
Description

Delete(&Pet{})

Delete(&Pet{})

From the docs, this should work.
It was working in v1.20.8.
Something broke it.
Besides, a panic is bad. In my honest opinion, it'd be better to add a validation.

From the docs, this should work.
It was working in v1.20.8.
Something broke it.
Besides, a panic is bad. In my honest opinion, it'd be better to add a validation.

@jinzhu
Are you really not fixing this?
It is documented in this way, and it was working fine in v1.20.8.
For a documented behavior to just stop working is a really bad thing.
One of two things must be changed: the docs or the code.
Considering that it is documented in this way and that this is a panic, I really recommend you to add a validation to the code to prevent this problem.

@jinzhu
Are you really not fixing this?
It is documented in this way, and it was working fine in v1.20.8.
For a documented behavior to just stop working is a really bad thing.
One of two things must be changed: the docs or the code.
Considering that it is documented in this way and that this is a panic, I really recommend you to add a validation to the code to prevent this problem.

authors: Hellysonrp jinzhu


text:
Count() erases SELECTs for Joins() statement if executed before a Find()

GORM Playground Link

https://github.com/go-gorm/playground/pull/681
Description
If you add a Joins() preload statement to a *gorm.DB transaction instance, the select statements to loads field from the relationship seems to be nullified if you first call tx.Count() and then afterwards with the same tx also call tx.Find(). The tx.Find() no longer selects the fields from the joined tables, e.g.
var res []MyModel
tx := db.Model(&MyModel)
tx.Joins("OtherModel")
var cnt *int64
tx.Count(&cnt)
tx.Find(&res)
// res.OtherModel.<somefield> is empty as SELECT for OtherModels have disappeared from the query

A use case for this scenario is if you are paginating: You first want to get the total records in the DB to show in the UI (or calculate the amount of pages) and after doing so, you apply a limit and offset to the tx to obtain a subset of the results.
If you call the join statements again, this results in an error:
var res []MyModel
tx := db.Model(&MyModel)
tx.Joins("OtherModel")
var cnt *int64
tx.Count(&cnt)
tx.Joins("OtherModel")
tx.Find(&res)

pq: table name \"OtherModel\" specified more than once

我也有相同的问题。  调用count()后，会删除joins。这和预期的不一样，我理解的应该不会删除。如图

执行count的时候db的 joins 里面有2个 成员

执行到find的时候，joins变成了nil

但是查看执行的语句又是对的

这点就很奇怪

authors: dschreij kissIce


text:
invalid memory address or nil pointer dereference. part2

Hi! Looks like issue described in https://github.com/go-graphite/graphite-clickhouse/issues/250 exists in current version:
Nov 28 18:52:18 localhost graphite-clickhouse[161601]: panic: runtime error: invalid memory address or nil pointer dereference
Nov 28 18:52:18 localhost graphite-clickhouse[161601]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1118ddf]
Nov 28 18:52:18 localhost graphite-clickhouse[161601]: goroutine 6642 [running]:
Nov 28 18:52:18 localhost graphite-clickhouse[161601]: github.com/lomik/graphite-clickhouse/render/data.(*commonStep).doneTarget(...)
Nov 28 18:52:18 localhost graphite-clickhouse[161601]:         /home/runner/work/graphite-clickhouse/graphite-clickhouse/render/data/common_step.go:26
Nov 28 18:52:18 localhost graphite-clickhouse[161601]: github.com/lomik/graphite-clickhouse/render/data.(*query).getDataPoints(0xc000260d80, {0x1981e50, 0xc0006d8150}, 0xc0001fe540)
Nov 28 18:52:18 localhost graphite-clickhouse[161601]:         /home/runner/work/graphite-clickhouse/graphite-clickhouse/render/data/query.go:143 +0x47f
Nov 28 18:52:18 localhost graphite-clickhouse[161601]: github.com/lomik/graphite-clickhouse/render/data.(*MultiTarget).Fetch.func2(0xc0005ae900?)
Nov 28 18:52:18 localhost graphite-clickhouse[161601]:         /home/runner/work/graphite-clickhouse/graphite-clickhouse/render/data/multi_target.go:206 +0x76
Nov 28 18:52:18 localhost graphite-clickhouse[161601]: created by github.com/lomik/graphite-clickhouse/render/data.(*MultiTarget).Fetch in goroutine 2206
Nov 28 18:52:18 localhost graphite-clickhouse[161601]:         /home/runner/work/graphite-clickhouse/graphite-clickhouse/render/data/multi_target.go:204 +0x63a
Nov 28 18:52:18 localhost systemd[1]: graphite-clickhouse.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

$ graphite-clickhouse --version
0.14.0

Setting "internal-aggregation = true" somehow fixes the issue.

repo: go-graphite/graphite-clickhouse


text:
goenv not setting $GOPATH and $GOROOT on Apple M1 using ZSH

I've followed the installation instructions in an attempt to setup goenv and have it manage $GOPATH and $GOROOT on my Apple M1 MacBook Pro.
I'm using ZSH as my shell and this is the contents of my .zshrc file.
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
eval "$(goenv init -)"
export PATH="$GOROOT/bin:$PATH"
export PATH="$PATH:$GOPATH/bin"

After configuring .zshrc and restarting my shell this is what I see for Golang environment variables:
$ env | grep GO | sort
GOENV_ROOT=/Users/hsatterwhite/.goenv
GOENV_SHELL=zsh

For what it's worth I'm able to successfully use goenv to install Golang. I also have a non-M1 MacBook Pro that I did the same setup on using ZSH and had no issues with installation and having goenv manage $GOPATH and $GOROOT.

having same issue
$ goenv -v
goenv 2.0.0beta11

$ goenv versions
  1.17.0

$ go version
goenv: 'go' command not found

The 'go' command exists in these Go versions:
  1.17.0

what do we do to fix this???
here is my ~./bash_profile
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
eval "$(goenv init -)"
export PATH="$GOROOT/bin:$PATH"
export PATH="$PATH:$GOPATH/bin"

I had the same problem on traditional, non-M1 hardware. Turns out that earlier in my giant .zshrc I was source'ing GVM. It was setting GOROOT to be an empty string. Once I removed that it worked and my $PATH is back to normal.

Scratch that, I must have had a bad test. I still have the issue.

Same on non-m1 mac.
goenv rehash does setting the GOROOT and GOPATH vars after changing them.

The issue here is export PATH="$GOROOT/bin:$PATH". $GOROOT is evaluated when your .zshrc is read and not when the PATH is searched. As such you'll directly call the go binaries instead of using goenv's shims. Remove that from your config and things should work as expected.

It looks like the offending lines came from the README -- it looks like this feature is not that well thought-out and potentially breaks stuff badly. I personally don't use goenv init -/configure according to the README so I never ran into this.

I've hit this issue, but if I don't run goenv init - then goenv doesn't work for me.
My zshrc config is as follows:
# Check for goenv existance and enable it if it's there
[[ -d "${HOME}/.goenv" ]] && export GOENV_ROOT="${HOME}/.goenv"

# Enable goenv things
if [ ! -z "${GOENV_ROOT}" ]; then
  export PATH="${GOENV_ROOT}/bin:${PATH}"
  eval "$(goenv init -)"
  ## Commenting these as it breaks the use of `.go-version` files.
  #export PATH="${GOROOT}/bin:${PATH}"
  #export PATH="${PATH}:${GOPATH}/bin"
fi

Looks like this has been solved.

I just started using the latest version goenv on my MacBook Pro with an Apple M1 processor, installed via Homebrew, and am having this exact same issue. The shell environment variables $GOPATH and $GOROOT are not switched when I use
goenv shell <version> or goenv local <version> commands. Note -- the version of go is switched (with the one caveat below) but not the environment variables.
And like @Nalum, when I follow the install instructions, adding these two lines after eval "$(goenv init -)" in my .zshrc breaks the use of .go-version for local version switching.
export PATH="${GOROOT}/bin:${PATH}"
export PATH="${PATH}:${GOPATH}/bin"

If I remove those two lines local version switching works.
@ChronosMasterOfAllTime -- you marked this issue as resolved back in Feb 19? It does not appear to be resolved, unless I misunderstood the discussion in this thread.
Any help really appreciated.

@ianjukes I will look into this. I also have a a Mac with zsh installed. Let me try to reproduce what you're running into.

Thank you @ChronosMasterOfAllTime. Just let me know if you need me to do any additional troubleshooting.

Did this ever work for you @ianjukes? I am facing the same issue as you

As per @jochman's post above, goenv rehash will set the variables after switching the version, but I think this should be done automatically?
And like @Nalum, when I follow the install instructions, adding these two lines after eval "$(goenv init -)" in my .zshrc breaks the use of .go-version for local version switching.
export PATH="${GOROOT}/bin:${PATH}"
export PATH="${PATH}:${GOPATH}/bin"

Using ubuntu with zsh and this is my experience also. The two exports added after the init described in the readme break the .go-version file switching, and it requires manually running goenv rehash to update the env vars.

Did this ever work for you @ianjukes? I am facing the same issue as you

Unfortunately not -- I still have the same issue.

@ianjukes please find me on Discord so we can better figure out what's going on
my username is the same as here but all lowercase

If you're using homebrew in your M1 mac and the data is imported from an Intel one, you can consider removing /usr/local/Cellar/go. Because the package installed in the previous one, can still be applied to the whole machine when the new package doesn't exist in the new homebrew-installed location.

authors: ChronosMasterOfAllTime Nalum chriscarpenter12 derekcrovo encryptblockr envintus ianjukes jochman neersighted oneWalker rahul-r-modi

repo: go-nv/goenv


text:
feat: prefix allows all version identifiers

Features

goenv prefix supports the same installed version identifiers like local or global
goenv prefix latest -> 1.22.3 (latest installed version)
goenv prefix system -> system Go location if installed
goenv prefix 1 -> 1.22.3 (latest installed major version)
goenv prefix 22 -> 1.22.3 (latest installed minor version when combined with a major version)
goenv prefix 1.22 -> 1.22.3 (latest installed minor version)
Offer all installed versions plus latest and system as completions

Fixes

Usage information and tests by introducing new helper functions

Changed

Using latest patch version no longer displayed (prefix contains the found version already)

Asserting stdin tricks didn't work, I had to write new helper functions.
But on the bright side, the tests are working now because of that and I fixed multiple old tests and some usages.

@reneleonhardt  are you interested in becoming a bona fide contributor role? I can add you which will give you more privileges to review/merge PRs and add releases etc

Hey Chronos, wow, thank you for the offer!
Actually I'm no Go developer, still waiting for v2 to iron out the kinks and save me many headaches 😅
But it could be interesting to learn more about it because a big part of the k8s ecosystem seems to prefer it, let's try and see how it goes!

Hey Chronos, wow, thank you for the offer!
Actually I'm no Go developer, still waiting for v2 to iron out the kinks and save me many headaches 😅
But it could be interesting to learn more about it because a big part of the k8s ecosystem seems to prefer it, let's try and see how it goes!

Done! You should have gotten an invite. For what it's worth, go 1.22 is actually quite powerful. I have been using go since 1.9 and the differences are night and day. I have been developing on golang for 5 years now, and have found it quite intriguing and simple. Does it have its drawbacks? Of course! But I feel the pros out weigh the cons.

authors: ChronosMasterOfAllTime reneleonhardt


text:
Fixes LengthRule validation for the case when empty value is required (min=0, max=0)

The error itself is already defined in the length.go:
// ErrLengthEmptyRequired is the error that returns in case of non-empty value.
ErrLengthEmptyRequired = NewError("validation_length_empty_required", "the value must be empty")

but the validation part for min=0, max=0 was missing in:
if r.min > 0 && l < r.min || r.max > 0 && l > r.max {
	return r.err
}

Added with:
if r.min > 0 && l < r.min || r.max > 0 && l > r.max || r.min == 0 && r.max == 0 && l > 0 {
	return r.err
}

Coverage remained the same at 100.0% when pulling 3bde9d8dc236b6db9bc4421f5a49833fe0f16ce5 on 0perl:master into f6ac6c4a9c44e58d830291066150ec95fd9205f3 on go-ozzo:master.

Thank you for your contribution!

authors: 0perl coveralls qiangxue

repo: go-ozzo/ozzo-validation


text:
Kosovo doesn't define as a country code

Hi, I used the validator in my code for validating the country code (iso3166_1_alpha2).
The validation failed when I tried to enter Kosovo (XK) as an input. I saw that you don't support this country. Can you add this country to your code?
Thanks!

I think this issue can be closed as the PR is merged to master

authors: rebel-l shakedoron

repo: go-playground/validator