sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: cmd/go: GOWORK env var should be off by default 
Labels: Proposal

This is certainly a duplicate of the rejected #51967 – but some months have passed and people have been using `go.work` in real life projects.

One of the great thing about Go's build tools is that you in most cases can do a `go install` in a random Go project and get a fully working executable.

With `GOWORK=on`  as a default, that is no longer the case:

* If you have a `go.work` file committed to CVS, then that file will be used for module resolution.
* If you have that file in `.gitignore` then you will get a different build compared to some other person who clones and builds your project.

I see arguments in #51967 that you should really control this with Make scripts and similar, which is an argument I find odd. The production build is where the defaults should be directed and, again, one beauty of Go's build tools is the simplicity of just doing `go install`.

A related issue #53502 is discussing whether `go.work` should be committed to CVS or not, a question that might have been possible to answer if  `GOWORK=off` was the default.  

The final argument in the #51967 thread was:

>Given that there are no new footguns here, just the same ones we had in replace directives ...

The big difference here is that the foot gun now is invisible.

With replace directives we had a well defined situation of "development replace directives should be temporary and never be committed to CVS". It took some care to live by that, and I have certainly shot myself in the foot more than once, but the current situation is that I have to either 1) Not use go.work files or 2) Create Make files for all of my projects (or some other tool to set `GOWORK=off`), which I would need to remember to use myself and document so others also remembers not to just do the simple `go install`.

The ideal situation would be to be able to turn on GOWORK when I'm doing development, e.g. `GOWORK=on code .`
Repository: pytorch
Issue: test_lazy spuriously fails if LAPACK is not installed
Labels: module: tests,triaged,module: lazy

### 🐛 Describe the bug

should skip if not compiled with lapack

### Versions

master

cc @mruberry
Repository: godot
Issue: Game consumes 100% CPU if the window is covered by another OS window (macOS)
Labels: bug,platform:macos,topic:rendering,topic:editor,topic:porting,confirmed,performance

### Godot version

v3.5.stable.official [991bb6ac7]

### System information

macOS 12.5.1 (21G83), Apple M1 Max MacBook Pro

### Issue description

Simply covering up the game's window with another OS window causes CPU usage to spike to 100%. You can see this in action in the video:


https://user-images.githubusercontent.com/453721/185812416-203ed323-0884-4a5b-950d-c93d099716c9.mov






### Steps to reproduce

Run the attached project (or any project, really - the attached one is essentially empty and has no scripts) on macOS. Drag a window over top of the game's window (it needs to cover it completely). Watch as CPU usage skyrockets.

My uninformed suspicion is that macOS detects when the window is covered and stops sending rendering/v-sync events to the app in an effort to save power. Godot may be waiting for those events in an inefficient polling loop and when they stop coming that loop starts burning up cycles.

Godot now has the distinction of being the first app on my M1 Max that's actually managed to get the fan to run because of this. I noticed it because I have a habit of leaving the game open behind other windows when I switch back to the editor to keep working on it. I don't think this is an uncommon habit, tbh, and this behavior would have caused Godot to very rapidly deplete my laptop's battery if I hadn't happened to be running while plugged in.

### Minimal reproduction project

[Godot 100% CPU Bug.zip](https://github.com/godotengine/godot/files/9389996/Godot.100.CPU.Bug.zip)
Repository: rust
Issue: Undocumented use of DT_GNU_HASH descriptor
Labels: T-compiler,A-docs

Some executable Rust programs in ELF file format for Linux, often involving the **musl** low-level library, use undocumented "features" of the DT_GNU_HASH descriptor for run-time symbol information in an ELF file.  The DT_GNU_HASH descriptor itself is undocumented by GNU binutils, so the "corner case" usage by Rust compounds the problem of deterioration of software environment by not agreeing or communicating intended meaning, and proliferation of inconsistent private interpretations.  This GitHub Issue documents problematic occurrences that I have seen, and requests that Rust contribute to creating the documentation of DT_GNU_HASH, including explanation of "corner cases" seen so far.

The cases appeared when users of UPX (https://github.com/upx/upx) reported that UPX did not understand various Rust-compiled binary executable programs.  UPX wants to understand compiled binary executables in order to compress and de-compress them, and a program's use of specific global symbols can affect UPX; so UPX must lookup those symbols, which are expected to be encoded using DT_HASH and/or DT_GNU_HASH descriptor.  The specific DT_GNU_HASH descriptors used by Rust+musl have presented unusual encodings.

1. https://github.com/upx/upx/issues/568  DT_GNU_HASH descriptor with no symbol information `(0 == nbucket)`, in a dynamically-linked executable main program that does contain global symbols.  How should this be interpreted?  Is it an attempt to save space, and force a fall-back to linear search of DT_SYMTAB?  If so, then why not save even more space by omitting DT_GNU_HASH entirely?
2. https://github.com/upx/upx/issues/525  An earlier case of DT_GNU_HASH descriptor with no symbol information, but encoded as `(1==n_bucket  && 0==buckets[0] &&  1==n_bitmask && 0==bitmask[0])`.  Save even more space by omitting DT_GNU_HASH entirely.
3. https://github.com/upx/upx/issues/476  First-seen case of DT_GNU_HASH descriptor with no symbol information `(0==nbucket)`, in a statically-linked main program with no symbols.  Save even more space by omitting DT_GNU_HASH entirely.
4. https://github.com/upx/upx/issues/369  `hash_array[j]` is not present if `bucket[k]` is zero for all `k > j`.  So the tail of a complete `hash_array[]` (which should have `nbucket` entries, just like `buckets[]`) would overlap the following table (typically DT_SYMTAB).

The `(0==nbuckets)` cases suggest that the input to UPX might have been compromised by malware clobbering the first word of DT_GNU_HASH (and then using the remaining original space as payload for malware); else why was the trivially-shorter encoding of "no DT_GNU_HASH at all" not used?  The last case (`hash_array[]` truncated by the start of DT_SYMTAB) also casts doubt on the integrity of the file.  These optimizations for reducing space could well be blessed, _if documented and explained_.  Please lend your weight to getting DT_GNU_HASH documented and annotated.
Repository: HelloGitHub
Issue: 【开源项目】flet
Labels: Python 项目

## 推荐项目

- 项目地址：https://github.com/flet-dev/flet

- 类别：python

<!--请用 20 个左右的字描述它是做什么的，类似文章标题让人一目了然 -->
- 项目标题：Flet 是一个使您能够轻松地以您喜欢的语言构建实时 Web、移动和桌面应用程序的框架

<!--这是个什么项目、能用来干什么、有什么特点或解决了什么痛点，适用于什么场景、能够让初学者学到什么。长度 32-256 字符-->
- 项目描述：Flet 是一个框架，使您能够轻松地以您喜欢的语言构建实时 Web、移动和桌面应用程序，并与您的团队安全地共享它们。无需前端经验。

<!--令人眼前一亮的点是什么？类比同类型项目有什么特点！-->
- 亮点：不再需要 JavaScript 前端、REST API 后端、数据库、缓存等复杂架构。使用 Flet，您只需用 Python 编写一个整体式有状态应用程序，并获得多用户、实时单页应用程序 (SPA)。

- 示例代码：

安装依赖包

`pip install flet`

编写代码

`counter.py`

```
import flet
from flet import IconButton, Page, Row, TextField, icons

def main(page: Page):
    page.title = "Flet counter example"
    page.vertical_alignment = "center"

    txt_number = TextField(value="0", text_align="right", width=100)

    def minus_click(e):
        txt_number.value = int(txt_number.value) - 1
        page.update()

    def plus_click(e):
        txt_number.value = int(txt_number.value) + 1
        page.update()

    page.add(
        Row(
            [
                IconButton(icons.REMOVE, on_click=minus_click),
                txt_number,
                IconButton(icons.ADD, on_click=plus_click),
            ],
            alignment="center",
        )
    )

flet.app(target=main)
```
运行代码， 该应用程序将在本机操作系统窗口中启动 - 这是 Electron 的一个不错的替代品！
`python counter.py`

如果您想将应用程序作为 Web 应用程序运行，只需将最后一行替换为：
`flet.app(target=main, view=flet.WEB_BROWSER)`

- 截图：
![](https://camo.githubusercontent.com/1f34fe5ee8e8062999a14ffdb4296f79e0ba068e8f61869616ce29f7b0f20073/68747470733a2f2f666c65742e6465762f696d672f646f63732f67657474696e672d737461727465642f666c65742d636f756e7465722d6d61636f732e706e67)

![](https://camo.githubusercontent.com/704d52cb0548d733069ed1ff7be14575944862732ea3a7950157076764631bec/68747470733a2f2f666c65742e6465762f696d672f646f63732f67657474696e672d737461727465642f666c65742d636f756e7465722d7361666172692e706e67)
Repository: flutter
Issue: [platform-views][foldables] Re-render is a laggy when switching between different states of the screen
Labels: e: device-specific,platform-android,engine,c: performance,a: platform-views,c: rendering,has reproducible steps,P2,e: samsung,found in release: 3.0,found in release: 3.1,team-android,triaged-android

I am using the Galaxy Fold.
When I fold or unfold the screen, sometimes the map turns white.
How do I solve this problem?

google_maps_flutter version: `2.1.12`

```dart
class googleMapTest extends StatefulWidget {
  googleMapTest({Key? key}) : super(key: key);

  @override
  State<googleMapTest> createState() => _googleMapTestState();
}

class _googleMapTestState extends State<googleMapTest> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: GoogleMap(
          initialCameraPosition: CameraPosition(target: LatLng(130, 10),)),
    );
  }
}
```

emulator test

https://user-images.githubusercontent.com/81281937/185824088-226add37-6d86-4346-bd4b-57b29ab51e9b.mov
Repository: tauri
Issue: When running tauri build, bundle_dmg.sh errors fails to bundle project
Labels: type: bug,status: needs triage

### Describe the bug

Error [tauri_cli_node] failed to bundle project: error running bundle_dmg.sh: error running bundle_dmg.sh: `failed to run /Users/chenzhanfeng/Documents/tauri/demo/src-tauri/target/release/bundle/dmg/bundle_dmg.sh`

+ hdiutil create -srcfolder /Users/chenzhanfeng/Documents/tauri/demo/src-tauri/target/release/bundle/macos/demo.app -volname demo -fs HFS+ -fsargs '-c c=64,a=16,e=16' -format UDRW /Users/chenzhanfeng/Documents/tauri/demo/src-tauri/target/release/bundle/macos/rw.demo_0.1.0_aarch64.dmg
hdiutil: create failed - Read-only file system

### Reproduction

_No response_

### Expected behavior

_No response_

### Platform and versions

Environment
  › OS: Mac OS 12.5.0 X64
  › Node.js: 18.6.0
  › npm: 8.13.2
  › pnpm: Not installed!
  › yarn: 1.22.19
  › rustup: 1.25.1
  › rustc: 1.63.0
  › cargo: 1.63.0
  › Rust toolchain: stable-aarch64-apple-darwin

Packages
  › @tauri-apps/cli [NPM]: 1.0.5
  › @tauri-apps/api [NPM]: 1.0.2
  › tauri [RUST]: 1.0.5,
  › tauri-build [RUST]: 1.0.4,
  › tao [RUST]: 0.12.2,
  › wry [RUST]: 0.19.0,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../dist
  › devPath: http://localhost:5173/
  › framework: Vue.js

App directory structure
  ├─ dist
  ├─ node_modules
  ├─ public
  ├─ src-tauri
  ├─ .vscode
  └─ src

### Stack trace

_No response_

### Additional context

_No response_
Repository: go
Issue: proposal: sync/atomic: add JSON and Text Marshal and Unmarshal functions to scalar types
Labels: Proposal,Proposal-Hold

Simplified use case:
```go
type Metrics struct {
	Requests int64 `json:"requests"` // I want to replace this with an atomic.Int64
}

func main() {
	var metrics atomic.Pointer[Metrics]

	metrics.Store(&Metrics{})

	// Standin for somehthing like a HTTP handler or something else generating metrics...
	go func() {
		for {
			time.Sleep(time.Millisecond)

			m := metrics.Load()
			atomic.AddInt64(&m.Requests, 1) // Would become m.Add(1)
		}
	}()

	for {
		time.Sleep(time.Second)

		m := metrics.Swap(&Metrics{})

		// Give other goroutines another 100 milliseconds to do
		// their atomic operations on m.
		time.Sleep(time.Millisecond * 100)

		b, _ := json.Marshal(m) // This would become safe with atomic.Int64
		fmt.Println(string(b)) // Send to some other place etc...
	}
}
```
Adding these methods would allow changing `Metrics.Requests` to an `atomic.Int64` to make it simpler and safer.

The [previous time this was suggested](https://github.com/golang/go/issues/50860#issuecomment-1059496192) it was reject because `sync/atomic` can't import `encoding/json`. But this is not required to implement the interfaces. Only `strconv` would be required.

Sample implementation for `atomic.Int64`:
```go

// MarshalText implements the encoding.TextMarshaler interface.
func (x *Int64) MarshalText() ([]byte, error) {
	if x == nil {
		return []byte("<nil>"), nil
	}
	return []byte(strconv.FormatInt(x.Load(), 10)), nil
}

// UnmarshalText implements the encoding.TextUnmarshaler interface.
func (x *Int64) UnmarshalText(text []byte) error {
	n, err := strconv.ParseInt(string(text), 10, 64)
	if err != nil {
		return err
	}
	x.Store(n)
	return nil
}

// MarshalJSON implements the json.Marshaler interface.
func (x *Int64) MarshalJSON() ([]byte, error) {
	if x == nil {
		return []byte("null"), nil
	}
	return x.MarshalText()
}

// UnmarshalJSON implements the json.Unmarshaler interface.
func (x *Int64) UnmarshalJSON(text []byte) error {
	// Ignore null, like in the main JSON package.
	if string(text) == "null" {
		return nil
	}
	return x.UnmarshalText(text)
}
```

`atomic.Bool` shouldn't use `strconv.ParseBool` as it isn't JSON compatible. Instead if can just compare against `"true"` and `"false"`.

`atomic.Pointer`, `atomic.Uintptr` and `atomic.Value` are omitted from this proposal as they would require importing of `encoding/json` which is not allowed.
Repository: vscode
Issue: Have UI expose data in VariablePresentationHint 
Labels: feature-request,debug

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

Hi all!

Besides wanting this myself, I get user requests here and there (https://github.com/xdebug/vscode-php-debug/issues/819) to provide visual feedback on whether a field displayed in the Variables pane is private, protected or public. This is all reported within VariablePresentationHint with lots more information. I understand from this old issue #50331 that VS Code doesn't implement this and that adding support similar to VS would be quite an effort (a lot of icon combinations) however how about a simpler approach?

Currently when hovering on a variable name, we get the `type` name:

![image](https://user-images.githubusercontent.com/2456026/185874713-becd5013-e688-4233-bca7-172513480c57.png)

Could we just add the other info, if its present? Maybe
`(visibility _attributes_ kind) type`

Maybe we can call on some of the other DA authors and maintainers to see if they are receiving similar feedback?

Thanks again for all the hard work!
Damjan
Repository: kubernetes
Issue: Formalized `CheckResult`
Labels: priority/awaiting-more-evidence,sig/auth,lifecycle/frozen,needs-triage

As part of the LFX mentorship, I try to integrate the Pod Security Admission with Kyverno to provide native admission enforcement for finer-grained controls. I presented a demo at [the sig-auth meeting](https://www.youtube.com/watch?v=etGq-IKxZRk&list=PL69nYSiGNLP0VMOZ-V7-5AchXTHAQFzJw&index=2). For design specification, please refer to [Extending Pod Security Admission](https://github.com/kyverno/KDP/pull/22).

One challenge we are facing now is to get details from the [CheckResult](https://github.com/kubernetes/pod-security-admission/blob/767140a93fb0bb7225966c475eef70294322d79a/policy/checks.go#L65-L82). We are thinking to add an additional field `RestrictedFields` which contains the forbidden paths and its values. For example:

```
{
  "Allowed":false,
  "ForbiddenReason":"non-default capabilities",
  "ForbiddenDetail":"containers "init-container-nginx-host-network", "nginx-host-network" must not include "SYS_ADMIN", "SYS_NICE" in securityContext.capabilities.add",

  // Fields to add
  "RestrictedFields":[
   {
     "Path":"spec.containers[*].securityContext.capabilities.add",
     "ContainerName": "nginx-host-network",
     "ForbiddenValues":[
      "SYS_ADMIN",
      "SYS_NICE"
     ]
   },
   {
     "Path":"spec.initContainers[*].securityContext.capabilities.add",
     "ContainerName": "init-container-nginx-host-network",
     "ForbiddenValues":[
      "SYS_ADMIN",
      "SYS_NICE"
     ]
   }
  ]
}
```
Would it be possible to add these into the `CheckResult`? Or is there any plan of adding such? We’d like to contribute if this sounds valid.
Repository: PowerToys
Issue: [FancyZones] "Custom layout not found" error after closing editor
Labels: Issue-Bug,Product-FancyZones

Repro steps for me:

1. Have 2 monitors in any configuration
2. Use remote desktop to connect to remote machine which has PowerToys 0.61.1 installed
3. Open FancyZones layout editor
4. Choose any layout other than Priority Zone (for me it's a custom 2-column layout
5. Close the layout editor
6. Drag a window and hold Shift to see that the new layout is not active

[PowerToysReport_2022-08-08-16-32-57.zip](https://github.com/microsoft/PowerToys/files/9283073/PowerToysReport_2022-08-08-16-32-57.zip)

_Originally posted by @danielsamuels in https://github.com/microsoft/PowerToys/issues/16370#issuecomment-1208285298_

`[error] Custom layout not found` after closing the editor. Layout applied to the desktop exists in the `custom-layouts.json`.
Repository: electron
Issue: [Bug]: Console.assert errors
Labels: platform/macOS,bug :beetle:,18-x-y,19-x-y,20-x-y,21-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

20.0.3

### What operating system are you using?

macOS

### Operating System Version

12.5

### What arch are you using?

x64

### Last Known Working Electron version

17.4.4

### Expected Behavior

Electron-based applications run without errors.

### Actual Behavior

With 20.0.3, I see lots of these errors as I run my application.  This didn't occur with 17.x...

[62415:0822/074915.763764:ERROR:CONSOLE(6)] "console.assert", source: devtools://devtools/bundled/panels/console/console.js (6)
[62415:0822/074915.763805:ERROR:CONSOLE(6)] "console.assert", source: devtools://devtools/bundled/panels/console/console.js (6)
[62415:0822/074915.763826:ERROR:CONSOLE(6)] "console.assert", source: devtools://devtools/bundled/panels/console/console.js (6)
[62415:0822/074915.763844:ERROR:CONSOLE(6)] "console.assert", source: devtools://devtools/bundled/panels/console/console.js (6)
[62415:0822/074915.763862:ERROR:CONSOLE(6)] "console.assert", source: devtools://devtools/bundled/panels/console/console.js (6)
[62415:0822/074915.763880:ERROR:CONSOLE(6)] "console.assert", source: devtools://devtools/bundled/panels/console/console.js (6)
[62415:0822/074915.763897:ERROR:CONSOLE(6)] "console.assert", source: devtools://devtools/bundled/panels/console/console.js (6)
[62415:0822/074915.763914:ERROR:CONSOLE(6)] "console.assert", source: devtools://devtools/bundled/panels/console/console.js (6)


### Testcase Gist URL

_No response_

### Additional Information

_No response_
Repository: tensorflow
Issue: [BUG] Gradient tape *inside* tf.function broken for tf.Variable argument.
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.9

 
 ### Issue Type

Bug

### Source

binary

### Tensorflow Version

tf 2.7, 2.9, nightly

### Custom Code

Yes

### OS Platform and Distribution

Ubuntu 22.04

### Mobile device

_No response_

### Python version

3.1)

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

```shell
tf.function (since TF 2.7 I believe) now remembers the storage of the variable and treats them as tensors (using the `__tf_retrace__` mechanism). This works fine whenever the value of the variable is needed and not it's identity. However, when taking the gradient, the identity matters, not the value.

This means when decorating a function that takes the gradient of y with respect to x (x being a parameter here), it traces the function, uses the value of the TensorLike object and **creates the gradient with respect to the parameter's identity (watching the parameter)**.
Calling the same function with a different parameter won't retrace (!) and just use the value, however since it doesn't retrace, it won't re-calculate the gradient with respect to the *identity* of the new variable given as argument but instead use the remembered gradient.

Basically, the problem arises since tf.function and tensor-like objects function functionally (i.e. gradient with respect to argument one, two etc) and tf.Variable, that are global statebased objects. Using a statebased object as a "functional" object breaks the correct behavior of GradientTape.

## Bug or feature?

I do understand the merits of this in a function that doesn't take gradients. However, it breaks for the logic of the gradient.

## Possible fixes

There are workarounds, i.e. to always give parameters in a dict with their name, the names triggering a retrace.
```


### Standalone code to reproduce the issue

```shell
Link to colab with the code below: https://colab.research.google.com/drive/1z26ZIoiFEBO9icGJ5bYusu4XY5u-vpkG?usp=sharing


import tensorflow as tf

x1 = tf.Variable(2.0)
x2 = tf.Variable(4.0)


def f():
    res = x1 + x2 ** 2 / 2
    return res


def grad(param):
    with tf.GradientTape(watch_accessed_variables=False) as tape:
        tape.watch(param)
        value = f()
    return tape.gradient(value, param)

jitted_grad = tf.function(grad)

y1 = grad(x1)
y1_jit = jitted_grad(x1)
assert abs(y1 - 1.0) < 1e-5  # because d x1 / dx1 = 1
assert abs(y1_jit - 1.0) < 1e-5
y2 = grad(x2)
y2_jit = jitted_grad(x2)
print(f"y2: {y2}, should be 4")  # but is 1 because it uses the derivative of x1
print(f"y2_jit: {y2_jit}, should also be 4")  # but is 1 because it uses the derivative of x1
assert abs(y2 - 4.0) < 1e-5  # because d / dx x**2/2 = x -> 4
assert abs(y2_jit - 4.0) < 1e-5  # fails!
```
```


### Relevant log output

_No response_</details>
Repository: storybook
Issue: Globals containing colon (:) not being set in URL
Labels: bug,args

**Describe the bug**
If a global contains a colon (:) it will not be set in URL. `&globals=theme:my-theme` is ok but if theme were to be set to `my:theme` via e.g. toolbar menu it would disappear from the URL.

Would URL encoding/decoding globals in URL be a valid solution to this problem?