WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Bug report

Describe the bug

my library is ui component library that depends css modules

To Reproduce

Expected behavior

works css loader to my library code as well

Screenshots

my-library/MyComponent/index.js

System information

OS: macOS

Version of Next.js: 7.0.1

"dependencies": {
"next": "^7.0.1",
"@zeit/next-css": "^1.0.1"
}

Additional context

similar issues

vercel/next-plugins#70

#105

vercel/next-plugins#273

#706

#4114

#4617

#4637

#5278

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

No errors

Current Behavior

After upgrading to Next v5 and React v16.2, I am getting this error when trying to build my project:

Error: _document.js is not exporting a React element

Here is what my _document.js looks like. The only thing that differs from the normal _document is that I'm using styled-components.

import Document, { Head, Main, NextScript } from 'next/document';
import { ServerStyleSheet } from 'styled-components';

export default class _Document extends Document {
static getInitialProps({ renderPage }) {
const sheet = new ServerStyleSheet();
const page = renderPage(App => props => sheet.collectStyles(<App {...props} />));
const styleTag = sheet.getStyleElement();
return { ...page, styleTag };
}

render() {
return (
<html lang="en">
<Head>
{this.props.styleTag}
</Head>
<body>
<Main />
<NextScript />
</body>
</html>
);
}
}

My .babelrc:

{
"presets": [
"next/babel"
],
"plugins": [
"transform-decorators-legacy",
[
"inline-react-svg",
{
"svgo": {
"plugins": [
{
"removeAttrs": {
"attrs": "(data-name)"
}
},
{
"cleanupIDs": false
}
]
}
}
],
[
"styled-components",
{
"ssr": true,
"displayName": true,
"preprocess": false
}
],
[
"transform-assets-import-to-string",
{
"baseDir": "static",
"baseUri": "/"
}
],
],
}

My next.config.js:

const path = require('path');
const VersionFile = require('webpack-version-file');

module.exports = {
webpack(config, { buildId, dev }) {
config = addBuildVersioning(config);
return config;
},
};

function addBuildVersioning(config) {
config.plugins.push(new VersionFile({
output: path.join('./server', 'version.json'),
templateString: `{
"name": "<% name %>",
"version": "<%= version %>",
"buildDate": "<%= buildDate %>"
}`,
}));

return config;
}

Anyone have any idea what may be causing this? Google doesn't come up with much about this error.

Thanks!
Issue 1:
We have some actions that result in new files being created in the workspace. We should respect the auto save setting and only save the file to disk if auto save is enabled. Otherwise we can open the file dirty until saved.

Old summary

Have "files.autoSave": "afterDelay" in your settings

Open code on a new folder

Create a hello.js file and open it

Wait for the (ugly) green lightbulb in the bottom right corner to appear; click it and choose to create a jsconfig.json file.

The newly created jsconfig.json file will not be automatically saved. It will instead display the unsaved icon and wait for me to save it.

Issue 2:
Issue Id: 9d49987e-1058-1c47-d977-23b53a6f81d2
Versions
- 1.0.0-insider
- fa6d0f0
Stack
Error: Illegal value 31 for line
at t.lineAt (\out\vs\workbench\node\pluginHostProcess.js:18:29390)
at Object.t.lineAt (\out\vs\workbench\node\pluginHostProcess.js:18:28204)
at TrailingSpaces.matchTrailingSpaces (\shardulm94.trailing-spaces-0.2.8\out\src\trailing-spaces\trailing-spaces.js:150:95)
at \shardulm94.trailing-spaces-0.2.8\out\src\trailing-spaces\trailing-spaces.js:59:23
at e.invoke (\out\vs\workbench\node\pluginHostProcess.js:7:14035)
at e.fire (\out\vs\workbench\node\pluginHostProcess.js:7:15488)
at e._acceptSelectionsChanged (\out\vs\workbench\node\pluginHostProcess.js:19:7900)
at t.e.handle (\out\vs\workbench\node\pluginHostProcess.js:15:12835)
at c (\out\vs\workbench\node\pluginHostProcess.js:11:16222)
at h (\out\vs\workbench\node\pluginHostProcess.js:11:16882)
Issue 1:
use E::{A,B};

#[derive(Debug, Clone)]
enum E {
A(i64),
B(Box<E>),
}

fn f(a: &mut E) {
*a = match *a {
B(ref b) => *b.clone(),
_ => a.clone(),
}
}

fn main() {
let mut a = B(Box::new(A(1)));
f(&mut a);
}

This code yields the following message during compilation:

Instruction does not dominate all uses!
%9 = load %enum.E** %2, !nonnull !0
%17 = bitcast %enum.E* %9 to i8*
Instruction does not dominate all uses!
%9 = load %enum.E** %2, !nonnull !0
%21 = bitcast %enum.E* %9 to i8*
LLVM ERROR: Broken function found, compilation aborted!

Issue 2:
The functions below are OK:

fn foo1(x: Option<Box<int>>) -> Option<int> {
let res = match x {
Some(ref v) => v.clone(),
None => return None
};
Some(*res)
}
fn foo2(x: Option<Box<int>>) -> Option<int> {
let res = match x {
Some(ref v) => Some(*v.clone()),
None => return None
};
return res;
}

but:

fn foo3(x: Option<Box<int>>) -> Option<int> {
let res = match x {
Some(ref v) => *v.clone(),
None => return None
};
Some(res)
}

produces a LLVM ERROR. The message is:

Instruction does not dominate all uses!

%8 = load i64** %2

%12 = bitcast i64* %8 to i8*

LLVM ERROR: Broken function found, compilation aborted!

I'm sorry if it isn't a minimum example of this issue.
Issue 1:
What do you see as an issue?

Currently, in the Airflow documentation of Tableau connector, it is marked as deprecated to use a token to authenticate to Tableau.

https://airflow.apache.org/docs/apache-airflow-providers-tableau/stable/connections/tableau.html#authenticating-to-tableau

However, since MFA enforcement release (27th April 2023), it is now impossible to use a user/password to authenticate as a service account.

Solving the problem

Put the deprecated (even remove?) flag on the user/password authentication, and mark the access token authentication as strongly recommended.

Anything else

No response

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct

Issue 2:
Description

In Tableau Online, you can use user name and password method for REST API calls, only if you don't use MFA.

Thus, organizations that enabled MFA in Tableau, have to use Personal Access Tokens for API calls to Tableau.

However, Airflow deprecated the usage of Personal Access Tokens in airflow.providers.tableau.hooks.tableau, since there is a problem that each time you try to open a parallel connection, the previous one would be invalidated.

Use case/motivation

I would like to use the Personal Access Token method for API calls to Tableau.

I see 2 solutions that might be applicable:

Create 1 connection to Tableau and use that for all API calls from Airflow in a specific timeframe. I am not sure if this is feasible

Create a pool of tokens and for each connection to Tableau from Airflow, create a new connection id with 1 of the unused tokens. I saw that on Airflow, you can generate connection on the fly. I am not sure how to handle the token pool though

I am open to other solutions and guidance. Also, I am not sure I can submit a PR since I have never contributed to an open source project but I can try.

Related issues

No response

Are you willing to submit a PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct
Issue 1:
A lot of files are really just .xml files, but end in different extensions. This is just one example

It would be nice if

A) If on AutoDetect, check the the first line if it contains <?xml ....> then parse as xml language

B) Associate an extension with a particular language

Someone might have already created a package for it, but haven't found one yet.

Thanks!

Issue 2:
I will explain this issue referring to a third–party package, although the problem might be realted to atom's grammar auto detection feature:

Cucumber package for Gherkin syntax and step definitons (https://github.com/edda/cucumber-atom/) defines two grammars:

Gherkin (file types: feature)

Cucumber Steps (file type: steps.rb)

Whilst the first grammar is set correctly on files with the extension *.feature, the second grammar is not detected and instead will set grammar to "Ruby" for files *_steps.rb.

Any ideas please?

/cc: @izuzak
Issue 1:
Bug report

What is the current behavior?

Webpack stores absolute paths for node_modules (not only for node_modules I believe). So when the base path changes it leads to error like that:

[webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo]
/Users/v7rulnik/projects/project/node_modules/emojis-list invalidated because hashes differ
(missing != emojis-list@3.0.0)

The main problem that there are environments where users can't control the base directory. For example Jenkins CI. Base directory in Jenkins looks like this: /home/jenkins/agent/workspace/$PROJECT_NAME_$GIT_BRANCH/. So it's impossible to share cache between branches.

If the current behavior is a bug, please provide the steps to reproduce.

Run webpack with cache enabled in the project directory, for example: ~/project/

Rename project directory: ~/project/ → ~/project_renamed/

Run webpack in ~/project_renamed/

What is the expected behavior?

The base directory shouldn't affect persistent caching. Maybe we can store relative paths in pack files and concatenate them with current context?

Other relevant information:

webpack version: 5.32.0

Node.js version: 14.15.4

Operating System: MacOS

Issue 2:
Bug report

Files

// components/common.js
export function test() {
console.log('commonjs')
}

// src/main1.js
import { test } from './components/common'
test()

// src/main2.js
import { test } from './components/common'
test()

// src/main.js
const a = () => import('./main2')
const b = () => import('./main3')
console.log(a);
console.log(b);

What is the current behavior?

main1.js bundled to 1.js, main2.js bundled to 2.js,

but commonn.js bundled to both 1.js and 2.js

What is the expected behavior?

commons.js should be bundled to component.js

Other relevant information:

// webpack.config.js
const path = require('path')
module.exports = {
entry: './src/main.js',
output: {
path: path.join(__dirname, 'dist')
},
optimization: {
minimize: false,
splitChunks: {
cacheGroups: {
components: {
name: 'components',
priority: 30,
minChunks: 1,
reuseExistingChunk: false,
test: 'components'
},
},
},
},
}
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.6.5

Operating System version: Windows 7

Java version: 1.8.0_31

Steps to reproduce this issue

API的方式配置两个registry地址，例如： registryConfig.setAddress("127.0.0.1:2181|127.0.0.1:2182")。

API的方式配置ReferenceConfig按照文档配置stub，例如： referenceConfig.setStub("com.liupeng.dubbo.api.MyStub")。

3.API的方式启动consumer。

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

文档中描述protocol级别支持token, 实际上不支持，请更新文档描述：

http://dubbo.apache.org/zh-cn/docs/user/demos/token-authorization.html

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!
Issue 1:
Couldn't find a previous issue on this, so I'd like to open a tracking issue for this. We've known this for a long time, but the metadata format for the compiler is far too large and there are surely methods to shrink its size and impact. Today when I compile librustc, I get the following numbers:

librustc.rlib - 64MB

rustc.o - 12MB

rust.metadata.bin - 32MB

rustc.0.bytecode.deflate - 21MB

This means that the metadata is three times as large as the code we're generating. Another statistic is that 36% of the binary data of the nightly is metadata.

There are, however, a number of competing concerns around metadata:

Reading metadata needs to be fast. Rustc reads a lot of metadata for upstream crates, and it needs to quickly be able to read the minimum set of metadata for crates. This is currently achieved by storing metadata uncompressed in rlibs to allow LLVM to mmap it directly into the address space and page it in for reading.

Metadata needs to be fairly free-form to allow encoding various types of data into it. Ideally it's also extensible into the future so at some point we can use newer compilers against older libraries (this currently not possible for other reasons).

All libraries need metadata available in them (currently). This means that if a library produces a dylib/rlib pair (the stdlib is one of the few that does this) then the metadata is duplicated among artifacts. It also means that metadata must be suitable to place inside of a dynamic library.

There are a few open issues on this already, but none of them are necessarily a silver bullet. Here's a smattering of wishlist ideas or various strategies.

Changing metadata formats may gain us a win. Currently we're using a "variant" of EBML. #9303

Move metadata to a separate crate for faster iteration, allowing external tools to inspect, or in general improving the overall quality of the code. #2213

Being able to actually inspect metadata would probably give a helpful hand into what can be eliminated. #2326

More will likely be added to this over time as it's a metabug.

Issue 2:
trans codegen feeds the zeroed discriminant back into match in a loop

Some examples, courtesy of @eddyb and @dotdash

fn main() {
let mut result = Box::new(42);
let mut i = 0;
loop {
match result {
x => {
println!("A>>> {:p}", &*x);
println!("A: {:?}", x);
result = Box::new(42);
if i > 10 { break; }
i += 1;
}
}
}
}

playpen here yields:

A>>> 0x7fedb4423008
A: 42
A>>> 0x0
playpen: application terminated abnormally with signal 4 (Illegal instruction)

Another one, courtesy of @eddyb:

fn main() {
let mut result = (Box::new(12), 34);

// Run in a loop to demonstrate the zeroing:
let mut i = 0;
while i < 4 {
match result {
x => {
println!("{:p} {}", &*x.0, x.1);
result = (Box::new(12), 34);
i += 1;
}
}
}
}

playpen yields:

0x7f05c5823008 34
0x0 0
0x0 0
0x0 0
Issue 1:
The code to complete the waypoint, according to the example text, is:

$("#target2").appendTo("#right-well");

After going to the Gitter Help channel I was able to pass this waypoint using

$("#target2").appendTo($("#right-well"));

In the course of an hour or so in the help channel, there were at least 5 other people experiencing the same issue.

Issue 2:
A bug seems to be present: Chrome 46.0.2490.86 m; Windows 8.1 with respect to appendTo() function.

$("#target2").appendTo($("#right-well")); does work, but not the $("#target2").appendTo("#right-well");, the latter being suggested in the tutorial.

Hard reload and cache clearing did not seem to solve the problem.
Issue 1:
Stefan Gybas opened SPR-8434 and commented

We are migrating a project from Java 5 to Java 6 and noticed that one integration test was failing because a dependency was not injected any longer.

The problem can be reproduced with a simple scenario: We have a package-visible base class for some services with an autowired dependency and a public getter and setter:

abstract class AbstractService {

private Dependency dependency;

public Dependency getDependency() {
return dependency;
}

@Autowired
public void setDependency(Dependency dependency) {
this.dependency = dependency;
}
}

Then he have a public sub class that gets component-scanned:

@Component
public class Service extends AbstractService {
}

Our test basically looks like this:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "/applicationContext.xml" })
public class DependencyInjectionTest {

@Autowired
private Service underTest;

@Test
public void testDependencyInjected() {
// this test passes when Service.java was compiled with Java 5
// but fails when compiled with Java 6
assertNotNull(underTest.getDependency());
}
}

with a very simple application context that just enables annotation-config and does a package scan (see the attachment for a complete Maven/Eclipse project).

When we compile the project with Java 5 the test passes when run with Java 5 or Java 6. But when we compile the project with Java 6 ("-source 1.5 -target 1.5") the test fails both under Java 5 and Java 6.

After investigating the byte code in Service.class we noticed that two bridge methods are generated by the Java 6 compiler. These methods are not generated by the Java 5 compiler:

public com.example.Dependency com.example.Service.getDependency() (bridge: true)
public void com.example.Service.setDependency(com.example.Dependency) (bridge: true)

AutowiredAnnotationBeanPostProcessor.buildAutowiringMetadata(Class clazz) uses ClassUtils.getMostSpecificMethod() in line 346 (current SVN) to determine if the method is defined in the class that is investigated (AbstractService in the example). The most specific method is the bridge method in Service.class when compiled with Java 6 but this method does not have the @Autowired annotation so the setter is never called.

A fix would be to replace ClassUtils.getMostSpecificMethod() with AopUtils.getMostSpecificMethod() to get the same results on Java 5 and Java 6. But this would cause a circular dependency between spring-aop and spring-beans and is probably not a high-performance solution.

We will change the visibility of AbstractService to public in our project to work around the problem. But I suggest to change Spring to deliver the same results on Java 5 and Java 6.

Affects: 3.0.5, 3.1 M2

Attachments:

DependencyTest.zip (6.13 kB)

Issue Links:

#12555 Annotation based injection into non public base classes does not work ("duplicates")

Issue 2:
Chris Beams opened SPR-8141 and commented

This issue is a sub-task of #12694

Issue Links:

#12544 Introduce @EnableSpringConfigured ("duplicates")

#12790 SpringConfiguredBeanDefinitionParser (aop:spring-configured) ("is duplicated by")
Issue 1:
TypeScript is really stingy about the way you call super from the child constructor. I have seen questions on SO e.g. this one, where people want to splice and dice arguments they receive from varargs (rest parameters) before passing it on to super. My workarounds have been ugly:

class Parent {
constructor (required1, required2, ...rest) { //...
if(required1 === undefined) return;
}
}

class Child extends Parent {
constructor (...args) {
super(undefined,undefined); // make the compiler happy
Parent.apply(this,[val1,val2].concat(args)) // the actual call
}
}

Suggestion: Support super.apply(this, /*any|arr[]*/) as a part of the language grammar.

Also tagging @Steve-Fenton as he's answered similarly in the past.

Issue 2:
Hi Team,

Please visit the link below:

http://www.typescriptlang.org/Playground#src=interface%20Callback%20%7B%0A%09(param%3A%20number)%3A%20void%3B%0A%7D%0A%0Aclass%20A%20%7B%0A%09%0A%09public%20doSome%20%3D%20(callback%3A%20Callback)%20%3D%3E%20%7B%0A%09%09callback(123)%3B%0A%09%7D%3B%0A%7D%0A%0A%0Alet%20a%20%3D%20new%20A()%3B%0Aa.doSome(%20()%20%3D%3E%20%7B%0A%09console.log(%22tony%22)%3B%0A%7D)%3B

a.doSome( () => { } ); // should compiler not allow me to do this? since the param is not an optional field.

Cheers,

-Y
Issue 1:
Description

model_selection.cross_val_score explicitly blocks multiple scores despite calling cross_validate underneath the hood. Essentially, we have two identical functions but have manually blocked cross_val_score from accepting multiple scores.

def cross_val_score(estimator, X, y=None, groups=None, scoring=None, cv=None,
n_jobs=1, verbose=0, fit_params=None,
pre_dispatch='2*n_jobs'):

# To ensure multimetric format is not supported
scorer = check_scoring(estimator, scoring=scoring)

cv_results = cross_validate(estimator=estimator, X=X, y=y, groups=groups,
scoring={'score': scorer}, cv=cv,
return_train_score=False,
n_jobs=n_jobs, verbose=verbose,
fit_params=fit_params,
pre_dispatch=pre_dispatch)
return cv_results['test_score']

It creates confusion and duplication of APIs. Open to discussion but can we perhaps consider:

re-evaluate previous discussion in #7388 and make cross_val_score accept both single and multiple scores and callable, None?

Or alternatively make error message more explicit when passing multiple scores to cross_val_score.

Steps/Code to Reproduce

from sklearn.model_selection import cross_val_score
from sklearn.linear_model import LogisticRegression
from sklearn.datasets import load_breast_cancer

X, y = load_breast_cancer(return_X_y=True)
lr = LogisticRegression()

cross_val_score(lr, X, y, scoring=['accuracy', 'f1'])

Expected Results

>>> cross_val_score(lr, X, y, scoring=['accuracy', 'f1'])
{'fit_time': array([0.00580502, 0.00351 , 0.00399804]), 'score_time': array([0.00100303, 0.00081301, 0.00084615]), 'test_accuracy': array([0.93684211, 0.96842105, 0.94179894]), 'test_f1': array([0.95081967, 0.97520661, 0.9527897 ])}

Actual Results

>>> cross_val_score(lr, X, y, scoring=['accuracy', 'f1'])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mingli/GitHub/personal/scikit-learn/sklearn/model_selection/_validation.py", line 349, in cross_val_score
scorer = check_scoring(estimator, scoring=scoring)
File "/Users/mingli/GitHub/personal/scikit-learn/sklearn/metrics/scorer.py", line 305, in check_scoring
" None. %r was passed" % scoring)
ValueError: scoring value should either be a callable, string or None. ['accuracy', 'f1'] was passed

Versions

Darwin-17.4.0-x86_64-i386-64bit

Python 3.6.4 (default, Mar 22 2018, 13:54:22)

[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]

NumPy 1.14.2

SciPy 1.0.1

Scikit-Learn 0.20.dev0

Issue 2:
As illustrated in #14230 tests can contain unreachable code which then produces false positives.

Looking at codecov results for test files is probably a good start. For instance, there may be issue in,

test_countvectorizer_custom_vocabulary_repeated_indices, test_countvectorizer_custom_vocabulary_gap_index

(I have checked only a few test files).

cc @VarIr in case you are interested in looking into this (possibly in another PR)..
Issue 1:
deno test should support --ignore just like deno fmt and deno lint

Issue 2:
Allow an --ignore flag to exclude files. The only good and common way of defining excludes are globs, so I'm including glob support in this issue. Existing tools have this.

Allow the following usages:

deno fmt --ignore=<csv-globs> <globs>...
deno lint --ignore=<csv-globs> <globs>...
deno test --ignore-files=<csv-globs> <globs>...

Glob support was removed when we brought deno test and deno fmt into the CLI from std because:

The shell can expand globs for you. However, this doesn't work when spawning with process APIs, or with exclude patterns (or generally things that are meaningless to expand in the shell). You ultimately have to use platform-specific tools like find. It's not ideal.

There are no good glob expansion/matching tools in Rust. The ones considered were buggy on Windows and didn't have feature parity with the glob tools we have in std. This is still a blocker.

Ref #3820, #3865, #3865 (comment), #3865 (comment).
Issue 1:
When adding a violation error on an unmapped field, the ViolationMapper creates a PropertyPath with an empty string, which is invalid and throws an exception.

Code to reproduce the issue:

<?php
use Symfony\Bundle\SecurityBundle\Validator\Constraint\UserPassword;

$builder->add('current_password', 'password', array(
'mapped' => false,
'constraints' => new UserPassword(),
));

Issue 2:
https://github.com/rails/turbolinks/

havent looked at the implementation, but imho it should GET the same content as a normal GET request to better leverage ESI and reverse proxies in general.