sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Set as executable files that are intended to be binaries
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ

-->

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

- `mode`
- `binary`
- `executable`
- `package.json bin`

## Suggestion

<!-- A summary of what you'd like to see added or changed -->

Currently, the TypeScript compiler always generates files with the `644` mode. But some files are meant to be executable: they may start with `#!/usr/bin/env node`; they may be marked as `bin` in `package.json`; they may have an executable mode set on the `.ts` source; and so forth.

It’d be great if the TypeScript compiler would take any of the hints I mentioned above, figure that the file should be executable, and create the `.js` as so.

At least the TypeScript compiler doesn’t **change** the mode of existing `.js` files when overwriting them, so I can `chmod` once, and as long as never delete the file, it’ll have the right mode.

## Use Cases

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

This is mostly for development and running the binary from the command-line directly. Once you install the package, npm puts the binary in the `node_modules/.bin` folder, `npx` picks it up, and all is good.

## Examples

<!-- Show how this would be used and what the behavior would be -->

You’re working on a project that should provide a binary: `src/my-binary.ts`. You do one of the things I mentioned to indicate that the file should be executable. You run `tsc`, and the generated file at `lib/my-binary.js` is marked as `+x`. Then you can call the binary with `lib/my-binary.js` from the command-line and it works.

## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: godot
Issue: OS.execute trouble with shell evaluation ("export PATH=test && echo $PATH" doesn't work)
Labels: bug,platform:linuxbsd,platform:macos,topic:porting,confirmed

**Godot version:**
3.2.1

**OS/device including version:**
macos

**Issue description:**
OS.execute("/bin/bash", ['-c',"export PATH=test && echo $PATH"], true, output,true)
print(output)
print result
[/usr/bin:/bin:/usr/sbin:/sbin
]
don't work

**Steps to reproduce:**

**Minimal reproduction project:**
Repository: godot
Issue: [TextureRect] rect_scale when changing texture
Labels: bug,topic:rendering

**Godot version:**
3.2.1.stable

**OS/device including version:**
Windows 10 Pro

**Issue description:**
(Atleast when using animations) When changing a texture (from "null") on the TextureRect it briefly resets the rect_scale to 1,1.

**Steps to reproduce:**
- Create a control and put a texture rect inside it
- Create an animation state machine
- Create a show (start animation), base and hide animation
- At the start of the show animation "update" the texture (set to some texture) and set rect_scale to (0, 0) and at the end move it to (1,1)
- At the end of the hide animation "update" the texture (make it null) and set rect_scale to (1,1) and at the end move it to (0,0)
- Make controls so you can start the show animation and travel to the hide animation
- Start the show animation, travel to the hide (wait for it to finish) and then finally start the show animation, you can see that the rect_scale changes to (1,1) when changing the texture and then after a brief moment goes into it's rect_scale on which it should be (by the animation)

**Minimal reproduction project:**
https://drive.google.com/file/d/113X-mEWHL5ad1khAM6G4VG7CpapT7aOP/view?usp=sharing
Repository: go
Issue: cmd/compile: consider extending '-spectre' option to other architectures
Labels: Security,NeedsInvestigation,compiler/runtime

@rsc recently added a `-spectre` flag to the compiler and implemented a couple of speculative execution exploit mitigations on amd64. These involved using conditional moves to prevent out of bounds indexed memory accesses (`-spectre=index` added in https://golang.org/cl/222660) and making use of call stack optimizations to prevent indirect function calls being speculatively executed (`-spectre=ret` added in https://golang.org/cl/222661).

My understanding is that these mitigations could be important when the Go program being compiled is something like a hypervisor or operating system that has access to data or functionality that guest programs should be restricted from accessing. I'm still in the process of getting my head round these changes and how they might apply to other CPU architectures but my understanding so far is that, to be totally safe, we should apply similar mitigations on other platforms unless there are hardware mitigations in place.

The new flag also has potential for cross-platform incompatibilities since currently, for example, `-spectre=index` will cause the compiler to fail on non-amd64 platforms. It would be nice if these flags 'just worked' on other platforms.

I personally am responsible for maintaining the s390x port. I think it would be straightforward to implement equivalent mitigations on s390x:

1) index: use conditional moves in exactly the same way as the amd64 backend
2) ret: use EX{,RL} (execute) instructions to indirectly call branch instructions (more info here: 
https://www.phoronix.com/scan.php?page=news_item&px=S390-Expoline-Linux-4.16)

Does anyone have any thoughts on what we should do for other architectures, if anything?
Repository: flutter
Issue: SliverPersistentHeader initial state
Labels: c: new feature,framework,f: scrolling,would be a good package,P3,team-framework,triaged-framework

## Proposal
`SliverPersistentHeader` / `SliverPersistentHeaderDelegate`
This header has two main status - minExtent (collapsed) and maxExtent(expanded)
Initially, this header is in expanded status.
I think this header can be collapsed initally
Just like SearchBar on android.
It can be expanded or iconified (collapsed) initally.

Thank you for your great support.
Looking forward hearing from you.
Repository: node
Issue: Describe alternatives to require.extensions
Labels: module,deprecations

https://nodejs.org/api/modules.html#modules_require_extensions says `require.extensions` is deprecated.

Per https://github.com/TypeStrong/ts-node/issues/641 and https://github.com/TypeStrong/ts-node/issues/989 there are no alternatives.  They reference further the documentation of @babel/node, @babel/register, and coffeescript.

• Either re-introduce require.extensions or describe more precisely the alternatiles that should be used.
Repository: material-ui
Issue: [docs] Allow providing a custom theme and preview it live
Labels: priority: important,design,scope: docs-infra

<!-- Provide a general summary of the feature in the Title above -->
We're going to make a lot of modifications to our theme soon, and I was thinking that it'd be really cool if I could enter a custom theme (JS and all) in the material-ui docs, through an inline editor, and navigate through all the docs with that theme.

Benefits:
* Previewing and testing custom theming options is a breeze
* Remove all "customization" demos from the components, and add a button that loads a pre-defined global theme, which then modifies all demos in real time: "Try Button with different themes"
* Potentially improve the interactivity of the customization docs, making theming more aproachable for every one

This is obviously a huge effort, but as you can already change the theme colors across the website, maybe there is some infrastructure in place already to do this.
Repository: kubernetes
Issue: Stop applying the beta.kubernetes.io/os and beta.kubernetes.io/arch
Labels: area/kubelet,sig/node,kind/feature,priority/important-longterm,lifecycle/frozen,triage/accepted

It seems that according to plan, kubenrnetes 1.18 will remove support for the `beta.kubernetes.io/os` and` beta.kubernetes.io/arch` labels. Will we still do this work?

---

https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/
Repository: pytorch
Issue: runtime error when loding heavy dataset
Labels: needs reproduction,triaged

## 🐛 Bug

i used torch.save to save two very big tensors one being the training dataset and the other one being the test dataset (separated by torch.utils.data.random_split)

the original tensor was of size (4803, 354, 4000)

when i do that it’s very slow to save (wich is understandable), both files have the same size (wich is weird since the testing set is only 20% of the original while the training set is 80% of the original)
and when i try to load the dataset using torch.load it gives me this error (note : i am on a gpu kernel but i get the same error on a cpu kernel)

RuntimeError Traceback (most recent call last)
in
----> 1 training_set = torch.load(‘trainaction.pt’)
2 testing_set = torch.load(‘testaction.pt’)
3
4 batch_size = 200
5 DATA_PATH = ‘./data’

~.conda\envs\py36\lib\site-packages\torch\serialization.py in load(f, map_location, pickle_module, **pickle_load_args)
527 with _open_zipfile_reader(f) as opened_zipfile:
528 return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
–> 529 return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
530
531

~.conda\envs\py36\lib\site-packages\torch\serialization.py in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
700 unpickler = pickle_module.Unpickler(f, **pickle_load_args)
701 unpickler.persistent_load = persistent_load
–> 702 result = unpickler.load()
703
704 deserialized_storage_keys = pickle_module.load(f, **pickle_load_args)

~.conda\envs\py36\lib\site-packages\torch\serialization.py in persistent_load(saved_id)
661 location = _maybe_decode_ascii(location)
662 if root_key not in deserialized_objects:
–> 663 obj = data_type(size)
664 obj._torch_load_uninitialized = True
665 deserialized_objects[root_key] = restore_location(obj, location)

RuntimeError: [enforce fail at …\c10\core\CPUAllocator.cpp:47] ((ptrdiff_t)nbytes) >= 0. alloc_cpu() seems to have been called with negative number: 18446744066554005248

## Environment

PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Microsoft Windows 10 Home
GCC version: Could not collect
CMake version: Could not collect

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.2.89
GPU models and configuration: GPU 0: GeForce GTX 1070
Nvidia driver version: 441.22
cuDNN version: Could not collect

Versions of relevant libraries:
[pip] numpy==1.18.1
[pip] numpydoc==0.9.2
[pip] torch==1.4.0
[pip] torchvision==0.5.0
[conda] _pytorch_select           1.1.0                       cpu  
[conda] blas                      1.0                         mkl  
[conda] mkl                       2020.0                      166  
[conda] mkl-service               2.3.0            py36hb782905_0  
[conda] mkl_fft                   1.0.15           py36h14836fe_0  
[conda] mkl_random                1.1.0            py36h675688f_0  
[conda] pytorch                   1.4.0           py3.6_cuda101_cudnn7_0    pytorch
[conda] torchvision               0.5.0                py36_cu101    pytorch
Repository: godot
Issue: Extra suffix is not appended at the end of a binary name in some cases
Labels: bug,topic:buildsystem

**Godot version:**
3.0, 4.0

**OS/device including version:**
Windows 10, likely any other OS.

**Steps to reproduce:**

## With mono module enabled:
```
scons platform=windows target=release_debug bits=64 module_mono_enabled=yes mono_glue=no extra_suffix=mygame
```

Results in binary name such as:
`godot.windows.opt.tools.64.mygame.mono.exe`

Should be like:
`godot.windows.opt.tools.64.mono.mygame.exe`

## With sanitizers:
```
scons platform=linuxbsd target=debug tools=yes use_asan=yes use_lsan=yes extra_suffix=mygame
```

Results in binary name such as:
`godot.linuxbsd.tools.64.mygames` (notice appended `s`)

Should be like:
`godot.linuxbsd.tools.64.s.mygame`

---

Should likely be handled by refactor as suggested in #24030.
Repository: TypeScript
Issue: New error: Type 'string' is not assignable to type 'string & ...'
Labels: Docs

https://github.com/material-components/material-components-web-components/blob/b1862998d80f4b0b917c817e6efde15a2504d8da/packages/linear-progress/src/mwc-linear-progress-base.ts#L109

```
packages/linear-progress/src/mwc-linear-progress-base.ts:109:9 - error TS2322: Type 'string' is not assignable to type 'string & ((property: string) => string) & ((property: string) => string) & ((index: number) => string) & ((property: string) => string) & ((property: string, value: string | null, priority?: string | undefined) => void)'.
  Type 'string' is not assignable to type '(property: string) => string'.

109         this.bufferElement
            ~~~~~~~~~~~~~~~~~~
110             .style[property as Exclude<keyof CSSStyleDeclaration, 'length'|'parentRule'>] =
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

https://github.com/material-components/material-components-web-components/blob/b1862998d80f4b0b917c817e6efde15a2504d8da/packages/linear-progress/src/mwc-linear-progress-base.ts#L119

```
packages/linear-progress/src/mwc-linear-progress-base.ts:119:9 - error TS2322: Type 'string' is not assignable to type 'string & ((property: string) => string) & ((property: string) => string) & ((index: number) => string) & ((property: string) => string) & ((property: string, value: string | null, priority?: string | undefined) => void)'.
  Type 'string' is not assignable to type '(property: string) => string'.

119         this.primaryBar
            ~~~~~~~~~~~~~~~
120             .style[property as Exclude<keyof CSSStyleDeclaration, 'length'|'parentRule'>] =
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

To repro:
1) `npm ci`
2) `npm run build:styling`
3) `tsc -b -f`
Repository: rust
Issue: Layout for enums does not match MIR (and types) very well
Labels: C-cleanup,T-compiler,A-MIR,A-layout

Enum layout computation entirely ignores ZST uninhabited ("absent") variants, which can lead to the layout being quite different in structure from the user-visible enum:
* if there are more than 1 non-absent variants, `Variants::Multiple` is used.
* if there is exactly 1 non-absent variant, `Variants::Single` is used.
* if all variants are absent, the layout of `!` is used, so the entire thing ends up looking like a union with 0 fields.

When actually asking for the layout of such an absent variant, it has to be made up "on the spot".

In terms of testing things like Miri (or anything else that needs to work with layout variants information), this leads to the "interesting" situation that we need an enum with at least 3 variants where 1 is "absent" to make sure that `Variants::Multiple` with absent variants is handled correctly.

This could be improved by generalizing `Variants::Multiple` to also support "discriminants" of "type" `()` and `!`, thus uniformly handling all enums.

Also see the second half of https://github.com/rust-lang/rust/issues/69763#issuecomment-595699745, and discussion below https://github.com/rust-lang/rust/issues/69763#issuecomment-603657246.

Cc @eddyb
Repository: flutter
Issue: Reliance on iana.org for localizations is flakey
Labels: team,tool,a: internationalization,c: proposal,P2,team-tool,triaged-tool

`dev/tools/localization/localizations_utils.dart` references iana.org which is causing CI to fail sometimes.  We should have local mirrors.

example from cirrus:
```
 ▌22:06:09▐ ELAPSED TIME: 5.306s for bin/cache/dart-sdk/bin/dart dev/tools/localization/bin/gen_localizations.dart --material in .
Unhandled exception:
HttpException: , uri = https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ERROR: Last command exited with 255.
Command: bin/cache/dart-sdk/bin/dart dev/tools/localization/bin/gen_localizations.dart --material
Relative working directory: .
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```

Example luci failure: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket.appspot.com/8884911422563139120/+/steps/run_test.dart_for_framework_tests_shard/0/stdout

```
00:22 +43 -2: test/localization/gen_l10n_test.dart: generateCode plural messages should throw attempting to generate a plural message with no resource attributes [E]                                  
  HttpException: , uri = https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
  dart:_http                                    _HttpClient.getUrl
  localization/localizations_utils.dart 302:50  precacheLanguageAndRegionTags
  test/localization/gen_l10n_test.dart 54:11    main.<fn>
```
Repository: rust
Issue: Tracking Issue for `-Z src-hash-algorithm`
Labels: A-debuginfo,T-compiler,B-unstable,C-tracking-issue,S-tracking-needs-summary,A-CLI

This is the tracking issue for the unstable option `-Z src-hash-algorithm`

### Steps
- [x] Implementation PR #69718 
- [ ] Adjust documentation
- [ ] Stabilization PR

### Unresolved Questions
- Should we have a separate option in the target specification to specify the preferred hash algorithm, or continue to use `is_like_msvc`?
- Should continue to have a command line option to override the preferred option? Or is it acceptable to require users to create a custom target specification to override the hash algorithm?
Repository: flutter
Issue: if (kRelease) return null; does not treeshake
Labels: c: new feature,framework,c: performance,dependency: dart,perf: app size,P3,team-framework,triaged-framework

## Use case

Flutter framework uses the following pattern:

```
DiagnosticPropertiesBuilder get builder {
    if (kReleaseMode)
      return null;
    if (_cachedBuilder == null) {
      _cachedBuilder = DiagnosticPropertiesBuilder();
      value?.debugFillProperties(_cachedBuilder);
    }
    return _cachedBuilder;
  }
```

value?.debugFillProperties causes all debugFillProperties not to be treeshaken. Which on the web is > %2 code size increase (tested using flutter build web --profile).

Wrapping this code in assert on the other hand does tree shake offending methods.

## Proposal
Options:
1- Consistently handle the above across dart2js and AOT and treeshake code below without assert.
2- Introduce asserts into framework code explicitely. Check all current usages of if (kRelease) across the code base.
Repository: pytorch
Issue: torch.jit.script works for x*sigmoid(x) but not for x*sin(x)
Labels: oncall: jit,triaged

cc: @ptrblck 

## 🐛 Bug

In the following example, I observe that `x * sigmoid(x)` is JITted as expected. In the first call to `foo`, I see 1 GPU kernel for sigmoid and 1 for mul. In the second call, I see 1 call to `kernel_0` which is the JITted kernel. However, if I replace `sigmoid` wtih `sin`, seemingly another simple pointwise operation, then the JIT does not seem to be working and I observe 4 kernels (2 for sin and 2 for mul). However, if I use the flags

```python
torch._C._jit_set_profiling_mode(False)
torch._C._jit_set_profiling_executor(False)
```
then I see `kernel_0` being invoked twice as expected.

## To Reproduce

```python
import torch
@torch.jit.script
def foo(x):
    return  x * torch.sigmoid(x)
    #return  x * torch.sin(x)

x = torch.rand(2048,2048).cuda()
y = foo(x)
y = foo(x)
```
## Steps to reproduce the behavior:

Run the above code as `nvprof python foo.py` to see the list of kernels.

## Expected behavior

I would expect `x * sin(x)` to be JITted as well.

## Environment
```vim
PyTorch version: 1.4.0a0+a5b4d78
Is debug build: No
CUDA used to build PyTorch: 10.2

OS: Ubuntu 18.04.4 LTS
GCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
CMake version: version 3.14.0

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.2.89
GPU models and configuration: 
GPU 0: Tesla V100-SXM2-16GB
GPU 1: Tesla V100-SXM2-16GB
GPU 2: Tesla V100-SXM2-16GB
GPU 3: Tesla V100-SXM2-16GB
GPU 4: Tesla V100-SXM2-16GB
GPU 5: Tesla V100-SXM2-16GB
GPU 6: Tesla V100-SXM2-16GB
GPU 7: Tesla V100-SXM2-16GB

Nvidia driver version: 440.33.01
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5

Versions of relevant libraries:
[pip] msgpack-numpy==0.4.3.2
[pip] numpy==1.17.2
[pip] pytorch-transformers==1.1.0
[pip] torch==1.4.0a0+a5b4d78
[pip] torch-dct==0.1.5
[pip] torchio==0.13.18
[pip] torchtext==0.4.0
[pip] torchvision==0.5.0a0
[conda] magma-cuda101             2.5.2                         1    local
[conda] mkl                       2020.0                      166  
[conda] mkl-include               2020.0                      166  
[conda] nomkl                     3.0                           0  
[conda] pytorch-transformers      1.1.0                    pypi_0    pypi
[conda] torch                     1.4.0a0+a5b4d78          pypi_0    pypi
[conda] torchtext                 0.4.0                    pypi_0    pypi
[conda] torchvision               0.5.0a0                  pypi_0    pypi
```
cc @suo
Repository: flutter
Issue: Include Gradle version in tool crash GitHub template
Labels: tool,t: gradle,a: triage improvements,P3,team-tool,triaged-tool

Include in the **Flutter Application Metadata** section.

https://github.com/flutter/flutter/blob/2dda1297bb499b84de89321c1b19e40516038f5d/packages/flutter_tools/lib/src/reporting/github_template.dart#L133-L143
Repository: TypeScript
Issue: New error: Type of property 'defaultProps' circularly references itself in mapped type
Labels: Needs Investigation,Rescheduled

https://github.com/nteract/nteract/blob/af734c46893146c617308f4ae1e40bf267e8875f/packages/connected-components/src/header-editor/styled.ts#L24

```
packages/connected-components/src/header-editor/styled.ts:24:34 - error TS2615: Type of property 'defaultProps' circularly references itself in mapped type 'Pick<ForwardRefExoticComponent<Pick<Pick<any, Exclude<keyof ReactDefaultizedProps<StyledComponentInnerComponent<WithC>, ComponentPropsWithRef<StyledComponentInnerComponent<WithC>>>, StyledComponentInnerAttrs<...> | ... 1 more ... | StyledComponentInnerAttrs<...>> | Exclude<...> | Exclude<...> | Exclude<...>> & Parti...'.

24 export const EditableAuthorTag = styled(AuthorTag)`
                                    ~~~~~~~~~~~~~~~~~
```

https://github.com/nteract/nteract/blob/af734c46893146c617308f4ae1e40bf267e8875f/packages/presentational-components/src/components/prompt.tsx#L85

Also, I'm seeing each of these errors printed twice.

To repro:
1) `yarn`
2) `tsc -b -f`

Note that it fails with a different (apparently unrelated) error in 3.8.
Repository: flutter
Issue: Create way to automate updating of dev/tools/localization/language_subtag_registry.dart
Labels: tool,framework,a: internationalization,P2,team-framework,triaged-framework

`dev/tools/localization/language_subtag_registry.dart` is cached from iana.org, `dev/tools/localization/gen_subtag_registry.dart` generates it but there is nothing that is automatically generating it regularly.

related pr: https://github.com/flutter/flutter/pull/53286