text:
Newsfeed intervals become chaotic

I found a bug in MagicMirror
Platform: Raspberry Pi OS
Node Version: 14.17.2
MagicMirror Version: 2.16.0
Description: After an unspecified time, the newsfeed module starts with chaotic fading intervals. It looks like multiple, competing intervals are affecting fading at the same time. It is noticeable that there are fading pauses of different lengths.
A browser refresh fixes this problem temporary (as it refreshes client runtime intervals)
https://user-images.githubusercontent.com/25933231/131243809-40b7f42a-968e-4da2-afe1-a5c4d73ba316.mov
Steps to Reproduce: This problem is not reproducible "by hand", but comes by itself after an unpredictable runtime (without further human interactions)
Expected Results: Constant fading intervals
Actual Results: Fading intervals are totally messed up
Configuration:
{
  module: "newsfeed",
  position: "bottom_bar",
  config: {
    feeds: [
      {
        title: "Tagesschau.de",
        url: "https://www.tagesschau.de/xml/rss2"
      },
      {
        title: "Heidelberg.de",
        url: "https://www.heidelberg.de/site/Heidelberg_ROOT/pmrss/407657/Lde/pressemitteilungen.html"
      }
    ],
    showSourceTitle: true,
    showPublishDate: false,
    broadcastNewsFeeds: false,
    broadcastNewsUpdates: false,
    showDescription: true
  }
},

Additional Notes: -

Here too.
It only happens with 2.16. WIth MM 2.15 no problem.
I also using MM_Pages to flip the page every 1 Minute. No special options in my config:
   {       module: 'newsfeed',       position: 'top_bar',       header: '',       config: { 		showDescription: false, 		wrapDescription: false,         feeds: [           {             title: 'Spiegel Online Eilmeldungen',             url: 'https://www.spiegel.de/schlagzeilen/tops/index.rss'           },           {             title: 'Golem',             url: 'https://rss.golem.de/rss.php?feed=RSS2.0',             encoding: 'ISO-8859-1'           },           {             title: 'Heise',             url: 'https://www.heise.de/newsticker/heise-atom.xml'           },           {             title: 'Spiegel Online komlett',             url: 'https://www.spiegel.de/schlagzeilen/index.rss'           },           {             title: 'Computerbase',             url: 'https://www.computerbase.de/rss/news.xml'           },           {             title: 'Tagesschau',             url: 'http://www.tagesschau.de/xml/rss2'           }         ]       }     },

Already followed the corresponding Forum-Thread.
Reading through this thread I can summarize:

Problem exists since v2.16.0 (v2.15.0 is working correctly)
not related to setup (docker and pm2 was mentioned)
only occuring on the screen of the pi (not in remote browser using same pi instance)

Questions:

are there any foreign modules involved (MMM-Pages was mentioned by some users) or is it also occuring without foreign modules installed?
can someone test the develop branch because the electron version change to v13 (current is v11)?
are there any errors/warnings in the logs (on the pi and/or in the dev console)?

@khassel
Since the problem (as in my case) only occurs after several days of runtime, I have only been able to see it on my productive mirror, but not on my development environment.
I could not detect any errors in the Developer Console. However, since I don't keep an eye on the mirror 24/7, it is of course possible that the cause of the problem lies far back.

I think the best thing to do is let someone who has this issue test the dev branch without any 3rd party modules. If this solves the issue, add the 3rd party modules to see if that was the issue. If not the issue seems to be solved by using the dev branch.

I think the best thing to do is let someone who has this issue test the dev branch without any 3rd party modules. If this solves the issue, add the 3rd party modules to see if that was the issue. If not the issue seems to be solved by using the dev branch.

Which file from the developer branch is the one I need to test?
with the exception of the PirModule my Mirror has no 3rd party Modules

@Sekisback   you just do
git checkout dev

to get to the dev h branch with the latest pre-release code

@sdetweil shouldnt it be develop instead of dev?

@rejas doah!, fixed

on the way, develop branch installed, pm2 shows Version 2.17.0.
Cron job disabled. Now i have to wait till... till what??? the behavior occurred after days/weeks. Is there a way to force it.

good news, looks like that you made it, till now it works like expected

When its going to be the 2,17 release? Think about tonswitch tonthe dev-branch.

October 1, release every 90 days

Bad news.. we were happy too early... not so wild as before, but a few news are shown like expected with the right time. But some of them rush

Repeating same news several times in a row. v2.17 dev
Has anyone encountered this problem before?

New release v2.17.1 is released, so may some people can update and test if this issue is still present using the new version, thanks.

updated to 2.17.1, now we will see whats happen in the next few days

After a little time, every 2nd news is flashing. But the others seems to be stablem.
So its working by 50% now ;)

I have the same problem. Latest version installed, though the interval is chaotic, article disappears after 3-5sec, but updateInterval is set to 1min. Also some news are also flashing for me.

I went back to version 2.14 for newsfeed, before nunjucks template, it is more stable and works properly

What would be interesting is to test 2.14 but with the latest Electron version. Just to make sure it's not an issue of Electron.

I don't use electron, I go into server mode and display in chrome Kiosk mode

Using electron, runs without issues since the last update (7days)

I am using Electron with 2.17 and still had the problem.
Let me mention one thing: I added a new external WiFi Adapter to my system to improve the internet stability, as I had some connectivity issues (like timeouts etc). Since I did that, the problem did not occur again.
Perhaps the cause of the problem is near the error handling/retry mechanism?

What's the update interval you are using?

Hmmm that's interesting. How about everyone else with this issue? Using electron or server only?
Also: why chrome kiosk mode and not electron?

I am running a modified version on windows, on several devices and it seems simpler to me

@hangorazvan makes sense.

I thought about this change: https://github.com/MichMich/MagicMirror/commit/37fab7ac6374c9468118d31f0fdc9851acc9f111#diff-ff5384d40bfcc5aeb84bf47c5652e5569f09ab0c2aa35486de39712451c5c396
It recalls scheduleUpdateInterval

after 11 days without trouble, same behavior as before.  with the difference, that the news stay a little bit longer may 3second

Installed dev version, same as before. After some time, the updateInterval is not normal.

I found a way to reproduce the problem:

Set the reloadInterval short (to simplify testing, eg. 30 * 1000)
Start MM -> Works fine
Unplug network connection -> Module will display error when it tries to reload newsfeeds
Connect to the Internet again
Module will fetch newsfeeds again but with chaotic fading intervals

You could also just use the Browser console and execute once:
MM.getModules()[0].socketNotificationReceived("NEWSFEED_ERROR", {error_type: 'MODULE_ERROR_UNSPECIFIED'})

where getModules()[0] is the id of the newsfeed module

Update: Or even simpler,
just execute MM.getModules()[0].scheduleUpdateInterval() like the module does, after an error has occurred

Thanks for the hints @jalibu I might have found the issue behind it. Please check out my PR..

i don't see any open PR's

Like I said 7 days ago ;-)

Didnt have the time to look at the whole thread these days :-)

🎉

Haha, I opened a PR, too. But you @rejas were first.
It seems I will never make it into the desired MagicMirror Contributors Hall of Fame ¯_(ツ)_/¯ :-D

Haha. One day ....

authors: MichMich OberfragGER Sekisback hangorazvan jalibu khassel radokristof rejas sdetweil

repo: MichMich/MagicMirror


text:
Create logo with Adobe Illustrator

Sketch:
HEX color code:

Yeah! you can contribute with a logo in this issue

Thanks you! @Daridjcm you can send the logo without the text, like a isotype logo

source: gharchive/issue

authors: Daridjcm Michael-Liendo

repo: Michael-Liendo/linx

license: MIT

license_type: permissive

license_source: github-api


text:
Removed sources

This website is based on the Lab Website Template.
See its documentation for working with this site:
https://greene-lab.gitbook.io/lab-website-template-docs

Removing sources

source: gharchive/pull-request


text:
Add hcrystalball

Checklist

[x] Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml"
[x] License file is packaged (see here for an example)
[x] Source is from official source
[x] Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged)
[x] If static libraries are linked in, the license of the static library is packaged.
[x] Build number is 0
[x] A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details)
[x] GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there

@conda-forge-admin, please ping team

Against wrong repo

repo: MichalChromcak/staged-recipes


text:
App name argument propogated to child app

The child process is being called with the clap app name as the first arg. I printed env::args() when the process starts so you can see that.

At quick glance, I see the app name is added to the arg list in Klask::execute (here) which didn't seem right. As a quick test, it appeared to work for me if I replaced that line and kill the subsequent validation check:
    fn execute(&mut self) -> Result<ChildApp, ExecuteError> {
        // let args = self.state.get_cmd_args(vec![self.app.get_name().into()])?;
        let args = self.state.get_cmd_args(vec![])?;

        // Check for validation errors - disabled since the validation expects the app name arg
        // self.app.clone().try_get_matches_from(args.iter())?;

But even though that works for me, I feel like I'm missing something since it seems like there is an intention to use the app name argument to distinguish some "outer" subcommand, but I didn't completely grok how that works (why wouldn't run_app always start the GUI and just put the logic on the calling code to decide when to call run_app?

The idea is that I wrap clap app in another clap app and treat it as a subcommand. And then when someone calls prog.exe I show a GUI and when prog.exe prog <options> is called I pass it to the user code.
So, just right-clicking the program opens up a GUI. But also if someone has a clap app with only optional arguments, it still works.
#[derive(Debug, Clap)]
struct Test {
    #[clap(long)]
    opt1: Option<String>,
    #[clap(long)]
    opt2: Option<String>,
}

For example, without this subcommand trick the above code launches new GUIs every time Run is pressed with no arguments. I hope that clears things up. If you have any ideas on how to improve this (admittedly kinda janky) setup, I'm open to suggestions!

Ah. I see now. I was still using clap to parse args explicitly and only calling klask when I wanted GUI rendered. So it was clap's Opt::parse() here that exited:
fn main() -> Result<()> {
    println!("{:?}", env::args());
    let opts = Opts::parse();

    match opts.issue {
        None => {
            let settings = klask::Settings { enable_env: Some("Env Vars".to_string()), ..Default::default() };
            klask::run_derived::<Opts, _>(settings, |_opts| println!("Welcome to JEM"));
        },
        Some(issue) => {
            // Handle --issue

While it's your library to take in the direction you want, reasons against hijacking args include:

Clap exposes parse for convenience (exits on parsing error) but also try_parse for more custom handling of parsing errors.
It may break code that checks env::arg or env::args directly (e.g. to count args) - or in my case, using clap directly.
It makes it slightly more complicated to conditionally compile in support for klask (one path calls clap to parse, the other klask)

Possible alternatives:

Environment variable; set a var (e.g. KLASK_CHILD=true) on the child process to detect child processes; Downside is that all subsequent child process inherit this variable by default (e.g. meaning an app would need to call cmd.env_remove("KLASK_CHILD") if they wanted one klask app to launch a different klask app). Is hijacking env::var less janky then env::arg?
Parent PID: Have klask figure out the path associated with the parent pid, and if it matches the path of the current process pid, then you know the the app was launched by itself. For unix, see parent_id and pidpath. Windows seems a bit more complicated, but possible: see Process::path and process32first (msdn)

Anyhow, given that I figured out that I was just using klask wrong, feel free to close this if you want to stick with the arg-injection approach. Though, it might be at least worth documenting that usage of klask::run_* should replace any existing arg parsing since klask injects an argument that it silently consumes. Cheers!

Thanks for the feedback! I think switching to an environment variable is a good idea. I could probably use std::env::remove_var to remove it automatically (at least when someone is using klask::run_*) so recursive apps shouldn't be a problem. Using parent pid seems a bit too complicated.
Also, just as a note, try_parse should always return Ok because I'm doing the validation with try_get_matches_from before I start the child process.

authors: MichalGniadek anowell

repo: MichalGniadek/klask


text:
allow to select files not existing with file chooser

as title says, I think currently I cannot select output file gracefully with klask
both of rfd and native_dialog provide save single file dialog.
I don't see any Arg derive in clap approciates for this, please tell me if there is one
otherwise, there is some way:

#[klask(save_file)]

user can change working directory and simply type filename. suffix tips is not important, so I closed this issue


text:
End of epoch divides incorrectly

The logging loss sum appears to be divided by the expected number of samples (i.e., the full minibatch size), instead of the actual samples processed. This results in an abrupt reduction in magnitude of the logged loss when an epoch ends.

Completed fix by adding a running batch counter to account to true batch size being processed as opposed the hard calculation of pseudo_batch_looper * batch_size.

authors: lemmersj zeonzir

repo: MichiganCOG/ViP


text:
[Feature] Add Events Page

Feature :rocket:
Things to be added:

Stylesheet code for events page
HTML code for events page

Use /events branch to work and make a pull request to /main while contributing
Page design:
https://imgur.com/KkkpdE1.png

I'd like to work on this

This issue is assigned to you @nanna7077
You can start working on this issue ✨

repo: Microsoft-Club-SIST/mclub-website


text:
Update GreetingsManagement.al Español

Updated with Spanish.

Hi @achecac, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

authors: achecac msftclas

repo: Microsoft/AL


text:
Jwoo/ios background image

checking in on behalf of @Carlos Zamora.
All credit to Carlos Zamora (including bugs if any :-) j/k)

closes #1293

repo: Microsoft/AdaptiveCards


text:
ADLS Gen2 storage container error message

Storage Explorer Version: 1.7.0
Platform/OS: Windows 10
Architecture: x64
Bug description
When trying to browse to a container in an ADLS Gen2 Storage account, I get the following error:
The specified filesystem does not exist. RequestId:daac17ff-a01f-000a-7231-ddd6a2000000 Time:2019-03-18T02:23:22.8348017Z

I have 4 containers in the same account and this error occurs on them all.
Steps to Reproduce

Create a new Storage Account, enable ADLS Gen 2 storage
Create a container in the account
Try to browse to it in Storage Explorer

Expected Experience
The Azure Portal tells me I can only browse ADLS Gen2 storage w/ Storage Explorer, so I'd expect it to work as it does w/ any other type of blog storage account.
Actual Experience
I can't view the blobs in the container and I get the above error message

Hi @bc3tech , I reached out to the backend team and they were able to explain why you're running into this. Basicially you made this Storage Account back when it was still possible to create a blob container in a HNS enabled account. Today though, using Blob APIs has been fully blocked for HNS enabled accounts, which means you can't access these containers. So you need to make a new HNS enabled Storage Account and use the ADLS Gen2 APIs to make containers (which Storage Explorer will do for you). If you still need to access the data in this Storage Account though, then let us know. The backend team can apparently help you migrate the data out.

geez this is the 2nd time i'll have had to re-create my storage while in this preview.... will it be the last?

Hopefully it is. Unfortunately I'm not on the back-end team so I can't confirm that for sure. I'll assume you're all good for now though, so I'm going to close this issue.

repo: Microsoft/AzureStorageExplorer


text:
Unable to render Hero cards from Microsoft Bot

Unable to render Hero cards from Microsoft Bot

This library is just for messaging and has no rendering capabilities. You may be thinking of Web Chat. If you choose to file an issue there I suggest you provide significantly more details.

Hi,
I used Microsoft Bot Framework QNA maker to create a web app bot. I
customized the bot with direct line and Gifted chat. I am
receiving messages but unable to receive Hero cards that I have added for a
few dialogues.
Please let me know if you can help me with that.
On Thu, Jul 19, 2018 at 9:40 PM, Bill Barnes notifications@github.com
wrote:

This library is just for messaging and has no rendering capabilities. You
may be thinking of Web Chat
https://github.com/Microsoft/BotFramework-WebChat/. If you choose to
file an issue there I suggest you provide significantly more details.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/BotFramework-DirectLineJS/issues/78#issuecomment-406487196,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYo7yKubw7ZY-wPpULhVRA3xJaeBU_-Gks5uIV8vgaJpZM4VXYfw
.

It sounds like you aren't reporting problems with the DirectLineJS library, but rather are just having trouble getting your bot working. In that case the right place to go for help is Stack Overflow. Use tag botframework.

repo: Microsoft/BotFramework-DirectLineJS


text:
change userId -> userID

fixes #1373
Fixed

[client] Use correct casing for user id prop for web chat in PR #1374

Pull Request Test Coverage Report for Build 2223

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 54.99%

Totals

Change from base Build 2222:
0.0%

Covered Lines:
4873

Relevant Lines:
8321

💛  - Coveralls

authors: a-b-r-o-w-n coveralls

repo: Microsoft/BotFramework-Emulator


text:
Object constructor calls are slow

There was a discussion going on in https://github.com/webpack/webpack/issues/5600 that wraps all references into Object () which was slow. v8 recently fixed it and I piggy-backed the test case from here that was used to demonstrate v8's behavior and verified for chakracore and the results are similar. We are slow too and will be good to optimize to get boost in webpack module.
const identity = x => x;

function callDirect(o) {
  const foo = o.foo;
  return foo(1, 2, 3);
}

function callViaCall(o) {
  return o.foo.call(undefined, 1, 2, 3);
}

function callViaObject(o) {
  return Object(o.foo)(1, 2, 3);
}

function callViaIdentity(o) {
  return identity(o.foo)(1, 2, 3);
}

var TESTS = [
    callDirect,
    callViaObject,
    callViaCall,
    callViaIdentity
];

class A { foo(x, y, z) { return x + y + z; } };
var o = new A;
var n = 1e8;

function test(fn) {
  var result;
  for (var i = 0; i < n; ++i) result = fn(o);
  return result;
}

// Warmup.
for (var j = 0; j < TESTS.length; ++j) {
  test(TESTS[j]);
}

// Measure.
for (var j = 0; j < TESTS.length; ++j) {
  var startTime = Date.now();
  test(TESTS[j]);
  console.log(TESTS[j].name + ':', (Date.now() - startTime), 'ms.');
}

Results :
E:\git\Chakra\core>node f:\temp\object.js
callDirect: 664 ms.
callViaObject: 1906 ms.
callViaCall: 329 ms.
callViaIdentity: 454 ms.

E:\git\Chakra\core>node -pe "process.versions"
{ http_parser: '2.7.0',
  node: '8.4.0',
  chakracore: '1.7.1.0',
  uv: '1.13.1',
  zlib: '1.2.11',
  ares: '1.10.1-DEV',
  modules: '57',
  nghttp2: '1.22.0',
  openssl: '1.0.2l',
  icu: '59.1',
  unicode: '9.0',
  cldr: '31.0.1',
  tz: '2017b' }

callViaObject looks seriously slow.  However not sure its popularity. Do you have v8 numbers?

Yes. Check the blog in the description of this issue.

I tried playing with his code a bit:
Original:
  | Edge | Chrome
callDirect        | 716   | 546
callViaObject  | 2156 | 1152
callViaCall       | 196   | 579
callViaIdentity | 302  | 521
The reason for our poor callDirect score is that warmup wasn’t sufficient for us.  Running the warmup twice, we get:
                   | Edge | Chrome

callDirect        | 198   | 545
callViaObject  | 2157 | 1154
callViaCall       | 190   | 582
callViaIdentity | 304   | 519
I then used a switch to get rid of the polymorphic calls:
                        | Edge | Chrome
callDirect         | 159   | 43
callViaObject   | 1741 | 1309
callViaCall        | 168   | 718
callViaIdentity  | 281   | 667
Our numbers make sense here, but not sure what happened to Chrome…
We have some pretty easy optimizations (allowing non-fixed field inlining checks to be hoisted our of lops) that should speed up all of these significantly.  Inlining Object() would certainly help the second case and we should look into it.  It should be easy.
Firefox has pretty consistent results across all 3 runs:
callDirect:199ms.
callViaObject:1505ms.
callViaCall:194ms.
callViaIdentity:192ms.

Awesome.
Note however that the polymorphic call site inside test is there by design to make sure we measure the right thing, i.e. the cost of the actual functions under test and not our ability to inline everything into the driver and then hoist checks out of the loop.

authors: LouisLaf bmeurer kunalspathak obastemur

repo: Microsoft/ChakraCore


text:
Resolves #1391: Implement TypedArray updates to index handling.

Resolves 1391: Implement TypedArray updates to index handling.

Also, made changes to ArrayBuffer and DataView as per the spec updates.
Added some more tests for DataView.

Hi @atulkatti, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Atul Katti). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@Microsoft/chakra-developers

Make sure to prefix the issue number with # so it triggers GitHub to link them.

@boingoing please take a look

@atulkatti please run buddy testing as per the email I sent

(Reverted by #2350)

@ljharb @tcare FYI https://github.com/Microsoft/ChakraCore/issues/1391#issuecomment-272012172

authors: atulkatti dilijev ljharb msftclas tcare


text:
Improved HDR support

The DirectXTex library can read & write floating-point format DDS files, but the only 'source' HDR format it supports is JPEG XR / HD-Photo.
The library should have support for another HDR format, such as OpenEXR--see here and here--, and functions for converting between the various color spaces:

Linear RGB
Rec 709 color primaries / sRGB
Rec 2020 color primaries
scRGB
Adobe RGB
Adobe Wide Gamut RGB

Opened issues for HDR and PFM file formats which would be easy to implement directly in the library without having to rely on a 3rd party library for more HDR support. This along with PPM would round out the file format support to match the old D3DX library support.

DirectXTex now supports HDR

The colorspace conversions can now be implemented using TransformImage, so they don't need to be 'baked' into the library.

Library now includes optional OpenEXR format support. See Adding OpenEXR

repo: Microsoft/DirectXTex


text:
Unified Interface fix for Entity.GetValue(string fieldname)

Correcting issue with GetValue for string fields in which a NULL value was always returned

Correcting link, this is regarding Issue #196

repo: Microsoft/EasyRepro


text:
Shared experiences

Hello,
How easy would it be to add shared experiences capabilities (Spatial anchoring) to HoloJs.
Regards,
Omar.

Hello Cristi,
Did you have the chance to work on this?

Sorry, higher priority work popped up. I don't have an ETA but it will be the first thing I do on HoloJS once I get a little bit of time.

I've added the concept of spatial anchors to HoloJS. Checkout the develop/spatial-anchors branch. There is a  ThreeJS example called spatial-anchors that shows how to create, delete, save, enumerate and get location of anchors. I will add import/export of said anchors in the next couple of days to enable sharing of anchors with other devices.

I added import/export as well. I'll do some cleanup and write a Wiki entry, but the intended functionality is done. Please give it a try and let me know if you encounter any issues.

Hello Cristi,
Thank you for the update.
I am trying to send the exported anchor over a socket connection in order to share it with multiple devices. However when doing something like this
var data = {
	buffer : result.anchorBuffer,
        name: "exportedCubeLocation"
}
socket.emit('sendAnchor', data);

I get the following error:
Exception thrown at 0x76CA2552 in ThreeJSApp-Vs2017.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x0200C454.
TypeError: Object doesn't support property or method 'btoa'
   at e.encodeBase64Packet (socket.io.js:2:10105)
   at o (socket.io.js:2:8224)
   at e.encodePacket (socket.io.js:2:9510)
   at Anonymous function (socket.io.js:2:22461)
   at r.prototype.write (socket.io.js:2:22449)
   at r.prototype.send (socket.io.js:2:7770)
   at r.prototype.flush (socket.io.js:1:29319)
   at r.prototype.onDrain (socket.io.js:1:29162)
   at Anonymous function (socket.io.js:1:25677)
   at r.prototype.emit (socket.io.js:1:12370)

btoa is not implemented on the window element. I'm currently on vacation and can't add it for the next one week.
Meanwhile, you can try sending binary messages with socket.io as they don't require encoding with btoa:
After creating the socket, do:
socket.binaryType = "arraybuffer";
You can switch back to text messages by doing:
socket.binaryType = "";

Ok Cristi thank you. Enjoy your vacation :)

I implemented btoa and atob. Base64 encoding should work for socket.io now. However, sending binary messages will be much more efficient. Exported anchor size is in the megabytes range and base64 encoding/decoding these buffers will take some time.

authors: Almost-Done omaralcheikh

repo: Microsoft/HoloJS


text:
Sync data serialization and persistence of Persistent session data.

Adds functionality for serializing sync data, first implementation is in XML.
Adds interfaces to drive the session server persistent session from files off the disc.
With the -save [path] flag to session server it will save persistent session sync data to disk.
Fixes #43

Hi @jwittner, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Josh Wittner). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

I understand this is a big change with lots of design caveats - fully expecting lots of feedback on this one. =)

Probably needs readme updates...

It would be nice to expose the ability to save / load the sync data from the app (just the sync data, not including the session name), in the C# layer, on a per-session basis as opposed to server-wide. For example, if an app creates a new session, it could pass in a pointer to a file containing the sync state. Alternatively, apps might want to leverage the serialization of the sync data and save it to a file for later usage.
Right now, the functionalities are super nice, but only seem accessible from a server that was run with the -save switch. I'm OK if this is a first step in this direction.

Adding support for seeding new sessions with sync data is definitely possible with what I have here. Now that I changed the SyncData method to just Name I hope it's more clear that the name doesn't have to be the session name. The session name is not currently serialized into the data - for the FileSystemSyncDataProvider it's the stripped filename loaded from disc.

Should we be upping the version values with changes? SemVer?
Current status:
#define XTOOLS_VERSION 1,1,0,0
#define XTOOLS_VERSION_STRING L"1.1.0.0"

#if defined(WIN32)
#define XTOOLS_FILE_VERSION_STRING L"1.1.0.0 Win32.Release"
#elif defined(WIN64)
#define XTOOLS_FILE_VERSION_STRING L"1.1.0.0 x64.Release"
#else
#define XTOOLS_FILE_VERSION_STRING L"1.1.0.0 Release"
#endif
#endif

Is there anything we need to do to get TinyXml2 approved as an external dependency? It's released under the zlib license.

Note: Just pushed a unit test for the round trip of serialization via XMLSyncElementSerializer. =)

Can I get some love on the current state of this?

I'll get to this conflict soon - I kind of expected it to happen. =)

Very interesting.  How will this change the sync system in the HoloToolkit-Unity?

Note that internally my team's application has been taking advantage of this change for several weeks now.

@jwittner, any chance you have time to update the conflicts?

I'm going to abandon this PR since it's been so long. I have a team still leveraging the work, but we'll keep it in our fork. If someone desires this feature, let me know and I can reopen.

authors: HodgsonSDAS StephenHodgson jwittner maxouellet msftclas

repo: Microsoft/HoloToolkit


text:
updated Boost Compute submodule

@huanzhang12 Is it safe to use the latest compute submodule in LightGBM? The current one is one year old and 100 commits behind.

@StrikerRUS Thank you for updating the boost compute module!
In fact boost compute should already be included officially in libboost>=1.61 according to the release note: https://www.boost.org/users/history/version_1_61_0.html, but the version on git usually contains latest bug fixes. Also with this submodule included we can compile on libboost>=1.56.
I think it is safe to merge this.

@StrikerRUS you can fix the conflict then merge.

@huanzhang12 Thank you for the inside info!

authors: StrikerRUS guolinke huanzhang12

repo: Microsoft/LightGBM


text:
ControllerVisualizationProfile is not multi platform capable

Overview
When running the MRKT on a mobile phone and touching the screen, an error is thrown:

No controller model available. Failed to add controller game object to scene

This happens, because the DefaultMixedRealityControllerVisualizationProfile is queried for controllers. By default, it provides 2 controllers for UWP basically.
It is queried from the DefaultMixedRealityRegisteredServiceProvidersProfile, which CAN distinguish between platforms and uses the UnityTouchDeviceManager, which actually fits the platform.
Expected Behavior

Touch devices do not try to instantiate a controller
Each platform provides its set of controllers

Actual Behavior

error because for every platform UWP Controllers are tried to be used
differentiation is currently only possible when exchanging the ControllerVisualizationProfile altogether.

Unity Editor Version
2018.3.9f1
Mixed Reality Toolkit Release Version
mrtk_development

This seems similar to https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/3685
I will work on getting out a fix for this early next week.

yes I thought the same just forgot to link it

I removed the error message for controllers that have no visualization here https://github.com/Microsoft/MixedRealityToolkit-Unity/pull/3822

authors: Alexees chrisfromwork thalbern

repo: Microsoft/MixedRealityToolkit-Unity


text:
Debugger doesn't handle python interpreter arguments correctly

If you set Interpreter Arguments to -v you will get:
FileNotFoundError: [Errno 2] No such file or directory: '-v'

hm I saw this after I already submitted a different defect. #3934 I've included more information to what's happening.

No worries. I'll close this one and keep yours.

authors: huguesv ttricker

repo: Microsoft/PTVS


text:
Help On... context item includes the entire selection

https://github.com/Microsoft/RTVS/commit/468732e509cab0e9ff2a8d509e9afc2059d2174d

repo: Microsoft/RTVS


text:
Package manager should close when connection is switching

And stop refreshing. Even on local if user closes it it shouldn't be eating CPU cycles.

The second part is more a global issue. There are mutated event listeners (in PM, VE, etc.). Probably those listeners should react on event only when corresponding UI is visible.

If this is too complicated, we may leave it alone and document

With fix for #2808 another issue becomes prominent: async update of the package list causes odd behavior: in remote, library link is plain text but on local it is a clickable link. After switching remote -> local or the other way around and then clicking on various packages the link retains old appearance for some time and then eventually updates as view model is rebuilt.

The last one appears by design since fetching package info takes time. Closing for now.

authors: AlexanderSher MikhailArkhipov


text:
Can't open pdf when using internal help browser

This might actually be an interaction with Adobe Acrobat Reader.
R packages often have vignettes which are pdf files. Trying to open these from the internal help fails. An example is the Matrix package:
library(Matrix)
?Matrix

In the internal help, navigate to the main Matrix help page, then go to the vignettes link (2nd from top). Click on any of the pdf links. The help pane goes blank, and when I try to go back (click on the Back button), VS spins its wheels for a few seconds. Acrobat Reader also starts up in the background, and then disappears.

By design. internal browser is IE and has limitations. For complex content external browser is the only option.

Would it be possible to display an alert at least, if this happens? Or is it unrelated to RTVS?

I have simple solution

https://github.com/Microsoft/RTVS/commit/1e205ba4476f9703a1e00bc5c2c17907255b7e50

authors: Hong-Revo MikhailArkhipov


text:
Override window.event type

to resolve https://github.com/Microsoft/TypeScript/issues/11583

Hi @alisabzevari, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.
TTYL, MSBOT;

authors: alisabzevari msftclas

repo: Microsoft/TSJS-lib-generator


text:
Guidelines for where to publish definitions conflicts with DefinitelyTyped's guidelines

@mhegazy The TS Handbook's recommendation for where to publish definition files originally matched DefinitelyTyped's current recommendation:

If you are the library author, or can make a pull request to the library, bundle types instead of publishing to DefinitelyTyped.

884e4e80 changed the TS Handbook's recommendation to be:

If your package is written in TypeScript then the first approach is favored. If your package is not written in TypeScript then the second is the preferred approach.

Is there a reason this was changed? Additionally, how should we reconcile conflicting recommendations from Typescript and DefinitelyTyped?
I made a comment on the above-mentioned commit, but did not get any response.

Closing based @mhegazy's rationale here:

If the package is written in TypeScript, then the .d.ts files are auto generated from the source, and there is no reason to publish them to Definitelytyped.
If the package is not, then publishing the declaration files to Definitely typed allows the types to version independently. this is good for package authors who are not familiar with typescript, and are not willing to support users on their declaration files. DefinitelyTyped also has a supported mechanism for tracking releases of TS and testing infrastructure.
You can still bundle the declaration files in a package that is not authored in TS. but first you need to make sure the package owner/maintainer understands what they are signing up for. they will need to publish new version of their package to fix type-declaration-only bugs. they will need to publish major versions if their declarations change in a breaking way (thorough behavior have not changed) to maintain sem-ver. They need to test the declaration file contributions they get, and they need to track TypeScript releases.
What we have found is that package authors are "pressured" into adding declaration files into their packages without knowing what that entails. That ends up being bad for the package author as well as the TypeScript users of the package.

repo: Microsoft/TypeScript-Handbook

license_source: bigquery


text:
class/interface keyword should not be preceded with dot (.)

This fixes https://github.com/Microsoft/TypeScript-Sublime-Plugin/issues/367 and https://github.com/Microsoft/TypeScript-Sublime-Plugin/issues/353.

:+1:

authors: hoanhtien zhengbli

repo: Microsoft/TypeScript-Sublime-Plugin


text:
Writing declarations for libraries with polymorphic return types is difficult.

To jump straight to an example, I'm trying to write typings for the JXON library: https://github.com/tyrasd/jxon .
The library exports, among other things, a function that converts a JS object to an XML document:
module.exports = {
   ...
   jsToXml(jsObject: any, ...): XMLDocument;
}

The library when used in browser uses the browser's native XMLDocument interface, and when used in Node uses that of 'xmldom'. At present, there are two ways to represent this, each with significant drawbacks.

jsToXml(jsObject: any, ...): XMLDocument & 'xmldom'.Document;

requires browser projects to pull in @types/xmldom, and requires node projects to build with lib: ['dom']. Neither of these are requirements of the underlying library.
the return type is not accurately represented; native XMLDocument might have methods available that are not on xmldom's implementation, and vice versa.  XMLDocument | 'xmldom'.Document is also not accurate.

jsToXml<XMLDocumentImpl>(jsObject: any, ...): XmlDocumentImpl;

requires library users to specify the generic parameter every time they call the function. This is pretty shitty. If the library exported a factory function it could at least be a single manual parameter specification, but this library does not work that way.

Am I right in my conclusion that there is no way to achieve a 'proper' declaration currently?
At first glance, what I think might be needed is some way to conditionally specify types based on other types being available, without introducing a dependency on those types. Shitty syntax strawman:

type XMLDocumentImpl =( exists(XMLDocument)  ) ? XMLDocument
  : (exists('xmldom')) ? 'xmldom'.Document
  : CompileTimeThrow('dependency not satisfied')

Thoughts?

The union type seems like the correct representation - one or the other might be returned, and the only way to know is with extrinsic information. In the generic case where you don't know which, you certainly need a follow-up if to determine which case you're in; in the case where you're only writing for one platform, a type assertion to "add in" that additional knowledge is appropriate.

The problem with that is the dependencies. It means projects using this library can't be built unless lib: dom is available. Also it's a bit frustrating, as to me it seems the information to determine what is going to be used is definitely available at compile time.

The usual solution there is to declare the relevant type
declare global {
  interface XMLDocument { }
}

which will merge harmlessly with the DOM declaration (when present) or prevent a type error (when not present).

oh, that's a useful workaround. It's certainly helpful to me now, but if I publish these typings, is polluting the global scope with a declaration like this likely to be frowned upon? What about the analog for the xmldoc type, something like
declare module 'xmldoc' {
   interface Document
}

Again, will this pollute the global scope for users of this library?

If you do it that way, it won't merge with the global interface (i.e. that won't work).
Polluting the global NS with something that is likely to be there most of the time anyway isn't a big problem IMO

OK, thanks. I'll have a play around with that and see where it gets me. I've had a similar problem writing my own library that uses either 'node-fetch' or window.fetch, again dependant on environment, so I'll try this in both places and see if it's adequate for me / library users. Thanks!

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

authors: RyanCavanaugh akdor1154 mhegazy

repo: Microsoft/TypeScript


text:
Dissallow same parameter signature in overloads

I think the below overloads are ambiguous:
namespace Greet {
    export function sayHi(): number
    export function sayHi(): string
    export function sayHi(): string | number {
        if (Math.random() > 0.5) {
            return '';
        }
        else {
            return 1;
        }
    }
}

// What
typeof Greet.sayHi(); // What is the type?

Since, we are selecting a return type based on the parameter signature. But, what if the parameter signature is the same on multiple overloads? Nowadays, if the checker cannot find an appropriate overload it takes the first one. I think this is quite an unsafe approach. In the above example, it is clear that sayHi() cannot be narrowed to either string or number based on parameter signature selection, since there is only one parameter signature (), and thus should have the return type string | number only.
What I propose, is to error on the overload that has the same parameter signature:
namespace Greet {
    export function sayHi(): number // Error: Multiple same parameter signature on overload
    export function sayHi(): string // Error: Multiple same parameter signature on overload
    export function sayHi(): string | number {
        if (Math.random() > 0.5) {
            return '';
        }
        else {
            return 1;
        }
    }
}
``

There is something else involving generics:
function sayHi<T extends string>(): T;
function sayHi<T extends object>(): keyof T;
function sayHi(): string { ... }

it can match conditionally by type even without using inference:
sayHi<'a'>(); // 'a'
sayHi<{b: number}>(); // 'b'

If the compiler should enforce that it should keep this behavior intact. Generic constraints contribute identity to the signature.
In other words it should only complain when it sees indistinguishable overloads (overloads ONLY different in their return type). Not having this rule enforced haven't got me into trouble so far though.

I was thinking about type parameter as well, though didn't give an example on it.
paramater signature = type parameter signature + value parameter signature

I think this one is also require for #6606. Since, the following expression is ambiguous:
typeof Greet.sayHi();

https://github.com/Microsoft/TypeScript/issues/13225 is in similar vein.

Just for your information, the proposed behavior is implemented in pre TS1.1. But it is removed in later releases.
http://stackoverflow.com/questions/25022331/overloads-cannot-differ-only-by-return-type
Also, the spec disallow same parameter signature in ambient function declaration.

Duplicate of https://github.com/Microsoft/TypeScript/issues/13225

authors: HerringtonDarkholme alitaheri gcnew mhegazy tinganho


text:
TypeScript doesn't see a new symlink in node_modules

TypeScript Version:  2.7.0-dev.20171029
TypeScript doesn't see a symlink inside node_modules when executed twice. The symlink is created after the first execution of typescript. It seems like some caching issue.
Code to reproduce is in this repo: https://github.com/pnpm/outdated/tree/experimenting. You have to install pnpm and run pnpm install && npm test. It will fail only the very first time. Next executions of npm test will work, even if the symlink (at node_modules/@pnpm/outdated) will be removed manually.
Fail can be seen in CI: https://travis-ci.org/pnpm/outdated/jobs/295085685#L521
I used ls node_modules/@pnpm to demonstrate that the symlink is there before tsc is executed.
For some context. I created a tool called package-preview which packs and installs locally the tested package before running tests. So unit tests are testing a real production-like version of the package.
When a project is written in typescript, package-preview will compile the project with typescript, pack it, install it in a different folder and symlink it to the project's node_modules. Then it calls typescript again, to run the tests, which import the "real thing", the pseudo-published package... (that is when typescript fails)

I see many caches in the typescript repo, is there some flag that I can use to make typescript ignore cache? Or is there a command to ignore it?

Running tsc on the command line twice shouldn't involve any caching. Are you sure that the file system content is the same both times you run it?

The node_modules content differs. The first time I run it, there is no symlink in node_modules/@pnpm/outdated. The symlink is created before it is called the second time.

tsc shouldn't perform any writes to node_modules. It sounds like some other tool is creating the link. So if you run tsc twice in a row without intervening steps you should see the same result twice.

Yes, another tool creates the symlink (the package-preview)
First time tsc is called when the package is packed. The package is then unpacked in another directory and linked into node_modules. Then tsc is called second time to run the tests. The tests are importing the package by name (because the backage is symlinked into node_module by then)

It sounds like the error doesn't have anything to do with the number of times you run tsc. The result of tsc should be determined solely by the content of the file system at the time it is run. Based on that, you should be able to get a repro for this issue that consists only of creating some files (and symlinks) and then running tsc.

Alright, I'll try to make a simpler example. Probably tomorrow.

There is no issue in TypeScript. I thought npm pack runs prepublish scripts but it doesn't. So tsc was called only once, the second time, and .d.ts. files were not there. So the error was not because typescript did not see the symlink. It was because it did not find the d.ts. file.

authors: andy-ms zkochan


text:
Visual Studio hangs on project load.

I isolated it to having the following text within the .csproj file:
  <ItemGroup>
    <Service Include="{4A0DDDB5-7A95-4FBF-97CC-616D07737A77}" />
  </ItemGroup>

I created the project in Visual Studio 2015, and tried to open it in Visual Studio 2013 (which is where it hung).
According to this link it has something to do with the project being identified as a test project.
It is a new project that has had two folders and a handful of .ts files added to it.

@Griffork is this still an issue with TypeScript 1.6?

I have no idea. I stopped using Typescript a while ago.

Based on the link you posted this is not a TypeScript specific issue, but related to the unit testing integration. It doesn't like there is anything we can do.

authors: Griffork mhegazy paulvanbrenk


text:
Working with ES6 Sets in Typescript

The constructor for an ES6 Set takes an optional iterable parameter (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) but the declaration in lib.d.ts doesn't include it
declare var Set: {
    new <T>(): Set<T>;
}

So I'm getting a Typescript error if I try to do something like new Set([1,2,3]).
On a somewhat related note I'm using the 1.5 Beta version of typescript which supports a lot of ES6 features but it still relies on the browser to support Sets. Are there plans polyfill Sets in Typescript?

TypeScript does not come with built in pollyfills. it is up to you to decide which pollyfill to use, if any. you can use something like es6Collection, es6-shims, corejs..etc.
All the Typescript compiler needs is a declaration for the ES6 constructs you want to use. you can find them all in this lib file.
here is the relevant portion:
interface Set<T> {
    add(value: T): Set<T>;
    clear(): void;
    delete(value: T): boolean;
    entries(): IterableIterator<[T, T]>;
    forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
    has(value: T): boolean;
    keys(): IterableIterator<T>;
    size: number;
    values(): IterableIterator<T>;
    [Symbol.iterator]():IterableIterator<T>;
    [Symbol.toStringTag]: string;
}

interface SetConstructor {
    new <T>(): Set<T>;
    new <T>(iterable: Iterable<T>): Set<T>;
    prototype: Set<any>;
}
declare var Set: SetConstructor;

How do I tell the TypeScript compiler to use lib.es6.d.ts instead of lib.d.ts? I can't just redeclare Set or I will get a Subsequent variable declarations must have the same type. error. I'm using gulp Traceur and I'm not explicitly including lib.d.ts anywhere so I'm not sure how to replace it.

You can declare it in one of your source files and you should not get the duplicate definition errors.
You can also include this file in your project and explicitly reference it..

If I add something like
interface SetConstructor {
    new <T>(): Set<T>;
    new <T>(iterable: any): Set<T>;
    prototype: Set<any>;
}
declare var Set: SetConstructor;

to one of my .d.ts or .ts files I get a Subsequent variable declarations... error.
If I include a reference to lib.es6.d.ts I get a bunch of errors like this:
.../typings/lib.es6.d.ts(1196,2): 1169 Computed property names are not allowed in interfaces.

Which version of typescript are you using?
I gave you the wrong diffinition sorry about that. So some corrections:

you need to be using 1.5-beta

And add the typings:
interface Set<T> {
    add(value: T): Set<T>;
    clear(): void;
    delete(value: T): boolean;
    entries(): Array<[T, T]>;
    forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
    has(value: T): boolean;
    keys(): Array<T>;
    size: number;
}

interface SetConstructor {
    new <T>(): Set<T>;
    new <T>(iterable: Array<T>): Set<T>;
    prototype: Set<any>;
}
declare var Set: SetConstructor;

@JsonFreeman we should remove the restriction on computer properties in interfaces..right?
@rbuckton is getting a correct es6 typing file ready; @rbuckton please share it with @robianmcd

@mhegazy Why do you want to remove the restriction on computed properties in interfaces?

currently you can not write a declaration file that uses symbols and get it to work in ES5 and ES6, you have to write two. i think this is artificial. we need to allow the use of Symbols and the use of computed properties in both. this way if you are using lib.d.ts you are not getting ES6 types, but if you deliberately use lib.es6.d.ts you can still use that with target ES5.

we need to allow the use of Symbols and the use of computed properties in both

I think this fits well for people who are using a polyfill anyway.

We do allow computed properties downlevel. So there is nothing to do for that. In terms of Symbols, we do support polyfilling symbols in ES5. You just have to provide the typings yourself. Are you suggesting just to move the Symbols into the main lib.d.ts, where ES5 can see them as well?

To clarify, recall that computed property names that point to known Symbols are exempt from computed property restrictions (like use in an interface). This was part of the design of Symbols.

sorry my bad. you are right. @robianmcd you can just include the lib.es6.d.ts explicitly in your project, and you should be good to go.

I thought I had been using Typescript 1.5 this whole tile but it turns out I was including it wrong in my gulpfile and it was falling back to 1.4. So I updated to 1.5 and included the lib.es6.d.ts and everything is working now.
Thanks for the help!
I'm still confused as to what ES6 features TypeScript will support, what will require this additional d.ts file and what will require third-party polyfills. But I assume there will be some more documentation on this when 1.5 is fully released so I can wait until then.

Sorry I am confused about the above discussion, I am trying to do
let test = [1, 2, 3, 4, 4, 3]; test = [...new Set(test)];
And the error is 'Type 'Set' is not an array type.'
I'm not using any polyfill, this works natively in Chrome so should this issue be reopened?

@arjunyel this is a correct error if targeting ES5 because there isn't default ES5 codegen for iterating a Set. Specify --target ES6 or --downlevelIteration

authors: DanielRosenwasser JsonFreeman RyanCavanaugh arjunyel mhegazy robianmcd


text:
Spread arguments should appropriately spread into optional parameters

Adapted from #4755.
Currently the following is fine:
function f(...things: any[]) {
    let [a, ...bs] = things;

    // do things with 'a' and 'bs'
}

function g(xs: any[]) {
    f(...xs);
}

However, it might be the case that you want to be clear about how things will be used when your function gets called, so it should be fine to use an optional parameter for a:
function f(a?: any, ...bs: any[]) {
    // do things with 'a' and 'bs'
}

function g(xs: any[]) {
    f(...xs);
//  ~~~~~~~~
}

Currently, with the invocation of f above you'll get the error message Supplied parameters do not match any signature of call target. even though a is optional.

:+1:

should be subsumed by a fix to https://github.com/Microsoft/TypeScript/issues/4130

on a closer look, this is already fixed.

@mhegazy @DanielRosenwasser using "typescript": "^2.7.0-dev.20171123" I am still having this issue everywhere I use spread operator I have to actually do functioName.call(null, value)
I am confused because most of the tickets said close but this still happening

Yeah, I don''t think this works.
let str = "abc";
let arr = [...str];

Maybe it requires some configuration.

https://stackoverflow.com/a/33233956

authors: DanielRosenwasser bootstraponline mhegazy yordis


text:
Design Meeting Notes for 12/4/2015

Allow type parameter constraints to reference other type parameters (#2304)

Pre 1.0, used to be that we could allow you to write something like class Foo<T extends X, U extends T>

Had too many issues with infinitely diving in to types.
Disabled it, and so the TypeScript 1.1 rewrite had the same restriction.
Need to do some checking up front to avoid these circularities.
Though it's not that simple; what's the apparent type of T here?

class Foo<T extends Foo<T>> {
}

though this is solved.

Where it gets interesting.

function bar<T extends Foo<T>>(x: T): T {
}

when writing bar(expr), we expect to infer a types of T from expr.
We then need to check the constraint for T against Foo<T>.

How should this work when inference fails?
Couldn't we just infer any when we can't resolve things?

Anders tried that, but then you end up inferring any for almost every type parameter of this form which is undesirable

We could resolve a failed inference for T extends Foo<T> with Foo<{}>

But that's not compatible.
Kind of weird to allow that.
But inference is never supposed to "fail", so what else can we do?

Inferring from union types
function extract<T>(x: T | string): T { /*...*/ }

var x: string | string[];
var y = extract(x);

We decided to adopt the policy that we remove string from the union type and just infer string[] for T.
This is because the two types are identical.
What if we had a recursive call?

function extract<T>(x: T | string): T {
    var z = extract(x);
}

  * Right now we refer the type of `z` to be `{}`.
  * Changes to union type inference will make us infer the type of `z` to be `T`.

Regression caused by implicit type parameters
class C {

}
var x: C;

is implicitly of like writing
class C<this> {

}
var x: C<C>;

Internally, C has type flags indicating that it is both a class and a reference (TypeFlags.Class and TypeFlags.Reference).
Internally, this is just represented by having 1 extra type argument than the number of type parameters.
Caused a regression.
Anders fixed it.
Did we add it to the real world code suite?
No.
We should.

Enum compatibility - continued (#1748)

Dicsussed it a bit last time.
Discussion from last time was inconclusive.
We have a request to make enums structurally compatible.

Why is this a problem?
Two packages that use the same enum from a .d.ts that they depend on.
TypeScript has this issue when using its own API as well as TSLint's.
Alternative is to consider some form of "tagging".

e.g. use some sort of GUID to indicate enums are compatible.

Weird - a very "opt-in" behavior.
This is often the desired default behavior.

If this needs to become common practice, it makes enums awkward and daunting.

Easy "gotcha".

What makes two enums "compatible"?

Same name?

That's odd.
We don't do that anywhere else.

Same property names?

Should those matter?
But what about when v2 of a library adds enum members to v1?

But it seems like those libraries aren't compatible anyway, so the two enums are incompatible.

What about when you want to supply a "public" version of your enum?

What about just the values?

Surprise! People hate that.

Being const enums with equivalent values?

But that leaves enums out in the rain.
Const enums can never have "floating dependency versions".

e.g. when writing a library for TypeScript that depends on TypeScript, you need to lock down on the version you compiled against.
Regular enums are better for this because you never have to think about this as long as the members still exist due to late binding.

If we used property names, we'd need to restrict the assignability of the individual members themselves.

What if each enum member had an implicit "parent"?

That way when comparing Direction.Right to Moral.Right, we need to check if Direction and Moral are structurally compatible as well.

What about directionality?

Is the one with fewer members assignable to the enum with more members?
What is the motivating example for directionality?

When depending on a library that depends on us where we've hidden part of our own API.
What if we had "enum merging" to split out public and private portions?

Team seems frightened by this, I will never bring this up again.

Order?

No, ordering is a red herring. Values are really what we're interested in.

Let's just get an implementation going so we can make decisions on that.
More or less, seems like we're interested in enums needing the same members with identical name/value pairs.
Lingering question: do we require the enum declaration name to be identical?

You don't want Volume and Weight to be compatible.
Weird that we recognize the value of nominal checking, but only want to apply it to enums.

Team seems frightened by this, I will never bring this up again.

:fearful:

authors: DanielRosenwasser weswigham


text:
Cannot build TypeScript: "gulp local" hangs

Hi,
since yesterday, I seem to not be able to build TypeScript on a Windows machine because "gulp local" hangs after printing "Requiring external module ts-node/register".
I just run the following steps on a clean Windows 10 x64 Version 1511 machine:

Install Git for Windows 2.9.2 (x64), TortoiseGit 2.2.0.0 (x64), Node.js v4.4.7 LTS (x64).
Clone https://github.com/Microsoft/TypeScript.git.
In the TypeScript directory, run npm install -g gulp and npm install as written in the readme.
In the TypeScript directory, run gulp local.

However,  the console window now looks like this since 10 mins, and there is no harddisk or network activity (however there is 100% usage for 1 CPU core):

Any idea what could be causing this?
Thanks!

Exactly the same!

Even gulp clean hangs with the same symptoms

Looks that it is not a Windows specific problem - I'm on OSX 10.11.5

Something strange happens, when loading tsconfig (which is absent for the TypeScript project itself, ts-node scans all the files in TypeScript/tests/baselines/reference/project and does it extremely slow. Investigating further.

getFileMatcherPatterns produces extremely inefficient RegEx for includeFilePattern.
It hangs (actually take very long time) on long file names.
the culprit:
/^((\/Users\/aar\/type\-type\/TypeScript(\/[^\/.][^\/]*)*?\/([^.\/]([^.\/]*(\.(?!min\.js$))?)*)?))$/.test(
"/Users/Artazor/repo/TypeScript/tests/baselines/reference/project/declarationsImportedUseInFunction/amd/useModule.d.ts")

Will investigate further and probably make a PR with fix

@weswigham can u take a look

/^(((/[^/.][^/])?/(^./*)?))$/  - has a catastrophic backtracking

The problematic regexp is built right here: https://github.com/Microsoft/TypeScript/blob/8b2ea398ffc54f96018e40091d1827cb81d5ee39/src/compiler/core.ts#L944

The problem was introduced (I suspect) by the commit https://github.com/Microsoft/TypeScript/commit/8325565f0ac8783895b0f1b5a16273526326ae4a

the problem is not caught by tests because fileName values used in tests are too short. performance problems start to be observable starting from 130 characters (on my machine) and quickly grow with the length.

All tests are passed

 const singleAsteriskRegexFragmentFiles = "([^./]*(\\.(?!min\\.js$))?)*";   // BEFORE
 const singleAsteriskRegexFragmentFiles = "([^./]|(\\.(?!min\\.js$))?)*";    // AFTER

I've changed '' to '|' because all the group is repeated as '' and the (\.(?!min\.js$)) is optional.
It keeps the semantics.

@mhegazy maybe it would be worth to create another issue, related to the unacceptable regexp in core.ts ?

This change in ts-node (which reads our Gulpfile.ts and compiles it) is what triggered the exposure of this bug. (And so is also likely the cause of the following errors once the RegExp DOS issue is fixed)

I've merged the RegExp DOS fix and opened an issue on ts-node about the behavioral change. While that is getting looked at, I've locked out package.json to version 1.1 of ts-node.

authors: Artazor kpreisser mhegazy weswigham


text:
add Array.prototype.filter signature with type guard

10027 also didn't add the overload to Array#filter, only to ReadOnlyArray#filter. @mhegazy could you reopen this issue?
-- Arnavion's comment

This only adds it to ReadOnlyArray though. Also need it for regular Array.
-- Arnavion's comment

See #7657 and #10027

Hi @maiermic, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

thanks @maiermic, some baslines changed, you will need to do a gulp baseline-accept

@mhegazy Thanks, I appreciate your help.

waiting on the CI.

@mhegazy Two tests failed on my machine. I ran gulp baseline-accept a second time and it modified two more files. I guess all tests will pass now, but this time I wait until my local test runner is done.

@mhegazy Is it possible to merge this?

Sorry this fell off my list for a while. one more comment, we need to update the filter method on ReadOnlyArray, and the TypedArray varients, e.g. Int32Array (all in the same file).

@mhegazy This pull request only updates filter on Array. I updated filter on ReadOnlyArray in #10027 (already merged). TypedArray varients cann't use a type guard. They are not generic and contain always the same type. No update possible. So it should be possible to merge this.

Any updates here?

@mhegazy Could you review again taking into account latest comment https://github.com/Microsoft/TypeScript/pull/10916#issuecomment-273578660?

@maiermic @mhegazy any updates? I could resolve the conflicts and create new pr if you need.

@teppeis Conflicts are resolved by my latest update. I'm waiting for @mhegazy to merge.

What's the status on this?

@mhegazy @maiermic What is happening with this?

This has been solved by #16223 in the meantime.

authors: NaridaL bcherny ikokostya maiermic mhegazy msftclas mysticatea teppeis


text:
Allow export default abstract class. Related to issue 3792.

Fixes (part of) #3792

@erikmcc,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla.microsoft.com.
It will cover your contributions to all Microsoft-managed open source projects.
Thanks,
Microsoft Pull Request Bot

@erikmcc, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.
Thanks, Microsoft Pull Request Bot

👍 LGTM

Awesome!
It is a shame this doesn't support interfaces. I tend to abide by the rule that says if you have only one export, it should be the default, and I apply this even to interfaces.
Regardless, I'm really glad to see this. Thank you!

I'm planning on fixing that next. I just wanted to see what the PR
submission process was like before investing too much time.
On Mar 31, 2017 3:26 PM, "Aluan Haddad" notifications@github.com wrote:

Awesome!
It is a shame this doesn't support interfaces. I tend to abide by the rule
that says if you have only one export, it should be the default, and I
apply this even to interfaces.
Regardless, I'm really glad to see this. Thank you!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/TypeScript/pull/14657#issuecomment-290846489,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANbipOT8DVQ6v40yfrRGD0XRkWaA52A_ks5rrX2CgaJpZM4MdGCI
.

@erikmcc Does it make sense that I'm still getting an error if I use the export = syntax (for example, export = abstract class A)?

We are not planning on changing the export =  at the time being.

authors: BehindTheMath DanielRosenwasser aluanhaddad erikmcc mhegazy msftclas


text:
external modules resolve by node_modules and package.json-main

Code for #2338. This is just for the node_modules resolution. Does everything for node_modules except for the typings stuff as I don't see the rational for that considering there is no way to have tsc send .js to one location and .d.ts to another location.
[](No longer relevant :
using ts.sys.fileExists doesn't work under the test harness because it doesn't give actual file system paths. So tests are broken by this commit. What is the best way to overcome this. I have reviewed previous work that uses program.getSourceFile (which resolves to this code) to do exists checks and read package.json and that feels very ugly. How would you guys recommend authoring the resolveExternalModule function.)

How would you guys recommend authoring the resolveExternalModule function.

I've added a commit which gets the tests passing to demonstrate the issue : https://github.com/Microsoft/TypeScript/commit/a7819160fed625aa9d45336ce38d67a79f70ff35

Thanks for the PR @basarat - I got the chance to discuss it a bit with @vladima and apparently there are some subtleties on our end, some of which pertain to language service scenarios. Vlad has some existing work on this, and may be able to explain a bit more.

apparently there are some subtleties on our end, some of which pertain to language service scenarios

If it is because the language service didn't get such a resolved file as a part of its original file set : then this can be solved by lazily expanding the file set : https://github.com/TypeStrong/atom-typescript/blob/8df1482222fb88363b504d9c27f98692e938e44f/lib/main/lang/core/languageServiceHost2.ts#L353-L358 I've tried the code in this PR with atom-typescript and it works like a charm :rose:

I guess main points of inconvenience on our end are:

when language service is hosted inside the VS you in general don't have access to all sys functionality meaning that operations like isDirectoryExists, isFileExists and readFile should be delegated to the host.
the way how VS side works today is slightly different from the model used by tsserver. Main difference is that currently VS pre-resolves all tripleslash-refs/imported files before creating script language service so if resolution process will be just changed on the script side - this will break VS integration.
per #2338 we would like to have ability to switch module resolution from node style (with folder walks) to requirejs (that will use baseURL) and vice versa. Ideally module resolver should just a function (moduleName: string, containingFile: string, compilerHost: CompilerHost) => string so if somebody needs more involved method to resolve modules - he can do this by just replacing this one part. It does not directly contradict with proposed solution - it just needs to be slightly reshaped.

I guess main points of inconvenience

@vladima Taking your points into consideration I guess you are recommending:

adding readFile and fileExists to host ... and then using sys inside host.
after that refactoring use the resolver function to be (moduleName: string, containingFile: string, compilerHost: CompilerHost) => string and use host.readFile/host.fileExists inside.

So:

^ Is the refactoring I am suggestion correct?
What is shim host? < you might same me some time digging through the code :)

What is shim host?

do you mean this guy ? The idea behind it (and shims in general) is that they act as a send\receive proxies whose purpose is to extract incoming parameters from JSON, call corresponding method on the language service instance, wrap its return value to JSON and send it back.

Is the refactoring I am suggestion correct?

In general yes, you got the idea. I need to think more about details of interaction with VS that should be handled.

do you mean

Yup. Thanks. I'll see if it comes up in this refactoring (I am sure it will) :)

In general yes, you got the idea

I'll give it a go :rose:

Investigating a better method

Pushed https://github.com/basarat/TypeScript/commit/a17c6aaec3b25624111c3fcd8026b5af2340c471
The  current changeset is ready for an early review if anyone is interested. I'm moving on to adding tests for this.

Tests pushed. The PR is ready for review :+1: :rose:

I don't believe this technique is a good idea for large application development.  Auto-detection is nice for toy projects (hello world apps, scripts, etc.) but has potential for causing headaches and very difficult to track down bugs in large applications.
An example would be if you bring in a new node module that happens to share a name with an existing library you (or someone else) wrote and is resulting in a name collision.  In this case you will end up pulling in the wrong typings when importing without realizing it.  If both imported types have similar structure it further complicates the matter because things will look mostly right.
Also, this would need to filter out devDependencies.  If I have underscore as a dev dependency and import it with import underscore from 'underscore'; TSC will find the dev dependency and bring in the typings, telling me everything compiled fine.  However, when I go to deploy underscore won't be bundled/deployed because it was listed as a devDependency.  If lucky, it wouldn't build on the build server... if not so lucky you'll just have production builds that fail to work properly.
Personally, I am a much bigger fan of an explicit mapping in tsconfig.json.  While people may be turned off by the idea of having to populate that file by hand, it should really be auto-generated by tooling in most cases (see JSPM, Visual Studio C#, etc.).  The explicit mappings makes troubleshooting easier because there is no "magic" mapping behind the scenes at compile time, the magic happens at tooling time.  I believe it is also easier to document behavior of.
If it is decided to keep auto-mapping like this, I would recommend a configuration flag that can disable it.

Ah, I should have put these comments over in #2338.  For some reason I thought this PR was for #2839, I must have got them mixed up in my head.  Will leave comment above to avoid confusion for people who already received email notification, feel free to delete it if desirable.

TSC may not be able to output a d.ts to a separate location, but a post-compile build step easily could.  It seems to be fairly common for typings to sit in a typings directory.
That being said, I believe there is value in setting a standard for how people should distribute their TS/JS packages (no typings folder) and expand it later if necessary.

believe there is value in setting a standard for how people should distribute their TS/JS packages (no typings folder) and expand it later if necessary.

Thanks :heart:
Also at the moment the typings from the typings property are currently of the form declare module "foo/bar" and those typings are not the target of this PR anyways :rose:

:+1: on this functionality!

I've pulled with PR into the moduleResolution branch in this repo - this will cover node related part of #2338 and the rest of the work on this proposal will be continued in that branch.
Thanks!

Thanks @vladima!

This should be in the 1.6 release

authors: DanielRosenwasser Zoltu basarat mhegazy poelstra vladima


text:
Unused identifiers compiler code

Fixes #

Hi @sarangan12, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

Please add tests for

parameter properties that are private/public/protected/readonly.
getter and setters
setter parameters
interface members, ambient class
unused namespaces, enums
unused imports
catch variables
unused type aliases
unused declarations in for, for..in, for..of
parameters referencing each other in parameter list
parameters of an abstract method
unused values exported through export statements i.e. export { x }

thanks @sarangan12, and sorry for the delay. just a few more comments.

@mhegazy Changed the code per PR comments and also added the scenario for TypeParameters in interfaces. Kindly review

👍

You do not need the import, it contributes nothing to the module augmentation.

If I remove the import I get Ambient module declaration cannot specify relative module name.

The file needs to be an external module. at least one import of export declarations. so you could either add an import without a name binding:
import "./b";
``

or add an empty export:

```ts
export {};

I already tried to import it without a name which results in: '"./b"' is declared but never used.

Also to be more precise I'm actually using the imported Member in the first file. So the code looks more like:
a.ts
import { Member } from './b';

declare module './b' {
  interface Member {
  }
}

const m: Member = ...;
export m;

that is a bug then. let me see why it is happening.

I have a fix out in https://github.com/Microsoft/TypeScript/issues/9434

authors: ligaz mhegazy msftclas sarangan12


text:
Prompts for authentication for each new repo

I have multiple repositories using VFSforGit stored on the same server. Each time I try to clone a new repository with gvfs clone, I'm prompted to log in again and must enter my username, password, and a 2FA code.
Instead, VFSforGit should prompt once to acquire a personal access token and store it in the credential manager for reuse across all repositories on that server, as upstream Git does. If the user requires different credentials for different repositories, then they can set the credential.useHttpPath option in their configuration to specify this, and VFSforGit can then prompt them each time.

Hi!
Great feedback. We effectively force credential.useHttpPath for all of our VFS4G repositories currently, as some remotes require it to authenticate as expected - in particular internal repositories that we support. This is unnecessary (and has negative consequences) in general.
I think one option is for our team to handle setting the useHttpPath as an internal concern (e.g. in our internal setup) rather than pushing this behavior into the general behavior for VFSForGit.

Addressed with #939

repo: Microsoft/VFSForGit


text:
Add CFNetwork.dll to NuGet package

CFNetwork.dll is now a required framework library, so I'm adding it to the NuGet package.

This change is

@bbowman is added to the review. #Closed

:shipit:

<version>1.0.0</version>

should be bumped no?

Refers to: build/nuget/WinObjC.nuspec:5 in 08bff3a. [](commit_id = 08bff3ab1f2933749080aab51a25cf7cf3b9e1c9, deletion_comment = False)

:clock1:

:shipit:

<version>1.0.0</version>

Also thinking but we probably should be 0.0.X since we technically haven't released a first truly usable package. We are still in "beta"/development with these packages.

In reply to: 259294852 [](ancestors = 259294852)

Refers to: build/nuget/WinObjC.nuspec:5 in 08bff3a. [](commit_id = 08bff3ab1f2933749080aab51a25cf7cf3b9e1c9, deletion_comment = False)

@bviglietta is this still needed?

authors: bbowman bviglietta memontic-ms rajsesh-msft

repo: Microsoft/WinObjC


text:
Jwilaby/chatdown typescript

Proposed Changes
Converted Chatdown to use TypeScript for better organization and maintenance.

Pull Request Test Coverage Report for Build 1929

0 of 0   changed or added relevant lines in 0 files are covered.
14 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.09%) to 68.61%

Files with Coverage Reduction
New Missed Lines
%

packages/Chatdown/lib/index.js
1
95.26%

packages/Chatdown/bin/chatdown.js
13
84.25%

Totals

Change from base Build 1920:
-0.09%

Covered Lines:
4082

Relevant Lines:
5632

💛  - Coveralls

Tagged to 4.4, per @sgellock

This is now a bit stale, so I'm going to abandon this PR.  Let me know if you need a hug.

authors: cleemullins coveralls justinwilaby sgellock

repo: Microsoft/botbuilder-tools


text:
Proposal: treat CompletionItem#description as markdown

In the polymer language server we have the same documentation available for a symbol whether we're autocompleting it or giving the docs on hover. I expect most other servers to be in a similar boat. The markdown rendering for hover documentation is great, and we'd like to have similar rendering for the same content.

In general whenever the LSP passes a strings to be displayed to the user (also showMessage for instance) it should allow the same kind of mark up.
Always assuming markdown seems good enough to me.

@dbaeumer Yeah, I'm talking about documentation. No opinion on details.

Yes - we have request to allow markdown in more places but haven't tackled that yet

@jrieken cool. We keep it as a feature request then.

The PHP stubs for the PHP standard libraries all contain HTML in their docblocks, which looks awful at the moment. Using markdown in docblocks is very common, and would also solve the HTML case, since markdown can contain HTML.

and would also solve the HTML case, since markdown can contain HTML.

fyi - we currently don't allow html in markdown

Any reason why?

script execution

Good point, but I think it would be pretty easy to not allow any <script>, <style>, onclick etc. but only basic elements like <b>, <br>, <table>. If the markdown parser you're using doesn't provide this, sanitize-html is super easy to use.

I still haven't found a complete list of onclick etc attributes...

Instead of blacklisting all script execution attributes, you can just whitelist safe attributes. Normally you don't use that many attributes in HTML in markdown, it's mostly basic elements like the ones I mentioned above that could also be represented in markdown.

Would also love it if the documentation field on CompletionItem supported Markdown.

See https://github.com/Microsoft/vscode-languageserver-node/pull/276

Implemented in the npm node modules as speced in the protocol in a backwards compatible way.

Besides CompletionItem, SignatureHelp can provide Markdown as well.

authors: dbaeumer felixfbecker jrieken rcjsuen rictic svenefftinge

repo: Microsoft/language-server-protocol


text:
onDidChangeModelContent fired twice?

monaco-editor version: 0.9.0
Browser: Chromium (Electron)
OS: Windows 10 64bit
Steps or JS usage snippet reproducing the issue:
I subscribe to the onDidChangeModelContent event of an editor, for each character I type, I receive two identical IModelContentChangedEvent objects one after the other.
Is it only me?

Never mind, turns out I had the same model bound to two editors, so obviously also the editor on which the change didn't originate gets notified of the change. I didn't notice before but it makes sense.

repo: Microsoft/monaco-editor


text:
Nuget package installation continues if Init.ps1 fails

Steps to reproduce
Install a Nuget package that executes an Init.ps1 script during the installation. The script ends with Exception (we use throw, and also tried Exit 1 or Exit -1), but the installation continues.
Expected  behavior
We expected that the installation would fail upon Init.ps1 failure.  Basically we have dependencies on external binaries. If the binaries are not found in the system, installation should fail, as our Nuget is not usable.
Actual behavior
Installation continues if Init.ps1 terminates with error.
Environment data
msbuild /version output:
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
15.7.179.6572
OS info:
Windows 10
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):
Visual Studio Community 2017 Version 15.7.3

This issue was moved to NuGet/Home#7039

authors: jpsalada rainersigwald

repo: Microsoft/msbuild

license: mit


text:
Add more manifest schemas to repo?

I noticed that the manifest schema resources stop at the end of 2017. Is there any chance that the new MSIX manifest schemas from Windows 10, 1803, 1809, and 19H1 (when they're ready, for that last one) can be added to this repository? I find this is the most convenient place to reference AppX/MSIX schema details. Thanks!

We will update the schemas when 19H1 ships

Schemas added as of PR #82.

authors: msftrubengu wjk

repo: Microsoft/msix-packaging


text:
added 4.1.7 to changedlog

Added Windows/Linux/MAC 4.1.7 to Changelog

Coverage remained the same at 53.158% when pulling 5763680dff1898691d8cf7af04f6ec4458b7305f on v-kaywon:changelog_7.1.7 into 9d7a79270b243aac9bcbdd3884f10fea826f56c2 on Microsoft:dev.

Coverage remained the same at 53.158% when pulling f6a35a39f6a3834e55a44c4569945437ce244812 on v-kaywon:changelog_7.1.7 into 9d7a79270b243aac9bcbdd3884f10fea826f56c2 on Microsoft:dev.

Coverage remained the same at 53.158% when pulling f6a35a39f6a3834e55a44c4569945437ce244812 on v-kaywon:changelog_7.1.7 into 9d7a79270b243aac9bcbdd3884f10fea826f56c2 on Microsoft:dev.

Coverage remained the same at 53.158% when pulling f6a35a39f6a3834e55a44c4569945437ce244812 on v-kaywon:changelog_7.1.7 into 9d7a79270b243aac9bcbdd3884f10fea826f56c2 on Microsoft:dev.

authors: coveralls v-kaywon

repo: Microsoft/msphpsql


text:
TimeoutTimer thread pool max

Hello,
I noticed the TimeoutTimer in older versions started a thread for every query that had a query timeout greater than 0. Then I saw in https://github.com/Microsoft/mssql-jdbc/issues/150 someone had reported it. https://github.com/Microsoft/mssql-jdbc/pull/162 fixed it.
Not sure if I'm missing something, but how is this problem fixed? In TimeoutTimer the executor service is using a cached thread pool via java's helper methods in ExecutorService. This creates a thread pool with a core pool size of 0 and a max pool size of Integer.MAX. If I'm reading that correctly, if I spawn 1k queries at once with timeouts, I will have 1k additional timeout threads (since no max on the thread pool exists). Seems like the problem still exists, you've just capped the max number of threads that could get created from unlimited to Integer.MAX by using a thread pool.
How come we can't do something like what the oracle jdbc driver does? They have one thread that all queries (that have a timeout) register with and that thread polls every second checking if they should interrupt each thread running the query?
Forgive me if I'm missing something with the original proposed fix

Hi @shayaantx ,
Please provide a repro code, we will investigate and get back to you.

I can attempt to write some reproducible code, but I mean I think the latest code highlights the issue I described.
In the TDSCommand and TDSReader objects, you guys use the class TimeoutTimer (if users of the driver set a query timeout greater than 0). This class has two methods that use a static final ExecutorService that is created once via Executors.newCachedThreadPool(new ThreadFactory()). That specific implementation makes a thread pool that has a max size of Integer.MAX_VALUE, this type of thread pool will reuse threads if they are available, but since the max is such a large number you can run the pool up as many threads as you need.
So if I run 5k queries at once with 5k timeouts configured, depending on how fast each query executes, you could have 10k threads in use, instead of 5k. Obviously this is an extreme case, but the same problem would appear with 500 simultaneous queries configured with timeouts (which in my use cases, is normal amount of queries to run in parallel).
The design here of the query timeout logic seems inefficient. You are creating one timer thread for every query being run at any given time with a query timeout. Oracle doesn't have this problem, mysql has the same issue (https://github.com/mysql/mysql-connector-j/blob/1f61b0b0270d9844b006572ba4e77f19c0f230d4/src/com/mysql/jdbc/StatementImpl.java#L67).
I understand timeouts may be rarely used, but still seems like something worth fixing. The only workaround we implemented was just setting keep alive timeouts at the OS level.

Hi @shayaantx ,
I looked into this a bit and agree that in a multi-threaded environment (where every thread has its own connection) each query with timeout creates a new thread. I will label this as an enhancement, we will investigate what needs to be done to improve.

@ulvii Appreciate it
If I wanted to enhance it myself would you guys consider adding it to the main src?

Hi @shayaantx ,
Definitely, we appreciate contributions from the community. Please create a PR against the dev branch, the team will get it reviewed.

#782 is merged.

authors: shayaantx ulvii

repo: Microsoft/mssql-jdbc


text:
Auto-Dts: Add PackageSet collection

Adds a basic collection type to manager and compare sets of packages. This makes it easier to track what package  have been added or removed (we currently rely on UI nodes to track the current state.)

Hi @mjbvz, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Matt Bierner). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

authors: mjbvz msftclas

repo: Microsoft/nodejstools


text:
Revert Softmax optimizations using openmp.

squash related reverts together:
Revert "Simpler unused parameter in #if defined() switch."
This reverts commit 6b00e6bb4df23e77da73b72c67ff98ba605712f1.
Revert "Better opemmp parallel group count calculation in Softmax parallel running."
This reverts commit c530064ebe912621ac5627bc486c62356fbd1eeb.
Revert "Optimize softmax cpu by parallel using openmp."
This reverts commit e7bdfa00db1d0e9909f1d0d5e159173e3fbd608f.

What's the reason for reverting?

      What's the reason for reverting?

The perf gain is too small to the transformer model currently after it use dynamic input sequence length. And we do  not have enough real data to do the perf tuning based on this change.

authors: pranavsharma zhanghuanrong

repo: Microsoft/onnxruntime


text:
hadoop-resource-manager-ds Liveness probe failed

Organization Name:

Short summary about the issue/question:
集群部署完成后hadoop-resource-manager-ds出现问题
Brief what process you are following:
集群已经搭建完成   可以新建job但无法打开job详细页面
Liveness probe failed: HTTP probe failed with statuscode: 404
Back-off restarting failed container

<!--deployment related issues
Please fill this for deployment related issues:
- Operating type: Initial deployment

**OpenPAI Environment**:
- OpenPAI version:v0.11.0
- Cloud provider or hardware configuration:
- OS (e.g. from /etc/os-release):ubuntu 16.04
- Kernel (e.g. `uname -a`): 4.4.0-131-generic
- Hardware (e.g. core number, memory size, storage size, GPU type etc.):
    master:62G mem    2 cpu
    node1: 48G mem    2cpu    4 TitanX GPU
   node2:48G  mem    2cpu     4 Tesla K80
- Others:

可以新建job但无法打开job详细页面

job详细页面是指哪个，另外请提供集群的版本

可以新建job但无法打开job详细页面

job详细页面是指哪个，另外请提供集群的版本

就是MarketPlace中创建的job不能点开job项目，但是自己创建的任务可以打开
版本是v0.11.0
目前由于问题没有解决，使用了v0.9.1
v0.9.1版本中Hardware无法显示，其他功能正常

@qzwlinux
Does liveness probe failure exist in v0.9.1? If not, we could rename this issue.

不好意思  跨版本提问了  可以删除这篇文章

@qzwlinux
Does liveness probe failure exist in v0.9.1? If not, we could rename this issue more appropriate.

不好意思 跨版本提问了 可以删除这篇文章

Feel free to reopen it

authors: mzmssg qzwlinux

repo: Microsoft/pai


text:
Spring Boot 2.0 M6 support

@yungez @yaweiw

close this one since sb 2 is supported in seperate PR #11

authors: ZhijunZhao yungez

repo: Microsoft/spring-data-documentdb


text:
Add info/warning/error messages for wizards and dialogs

This PR adds info/warning/error messages for wizards and dialogs in order to mitigate the issue in #1626 where there is no good way to notify users when something goes wrong.

Here's the code sample to create that message:
let customButton = sqlops.window.modelviewdialog.createButton('Message');
customButton.onClick(() => {
	if (wizard.message) {
		wizard.message = undefined;
	} else {
		let level = Math.floor(Math.random() * 4);
		if (level === 3) {
			level = undefined;
		}
		wizard.message = {
			text: 'This is a test error message',
			level: level
		};
	}
});
wizard.customButtons = [customButton];

@corivera and @kevcunnane please let me know if this API looks good to you or if there's anything else you need here

Does the message field have a fixed height, or does it scale with the length of the message?

Also, is the message field always an error message, or does the level determine error/warning?

@corivera the level determines if it's shown as an error, info, or warning. There are different icons for each. If the message is long enough to require it, the message will have a vertical scrollbar so that the user can see the whole thing.

authors: MattIrv corivera

repo: Microsoft/sqlopsstudio


text:
Added preview messages to Edit Agent scenarios

Added 'Feature Preview' tags to Edit scenarios where the lists of Alerts/Steps/Operators weren't being populated.

@abist could you please add a screenshot to the PR comments?  We need to run this by @vickyharp and @yualan prior to merging.

authors: abist kburtram


text:
Add OE node refresh API method

At @ronychatterjee's request I added a way to programmatically refresh object explorer nodes from extensions and from inside Ops Studio

@MattIrv I'll merge to pickup in tonight's build.

authors: MattIrv kburtram


text:
Enable MSTest framework based tests targeting .NET Core to be run and debugged from within VSCode

As of C# for Visual Studio Code extension: 1.9.0, only xUnit and NUnit based tests targeting .NET Core can be run and debugged from within VSCode.
This issue tracks the addition of MSTest support.
linked: omnisharp-vscode #1482

omnisharp-vscode #1482

This has been fixed in https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.10.0-beta3.

authors: AbhitejJohn pvlakshm

repo: Microsoft/testfx


text:
Typings with typescript 2.2 not working UNMET PEER DEPENDENCY

➜  cms-ts git:(master) ✗ npm install @types/body-parser --save-dev
cms-ts@1.0.0 /home/chris/www/cms-ts
├── @types/body-parser@0.0.33
└── UNMET PEER DEPENDENCY typescript@2.2.0-dev.20161112 extraneous
npm WARN gulp-typescript@3.1.2 requires a peer of typescript@~2.0.3 || >=2.0.0-dev || >=2.1.0-dev but none was installed.
npm WARN cms-ts@1.0.0 No description
npm WARN cms-ts@1.0.0 No repository field.

@cdekok Please see the warning:

npm WARN gulp-typescript@3.1.2 requires a peer of typescript@~2.0.3 || >=2.0.0-dev || >=2.1.0-dev but none was installed.

It's a warning from gulp-typescript.

Oops you are correct will report it there

authors: blakeembrey cdekok

repo: Microsoft/types-publisher


text:
Release 5.1

Prerequisites
PowerShellGet >= 1.6.0
Necessary for -AllowPrerelease flag on Install-Module.
Open PowerShell as Administrator
PS> Install-Module -Name PowerShellGet -Repository PSGallery -Force -AllowClobber -MinimumVersion 1.6.0

UnitySetup == 5.1.123-develop
Open PowerShell
PS> Install-Module -Name UnitySetup -AllowPrerelease -RequiredVersion 5.1.123-develop -Scope CurrentUser -Repository PSGallery

Enhancements and Fixes

[ ] Install support for MacOS
[ ] Progress UI for download phase
[ ] Installs to Unity Hub location by default.
[ ] Support project paths with spaces
[ ] Adds Get-UnityEditor command for discovering the editor app in a UnitySetupInstance.
[ ] Start-UnityEditor support for Unity Run mode unit tests args.

[ ] TestPlatform
[ ] TestResults
[ ] RunTests

[ ] Start-UnityEditor -AdditionalArguments to pass arbitrary args to Unity
[ ] Support for Product Names in UnityProjectInstance
[ ] Support for Unity 2019
[ ] Support for Lumin

Cmdlet Smoke Tests
Please explore the below Cmdlets via help <cmdlet> to attempt to understand them, use them, and report any ideas or issues as issues here on GitHub.

[ ] Get-UnityProjectInstance
[ ] Get-UnitySetupInstance
[ ] Test-UnitySetupInstance
[ ] Find-UnitySetupInstaller
[ ] Request-UnitySetupInstaller
[ ] Select-UnitySetupInstaller
[ ] Install-UnitySetupInstance
[ ] Select-UnitySetupInstance
[ ] Uninstall-UnitySetupInstance
[ ] Get-UnityEditor
[ ] Start-UnityEditor
[ ] ConvertTo-UnitySetupComponent
[ ] Get-UnityLicense

DSC Resource Smoke Tests
Please explore the features of the resource, create a configuration, and apply it to a Local Configuration Manager. Recommend standing up a VM or Container for testing these.

[ ] xUnitySetupInstance
[ ] xUnityLicense

I'd like to get #163 resolved before moving this in.

Should Lumin show up when just doing a Find-UnitySetupInstaller 2019.1.0f1? If I do Find-UnitySetupInstaller 2019.1.0f1 -Components Lumin I do see it.

Probably for f1 but f2 yes

authors: StephenHodgson Ziugy jwittner


text:
[WIP] Replace lkg fslex/fsyacc with FsLexYacc package

ref #959

[X] remove lkg binaries
[X] use fslex, fsyacc and msbuild task from FsLexYacc package
[ ] update FsSrGen with visualfsharp prim-{lexing,parsing} (the fslexyacc runtime) improvements
[ ] use source of FsLexYacc runtimes ( Lexing.{fs,fsi} and Parsing.{fs,fsi} ) from a nuget package

The final version will use Lexing/Parsing runtime source from a nuget package, atm i replaced the src/utils/prim-{lexing,parsing} with src/utils/{Lexing,Parsing} source from FsLexYacc repo to make it easier to review differences
to review diff, check diff of commit cf9e09e /cc @dsyme

Thanks for doing this, can you also make sure that there is coreclr build of these two tools, because it's neceeary for cross plat.

@KevinRansom the coreclr version already exists, i discussed with @dsyme and he said to:

use FsLexYacc package
align FsLexYacc and current visualfsharp version of utils/prim-{lexing,parsing}.fs
use runtimes source files from a nuget package of FsLexYacc.Runtime.Sources (i'll create it) instead of reference FsLexYacc.Runtime.dll

After is ok and merged in master, we just use the .NET Core version in coreclr branch (with the new dotnet-fslex and dotnet-fsyacc dotnet cli tools for project.json. xplat ready)

@enricosada
Hey mate, lets try to make these two cross platform dotnet cli commands.  There isn't any real reason for it to be a windows app.

@KevinRansom make a dotnet cli command is easy (there is already in the repo).
Main work atm is merge the two versions there and in the https://github.com/fsprojects/FsLexYacc and resolve the issues in the previous comments. And create a new exe.
After that, do a dotnet cli command is really easy, it's the same codebase. I'll do that for sure!

Don did something similar recently.  Closing.

authors: KevinRansom enricosada

repo: Microsoft/visualfsharp


text:
Update mef_library_differences.md

link wasn't working.

Thanks

authors: AArnott pjchristmas

repo: Microsoft/vs-mef


text:
Feature Request: When copying from the REPL and pasting into a py file remove >>> prompts and comment non-code

Issue Type: Feature Request
When copying from the REPL and pasting into a py file,
remove >>> prompts and comment non-code.
Similar to PastePyShell.py in
http://idlex.sourceforge.net/extensions.html
Extension version: 2019.1.0
VS Code version: Code 1.30.2 (61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8, 2019-01-07T22:54:13.295Z)
OS version: Windows_NT x64 6.1.7601

Thanks for the suggestion, but we'd recommend using the Python Interactive window instead for this scenario. The terminal is not very advanced in terms of it's capabilities.

authors: jcrmatos qubitron

repo: Microsoft/vscode-python


text:
Ctrl + H should be mapped to editor.action.startFindReplaceAction #38

This change corrects the replace key mappings found in sublime text

Whoops. I missed this. Thanks for the PR! Just pushed the fix as well.

authors: ryansonshine waderyan

repo: Microsoft/vscode-sublime-keybindings


text:
Editor does not open when working offline

VSCode Version: Code 1.4.0 (6276dcb0ae497766056b4c09ea75be1d76a8b679, 2016-08-04T16:45:31.680Z)
OS Version: Windows_NT ia32 10.0.10586

I am trying to edit some php, html, css and js file on my local development machine, while working I had turnoff the internet. To my surprise it does not open when I double click on the icon from my desktop. I have also tried several other way to open it but no luck.
I turn on the internet and it is working again. This is strange for me
Steps to Reproduce:

Turn off the internet
Open it

Marking as duplicate.

authors: bpasero sanjayojha

repo: Microsoft/vscode