Ability to over power TS and ignore specific error by developer

A developer should be able to add a comment above a ts error such as
/// TS_IGNORE
let a:string = 1

and have the compiler not report that error...
there are certain scenarios the developer knows best and want to quiet down the error reports.
kind of like :any
regards
Sean

Agreed. Longing for something like Java's @SuppressWarnings, in particular for the case described here:

The following:
const typeMetadataKey = Symbol('type');

function type(name: string): PropertyDescriptor {
 return Reflect.metadata(typeMetadataKey, name);
}

Produces the error:  Unable to resolve signature of class decorator when called as an expression..
When used as below:
class Person {
  @type('string')
  firstName: string;
}

The decorator does work as expected and will compile but gives the error above.
If you have thoughts on how this might be resolved happy to dig into it if someone would like to point to the right direction.

I just gave an example, not really a case (I know all about casting) , I do have other cases such as
super being called after  first line of constructor and other issues...

will make transition into TS easier from JS + sometime you change a lib and get tons of errors and you just want to clean things up as you know as the developer for the reason...

this is an important feature

So something like //tslint:disable, letting you turn on/off specific checks by ts

that would be awesome...

I don't know... I think that might be out of the scope of tsserver. That's what linters are for.

there has to be able to "shut it up" :)

I think there's a case to be argued for suppressing errors/warnings on "experimental" features, like decorators, where the API is usually subject to change. You get a (very specific) version of this just using the tsconfig "experimentalDecorators" field, but it only suppresses one type of warning.
To play my own devil's advocate, this could encourage new users of TypeScript to suppress warnings they do not understand instead of learning why the warning occurs. And with experimental features, everyone is sort of a new user - having the ability to suppress errors could make users complacent with bugs in new features, instead of opening issues.
Ultimately, I still want my Syntastic output to be clean. Which means suppressing the error. Of course, that would be after I open the issue for a possible bug and try to learn more. ;)

The problem with "shutting it up" is you do not know what you get out of "it".  so is let a:string = 1 a number or a string?, what if there is another declaration of a, does it merge or not? what if some one captured the type of this variable e.g. return {a} ; , should they be assignable to { a : number } or { a: string }, or both.
one fundamental thing, errors are all ignoble. errors do not block the generation of outputs, nor the tooling.
There are different mechanisms to allow you to suppress checking of certain parts of your code, e.g. any, type assertions (casts), and ambient declaration.
so for instance, if you have a library that has "invalid" definition, you can just remove it, and replace it with declare module "blah" { export = any }. or declare var $: any and you are good to go.
As i usually reply to these requests, i think your problem is not in suppressing the error. the real issue is you got an error that you do not find useful. suppress that does not solve the underlying problem it just covers it, and has ramifications of an inconsistent state with no warning. The right solution is to know what is the error you are getting? what library is it? and why the compiler is giving you an unuseful error...
And for this we need to know more about your use case.
We have done some work in TS 2.0 to resolve some of these underlying issues, for instance;

Support shorthand ambient module declarations and wildcard chars in module names that allows for an easy way to disable a whole module or even a set of modules e.g. declare module "@angular\*";
Module resolution changes to allow you to override where a module definition is loaded from
allowing for duplicate definitions with the same type accross .d.ts files
new --skipLibCheck to not type check any .d.ts files
support for --typeRoots to allow overriding where declaration files are loaded from

just use any, this is how "shut it up", merits of doing so  (or actually a lack of thereof) is a different question
let x: PieInTheSky = <any> 'cake is a lie';

ok but again, the issue is not specifically on casting

 gives you vanila javascript with 100% freedom from all annoying things of TypeScript, so what else do you need?

<any> gives you vanila javascript with 100% freedom from all annoying things of TypeScript, so what else do you need?

Instead of trying to force it to accept an anti-paten, why not write try something like this:
ClassA.ts
class A {
    constructor() {
        this.init();
    }
    protected init() {
        // does nothing by itself
    }
}

ClassB.ts
class B extends A {
    constructor() {
        super();
        console.log('rest of code from B\'s constructor');
    }
    protected init() {
        console.log('this runs before the rest of code from B\'s constructor');
    }
}

in my case I call super not as fisrt line of constructor and need to quiet the error

And make your code incompatible with ES6...  Which is exactly why the main purpose of TypeScript is to take 👣 :gun: out of your hands.
If TypeScript is not interpreting something right, then it should be fixed versus "worked around".  Now there are a few things where TypeScript is acting more like a linter and there is not yet a concept of "error" versus "warning".  I can see suppressing warnings when they do come.  Things like code after return and unused parameters should be warnings in my opinion, because they are syntactically correct (though stupid).

here's another case where I would love to have this feature:
interface Animal {
  numberOfLegs: number;
  // a gazillion more properties
}

class Dog {
  breed: string;

  constructor(animal: Animal, breed: string) {
    Object.assign(this, animal);
    this.breed = breed;
  }
}

Right now there's an error from ts:

[ts] Class 'Dog' incorrectly implements interface 'Animal'
Property 'numberOfLegs' is missing in type 'Dog'

As you can see, the compiler is totally wrong, but I don't want to (and I shouldn't be forced to) copy all the properties from the interface just for the compiler's sake.

@DethAriel Basically what you're asking for is a way to express post condition side effects in the type system. That's interesting but I have a feeling it would lead to some terribly convoluted code.

@aluanhaddad Yup, I totally get that. But still, I do not see a non-ugly workaround for that except for copy-pasting the interface members, which is non-ideal at the very least. That's why I think that having the ability to shut up the compiler error output makes sense - we're all smart people here, and the compiler should trust us when we tell it to

Just use an interface+class combo
interface Animal {
  numberOfLegs: number;
  // a gazillion more properties
}

interface Dog extends Animal {
}

class Dog  {
  breed: string;

  constructor(animal: Animal, breed: string) {
    Object.assign(this, animal);
    this.breed = breed;
  }
}

Thx, @mhegazy , that worked indeed

What if the error can'y be <any>ed away?
Im using the experimental bind syntax as discussed here https://github.com/Microsoft/TypeScript/issues/3508 and aside from not using it, I'm otherwise unable to get the compiler to ignore the error on each line before each :: operator (TS1128: Declaration or statement expected)

Im using the experimental bind syntax

this is really more than dismissing one warning. The parser does not support it, so the resulting tree is completely wrong, all of the compiler features from this point on will not work, so no type inference, no compatibility checks, no formatting, no completion, nothing. so you would be better off ignoring all errors, or just working in a .js file.

I am currently converting a huge JS project into typescript and after doing the conversion when I run gulp build command I see around 2000 TS errors during compilation and majority of the errors are related to Property not defined on a class or Module not defined. I think there must be some way to suppress these types of errors as the output JS files are getting generated.

This is exactly my case as well, I convert a huge app built with modules-as-properties design, so I have a HUGE app.namespace1.namespace2.something.views.view -like global object.
I rewrite some part of it and I DO  rely on the global app.* object and its different sub-elements in my code. All I get is a mass of "Cannot find namespace 'app'" warnings.
I have refactored all my global dependencies to a globalProxy.ts, so this is the only place I get the warnings, but it would be AWESOME to add a //TS-NO-WARNINGS at the top of this file to clean up the console from the obvious messages...

TS errors do not block the code generation. You could choose to ignore them, but what these are telling you is that the compiler can not assert the correctness of your code.

@zeeshanjan82 why not use --allowJs and migrate file by file? With that setup you won't get type errors from JavaScript sources. You can also use an ambient wildcard declaration to suppress module module resolution errors like
globals.d.ts
declare module '*';

Here's another use case for error suppression.
The maintainers of the moment library forgot to add isoWeek as a valid string to the parameter enum for startOf and endOf methods. It was fixed in a subsequent release, but in doing so they completely refactored the way these units are handled, which would cause too much re-work on our end.
So we fixed the version of moment in place, but now we essentially can't use isoWeek because of TS throwing errors. So stuck between a rock and a hard place at the moment.

you could just add a local copy. say something as simple as:
// ./overrides/moment.d.ts
declare module "moment";

// tsconfig.json
{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "baseUrl": ".",
        "paths": {
            "moment": ["overrides/moment.d.ts"]  // override definition for moment
        }
    }
}

now the compiler will be checking against your local copy of override/moment.d.ts instead of the one coming with the package. obviously this can be a local copy of moment declaration file, or a small set of things you need.

I lack both the time, skill and desire to maintain my own typings definitions for 3rd party libraries ;)

I lack both the time and desire to maintain my own typings definitions for 3rd party libraries ;)

And that is perfectly fine. just use declare module "moment"; which is the equivalent of declare var $: any for modules, and the compiler will not bother you about it again.

@mhegazy's suggestion is a very good one. It will take you about 20 seconds to do that. By the way, with respect to moment, they forgot a couple of units that I was using and they were very open to accepting my pull request.

The downside to adding declare module "moment"; is that you will no longer have any IDE intellisense or static type checking for any moment-related code. And the anys that arise tend to bleed out into surrounding code, shutting down many static checks there as well. It's a heavy price to pay for suppressing errors related to a single problematic enum value.

@aluanhaddad there was a pull request open to fix the issue, but it got closed in favour of another one, which introduced breaking changes (and still didn't add support for isoWeek), so not sure what happened there.

I have this issue with a node core library (net, node 6.9 LTS):
server = net.createServer({ pauseOnConnect: true }, function(connection) { ... })
// [ts] severity: 'Error'
message: 'Argument of type '{ pauseOnConnect: boolean; }' is not assignable to parameter of type '{ allowHalfOpen?: boolean; }'.
  Object literal may only specify known properties, and 'pauseOnConnect' does not exist in type '{ allowHalfOpen?: boolean; }'.'

And also with ioredis library:
var redis = new Redis(CONFIG.redis);
// file: 'file:///home/juanmi/Projects/juanmi-webrtc/server/signaling_server.ts'
severity: 'Error'
message: 'Only a void function can be called with the 'new' keyword.'
at: '91,13'
source: 'ts'

As @yortus and @adamreisnz this is a common problem as definition files are not always correctly updated. Besides, If you have to sacrifice TS benefits using  declare module "x"; why would you use TS in the first place?

You can also augment the module with the types that are missing so as to not lose intellisence.

Well, when I write:
if (typeof Symbol === "function" && Symbol.match) {
  // ...
}

The typescript compiler always reports an error Cannot find name 'Symbol' if target is es5, although this code indeed works well just as I expected.

declare var Symbol: any;

@gdh1995 @mhegazy Or just use the real fix which is setting the lib flag to es2015.

@mhegazy Thanks. I find this works well:
declare var Symbol: {
  (description?: anyNotSymbol): symbol;
  readonly match: symbol;
};

@DanielRosenwasser Although es2015 adds these useful features, my project is limited to be compatible with es5 and then Symbol should be avoid in other files.
What I don't understand now is that the TypeScript compiler gives me errors even when I've written typeof Symbol === "function". Any advice?

One case I'd love to have to feature is for mocking dependencies:
// Test.ts

// Component to test
import {ComponentToTest} from './ComponentToTest';

// Dependency of ComponentToTest to mock
import {Dependency} from './Dependency';

// Mock to replace it with
import {MockedDependency} from './MockedDependency';

Dependency = MockedDependency;

This code has the desired effect of having the dependency be mocked within the tested component but TypeScript throws an obvious "Cannot assign to 'Dependency' because it is not a variable." error.
I'm sure the response is going to be that I'm barking up the wrong tree and should be using something like inject-loader but from my experience those solutions A) are a pain to get working/don't always work and B) aren't as simple as the above. As OP mentioned, sometimes the developer knows best. I know this is a hacky solution but it works and I'd love TS to just shut up in this case.

This code has the desired effect of having the dependency be mocked within the tested component but TypeScript throws an obvious "Cannot assign to 'Dependency' because it is not a variable." error.

this is an error in ES6. so some time in the future when engines support ES6 modules nativelly, your tests will need to be rewritten.
Alternatively you can have your ComponentToTest accept an argument for Dependency, and your tests can pass that, or have test hook that allows you to override the value of Dependency before invoking methods on ComponentToTest.

this is an error in ES6. so some time in the future when engines support ES6 modules nativelly, your tests will need to be rewritten.

Ah fair enough I'll drop it then as that requirement is tangential to this issue.

Alternatively you can have your ComponentToTest accept an argument for Dependency, and your tests can pass that...

I think this is what we ended up going with. It's just pretty lame to have to redefine the api for a class to make it testable but then I guess that's not a problem unique to TS at all.

I'd like to override the check on the type of argument of a function.
My use case is quite simple, I have a function like this one:
function isValidId(s: string): boolean {}
that check if a string follows some rule.
It is used both internally and to validate user input - I'd like to write tests to see if it returns false when user inserts something that is not a string.
Strictly speaking, the function can accept anything as input because is able to manage it, but since we use it also internally I'd like to specify that we want a string
Therefore, I'd like something to suppress the error about wrong format in the tests

@rpadovani just use any:
expect(isValidId(78 as any)).toBe(false);

I could use this as well.  We have a situation in which foo(bar: any, baz: any) is defined as part of a framework, but in some implementations of foo, bar is unused.  With typescript error checking turned on, this throws an error because an unused variable is declared.  It must be declared, because other versions of foo, bar is used.

@benjaminabbitt It seems that  foo (_bar: any, baz: any) works for you: a name starting with "_" is not forced to be used.

Something challenging here is that people keep showing up saying that want to suppress errors, posting code snippets, and getting effective in-code solutions for silencing those errors (or finding out their code really does have a problem). It's hard to design this feature without knowing what a truly problematic error looks like, or understanding which errors people want to suppress globally are.

What is the appropiate way of handling third party javascript code that we wish to include in our projects?
Consider the following scenario. There is a huge library that has not been published to npm and even if it were, using the library as is would make our application carry around lots of dead code (tree shaking can't help because they attach everything to an object).
Lets suppose that in this case its just not worth extracting this piece of code and publishing in npm. What other options do we have?
In my attempt to use this library I have extracted the code that my project needs and incorporated it to the project as a typescript file. The issue with this is that typescript checks this file and now gives a lot of errors for this file.
For this situation it would be great to have the /* ts:disable */ comment at the top so that typescript would know that we do not care about possible errors within the file.
Please note that my project does not commit any javascript files anymore and even if it did the build process would get more complicated trying to accommodate a javascript into the flow.
Does anyone have any advice as to how to deal with third party javascript code that needs to be hosted in a typescript project?

Does anyone have any advice as to how to deal with third party JavaScript code that needs to be hosted in a typescript project?

do not migrate them. leave the .js files as they are. create a .d.ts file for them instead. this is what .d.ts files are for any ways.
the .d.ts file can start with something as basic as:
declare var $: any;

then add to it as you see fit, and as your needs grow.

That is a good option if I were committing js files. Is there any other options for projects that ignore js files?

That is a good option if I were committing js files. Is there any other options for projects that ignore js files?

I am not sure i understand the question. JS files are ignored by default. so you opt-in adding files. again my recommendation is, for external code that is not yours, or for legacy code that you do not intend to change, do not bother converting it to TS. start by writing a .d.ts file for them. for this, start simple, with any's then add as you go.

I should have said that the js files are not being committed to the git repository, thus the reason of putting the code in a ts file. Anyway, I'll try to go the route you mentioned and force commit those js files.

you do not need to commit the .js files. let's say you are using a dependency say react. typically you will not commit react-0.12.0.js in your repo, but you want to use it. noramlly you would include this in a sccript tag from a CDN for instance. let's also say @types/react does not exist, or you do not want to use it. so in your project add a new declaration file call it declarations.d.ts and add:
declare module "react"; // just saying the module is of type any

this tells the compiler that there is a module called "react" and it will just use it,  no need to include any .js files.

So if I want to use a small chunk of javascript (that is not available via npm/CDN) and I decide to commit it to my code base, I have 2 options:
Option 1: Keep the original code as a .js file and maintain a .d.ts file to handle types.
I think this doesn't work for @jmlopez-rod because he doesn't want to commit javascript code to his repo, and even if he did, he said it would make his build process complicated.
Option 2: Wrap the javascript in typescript and deal with all of typescript's errors.
This gets around the "complicated build process" because it will treat the code like typescript... but now we've got typescript errors, and we've circled back to the original discussion in this issue thread. Is this a valid use case for being able to disable typescript errors?

I think this doesn't work for @jmlopez-rod because he doesn't want to commit javascript code to his repo, and even if he did, he said it would make his build process complicated.

not sure i understand why it complicates your build process. you have a file "library.js" and "website.js", you decide to move "website.js" to "website.ts", just call tsc website.ts --outFile website.js and now we are back where it all started. so do not see why it any more complicated than before.. it is just an extra build step at the top.

This gets around the "complicated build process" because it will treat the code like typescript... but now we've got typescript errors, and we've circled back to the original discussion in this issue thread. Is this a valid use case for being able to disable typescript errors?

I am not sure i fully understand why did you decide to switch this file to ts, and integrate it with your project, let types from it flow into your other components, build it along with your code, yet hold it to a different standard.
May be an example would be useful here. as @RyanCavanaugh noted, it seems to me that all these issues have well-defined ways to tell the compiler about the types and avoid errors instead of disabling errors all together and throwing the baby with bathwater.

i couldn't understand why is this ambient declaration is not working for me.
i already defined the paths definition to the tsconfig.json like this
"paths": {             "js-xlsx": ["./xlsx.d.ts"]   }
but still i come accross that module not found error.
I tried to add 'fs', 'fs-extra' and that 'js-xlsx' libraries all of them didn't responded to my ambient declarations, castings or adding any types as here declare var $: any;
@mhegazy

you do not need to commit the .js files. let's say you are using a dependency say react. typically you will not commit react-0.12.0.js in your repo, but you want to use it. noramlly you would include this in a sccript tag from a CDN for instance. let's also say @types/react does not exist, or you do not want to use it. so in your project add a new declaration file call it declarations.d.ts and add:

declare module "react"; // just saying the module is of type any
this tells the compiler that there is a module called "react" and it will just use it, no need to include any .js files.

By the way i know that fs-extra library has the type definition like @types/fs-extra and for the  js-xlsx we have ts-xlsx libraries but this is so weird that this tricks are not working for me :(

By the way i know that fs-extra library has the type definition like @types/fs-extra and for the js-xlsx we have ts-xlsx libraries but this is so weird that this tricks are not working for me :(

I think there is somethign else going on with your project.
c:\test\9448>npm install @types/fs-extra
<EMAIL_ADDRESS>c:\test\9448
`--<EMAIL_ADDRESS>  `--<EMAIL_ADDRESS>
npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.

c:\test\9448>type a.ts
import { rmdir } from "fs-extra";
rmdir("c:/test");

c:\test\9448>type tsconfig.json
{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5"
    }
}
c:\test\9448>tsc --v
Version 2.2.0

c:\test\9448>tsc

c:\test\9448>echo %ERRORLEVEL%
0

yea maybe but, the main issue i couldn't understand is why  i couldn't surpress compiler warnings with the given methods. By the way i have https://github.com/AngularClass/angular2-webpack-starter , base for my project

Suppressing errors isn't necessarily about anti-patterns. I'm getting an incorrect error,
error TS1005: '{' expected.

on this perfectly fine JSX:
<motor-node ref      = 'menu'
    absoluteSize     = `0, ${this.MENU_BAR_HEIGHT}, 0`
    >
    {menu}
</motor-node>,

It complains the the template string needs {. This should ideally be fixed, but until then, I would like to be able to suppress the error for good reason.

@trusktr, this error is a parse error. suppressing it does not change the fact that the compiler does not understand the code from this point on, and the shape of the rest of the file is in an undefined state. that means that even if this error is muffled, the types inferred, as well as other errors generated in this file or others are not correct.
That said. According to the JSX spec:

JSXAttributeValue :

" JSXDoubleStringCharactersopt "
' JSXSingleStringCharactersopt '
{ AssignmentExpression }
JSXElement

So I am afraid the error is correct and a JSX attribute can not have a string template literal. you can use absolteSize = {...} instead

this error is a parse error

Yep, that's why it should be fixed.

The output is absoluteSize: "0, " + this.MENU_BAR_HEIGHT  + ", 0", which tells me the compiler things it is just fine.

Oh. Sorry then. I miss understood your comment. I thought you wanted the error silenced.

I did, but you're right, maybe I should better live with just adding {}.

In TS 2.1 (VS2017 RC) we get reported warnings coming from libraries JS files (sitting in /Scripts) folder -like TS7027. It would be nice to be able either suppress warn/errors from library files or at least to supporess them in some kind of global supression file (similar to C# GlobalSupressions.cs)

In TS 2.1 (VS2017 RC) we get reported warnings coming from libraries JS files (sitting in /Scripts) folder -like TS7027.

For unreachable code (TS 7027), set --allowUnreachableCode or set it in your tsconfig.json.

But is it possible to apply it only to library files. Bease for "my code" I need it !

by using --alowJs it becomes your code. the compiler will suck it in, will transpile it to the suggested target, will concatenate it if you use --outFile.. it just that it has a .js extension. if it is "library" code, i would recommend creating a .d.ts for it and including this instead.

I'm not aware that we have switched on --allowJs - in VS2015 the exactly same project does not squiggle jquery.js, react.js files sitting in Scripts (and in fact referenced only form html page by

let { value } = browser.waitForPromise(() => {
	return browser.executeAsync(function (method, name, resolve) {
		require(['patron.Locator/patron.Locator.Manager'], function (locator) {
			resolve(result);
		});
	}, method, name);
});

In my case, the fist line written in TypeScript, the second line written in JavaScript. They are executed in different contexts.

In my case, the fist line written in TypeScript, the second line written in JavaScript. They are executed in different contexts and I don't want to modify JavaScript code.

not sure i understand what you mean by "second line written in JavaScript"? do you pass the whole statement to the compiler or not?

not sure i understand what you mean by "second line written in JavaScript"? do you pass the whole statement to the compiler or not?

I don't want to modify that code because it should be passed to the Selenium server as is.

I don't want to modify that code because it should be passed to the Selenium server as is.

if this is in a .ts file, it will be transformed by the compiler. The compiler removes the type annotations for you..
Regardless, for this sample, all you need is declare var browser: any; and you should not get any errors. see Playground for a sample.

if this is in a .ts file, it will be transformed by the compiler. The compiler removes the type annotations for you..

I need a guarantee that a given code has executed untampered in IE6 and other old browsers.
For example, Node.js follows the CommonJS module system, but my require is a custom function that defined by other developers on its pages. That's why I'd like to include that code without any post- and pre- modifications. It's important for me and my team.

Regardless, for this sample, all you need is declare var browser: any; and you should not get any errors. see Playground for a sample.

Actually, the browser object is the most popular object in my project and there is no any reason to ignore it. The browser.execute method has own type declaration as well.

now i am not sure i understand what the issue is then. what is the error you are getting?

My code is executed in different contexts: node and browser. The current problems for the second context are type annotations and code modification.

let { value } = browser.waitForPromise(() => { // node
	return browser.executeAsync( // node
            function (method, name, resolve) { // browser
		require(['patron.Locator/patron.Locator.Manager'], function (locator) {  // browser
			resolve(result);  // browser
		});  // browser
	}, method, name);
});

browser.executeAsync  = (...args) => {
   let script = args.shift();

   RPC.Selenium('/session/:sessionId/execute', {
         script: `return (${script}).apply(null, arguments)`,
         args
    });
}

As you see I use TypeScript for Integration testing.

What is the error message?

Standard errors:
TS2345: Argument of type 'string[]' is not assignable to parameter string
TS7006: Parameter 'error'  implicitly has an 'any' type
TS7006: Parameter 'attach'  implicitly has an 'any' type
TS7006: Parameter 'message'  implicitly has an 'any' type
TS7006: Parameter 'model'  implicitly has an 'any' type

And so on...

Define require correctly.
declare function require(v: string[]): any;

Define require correctly.

I can't. In my case, the executeAsync method contains code for third-party projects and there are different variations for such requires. The code above is just one function of hundreds.
My desire is very simple — let me exclude some code when I need it :)

you can put the declare function require(v: string[]): any; locally. e.g.:
// module a.ts
export var ...

declare function require(v: string[], callback: Function);

let { value } = browser.waitForPromise(() => {
    return browser.executeAsync(
        function (method, name, resolve) { // browser
            require(['patron.Locator/patron.Locator.Manager'], function (locator) {  // OK
                resolve(result);
            });
        }, method, name);
});

you can also just cast to any when needed:
let { value } = browser.waitForPromise(() => { // node
    return browser.executeAsync( // node
        function (method, name, resolve) { // browser
            (<any>require)(['patron.Locator/patron.Locator.Manager'], function (locator) {  // browser
                resolve(result);  // browser
            });  // browser
        }, method, name);
});

This should produce identical code.

In my case I have a private (not exported) abstract class which is only meant to be extended by two classes:
abstract class IParent {
  static fromConfig(config: ParentConfig): IParent {
    // actual code is 20 lines long, not this simple
    return new this().applyConfiguration(config);
  }
  abstract method1(): void;
  ...
}

class FirstChild extends IParent {
  specificMethodForFirstChild() { ... }
  method1() { ... }
  ...
}

class SecondChild extends IParent {
  specificMethodForSecondChild();
  method1() { ... }
  ...
}

let first = FirstChild.fromConfig({ ... });
let second = SecondChild.fromConfig({ ... });

// this runs successfully:
(first as FirstChild).specificMethodForFirstChild();
(second as SecondChild).specificMethodForSecondChild();

But on method fromConfig() I get "Cannot create an instance of the abstract class 'Parent':
Playground code

I can duplicate the static methods and make they call a common function but sounds quite stupid.
I can't make the class not abstract because subclasses apply the method implementation.
I can remove the abstract methods but I use them to enforce the same interface on subclasses.

The compiler does not enforce that derived class constructors have the same signature as the base. in other words the derived class constructor can have more required arguments than the base. using new this() makes an assumption that all derived constructors will have no required parameters; and that is something not verifiable.
If you are sure this correct, consider casting as new (<any>this)(x, y);

Good point I didn't saw that. Your suggestion actually works, I will consider the dangers, thanks.

Is there a way to silence the Module ... was resolved to ..., but '--allowJs' is not set? in my use case, there's a build system that takes care of that and I don't need to pass all my code through TSC, so I'd like to silence those errors.

'declare module "someModule";' in one of your .d.ts files.

Or install the matching @types package if one exists.

I have another example of when this would be useful:
const Button = (
  content: contentTypes,
  action: React.EventHandler<React.MouseEvent<HTMLDivElement>>,
  disabled: boolean
): JSX.Element => (
  <div className={`Button disabled-${disabled}`} onTouchStart='' onClick={ !disabled ? action : undefined } >
    { content }
    <div className='background'></div>
  </div>
);

This throws an error because onTouchStart does not accept a string as a parameter which is true. However, onTouchStart='' fixes broken css behavior on touch devices related to certain css rules. I would not like to disable this error globally or redefine some JSX types. I would like just on this line to remove this error.

onTouchStart={<any>''}

That actually doesn't fix it.
I get this error :

onTouchStart={'' as any}, rather (forgot JSX uses alternate assertion syntax)

@RyanCavanaugh would generated code qualify as a legitimate use-case for this feature? I am using swagger codegen to create an api client for a node service. I'm also using the generated client's types in my server, since it transforms swagger definitions into TypeScript interfaces, so it's the easiest way to ensure I'm respecting my own swagger contract.
The generated code is a bit weird though, and it has blocks like this:
let contentTypeHeader: Dictionary<string>;
if (contentTypeHeader) {
    fetchOptions.headers = contentTypeHeader;
}

This gives an error if strictNullChecks is on, so I've turned it off for the entire project.  I don't want to parse the generated typescript and modify it, but I would be prepared to insert something like <tsc strictNullChecks=false /> at the top of the file (similar to @alexanderbird's suggestion).

Wouldn't this be a change request to the swagger code generator to produce strictNullChecks-compliant code?

@mhegazy sure - but this is just one example of something like this. There are a lot of ways code-generation is useful in TypeScript (more so than in JavaScript). So ideally there would be a way to not force people to drag their own projects down to the standards of their generated code.

But they are :) the code you get from your auto-generation tool results in types that flow into your compilation. if the code generation tool ignores --strictNullChecks then your code is observing non misleading types.
disabling checks is just muffling the fire alarm. the issue is not the alarm, it is what is causing the fire in the first place.

@mhegazy I'm ok with muffling the fire alarm in code that's generated by a very well-tested tool. The code is good, they're just not using state-of-the-art language features, and they shouldn't have to.
How about a less controversial example - what if the generated code has an unused local? That causes no harm to my code - except in the case where I have to turn off noUnusedLocals in tsconfig - which is what I am doing now.

How about a less controversial example - what if the generated code has an unused local? That causes no harm to my code - except in the case where I have to turn off noUnusedLocals in tsconfig - which is what I am doing now.

if you do not care about the generated code, then it should be in .js with a companion .d.ts. this way you can check against it, but do not have to compile it.

the typescript compiler doesn't seem to like underscore.js mixins used with chain.
_.mixin(){sortFunciton: sortFunc(), otherChainFunc: otherFunction()}
....
someVal = _.chain(someArray)
.sortFunction()
.otherChainFunc()
.value();
...

A pretty easy example is when you create a listener for click, for eaxample with @HostListener() for Angular, like so:
    @HostListener('click', ['$event'])
    private onClick(event: MouseEvent) {
        // Code here...
    }

If I enable noUnusedLocals, I have the following error:
onClick' is declared but never used.

Any way I can let the compiler ignore that?

@JeremyCarlsten
_.mixin(){sortFunciton: sortFunc(), otherChainFunc: otherFunction()}

looks like invalid code.

@leocaseiro Why does it need to be private? In this case onClick is a method that angular will end up using. A similar problem always happens when we declare private variables that we use in a template. If you do use them in the template simply make the variables public. It makes sense since you are letting angular use them.

Hi @jmlopez-rod, you are right.
Interesting that as public, it's passing now! I really appreciate your help.

@leocaseiro public is the default visibility level so you do not need to specify it.

Apology in advance if sounding negative – I may have missed something (new to TS).
Another example (I'm only use TS to produce ES5 - no casting, declaring, interfacing)
// do-as-i-tell-you-start
const factory = () => {
  const _this = [];
  let _value;
  Object.defineProperties(_this, {

    // Error: Property 'getset' does not exist on type 'any[]'.
    // true at at creation but not when used – don't MOM me!
    'method1' : { value(){ return _this.getset; }},

    // Works with property strings – I don't want this
    'method2' : { value(){ return _this['getset']; }},

    //  And here we go –
    'getset' : { get(){ return _value; }, set(value){ _value = value }},
  });
  return _this;
}

true at at creation but not when used – don't MOM me!

That is specifically what TypeScript is designed to do.  If you don't want to use types and casting, why are you using TypeScript?  As pointed out several times in this thread, it will still emit the code, so you ignore errors at your own peril already.

It's about moving a team from ES5 => ES6 (Babel or TS) => TS in all it's glory – in baby steps.
My impression was that TS is an addition to JS allowing you to step in at what level you are at.
The reason for my complaint is the dummy example provided throws an Error and hence does
not produce ES5. IMO passing linting should not be mandatory to transpile.

Unless you have no emit on error, it will emit. So it does produce ES5.

It didn't – switched to Babel – it worked

tsc can be configured to emit the output regardless of type errors, look at the noEmitOnError option.
If you're using ts-loader, it also has a new transpileOnly option where it will simply transpile and not show any errors.

@trusktr thanks - I'll give it a try :-)

errors do not block the generation of outputs, nor the tooling

That's not true. We have a (quite common - it comes from starter) setup in webpack which in production build crashes and does NOT output anything. And it should be that way - compiler reports error(s), programmer goes back and fixes them. Why use types when whole team ignores them because build is "working"? Similarily if tsc fails to compile then auto-refresh doesn't work (plugin is intentionally written that way - it doesn't refresh if your code is wrong [or considered wrong by compiler]).
Suppressing errors is useful when there is a bug in tsc. E.g. this should compile:
interface A {
  isEmpty(x: any[] | string | object): boolean;
}

const a: A = <A>{};
a.isEmptyObject({a: 1});

but in current TS release it fails.

By

a.isEmptyObject({a: 1});

you mean

a.isEmpty({a: 1});
?

Oh, yes. Copied wrong line :/.

Suppressing errors is useful when there is a bug in tsc.

A bug preventing emit should be fixed.  It is highly unlikely the ability to ignore an error would every cause tsc to suddenly emit something when it has a bug that makes it crash.

I have an import that looks like this:
import * as reducers from "./**/reducer.ts"

I use TypeScript first, then Babel. I have a babel plugin that treats * in imports as a glob pattern. TypeScript throws an error complaining about .ts, and then if .ts is removed it cannot find module.
I'm not really sure how to solve this, but my first thought was suppressing the error(s) related to this line. I tried doing module mapping in the config, but * is treated as a wildcard there as well and can't be escaped.

@lukescott in a .d.ts within the scope of the compiler:
declare module './**/reducer' {
  export = {
    [reducer: string]: () => void; /* or whatever */
  };
}

Another example of how this would be useful:
const req = https.request({
        host: 'www.google.com',
        method:'GET',
        path:'/',
        port: 443,
}, (res) => {
    console.log(res.connection.getPeerCertificate());
});

The getPeerCertificate says it doesn't exist due to faulty definitions in the node https.
It still compiles and works with the big red underline, but it would be very nice to do
console.log(res.connection.getPeerCertificate()); //ts:disable-line

@trusktr
Oops looks like I did mess up the syntax converting it from prod code.  Here is a js plunk of what I was trying to describe.  Perhaps more of an issue with the underscore definitions.  But if a third party library is causing issues with the ts compiler, shouldn't we be able to ignore that line of code?

+1. This will be useful for testing, since I need to make sure my code throws an error when it is passed in something it is not expecting.

This useful feature would just be the generalization of ! for possibly null objects.

If I want to bring a library file into a project (e.g. Chartjs), I often save it as a TS file (I like to keep all source files as TS and compiled as JS) and import it with a triple slash ref into the TS file that requires it. However, the TypeScript then complains endlessly about errors in that file (naturally as it is merely a standard JS file saved off as TS).
However, the ability to add:
/*ts-errors-disable*/ to the start of the library file and /*ts-errors-enable*/ to the end would reduce the output of errors that aren't relevant but still allow devs to keep all source files as TS.
Or should I just be doing things fundamentally differently?

@benfrain Well, it would be better to install the corresponding TypeScript definitions file if it exists (npm install --save-dev @types/mylibrary) or to create your own .d.ts file with a any type to your library namespace/main class first:
// mylibrary.d.ts
declare module "mylibrary" {
    let mylibrary: any;
    export = mylibrary;
}

// main.ts
import mylibrary = require("mylibrary");
...

@yahiko00 thanks, I'll give that a whirl 👍

I have a question. First the code, and the error that TypeScript is highlighting:
import {Directive, ElementRef, Input, OnChanges, SimpleChange} from '@angular/core'

@Directive({
  selector: '[blankAttr]',
})
export class BlankAttr implements OnChanges {
  // @ts-ignore
  @Input('blankAttr') private attrName: string // <--- unused variable

  constructor(private el: ElementRef) {}

  public ngOnChanges(changes: {[key: string]: SimpleChange}): void {
    const change: any = changes.attrName
    const prevValue: any = change.previousValue

    if (prevValue) {
      this.el.nativeElement.removeAttribute(prevValue)
    }
    this.el.nativeElement.setAttribute(change.currentValue, '')
  }
}

The problem I have is I need to declare the @Input decorator to allow the attribute to be passed a string. But I only care about the value of that string when it changes. And I can get the previous and current value when handling the change event.
Can we have a // ts-ignore now? Or is there another way to solve this nicely?

@uglow why is attrName private? This is a variable that Angular modifies so that you can get a value with it. Thus, it needs to be public.

@jmlopez-rod I've changed it to public, but that doesn't change the problem. TS is saying that it is an unused variable.

I'm using TS 2.4.1, after making it public typescript stops emitting the error.
Before:

After:

This should be included. I am working with  a custom js engine which allows a single .js file to return a value. See my gist for an example. I use TS to generate my .js files and of course TS does not know about that and throws:
A 'return' statement can only be used within a function body.

A new SO question that needs to suppress noUnusedLocals error:
https://stackoverflow.com/questions/45519476/is-it-a-typescript-antipattern-to-dynamically-call-a-member-function-stored-in-a

@mhegazy I've hit this kind of problem in a number of different ways.
My current situation (the entire flow assumes declaration mode):

class decorators require a class declaration (not class expression) and I'm inside a function - in principle this could be fixed, but it's not today.
ok, no problem I'll make the expression a declaration
no dice, the declaration now has an unused name
ok, no problem I'll return it
no dice, Return type of public method from exported class has or is using private name
... ?

Basically, the root cause here is that expressions can't be decorated, but it's unreasonable for you to drop everything to implement that functionality. In the meantime, it's sensible for me to simply suppress this error. I'd be fine if suppressing an error required me to find the associated TypeScript issue and say something like // TS-LIMITATION:#9448 although I suspect that would result in a huge amount of new pointless issues from your perspective.
I'd even be fine if you added specific targeted suppressions for known issues that you aren't ready to take up yet, but only if that was done quickly and without too much design effort (that would make the mechanism pointless :wink: )

I dont want to get unreachable code error (where I am happy to annotate "shut up on unreachable code error right here") when I do something like
if (false){ ...complicated debug code that I dont want to delete/forget... }

So, TypeScript compiler is still missing an option to "shut up and not mess up other tools". It would be really useful for us to have this option via comments and via compiler switches for specific files or even glob. We are stuck at using old version of tools because we don't want to lose auto-reload (newer versions doesn't auto-reload  when errors are present). So we either turn off buggy option noImplicitAny (which I really don't want to, I am using TypeScript because of typechecking and with allowed implicit any TypeScript doesn't bring that much to a table) or stay on ancient versions of packages. Yes, I reported the bug in both, WebPack and AwesomeTypeScript loader, but nobody cares. The issue is being ignored for many months now. I see it is exactly the same with TypeScript package :-(.

@polyglotinc  if (!!false) {

@RyanCavanaugh Well, for that matter, (!true)works ... I didnt even think of those as possibilities because I (as an ex-compiler-writer) gave the compiler more credit with regard to constant/literal expression collapsing... I guess I figured if it was busy-body about if (false), it would know if (!true) was the same thing!

@unional the SO question could be written a bit clearer and perhaps that is why we need the compiler to tell us about possible errors. See this screenshot showing the error the user wants to suppress

Notice that in the screenshot I only have one error. That is because I already fixed one problem caught by the compiler.
private keyHandlers = {
    'ArrowDown': function ($event: any) {
      this.handleArrowDown($event);
    },
    'ArrowUp': ($event: any) => {
      this.handleArrowUp($event);
    },
  };

The user claims that the handleArrow* are being used but typescript doesn't see it being used.  As far as typescript is concerned the this in this.handleArrowDown($event); could be any object that has the method handleArrowDown. With the arrow function it now knows that this is the instance of the class and thus it sees handleArrowUp being used.
Another option: Use the fake first parameter this.
  private keyHandlers = {
    'ArrowDown': function (this: SomeComponent, $event: any) {
      this.handleArrowDown($event);
    },
    'ArrowUp': ($event: any) => {
      this.handleArrowUp($event);
    },
  };

@jmlopez-rod Thanks. That's a good alternative. I like especially function(this: SomeComponent, ...) {...} solution because that is the most flexible.
The other solution doesn't work if the keyHandlers is not a part of the class:
const keyHandlers = {
  'ArrowDown': function (this: SomeComponent, $event) {
    this.handleArrowDown($event); // error on accessing private method, filing an issue for it.
  },

  'ArrowUp': ($event) => { // doesn't work, duh
    this.handleArrowUp($event);
  }
}

export class SomeComponent {
  onKeyDown($event) {
    if (typeof keyHandlers[$event.code] === 'function') {
      keyHandlers[$event.code]($event);
    }
  }
  private handleArrowDown(_event) {
    // ...
  }

  private handleArrowUp(_event) {
    // ...
  }
}

I am trying to manually set window.console for IE9 to prevent errors on console.log usage:
if (!window.console)
    window.console = {};

But I get error TS2540: Cannot assign to 'console' because it is a constant or a read-only property. Are there any workaround for these use cases?

@amiraliakbari You can assert window as any type, which effectively lets you opt out of type checks:
(window as any).console = {};

this worked for me to override/disable console.log globally -- Notice that Project.logging was defined before this
(window.console as any).___real_log = window.console.log;
window.console.log = function(args) {
  if (Project.logging) {
    return (window.console as any).___real_log(args);
  }
  return;
};

This was also much cleaner than putting if statements all over my code.

As mentioned in #19109 we still don't have the ability to suppress a specific error.

As mentioned in #19109 we still don't have the ability to suppress a specific error.

I think basic scenario outlined in this issue has been addressed. we can create a new issue to track global error suppression using error number. We have been reluctant to use error codes in such way because they lack expressiveness.

Created #19139.

This instruction works only per file, right? Is it possible to make it work over folder?

The instruction is supposed to work for a single line at a time. If you're seeing a lot of compiler errors in your project, you might check that you should have less strict compiler options, such as leaving noImplicitAny off (i.e., variables are implicitly any). You could also leave some files as JS and set allowJs on but checkJs off.

(Adding this comment here as it might be useful for those who stumble upon this issue, as I did)
I ran across https://github.com/Microsoft/TypeScript/pull/21602 and it might be the solution.
Just add // @ts-ignore to your code (or even // @ts-ignore <some code error> to ignore only the specified error).
Tested it here with TypeScript 2.7.2 and it works!

(or even // @ts-ignore  to ignore only the specified error).

#21602 was not merged. You can't ignore only certain errors.

@RyanCavanaugh you're right! I've updated my comment. Thanks!

Arrived here looking to suppress error TS2339.
document.getElementById('theme-admin').disabled = false; /* tslint:disable */
document.getElementById('theme-member').disabled = true; /* tslint:disable */


Operation equal for function

See #157

This change is

Reviewed 6 of 6 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Add separate_observables to read_shot_data_file

When reading shot data using read_shot_data_file and bit_packed=True, it's a bit inconvenient having to separate out the observables, since the end of the detector bits and beginning of the observable bits can be within the same byte (so simply using numpy array slicing doesn't do the job without some extra lines). Though perhaps I'm missing a trick here? Would be convenient if there was a separate_observables=True option so that detector bits and observable bits could more easily be split into separate numpy arrays.

Makes sense.
I have mixed feelings about this one since it's a case where the observables should already have been separated, but it's nice to allow incremental improvements.


fix: Fix unconfigured Input/Output Surface error

What
Fixes the "CaptureRequest contains unconfigured Input/Output Surface!" error by always re-creating the PreviewCaptureRequest so it never goes out of sync.
NOTE: I did not test this yet. I am on the road but I just had this idea.

Changes

Tested on

Related issues

Fixes #1773
Fixes #1925
Fixes #1934

NOTE: I did not test this yet. I am on the road but I just had this idea.

I did test this with the code scanner.
Just FYI, still the same issue.
I CameraSession: Adding preview output surface PREVIEW..
I CameraSession: Adding code scanner output surface VIDEO
[...]
E AndroidRuntime: java.lang.IllegalArgumentException: CaptureRequest contains unconfigured Input/Output Surface!
E AndroidRuntime: 	at android.hardware.camera2.CaptureRequest.convertSurfaceToStreamId(CaptureRequest.java:765)
E AndroidRuntime: 	at android.hardware.camera2.impl.CameraDeviceImpl.submitCaptureRequest(CameraDeviceImpl.java:1274)
E AndroidRuntime: 	at android.hardware.camera2.impl.CameraDeviceImpl.setRepeatingRequest(CameraDeviceImpl.java:1330)
E AndroidRuntime: 	at android.hardware.camera2.impl.CameraCaptureSessionImpl.setRepeatingRequest(CameraCaptureSessionImpl.java:313)
E AndroidRuntime: 	at com.mrousavy.camera.core.CameraSession.updateRepeatingRequest(CameraSession.kt:589)
E AndroidRuntime: 	at com.mrousavy.camera.core.CameraSession.startRunning(CameraSession.kt:571)
E AndroidRuntime: 	at com.mrousavy.camera.core.CameraSession.access$startRunning(CameraSession.kt:49)
E AndroidRuntime: 	at com.mrousavy.camera.core.CameraSession$configureFormat$1.invokeSuspend(CameraSession.kt:203)
E AndroidRuntime: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E AndroidRuntime: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:958)
E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:205)
E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:294)
E AndroidRuntime: 	at android.os.HandlerThread.run(HandlerThread.java:67)
E AndroidRuntime: 	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@12b4c64, mrousavy/VisionCamera.main]

Sorry i dont know to much about this, to get this changes, what i need to do?

@flexingCode You can manually replace the code in the file
node_modules/react-native-vision-camera/package/android/src/main/java/com/mrousavy/camera/core/CameraSession.kt with the contents of this PR. Build your project afterwards.
(Normally you can also point libs to a specific commit in the package.json file like so:
"react-native-vision-camera": "git+https://github.com/mrousavy/react-native-vision-camera.git#8034bdb53002e36efee852dced2ed354efb91d28", but I could not get that to work here, probably because of the codebase structure).

@mrousavy this did not resolve the issue for me, I am able to reproduce on a Samsung S22 and with below package versions.
"react-native": "0.72.5",
"react-native-vision-camera": "^3.3.1", # patched with code change from above

I neglected to capture the stack trace, but as it was the same exception thrown, I will retest later today and update this comment.

I need a Samsung S22 device, otherwise I cannot reproduce this

I reproduce on Pixel 5

The bug is observable in an Android 14 emulator, and presumably also on <14, so you can just try that.
I tried looking into the bug last week, but perhaps with some pointers I could look at it again and try solving the bug (I don't have any prior experience with the codebase).

I have the same issue with a moto g(9) play, I do not even switch the device, with the first one that I select the error is thrown, I am using:
"react-native-vision-camera": "^3.4.0"
"react-native-worklets-core": "^0.2.2"


performance - smt - unique Solve - single problem

unique solve function can be realized with a single call to problem solver to get value and determine uniqueness:
define boolean function 'satall' that contains all assertions.
solve satall x
together with
(not (exists y : satall(y) and (not (x == y))))

Although the problem is indeed reduced to a single problem solver call,
It is not clear whether the use of existential operator will indeed lead to a performance gain.


Initial API fields for HA control plane

Problem
Now that leader election has landed in 0.13, we should make the operator deploy an HA configuration by default.
Persona:
Users of the operator
Exit Criteria
A measurable (binary) test that would indicate that the problem has been resolved.
Time Estimate (optional):
Simple

We had a discussion in the WG meeting on 3/3 that we don't want to double the resources for Minikube, so me may need some sort of controllable option and/or auto-sizing (i.e. "turn off HA if there is only 1 node in the cluster").

I'm renaming this issue to be for the initial API changes that allow you to specify an HA installation.

After discussion with @jcrossley3, i offer the following proposal:
type KnativeServingSpec struct {
  // other fields omitted

  // non-nil indicates HA is requested
  HighAvailability *HighAvailability
}

type HighAvailability struct {
  // Replicas is the number of replicas to run for the HA parts of the control plane
  Replicas int
}

part of https://github.com/knative/pkg/issues/1007


Giving more information for subfolder read errors

I added a log to see which classes specified by the user don't match.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.10%. Comparing base (aeddd54) to head (fc98528).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #812   +/-   ##
=======================================
  Coverage   95.10%   95.10%
=======================================
  Files         127      127
  Lines        5026     5028    +2
=======================================
+ Hits         4780     4782    +2
  Misses        246      246

Flag
Coverage Δ

unittests
95.10% <100.00%> (+<0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


exception throw while unbinding and service not registered

I am facing this kind issue and my dynamic link works but its directly open the home page instead of it will navigate to page but its going to homepage

Hi @nageshadhavbncoe
When opening an issue, please try to provide all of the information indicated in the template.
Closing this issue, since no information has been provided.
Thank you.


ETA for Screenshot / getPixel(s) ?

Duplicate.

Duplcate. trying to delete this one.

There isn't a way to delete issues, so closing it is fine!

You can preview and use the screen capture code on Mac, I'm struggling to get it to work on Windows though.
http://blog.robotjs.io/post/130642552013/i-spent-a-few-hours-yesterday-and-today-working-on
Things have also been really crazy at work, it might be a while till I can finish this unfortunately.

No problem mate :)
I am dual booting Linux mint and Windows 10.
Curious why you replied to this post, since its the duplicate of the one where the content is :p
I got lots of stressful stuff my self at the moment so don't worry, just wanted to check :)

Lol I didn't see your other issue till just now.


Caption logic not working anymore/well

It doesn't look like the logic for the caption is working.
As I understand correctly, whenever we want to set a caption on an image, we need to:

Insert line break after the image
Set the caption text to italic

Can you please check if this logic is still supposed to work? Is there any other better way to implement the caption logic? like for example detect a specific char at the end of beginning of the sentence: ex: this is a caption-- ?
Thank you.
@bosschaert @sdmcraft @meejain @JiangLong2019 @jindaliiita

@ehrro , could you please share the page where you see this problem?

Hello @sdmcraft,
For example this one: https://main--sunstar--sunstar-global.hlx.page/jp/sustainability/social/employees
If you scroll to this section:

It's funny because now the captions are being generated but it cannot handle line-breaks anymore (I am not sure if you guys did something last week).

Thanks a lot @sdmcraft :)

Can you please add line break and bold support in the captions logic?


Updating docker images

:tada: This PR is included in version 1.9.7 :tada:
Your semantic-release bot :package::rocket:


BetterFps FastBeacon /y<0 Mixin Compatibility

Puts the Beacon below y0 fix into the selectable mixins (it was in fixes previously) and tries to discover BetterFps and its FastBeacon setting. If that setting is found active, force disables the Beacon below y0 fix to avoid a crash.
Disabling FastBeacon of BetterFps in total to activate the mixin.

Discussed a better Solution on Discord. Until that option of a more elegant fix is definitely disproven, this solution is far from a good solution.


[STORM-1143] - Validate topology Configs during topology submission

adding config validation during the topology submission process so that incorrect configs can be detected early

non related failure in travis for jdk7. Tests for jdk 8 passed

@d2r  thanks for your review, I just pushed a commit that I think addressed your comments

One minor nit, then I am +1 pending relevant tests pass.

@d2r thanks again! Just push a commit to fix the one nit

Tests passed for java 8. Unrelated test failure for java 7 build

It doesn't look like ConfigValidation has changed functionally at all. Is that correct?

@knusbaum the functionality of ConfigValidation has not changed, but this PR adds support for validating configs submitted with a topology.  This allows storm to do early detection on whether the configs submitted with a topology are valid

+1 looks good to me.

I guess I'm wondering why all those changes are in ConfigValidation.
I'm +1, but I'd rather have changes like that in a separate pull request for a separate jira, like 'remove checked exceptions' or something.


Filtering of categorical attributes with more than 50 categories

Problem
If there are more than 50 categories for an attribute, the histograms are no longer shown and it is thus impossible to filter them - the side panel stays empty, which is really confusing.
Suggestion
Show the list of categories (similar to the filter) in the side panel, so that the user can directly filter some categories (see mockup)

I agree that a blank summary is suboptimal (like a text: cannot render histogram, too many categoriess) but I don't wanna switch to a list automagically. Moreover, since more than 22 categories should be avoided due to color constraints anyhow the given case is actually not that frequent since the column would be derived as string column.

invalid histogram is still rendered

(60 categories)


interface assign issue

how can I assign how many interfaces existed into a 9kv?

Both xrv9k and nxos9kv support the standard --num-nics X argument. For example, to start xrv9k with 48 NICs: docker run -d --name xrv9k-big --privileged vrnetlab/vr-xrv9k:7.1.6 --num-nics 48 --trace.


feat: add wiki.autocomplete

fetches autocompletions from the OpenSearch-API
await wiki.autocomplete('test')
results in
["Test", "Testosterone", "Testicle", "Test cricket", "Test-driven development", "Testosterone (medication)", "Testicular cancer", "Tests of general relativity", "Test (wrestler)", "Test of English as a Foreign Language"]

autocomplete is a bit of a misnomer maybe, as it implies that the results are all extensions of the initial query, which is not the case.

my pr is referring to querying this list. the results often are extensions of the query, but does not have to be.
maybe 'suggestions' is a better name? 'opensearch' is a possibility too, as that refers to the action-type, but this is not very descriptive.

Thanks for the PR @bigmistqke let me check this tomorrow and add the necessary documentation and merge this.

I think having it directly on wiki makes perfect sense. No sense for open-search to be a page method.

I think I already implemented a unit-test, index.test.ts line 72, but I am a test noob so correct me if I am wrong.
Your unit test is fine but its a test for the success response. Ideally while unit testing a application, we should also add a test for the error response. Basically, a test for autocompletionsError.

You can check out https://github.com/dopecodez/Wikipedia/blob/345ba33851b046ebe98a0d4723d5fb3a6043248a/test/index.test.ts#L43 for more idea on what im talking about.
Other than this, the MR looks ready to merge/

MR looks all good now, ill merge this tomorrow and do a new release as i need my home computer to release this to npm.

(oops accidentally closed pr)

released on 1.2.0 🎆 . Thanks for the PR @bigmistqke 🥇


Running the contributed command:'emmet.expandAbbreviation' failed.

Issue Id: aa9793d7-6da9-7f9a-616d-d4a3251c2de4Versions - 1.15.0-  6feff11ed03402cf77e04e74e13c55529fdb4d09-  1af52c0470d6f445966b5c8a3065233b34303d9aStack Error: Running the contributed command:'emmet.expandAbbreviation' failed./vs/workbench/api/node/extHostCommands.ts#L134:32/vs/workbench/services/thread/common/abstractThreadService.ts#L34:16 (apply)/vs/platform/extensions/common/ipcRemoteCom.ts#L275:39 (handle)/vs/platform/extensions/common/ipcRemoteCom.ts#L231:25 (invokeHandler)    at _combinedTickCallback (internal/process/next_tick.js:67:7)     at process._tickDomainCallback (internal/process/next_tick.js:122:9)

Duplicate of #32507

I met this problem today.....
I'll just clear these two options  !!!
{
"command": "editor.emmet.action.expandAbbreviation",
"key": ""
}
{
"command": "emmet.expandAbbreviation",
"key": ""
}


Add support for Azure Blob Filesystem driver (ABFS)

Fixed by https://github.com/qubole/rubix/pull/343


Why not fork and clone?

I am confused about the following bit in the instructions:

To use this repository as a template, start by cloning it to your own computer under the name you will want your project to have:
git clone https://github.com/uwescience/shablona smallish
cd smallish

To point to your own repository on github you will have to issue something like the following:
git remote rm origin
git remote add origin https://github.com/arokem/smallish

(replace arokem with your own Github user name).

Why not just fork and clone? It seems that's what you are trying to achieve anyway by removing origin and adding a new remote.

You can only fork a repository once, and Github will retain the forking relationship with that repo, unless you write them and ask them to disconnect this relationship.
That said, this is indeed clunky, and what we should actually do here is explain how to use the Github importer: https://github.com/new/import

Addressed in #68


Take a backup mode "backup right now"

Hi guys! I was wondering if it is possible to take a backup on demand without any scheduling plan.
Thanks in advance

Yes, you can just do PUT http://<IP_ADDRESS>:{port}/{site}/basebackup to request new backup to be created.

What does "site" mean?

See the README for examples


Severity 2 Error 1001 caused by VTT Text Track Load Failure

Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
4.2.1
Can you reproduce the issue with our latest release version?
yes
Can you reproduce the issue with the latest code from main?
I do not have a Local build
Are you using the demo app or your own custom app?
Custom App
If custom app, can you reproduce the issue using our demo app?
No as the UI ignores the Severity 2 issue
What browser and OS are you using?
Chrome 105
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
What are the manifest and license server URIs?

What configuration are you using?  What is the output of player.getConfiguration()?

What did you do?

When initialising the player we load a VTT file via addTextTrackAsync.
This then adds a track to enable and disable Closed Captions. If the text track fails to load an error 1001 severity 2 is thrown.

        const textTrack = await this.player.addTextTrackAsync(
         'captions-track.vtt',
          'en',
          'captions',
          'text/vtt'
        );
        if (textTrack) {
          this.player.selectTextTrack(textTrack);
        }

What did you expect to happen?
I expected a text track failing to load to not cause a severity 2 error which seems related to a playback failure.
What actually happened?

Severity 2 error thrown on error of Loading the VTT file if it is a non OK response code.
We can train our app to ignore 1001 errors but not sure if this will result in hangs and non responsiveness if manifest files or segments fail to load.

Could you please fill out the form fully? Information is missing in order to be able to provide help

Could you please fill out the form fully? Information is missing in order to be able to provide help
My assumption is that you have not configured the player to ignore text stream failures, see docs

Thank you. I will close, I was not aware of this property.

I close it because of the last comment.


Add details/examples to shell help

IceNet version: v0.2.7

Description
When running help commands as follows, include example commands at the end (for other entry points too), and in this case, also include format for start_date and end_date, e.g. yyyy-mm-dd.
$ icenet_data_era5 --help

usage: icenet_data_era5 [-h] [-c {cdsapi,toolbox}] [-w WORKERS] [-po] [-d]
                        [-v] [--vars VARS] [--levels LEVELS] [-n] [-p]
                        {north,south} start_date end_date

positional arguments:
  {north,south}
  start_date
  end_date

optional arguments:
  -h, --help            show this help message and exit
  -c {cdsapi,toolbox}, --choice {cdsapi,toolbox}
  -w WORKERS, --workers WORKERS
  -po, --parallel-opens
                        Allow xarray mfdataset to work with parallel opens
  -d, --dont-delete
  -v, --verbose
  --vars VARS           Comma separated list of vars
  --levels LEVELS       Comma separated list of pressures/depths as needed,
                        use zero length string if None (e.g. ',,500,,,') and
                        pipes for multiple per var (e.g. ',,250|500,,'
  -n, --do-not-download
  -p, --do-not-postprocess

Another case would be for following, addition of what name is expected (i.e. loader file/processed name).
$ icenet_dataset_create --help

usage: icenet_dataset_create [-h] [-c] [-d] [-dt DASK_TIMEOUTS]
                             [-dp DASK_PORT] [-f FUTURES] [-fn FORECAST_NAME]
                             [-fd FORECAST_DAYS]
                             [-i {dask,dask_shared,standard}] [-l LAG]
                             [-ob BATCH_SIZE] [-p] [-t TMP_DIR] [-v]
                             [-w WORKERS] [-ns TRAIN_START] [-ne TRAIN_END]
                             [-vs VAL_START] [-ve VAL_END] [-ts TEST_START]
                             [-te TEST_END]
                             name {north,south}

positional arguments:
  name
  {north,south}

optional arguments:
  -h, --help            show this help message and exit
  -c, --cfg-only        Do not generate data, only config
  -d, --dry             Don't output files, just generate data
  -dt DASK_TIMEOUTS, --dask-timeouts DASK_TIMEOUTS
  -dp DASK_PORT, --dask-port DASK_PORT
  -f FUTURES, --futures-per-worker FUTURES
  -fn FORECAST_NAME, --forecast-name FORECAST_NAME
  -fd FORECAST_DAYS, --forecast-days FORECAST_DAYS
  -i {dask,dask_shared,standard}, --implementation {dask,dask_shared,standard}
  -l LAG, --lag LAG
  -ob BATCH_SIZE, --output-batch-size BATCH_SIZE
  -p, --pickup          Skip existing tfrecords
  -t TMP_DIR, --tmp-dir TMP_DIR
                        Temporary directory
  -v, --verbose
  -w WORKERS, --workers WORKERS
                        Number of workers to use generating sets
  -ns TRAIN_START, --train_start TRAIN_START
  -ne TRAIN_END, --train_end TRAIN_END
  -vs VAL_START, --val_start VAL_START
  -ve VAL_END, --val_end VAL_END
  -ts TEST_START, --test-start TEST_START
  -te TEST_END, --test-end TEST_END


Better Optimization for the No-landmarks option

I was reading up the code, and saw your implementation of the hand detection, with and without landmarks, and thought that you could optimize this using only the getBoundingBoxes function instead of the estimateHandBounds and estimateHands..
Thoughts?

Completely isolating the handpose part of it could really boost perf, imo.

can you clarify? handdetector doesn't have getBoundingBoxes, it only has estimateHandBounds which is a wrapper that resizes image before calling getBoxes and then parses the output.
and estimateHands is the main entry into hand module and if config.landmarks === false it will only use estimateHandBounds followed by enlargeBox (since output of handdetector is palm only, it needs to guess bounding box of an entire hand by enlarging palm bounding box)
and if config.landmarks === true, it will run landmark detection and then calculate new bounding box based on min/max coordinates of landmarks so it doesn't need to run silly enlageBox.

Hmm, then, how do you use the landmarks and get bounding box???
On Mon, 16 Nov 2020, 16:49 Vladimir Mandic<EMAIL_ADDRESS>wrote:

can you clarify? handdetector doesn't have getBoundingBoxes, it only has
estimateHandBounds which is a wrapper that resizes image before calling
getBoxes and then parses the output.
and estimateHands is the main entry into hand module and if config.landmarks
=== false it will only use estimateHandBounds followed by enlargeBox
(since output of handdetector is palm only, it needs to guess bounding
box of an entire hand by enlarging palm bounding box)
and if config.landmarks === true, it will run landmark detection and then
calculate new bounding box based on min/max coordinates of landmarks so it
doesn't need to run silly enlageBox.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/vladmandic/human/issues/33#issuecomment-727915600,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKQZA75QFPAG53HUS67DBOTSQEDCVANCNFSM4TW3HOFA
.

in handdetect.js:estimateHands()
if (config.landmarks) {
  ... // clean up palm box that we got from estimateHandBounds()
  meshDetector.predict(handImage); // run landmark detection
  if (confidenceValue >= config.minConfidence) // is confidence in landmarks high enough?
  const nextBoundingBox = this.getBoxForHandLandmarks(coords); // calculate new bounding box based on landmarks
  ...
}

is there anything outstanding here or this thread can be closed?

can be closed :+1:
On Wed, 18 Nov 2020 at 03:01, Vladimir Mandic<EMAIL_ADDRESS>wrote:

is there anything outstanding here or this thread can be closed?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/vladmandic/human/issues/33#issuecomment-729226242,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKQZA72G5Y6G5FUB63IYQQTSQLTT5ANCNFSM4TW3HOFA
.

--
Thanks
Dweep


Feature Request: for http3, af_xdp -> quic without going through netpoll with ready made repo for udp processing.

for http3, af_xdp -> quic without going through netpoll with ready made repo for udp processing.
using this repo can save a lot of time and should help increase performance by 30% minimally in general.
https://github.com/asavie/xdp
not trying to be funny but just hope for the 30% performance that's all because crypto/tls for golang is really slow

It seems that this repo is no longer maintained

@Duslia i dont think it needs anymore maintenance

This capability depends on the kernel version and functionality and it is not very widely applicable. If you are interested in it, you can do some attempts.

@Duslia ok i can try
but can u gimme a clue where's the code section to modify for the socket connection / change for af_xdp to interface with?

The connection relative code is under the pkg/network


Bootstrap array overlap form input

Hi,
I use bootstrap 3.
I designed the side with a left panel for the menu and the main content to the right.
Both section is under a container-fluid and row fluid.
My main part is under a tab-content and tab-pane.
When i use a table in the panel who have many line, it's overlap my form under it.
http://jsfiddle.net/m0pey3ev/

With only the pannel, that work fine. http://jsfiddle.net/33h53t4m/
Is there a incompatibility with theses components?

Hi @ericduhamel!
You appear to have posted a live example (http://fiddle.jshell.net/m0pey3ev/show/light/), which is always a good first step. However, according to Bootlint, your example has some Bootstrap usage errors, which might potentially be causing your issue:

line 73, column 25: E013: Only columns (.col-*-*) may be children of .rows
line 49, column 9: E014: Columns (.col-*-*) can only be children of .rows or .form-groups
line 50, column 9: E014: Columns (.col-*-*) can only be children of .rows or .form-groups
line 49, column 9: W009: Using empty spacer columns isn't necessary with Bootstrap's grid. So instead of having an empty grid column with class="col-sm-2" , just add class="col-sm-offset-2" to the next grid column.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!
(Please note that this is a fully automated comment.)

fixed

seem like bootstrap table don't  add padding-bottom to 40px...

"bootstrap-table" is a third-party project that is not maintained by us nor officially affiliated with us.
Please use their issue tracker instead: https://github.com/wenzhixin/bootstrap-table/issues

Superseded by https://github.com/wenzhixin/bootstrap-table/issues/1760


has_function broken when CCompiler.output_dir is set.

This has broken has_function when CCompiler.output_dir is set.
Originally posted by @mkoeppe in https://github.com/pypa/distutils/issues/31#issuecomment-962520921

Thanks for opening the issue. We came across this in https://trac.sagemath.org/ticket/32828 (pyzmq fails to build when SETUPTOOLS_USE_DISTUTILS=local is in use).

I looked at the patch and read the problem description, but it's not obvious to me where the flaw is. Do you have any more detail (traceback, repro)?
I tried to reproduce it by building pyzmq, but it built fine:
$ $SETUPTOOLS_USE_DISTUTILS='local' pip-run --no-binary pyzmq pyzmq
Collecting pyzmq
  Downloading pyzmq-22.3.0.tar.gz (1.2 MB)
     |████████████████████████████████| 1.2 MB 5.9 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyzmq
  Building wheel for pyzmq (pyproject.toml) ... done
  Created wheel for pyzmq: filename=pyzmq-22.3.0-cp310-cp310-macosx_10_9_universal2.whl size=1398560 sha256=4fc39ea9b87811527d0a4646025fc45a95a12ba8ea17e9208a35b2c237f5424b
  Stored in directory: /Users/jaraco/Library/Caches/pip/wheels/5c/8a/96/75ce2fe82d6ff5907f6c409b4ee48b8e7876d56047f34aaafa
Successfully built pyzmq
Installing collected packages: pyzmq
Successfully installed pyzmq-22.3.0
Python 3.10.0 (v3.10.0:b494f5935c, Oct  4 2021, 14:59:20) [Clang 12.0.5 (clang-1<IP_ADDRESS>)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

It build for me too - Python-3.8.11, pyzmq-22.3  as well  as current main branch.

I looked at the patch and read the problem description, but it's not obvious to me where the flaw is

The code is expecting that a.out is created in the current directory, which is not true if output_dir is set.

For context of how pyzmq provokes this error:
https://github.com/zeromq/pyzmq/blob/v22.3.0/buildutils/detect.py#L116

I've added a testcase in #65


fix(view-data): Add image content type check for URLs in view data page

fixes : #253

Added fallback logic: if no extension is found, the UI checks if the URL is valid and attempts a HEAD request to confirm the content type is an image. Note: this approach may encounter CORS restrictions on some domains.
Thank you @Anush008 for identifying this issue with non-standard URLs!

Is that correct that with this change web-ui will send requests to all URLs on preview?

Is that correct that with this change web-ui will send requests to all URLs on preview?

Yes.
For the 10 points that are displayed, if the value is a URL and doesn't have an image extension in it, A HEAD request is made.

It is arguable, that this is actually desired behavior. What's the use-case?

What's the use-case?

Only one actually. To support image URLs like https://www.bothellwa.gov/ImageRepository/Document?documentID=8024.


Data modified with gvapython not persists

Hello! I am trying to run the face recognition sample of the python folder with a gst-launch command.
The steps of this process are:

detect faces (every N frames)
rescale rois of faces (for example to 1.15 is the default value in the example)
track objects
get landmarks
get faces features
compare faces features and do the reidentification
show the results (for example drawing rois and labels)

The second step of that pipeline is re-scale the rois of the face detector obtained with the gvadetector.  This post processing function is not implemented, so, I created a new module to use it with the gvapython. In that module I was able to modify the rois and using the gvawatermark I saw that the results were fine. But that works only when in step 1, the gvadetect has the property of inference-interval=1. With other values, for example inference-interval=5, the gvawatermark draw the scaled roi only when the gvadetect is applied, in other steps, the roi that track and draw is the one that correspond to the original detection and not to the re-scaled detection.
A sketch of the gvapython module used:
class DetectionConverter:
    def process_frame(self, frame: VideoFrame):
        for roi in frame.regions():
            for tensor in roi.tensors():
                if not tensor.is_detection():
                   continue

                bbox = roi.normalized_rect()

                # rescale the bbox
                w_scaled = bbox.w * 1.15
                h_scaled = bbox.h * 1.15
                x0 = bbox.x + ((bbox.w - w_scaled) / 2)
                y0 = bbox.y + ((bbox.h - h_scaled) / 2)
                x1 = x0 + w_scaled
                y1 = y0 + h_scaled

                x0, x1 = np.clip([x0, x1], 0, 1.0)
                y0, y1 = np.clip([y0, y1], 0, 1.0)

                tensor['x_min'] = float(x0)
                tensor['y_min'] = float(y0)
                tensor['x_max'] = float(x1)
                tensor['y_max'] = float(y1)
        return True

When is not running the detection, the frame.regions are empty. So, I guess that the gvatrack is taking that data from other source (and the gvadetect is also writing there), but from the python wrapper I am not able to write it.

Hi @MGReyes ,
As far as I remember, gvatrack uses absolute coordinates of boxes for tracking, and ignores normalized coordinates. Try to scale and set  absolute coordinates too (x,y,w,h).

I tried it but the tensor have the data normalized. I print the data before. And if I set in pixels, the visualization fails showing a black screen. An example of a tensor before convert it:
-- tensor data: {'converter': 'tensor_to_bbox_ssd', 'confidence_threshold': 0.5, 'layer_name': 'detection_out', 'model_name': 'mobilenet_ssd_672x384', 'label_id': 1, 'confidence': 0.9999741315841675, 'x_min': 0.3334711194038391, 'x_max': 0.47851312160491943, 'y_min': 0.18580801784992218, 'y_max': 0.5296036750078201}

Little trick - absolute coordinates attached to "roi", not to "tensor"

Ok, I tried. Modifying the roi with absolute coordinates and the tensor with relative coordinates works fine. If I only modify one of them, it is not consistent.

It seems that the issue was resolved with w/a. @MGReyes feel free to reopen it if you have any concerns or questions


spurious "print" statement in system_manager.py

probably a left over from debugging found its way to the 1.3.0 release :)
To be found at line 253 of pycassa/system_manager.py

Oh, you beat me to it. I see it's gotten fixed 7 minutes ago. Thanks!


[Demon Gate] Remove "Skills (old)" tab (removing deprecated feature)

Submission Checklist
Required

[x] The pull request title clearly contains the name of the sheet I am editing.
[x] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[x] The pull request makes changes to files in only one sub-folder.
[x] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

New Sheet Details

The name of this game is: <   >  (i.e. Dungeons & Dragons 5th Edition, The Dresden Files RPG)

The publisher of this game is: <   > (i.e. Wizards of the Coast, Evil Hat)

The name of this game system/family is: <   > (i.e. Dungeons & Dragons, FATE)

[ ] I have followed the Character Sheets Standards when building this sheet.

[ ] I have authorization from the game's publisher to make this an official sheet on Roll20 with their name attached.
[ ] This game is not a traditionally published game, but a copy of the game rules can be purchased/downloaded/found at: <   >
[ ] This sheet is for an unofficial fan game, modification to an existing game, or a homebrew system.

Changes / Description

The "Skills (old)" tab has been deprecated for 18 months, with a clear message to move to the newer, better Skills tab before the old one was removed. We're now removing the old one (after a reminder on the Arcanum Syndicate Discord).

Character Sheet Info Roll20 Internal Use only.


When linking a npm package to a equivalent local folder, starting dev server with --force is failing

Describe the bug
I have some privates npm packages that, when installed through pnpm (or npm) works like it should in my vite project.
However when I link this package with a symlink to where it is in my computer, then starting the dev server fails. (when runing vite --force)
I tried to copy paste the exact content of the published package into the linked one (to check if other files where influencing vite) and the issue persist. I was previously doing it with a webpack build system and it worked well.
This is my vite config
import { defineConfig } from 'vite';
// Select between the two available
// import react from '@vitejs/plugin-react';
import react from '@vitejs/plugin-react-swc';

import tsconfigPaths from 'vite-tsconfig-paths';

// https://vitejs.dev/config/
export default defineConfig((command) => {
  return {
    plugins: [tsconfigPaths(), react()],
    resolve: {
      // preserveSymlinks: true,
      alias: {
        '~styles': path.resolve(__dirname, 'src/styles'),
        // lodash: path.resolve(__dirname, 'node_modules/lodash'),
        // '@makeit-studio/helpers': path.resolve(__dirname, 'node_modules/@makeit-studio/helpers'),
      },
    },
    esbuild: {
      drop: ['console', 'debugger'],
    },
    // optimizeDeps: {
    //   include: ['@makeit-studio/helpers'],
    //   exclude: ['@makeit-studio/helpers'],
    // },
    define: {
      // used for application with different "mode"
      // __ENV__: JSON.stringify(command.mode || 'default'),
    },
  };
});

I tried to play with optimizeDeps and resolve, without success
When I run the project after linking the first error I get is
The following dependencies are imported but could not be resolved:

  lodash/mergeWith (imported by<EMAIL_ADDRESS>  lodash/transform (imported by<EMAIL_ADDRESS>  lodash/isObject (imported by<EMAIL_ADDRESS>
That why I tried the resolve alias, but then when I go the resolve alias for lodahs I get
The requested module [...] does not provide an export named 'capitalize' (...)

Reproduction
https://stackblitz.com/edit/vitejs-vite-m2xfhp?file=vite.config.js
Steps to reproduce

Run npm install in the download reproduction link
copy the folder node_modules/@makeit-studio/helpers somewhere else in your computer
link node_modules/@makeit-studio/helpers to that folder
3.1. npm link where you copied the folder.
3.2. npm link @makeit-studio/helpers in the download reproduction link
run npx vite --force (force is important if you ran the project before doing the link)

You should get the error of my screenshot:

System Info
System:
    OS: macOS 13.4
    CPU: (12) arm64 Apple M2 Max
    Memory: 357.89 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.17.0/bin/yarn
    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.0/bin/npm
    pnpm: 8.10.0 - ~/.nvm/versions/node/v18.17.0/bin/pnpm
  Browsers:
    Chrome: 119.0.6045.123
    Safari: 16.5
  npmPackages:
    @vitejs/plugin-react: 4.0.3 => 4.0.3
    @vitejs/plugin-react-swc: 3.4.0 => 3.4.0
    vite: ^4.4.5 => 4.5.0

Used Package Manager
npm
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

we had a similar issue with our vite and our own private npm repo. In our case the browser was complaining about a missing default import.
The reason we concluded was that we used optimizeDeps: {exclude: ["@our/package"] } which seems to skip the commonJS -> ESM described here.
Removing it solved the issue. It was there on the first place since we had issues with updating the local linking because vite had still a version cached in node_modules/.vite/... and not optimizing it seemed to solve the caching issue.

I was able to reproduce, but setting optimizeDeps.includes: ['@makeit-studio/helpers'] fixed the issue for me.
https://vitejs.dev/guide/dep-pre-bundling.html#monorepos-and-linked-dependencies

For me it was helpful to go to node_modules/.vite/deps/_metadata.json and analyze real paths where dependencies are taken from during the build.
In our case it was the react hooks error with npm link packages (https://github.com/facebook/react/issues/15812). I found the dependency which was taken from our local package's node_modules (probably for some optimization reasons, idk). I added it to Vite config via include in main application dir, and Vite started to take that dependency from main application's node_modules.
optimizeDeps: { include: ['react-leaflet'] },

I am also having this issue with vue, but setting preserveSymlinks: true was able to make it work
resolve: {
    alias: {
      '@app': fileURLToPath(new URL('./src/app', import.meta.url)),
    },
    preserveSymlinks: true,
  },

Closing due to lack of response from the issue author.

Had the same issue, setting preserveSymlinks: true solved the issue for me! Thanks @gabrieladeniji


FromFactory does not work as intended

Hi,
    [TestFixture]
    public class TestAutoFixture {

        public class TestClass
        {
            public string Property { get; set; }
        }

        [Test]
        public void Test()
        {
            var f = new Fixture();
            f.Customize<TestClass>(composer => composer.FromFactory(() => new TestClass { Property = "foobar" }));

            var o = f.Create<TestClass>();

            Assert.That(o.Property, Is.EqualTo("foobar"));
        }
    }

This test fails using 4.0.0-rc1 on .NET Core 2
I think this is either misleading (or poorly documented) or broken.
EDIT : It's not broken, see comments below.

I noticed that if I add .Without(_ => _.Property) after the FromFactory method it works as intended.
I think that this is very counter intuitive but since it's not a bug we can close this.

Well, it's likely an issue with our documentation ☺
By default AutoFixture automatically populates properties with public setters, unless you disable that behavior by setting fixture.OmitAutoProperties = true. The composer.FromFactory() method allows you to specify how to activate the instance of the particular type, however the properties will still be assigned for the object later.
Actually, the proper AutoFixture API usage depends on the scenario. The most "idiomatic" usage in the scenario above would be the following:
f.Customize<TestClass>(c => c
    .FromFactory(() => new TestClass())
    .With(x => x.Property, "foobar"));

or even the simplified one as AutoFixture will automatically pick up that constructor:
f.Customize<TestClass>(c => c
    .With(x => x.Property, "foobar"));

Alternatively, you can simply disable the automatic properties fill-up if you need that:
f.Customize<TestClass>(c => c
    .FromFactory(() => new TestClass {Property = "foobar"})
    .OmitAutoProperties());

However, in this case, probably, the Customize<>() API is an overhead. Instead, it's simpler to use the fixture.Register() method as it allows to use the constructed instance "as-is" without any post-processing:
f.Register(() => new TestClass { Property = "foobar" });

It might be confusing at the beginning to understand which exact API suits better, but later it should go easier 😉All this API gives the flexibility and in different scenarios the different options look better.
Let me know if you still have some questions to clarify and I'll gladly help you.
P.S> The following links might also help:

https://stackoverflow.com/questions/18161127/cant-grasp-the-difference-between-freeze-inject-register
https://stackoverflow.com/questions/38688932/how-to-use-autofixture-to-build-with-customized-properties-while-keeping-type-cu

Thank you so much for this incredible answer! You're amazing :)


QoL improvements for ERROR Dismiss popup

Description
Allow a way to improve the DISMISS click on Sunstone after an error occurs. The goal is to avoid manually clicking dismiss on VMs after the error is no longer relevant. The relevancy is the tricky part.
This is just a cosmetic feature as it doesn't affect operations at all, just admin eyes.
Use case
Ease of management in case the same error affects a batch of VMs. Save time for each VM click
Interface Changes
Proposed alternatives

disable the last error pop up after X amount of time  by removing the VM Template ERROR attribute
disable pop ups entirely as another setting
provide a global Dismiss button in the vm pool view

Additional Context
The popup is a consequence of Sunstone detecting the ERROR attribute on the VM Template. Removing the attribute is what the dismiss button clicking does. Having a global button is potentially bad way of dealing with this case as it will issue a vm_pool update which affects every VM.
If this is implemented it will only apply to the new FireEdge Sunstone

Progress Status

[ ] Code committed
[ ] Testing - QA
[ ] Documentation (Release notes - resolved issues, compatibility, known issues)

Just wanted to say
"provide a global Dismiss button in the vm pool view"
instead of fully "Global".... would be helpfully just "dismiss button"  - but depending on vms choosen.
example: 100 vms.. 10 of them got issues... Admin fixed it... Admin would then check box all 10vms and click "dismiss".. so not whole VM pool affected....
or if its overnight anyway and may no admin online > then per other Point frontend dismiss by itself all invalid errors.
great option ;)


Send health status to prometheus

Hi. I user version 2.1.0--alpha-0071.  A added services.AddHealthReportingHostedService(). What do i need else to send health status to prometheus. Or version with this feature does not yet released?

I know that is duplicate of issue 9 https://github.com/AppMetrics/Health/issues/9, but mayby this feature already in alpha


Fd 999 final styling

[x] The founder's card
[x] The featured member's section

Update spacing:

[x] spacing between social icons
[x] spacing between featured member cards
[x] spacing under featured members title
[x] spacing above the featured members title and below the mission statement

Update card assets:

[x] update all featured members social links/icons
[x] update featured members emails

Update mission statement:

[x] Align paragraph left like the who are we/about us statement
[x] should we leave mission title centered?

Update Founding team's cards:

[x] align paragraphs/bios left
[x] leave the names and titles centered?``

Hey @mariorojasac the mission statement looks a little weird to me... what do you think? should we add a black background like all the other about us statements? Or do something to make it blend in with the rest of the page. Also, The spacing on the featured member cards looks a little weird too with the emails... I wonder if we should take off the emails...

I agree I think adding a black background to the Mission statement would make it look better because it will match the about us section. What about adding an email icon that would open up an email window to whatever default email account you have? Also, what about changing the "Y" icon to a github icon to make it universal? I wasn't sure where that icon was going to take me until I hovered over it.