profile
viewpoint

vscodewinodws/runtime 0

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.

issue commentdotnet/runtime

SafeHandle use-after-dispose in FileSystemWatcher on OSX

It is happening ~8 times a month, across all macOS versions...

WorkItems
| where Finished > now(-90d)
| where FriendlyName startswith "System.IO.FileSystem.Watcher.Tests"
| where ExitCode == 134
| join kind=inner Jobs on JobId
| where Branch == "refs/heads/master"
| sort by Finished desc
| summarize count(), any(ConsoleUri) by bin(Finished, 1d), ExitCode//, QueueName
| render columnchart  with (ycolumns = count_, xcolumn = Finished, series=ExitCode, yaxis=log) //, QueueName
stephentoub

comment created time in a minute

issue openedAzure/azure-storage-azcopy

azcopy - copy from AWS S3 to Azure Blob Storage throws CannotVerifyCopySource Error

Which version of the AzCopy was used?

azcopy verison 10.8.0

Which platform are you using? (ex: Windows, Mac, Linux)

Windows

What command did you run?

azcopy cp "https://s3.amazonaws.com/[bucket]/" "https://[destaccount].blob.core.windows.net?[SAS]" recursive=true

What problem was encountered?

S3 bucket has multiple folders and sub folders with different types of files (such as text, gif, avro, parquet, etc). Only few files were copied and failed with 1 file with below error

2021/01/18 03:30:42 ==> REQUEST/RESPONSE (Try=1/172.9497ms, OpTime=338.1054ms) -- RESPONSE STATUS CODE ERROR PUT https://<storageaccount>.blob.core.windows.net/<bucket>/cwl/error/processing-failed/2020/10/23/02/<filename>... Content-Length: [0] User-Agent: [AzCopy/10.8.0 Azure-Storage/0.10 (go1.13; Windows_NT)] X-Ms-Client-Request-Id: [9b71eda1-dadb-4d7a-5ca2-df2de62fe08d] X-Ms-Copy-Source: [https://<bucket>.s3.dualstack.ap-southeast-2.amazonaws.com/cwl/error/processing-failed/2020/10/23/02/<filename>.... X-Ms-Source-Range: [bytes=0-4439] X-Ms-Version: [2019-12-12]

RESPONSE Status: 403 Forbidden Content-Length: [200] Content-Type: [application/xml] Date: [Mon, 18 Jan 2021 03:30:40 GMT] Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0] X-Ms-Client-Request-Id: [9b71eda1-dadb-4d7a-5ca2-df2de62fe08d] X-Ms-Error-Code: [CannotVerifyCopySource] X-Ms-Request-Id: [25ffb88f-a01e-00b4-6b4a-ed735b000000] X-Ms-Version: [2019-12-12] Response Details: <Code>CannotVerifyCopySource</Code><Message>Forbidden </Message>

2021/01/18 03:30:42 ERR: [P#0-T#7] COPYFAILED: https://s3.ap-southeast-2.amazonaws.com/<bucket>/cwl/error/processing-failed/2020/10/23/02/<filename> : 403 : 403 Forbidden. When Staging block from URL. X-Ms-Request-Id: 25ffb88f-a01e-00b4-6b4a-ed735b000000

Dst: https://<storageaccountname>.blob.core.windows.net/ato-raw-pradeep/cwl/error/processing-failed/2020/10/23/02/<filename>?se=2021-01-18t11%3A27%3A06z&sig=-REDACTED-&sp=rwdlacupx&spr=https&srt=sco&ss=bfqt&st=2021-01-18t03%3A27%3A06z&sv=2019-12-12

2021/01/18 03:30:42 JobID=16f8c156-385c-4d4e-62c3-28b45b0a41cb, Part#=0, TransfersDone=56 of 56 2021/01/18 03:30:42 all parts of entire Job 16f8c156-385c-4d4e-62c3-28b45b0a41cb successfully completed, cancelled or paused 2021/01/18 03:30:42 all parts of entire Job 16f8c156-385c-4d4e-62c3-28b45b0a41cb successfully cancelled 2021/01/18 03:30:43 PERF: primary performance constraint is Unknown. States: W: 0, F: 0, S: 0, E: 0, T: 0, GRs: 32 2021/01/18 03:30:43

Diagnostic stats: IOPS: 21 End-to-end ms per request: 283 Network Errors: 0.00% Server Busy: 0.00%

Job 16f8c156-385c-4d4e-62c3-28b45b0a41cb summary Elapsed Time (Minutes): 0.0334 Number of File Transfers: 56 Number of Folder Property Transfers: 0 Total Number of Transfers: 56 Number of Transfers Completed: 0 Number of Transfers Failed: 1 Number of Transfers Skipped: 0 TotalBytesTransferred: 0 Final Job Status: Cancelled

How can we reproduce the problem in the simplest way?

AWS Set up an AWS account configure Access and secret keys create an s3 bucket with some files (source)

Azure Set up an Azure account Create storage account (destination) Create a SAS for storage account

Azcopy

Use AzCopy to copy data from AWS to Azure using the azcopy command provided above

The files in the AWS buckets have exactly same permissions as others that were copied successfully. But not sure what the issue was with this particular file. So, i can only reproduce this issue with this particular file.

Have you found a mitigation/solution?

No solution found.

But i deleted the file that caused this error but the error was raised on a different file that is similar to the other.

I also tried executing the azcopy command just for this file (instead of the entire bucket) and the same error was thrown.

created time in 2 minutes

push eventdotnet/roslyn

Martin Strecker

commit sha fd36740ef3523b4aa40423fa575fb93a5f2bcdd9

Add AbstractEnumCompletionProvider

view details

Martin Strecker

commit sha 01f3dcce4002959793b6a28108b2d45d8c33f1aa

Move GetPreselectedSymbolsAsync to AbstractEnumCompletionProvider

view details

Martin Strecker

commit sha 07d8ee1b8bb643d8dbc6b60ee4408f6c926464d3

Move GetSymbolsAsync to AbstractEnumCompletionProvider

view details

Martin Strecker

commit sha 1dc6293c4e2141655993976aa700c84e44f6f387

Move GetDisplayAndSuffixAndInsertionText to AbstractEnumCompletionProvider

view details

Martin Strecker

commit sha 495d5ace47c9dbf085048bb80f93aea93876a0ba

Move CreateItem to AbstractEnumCompletionProvider

view details

Martin Strecker

commit sha e8376311d7d8bf3e6f4f3d71541333885884c84d

Move GetTextChangeAsync to AbstractEnumCompletionProvider

view details

Martin Strecker

commit sha 9595681b4edb203b703b37e46581a9a0b53dda03

Bring "IsSkippedTokensTrivia" check back to AbstractEnumCompletionProvider (but I think the IsSkippedTokensTrivia extension method is buggy)

view details

Martin Strecker

commit sha 2d95d06441b632761357e43deebd4e313f856277

Add EnumCompletionProvider

view details

Martin Strecker

commit sha 284e17d738aada1932dea9b825ba178461087ed8

Fix completion provider order

view details

Martin Strecker

commit sha d6d29ddcd4e5ec5ed7937cf6ee8bd3c273b7cd9c

Format EnumCompletionProvider.cs

view details

Martin Strecker

commit sha d4573735c00454100a9b2a1044b4b0b5a1e3652f

Format AbstractEnumCompletionProvider

view details

Martin Strecker

commit sha 24b293b9b86eb22fc13a31cbf35a4cf16da20547

Format EnumCompletionProvider.vb

view details

Martin Strecker

commit sha 70ff8066c8e8cc5430e3ab5b6bfe1ef0d416a2ef

Fix syntax error in EnumCompletionProviderTests (VB)

view details

Martin Strecker

commit sha d7d76c8065d72a18af82f1b7ea76954c7b0e30fd

Convert (most) test cases from VB to C#

view details

Martin Strecker

commit sha bf139a33241b6844e8b88621f16a80da9ca435e4

Fix TestTriggeredForNamedArgument

view details

Martin Strecker

commit sha 12b0f6bdf2532424f87a0194a6c38f9f7b3eebf7

Add TestNotInTrivia

view details

Martin Strecker

commit sha c2c50f8487229995ca52c54fa732e2df1b225ebd

Apply suggestions from code review Co-authored-by: CyrusNajmabadi <cyrus.najmabadi@gmail.com>

view details

Martin Strecker

commit sha 3277eac8507ab3513778eed33c47c21c51c13d64

Fix compiler error after code review

view details

Martin Strecker

commit sha fa0f1d6b86bea259bbed2f1c379a932d487d2d0b

Fix stackoverflow in EnumCompletionProvider.vb GetDefaultDisplayAndSuffixAndInsertionText

view details

Martin Strecker

commit sha 8937b29358294f363f34790740fbfe4bbf05bf11

Remove unused variable.

view details

push time in 4 minutes

PR merged dotnet/roslyn

Enum values completion provider for C# Area-IDE Community

Fixes #47193

xu1IxT2zZ1

This PR basically brings the VB version of the enum values provider to C# by moving the existing logic to AbstractEnumCompletionProvider.

+1125 -84

15 comments

7 changed files

MaStr11

pr closed time in 4 minutes

issue commentmicrosoft/microsoft-ui-xaml

Cannot Submit Xaml Island App to Microsoft Store

@michalleptuch, yes I resolved it by adding the reference xaml island project into the installer project.

jindal1979

comment created time in 7 minutes

pull request commentmicrosoft/onnxruntime

Megatron checkpointing

The PR looks good to me except the CPU Execution Provider usage. Thanks a lot for adding tons of distributed test cases for both ZeRO + Megatron. This is awesome!

ashbhandare

comment created time in 8 minutes

issue commentdotnet/runtime

Assertion failed 'paddingToAdd == paddingNeeded'

C:\h\w\A4CC08D0\w\AFD5092E\e>"C:\h\w\A4CC08D0\p\dotnet.exe" exec --runtimeconfig System.Collections.Tests.runtimeconfig.json --depsfile System.Collections.Tests.deps.json xunit.console.dll System.Collections.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Collections.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Collections.Tests (found 5129 of 6996 test cases)
  Starting:    System.Collections.Tests (parallel test collections = on, max threads = 4)

Assert failure(PID 4600 [0x000011f8], Thread: 5480 [0x1568]): Assertion failed 'paddingToAdd == paddingNeeded' in 'System.Collections.Tests.LinkedList_Generic_Tests`1[Int32][System.Int32]:AddFirst_T_Tests():this' during 'Emit code' (IL size 758)

    File: F:\workspace\_work\1\s\src\coreclr\jit\emitxarch.cpp Line: 9417
    Image: C:\h\w\A4CC08D0\p\dotnet.exe

----- end Sun 01/17/2021  8:02:11.25 ----- exit code -1073740286 ----------------------------------------------------------

https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-master-a7ab659486744286af/System.Collections.Tests/console.8126f33e.log?sv=2019-07-07&se=2021-02-06T07%3A44%3A02Z&sr=c&sp=rl&sig=%2B3OjyHflp76my8yr6R5LOnyMZhn8z1g97ZEJjIiyqxE%3D

VincentBu

comment created time in 11 minutes

issue commentmicrosoft/TypeScript

Extending the system Error class does not work when transpiling to ES5

For reference, this is how Babel transpiles the above snippet:

"use strict";

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }

function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }

function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

var FooError = /*#__PURE__*/function (_Error) {
  _inherits(FooError, _Error);

  var _super = _createSuper(FooError);

  function FooError(m) {
    var _this;

    _classCallCheck(this, FooError);

    _this = _super.call(this, m); // Set the prototype explicitly.

    Object.setPrototypeOf(_assertThisInitialized(_this), FooError.prototype);
    return _this;
  }

  return FooError;
}( /*#__PURE__*/_wrapNativeSuper(Error));
octogonz

comment created time in 14 minutes

issue openedmicrosoft/TypeScript

Extending the system Error class does not work when transpiling to ES5

Bug Report

The system Error class cannot be extended without calling Object.setPrototypeOf() as a workaround, like this:

class FooError extends Error {
    constructor(m: string) {
        super(m);

        // Set the prototype explicitly.
        Object.setPrototypeOf(this, FooError.prototype);
    }
}

The TypeScript 2.1 release notes imply that this behavior is by design.

However when I proposed to add this workaround to the ANTLR4 runtime library, they observed that Babel injects the workaround automatically. Thus they concluded that this is a TypeScript bug rather than a problem with their library.

Is there some reason why TypeScript's transpiler cannot use the same solution as Babel?

🔎 Search Terms

setPrototypeOf extends Error

🕗 Version & Regression Information

Repros in TypeScript 4.1.3, first introduced in TypeScript 2.1.0

created time in 15 minutes

Pull request review commentmicrosoft/onnxruntime

Megatron checkpointing

 def _create_ort_training_session(self, optimizer_state_dict={}):                     else:                         raise ValueError("Optimizer attributes must be either float or int.") +        self.options.distributed.horizontal_parallel_size = max(self.options.distributed.horizontal_parallel_size, 1)+        self.options.distributed.data_parallel_size = int(self.options.distributed.world_size/self.options.distributed.horizontal_parallel_size)

you can use //, then don't need int cast.

ashbhandare

comment created time in 20 minutes

issue commentdotnet/runtime

Corrupt binlogs recorded on Linux using GZipStream

Binlogs uploaded by Tom are on corpnet at: kirillo2\public\Bugs\runtime47024

KirillOsenkov

comment created time in 23 minutes

PR closed Azure/azure-sdk-for-net

Reviewers
Supporting Availability set property in Azure Site Recovery for Vmware to Azure and Hyper V to Azure scenarios

Supporting Availability set property in Azure Site Recovery for Vmware to Azure and Hyper V to Azure scenarios

+24 -6

0 comment

5 changed files

vidyadharijami

pr closed time in 26 minutes

issue openedmicrosoft/vscode

Can't install vscode extensions

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ --> <!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --> <!-- Please search existing issues to avoid creating duplicates. --> <!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->

  • VSCode Version: 1.52
  • OS Version: 20H2,19042, widows 10,

When ever i try to install python or jupyter extensions, it shows an error. "[renderer1] [error] EPERM: operation not permitted, lstat 'c:\Users\ai.vscode\extensions.ms-toolsai.jupyter-2020.12.414227025\out\client\node_modules\zeromq\prebuilds\win32-x64\electron.napi.node': deleting: EPERM: operation not permitted, lstat 'c:\Users\ai.vscode\extensions.ms-toolsai.jupyter-2020.12."

<!-- Launch with code --disable-extensions to check. --> Does this issue occur when all extensions are disabled?: Yes

created time in 26 minutes

issue commentmicrosoft/vscode

Support multi cell selection in notebook

@claudiaregio they'd still appear on hover and whatever actions are taken there would apply for the selected cells. We'd only want to show actions that can be performed in bulk.

rebornix

comment created time in 29 minutes

PR closed chartjs/Chart.js

Add default export to esm build to make date adapters work

I'm currently getting:

WARNING in node_modules/chartjs-adapter-luxon/dist/chartjs-adapter-luxon.esm.js 23:0-5 "export 'default' (imported as 'Chart') was not found in 'chart.js'

The two choices here would be to add the default export here or to publish beta versions of the date adapters that use the named export

+4 -0

1 comment

1 changed file

benmccann

pr closed time in 30 minutes

pull request commentchartjs/Chart.js

Add default export to esm build to make date adapters work

Hmm. Actually if I downgrade chart-adapter-luxon it works again, so maybe this isn't necessary

benmccann

comment created time in 30 minutes

Pull request review commentdotnet/runtime

Improve Random (performance, APIs, ...)

 // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics;+using System.Numerics;+using System.Runtime.InteropServices;+ namespace System {+    /// <summary>+    /// Represents a pseudo-random number generator, which is an algorithm that produces a sequence of numbers+    /// that meet certain statistical requirements for randomness.+    /// </summary>     public class Random     {-        private static readonly Random s_globalRandom = new Random(GenerateGlobalSeed());-        [ThreadStatic]-        private static Random? t_threadRandom;+        /// <summary>The underlying generator implementation.</summary>+        /// <remarks>+        /// This is separated out so that different generators can be used based on how this Random instance is constructed.+        /// If it's built from a seed, then we may need to ensure backwards compatibility for folks expecting consistent sequences+        /// based on that seed.  If the instance is actually derived from Random, then we need to ensure the derived type's+        /// overrides are called anywhere they were being called previously.  But if the instance is the base type and is constructed+        /// with the default constructor, we have a lot of flexibility as to how to optimize the performance and quality of the generator.+        /// </remarks>+        private readonly ImplBase _impl;++        /// <summary>Initializes a new instance of the <see cref="Random"/> class using a default seed value.</summary>+        public Random() =>+            // With no seed specified, if this is the base type, we can implement this however we like.+            // If it's a derived type, for compat we respect the previous implementation.+            _impl = GetType() == typeof(Random) ?+                new Xoshiro256StarStarImpl() :+                new LegacyImpl(this);++        /// <summary>Initializes a new instance of the Random class, using the specified seed value.</summary>+        /// <param name="Seed">+        /// A number used to calculate a starting value for the pseudo-random number sequence. If a negative number+        /// is specified, the absolute value of the number is used.+        /// </param>+        public Random(int Seed) =>+            // With a custom seed, for compat we respect the previous implementation.+            _impl = new LegacyImpl(this, Seed);++        /// <summary>Returns a non-negative random integer.</summary>+        /// <returns>A 32-bit signed integer that is greater than or equal to 0 and less than <see cref="int.MaxValue"/>.</returns>+        public virtual int Next() => _impl.Next();++        /// <summary>Returns a non-negative random integer that is less than the specified maximum.</summary>+        /// <param name="maxValue">The exclusive upper bound of the random number to be generated. <paramref name="maxValue"/> must be greater than or equal to 0.</param>+        /// <returns>+        /// A 32-bit signed integer that is greater than or equal to 0, and less than <paramref name="maxValue"/>; that is, the range of return values ordinarily+        /// includes 0 but not <paramref name="maxValue"/>. However, if <paramref name="maxValue"/> equals 0, <paramref name="maxValue"/> is returned.+        /// </returns>+        /// <exception cref="ArgumentOutOfRangeException"><paramref name="maxValue"/> is less than 0.</exception>+        public virtual int Next(int maxValue)+        {+            if (maxValue > 1)+            {+                return _impl.Next(maxValue);+            } -        private readonly int[] _seedArray = new int[56];-        private int _inext;-        private int _inextp;+            if (maxValue < 0)+            {+                ThrowMaxValueMustBeNonNegative();+            } -        public Random() : this(ThreadStaticRandom.Next())-        {+            Debug.Assert(maxValue == 0 || maxValue == 1);+            return 0;         } -        public Random(int Seed)+        /// <summary>Returns a random integer that is within a specified range.</summary>+        /// <param name="minValue">The inclusive lower bound of the random number returned.</param>+        /// <param name="maxValue">The exclusive upper bound of the random number returned. <paramref name="maxValue"/> must be greater than or equal to <paramref name="minValue"/>.</param>+        /// <returns>+        /// A 32-bit signed integer greater than or equal to <paramref name="minValue"/> and less than <paramref name="maxValue"/>; that is, the range of return values includes <paramref name="minValue"/>+        /// but not <paramref name="maxValue"/>. If minValue equals <paramref name="maxValue"/>, <paramref name="minValue"/> is returned.+        /// </returns>+        /// <exception cref="ArgumentOutOfRangeException"><paramref name="minValue"/> is greater than <paramref name="maxValue"/>.</exception>+        public virtual int Next(int minValue, int maxValue)         {-            // Initialize seed array.--            int subtraction = (Seed == int.MinValue) ? int.MaxValue : Math.Abs(Seed);-            int mj = 161803398 - subtraction; // magic number based on Phi (golden ratio)-            _seedArray[55] = mj;-            int mk = 1;--            int ii = 0;-            for (int i = 1; i < 55; i++)+            if (maxValue > minValue)             {-                // The range [1..55] is special (Knuth) and so we're wasting the 0'th position.-                if ((ii += 21) >= 55)-                {-                    ii -= 55;-                }--                _seedArray[ii] = mk;-                mk = mj - mk;-                if (mk < 0)-                {-                    mk += int.MaxValue;-                }--                mj = _seedArray[ii];+                return _impl.Next(minValue, maxValue);             } -            for (int k = 1; k < 5; k++)+            if (minValue > maxValue)             {-                for (int i = 1; i < 56; i++)-                {-                    int n = i + 30;-                    if (n >= 55)-                    {-                        n -= 55;-                    }--                    _seedArray[i] -= _seedArray[1 + n];-                    if (_seedArray[i] < 0)-                    {-                        _seedArray[i] += int.MaxValue;-                    }-                }+                ThrowMinMaxValueSwapped();             } -            _inextp = 21;+            Debug.Assert(minValue == maxValue);+            return minValue;         } -        protected virtual double Sample() =>-            // Including the division at the end gives us significantly improved random number distribution.-            InternalSample() * (1.0 / int.MaxValue);--        public virtual int Next() => InternalSample();--        public virtual int Next(int maxValue)+        /// <summary>Returns a non-negative random integer.</summary>+        /// <returns>A 64-bit signed integer that is greater than or equal to 0 and less than <see cref="long.MaxValue"/>.</returns>+        public virtual long NextInt64() => _impl.NextInt64();++        /// <summary>Returns a non-negative random integer that is less than the specified maximum.</summary>+        /// <param name="maxValue">The exclusive upper bound of the random number to be generated. <paramref name="maxValue"/> must be greater than or equal to 0.</param>+        /// <returns>+        /// A 64-bit signed integer that is greater than or equal to 0, and less than <paramref name="maxValue"/>; that is, the range of return values ordinarily+        /// includes 0 but not <paramref name="maxValue"/>. However, if <paramref name="maxValue"/> equals 0, <paramref name="maxValue"/> is returned.+        /// </returns>+        /// <exception cref="ArgumentOutOfRangeException"><paramref name="maxValue"/> is less than 0.</exception>+        public virtual long NextInt64(long maxValue)         {+            if (maxValue > 1)+            {+                return _impl.NextInt64(maxValue);+            }+             if (maxValue < 0)             {-                throw new ArgumentOutOfRangeException(nameof(maxValue), SR.Format(SR.ArgumentOutOfRange_MustBePositive, nameof(maxValue)));+                ThrowMaxValueMustBeNonNegative();             } -            return (int)(Sample() * maxValue);+            Debug.Assert(maxValue == 0 || maxValue == 1);+            return 0;         } -        public virtual int Next(int minValue, int maxValue)+        /// <summary>Returns a random integer that is within a specified range.</summary>+        /// <param name="minValue">The inclusive lower bound of the random number returned.</param>+        /// <param name="maxValue">The exclusive upper bound of the random number returned. <paramref name="maxValue"/> must be greater than or equal to <paramref name="minValue"/>.</param>+        /// <returns>+        /// A 64-bit signed integer greater than or equal to <paramref name="minValue"/> and less than <paramref name="maxValue"/>; that is, the range of return values includes <paramref name="minValue"/>+        /// but not <paramref name="maxValue"/>. If minValue equals <paramref name="maxValue"/>, <paramref name="minValue"/> is returned.+        /// </returns>+        /// <exception cref="ArgumentOutOfRangeException"><paramref name="minValue"/> is greater than <paramref name="maxValue"/>.</exception>+        public virtual long NextInt64(long minValue, long maxValue)         {+            if (maxValue > minValue)+            {+                return _impl.NextInt64(minValue, maxValue);+            }+             if (minValue > maxValue)             {-                throw new ArgumentOutOfRangeException(nameof(minValue), SR.Format(SR.Argument_MinMaxValue, nameof(minValue), nameof(maxValue)));+                ThrowMinMaxValueSwapped();             } -            long range = (long)maxValue - minValue;-            return range <= int.MaxValue ?-                (int)(Sample() * range) + minValue :-                (int)((long)(GetSampleForLargeRange() * range) + minValue);+            Debug.Assert(minValue == maxValue);+            return minValue;         } -        public virtual double NextDouble() => Sample();+        /// <summary>Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.</summary>+        /// <returns>A single-precision floating point number that is greater than or equal to 0.0, and less than 1.0.</returns>+        public virtual float NextSingle() => _impl.NextSingle(); +        /// <summary>Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.</summary>+        /// <returns>A double-precision floating point number that is greater than or equal to 0.0, and less than 1.0.</returns>+        public virtual double NextDouble() => _impl.NextDouble();++        /// <summary>Fills the elements of a specified array of bytes with random numbers.</summary>+        /// <param name="buffer">The array to be filled with random numbers.</param>+        /// <exception cref="ArgumentNullException"><paramref name="buffer"/> is null.</exception>         public virtual void NextBytes(byte[] buffer)         {             if (buffer is null)             {                 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.buffer);             } -            for (int i = 0; i < buffer.Length; i++)-            {-                buffer[i] = (byte)InternalSample();-            }+            _impl.NextBytes(buffer);         } -        public virtual void NextBytes(Span<byte> buffer)+        /// <summary>Fills the elements of a specified span of bytes with random numbers.</summary>+        /// <param name="buffer">The array to be filled with random numbers.</param>+        public virtual void NextBytes(Span<byte> buffer) => _impl.NextBytes(buffer);++        /// <summary>Returns a random floating-point number between 0.0 and 1.0.</summary>+        /// <returns>A double-precision floating point number that is greater than or equal to 0.0, and less than 1.0.</returns>+        protected virtual double Sample() => _impl.Sample();++        private static void ThrowMinMaxValueSwapped() =>+            throw new ArgumentOutOfRangeException("minValue", SR.Format(SR.Argument_MinMaxValue, "minValue", "maxValue"));++        private static void ThrowMaxValueMustBeNonNegative() =>+            throw new ArgumentOutOfRangeException("maxValue", SR.Format(SR.ArgumentOutOfRange_NeedNonNegNum, "maxValue"));++        /// <summary>Base type for all generator implementations that plug into the base Random.</summary>+        private abstract class ImplBase

Why not interface? Any opportunity to share some code?

stephentoub

comment created time in 31 minutes

issue commentmicrosoft/vscode

Add options to right-click menu for untitled files to save it

I don't mind adding a save action in the context menu, though I'm not sure if that will help for those that don't know you can right-click on tabs. I like the idea of a scrapbook concept, kinda like saving everything to a "untitled" workspace that the user never has to manage (like codepen).

Another idea, what if we showed a codelens that asked the user to choose a language mode on empty untitled files? Then we could prompt a save afterwards:

image

sana-ajani

comment created time in 32 minutes

Pull request review commentmicrosoft/onnxruntime

Megatron checkpointing

 class TrainingSession : public InferenceSession {    * Partition information of each paritioned weight    */   struct PartitionInfo {+    // value of the original shape of the weight

One thing we should think earlier,probabbly not now, for a bit later is: we will make change to the naming or this schema of weight partition information, once it goes to more stable, we need some flags to control old logic parsing/aggregation ckpts I guess. What we can do currently is, to be aware of this possibility, and try to make it stable as early as possible.

ashbhandare

comment created time in 32 minutes

issue commentdotnet/runtime

System.Diagnostics.PerformanceCounter.Tests failure

Seems indeed to be fixed by the repaving.

ManickaP

comment created time in 38 minutes

Pull request review commentmicrosoft/onnxruntime

Megatron checkpointing

 bool MegatronTransformer::PartitionWeightByRow(const Graph& graph, const NodeArg   const int64_t row_index_offset = horizontal_parallel_rank_ * row_partition;   memcpy(result.data(), a_weight + row_index_offset * column_count, sizeof(float) * element_count);   initializer_partition.set_raw_data(result.data(), element_count * sizeof(float));-  weight_partition_info_[new_initializer_name].megatron_row_partition = 1;++  // Partition initial optimizer state if available+  const auto optim_state_it = initial_optimizer_states_.find(original_name);

just double confirm, we have tests for this, right? :)

ashbhandare

comment created time in 38 minutes

pull request commentmicrosoft/onnxruntime

Delete the large model files

@snnn FYI. I recalled even when removed the big file, the history still have heavy information to restore it. This is anoying (I made some stupid mistake in some other private repos).

https://www.deployhq.com/git/faqs/removing-large-files-from-git-history

snnn

comment created time in 41 minutes

issue openedmicrosoft/vscode

Github Authentication no longer functional

Issue Type: <b>Bug</b>

I'm trying to sign in Github for Settings Sync but it doesn't work. Neither through the browser nor through manually copying either the generated link or an access token I generated myself.

  • Click the "Sign in" link to sync settings.
  • Select Github.
  • Authorize VS Code in the browser or copy and paste the link manually.
  • Signing in fails silently.

I have gathered this output from the Github Authentication extention:

[Info  - 04:08:24.375] Exchanging code for token...
[Info  - 04:08:27.835] Token exchange success!
[Info  - 04:08:27.836] Getting user info...
[Info  - 04:08:29.112] Got account info!
[Info  - 04:08:29.256] Login success!
[Error  - 04:08:29.303] Getting token failed: Error: Cannot get password
[Info  - 04:08:29.350] Removing session no longer found in keychain```

I've tried disabling-reenabling the extension, using diffrerent browsers, passing the generated link or an access token directly, deleting the Windows Credentials Manager entry created by the extension.

The authentication process did work correctly previously right after I installed VS Code, and so I had managed to sync my settings once. I am not quite sure as to what might have changed that caused it to malfunction ever since.

VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:34:46.910Z)
OS version: Windows_NT x64 10.0.19042

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Pentium(R) CPU  N3540  @ 2.16GHz (4 x 2167)|
|GPU Status|2d_canvas: enabled<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: disabled_off<br>opengl: enabled_on<br>protected_video_decode: unavailable_off<br>rasterization: enabled<br>skia_renderer: disabled_off_ok<br>video_decode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|7.89GB (1.89GB free)|
|Process Argv|--crash-reporter-id 5b864675-3a26-4790-9ea0-654705e65a4b|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (60)</summary>

Extension|Author (truncated)|Version
---|---|---
Bookmarks|ale|12.1.3
project-manager|ale|12.0.1
vscode-color|ans|0.4.5
insert-unicode|bru|0.10.0
npm-intellisense|chr|1.3.1
path-intellisense|chr|2.3.0
regex|chr|0.2.0
vscode-css-modules|cli|0.2.3
gitignore|cod|0.6.0
bracket-pair-colorizer|Coe|1.0.61
erb|Cra|0.0.1
vscode-github-actions|csc|0.13.0
dart-code|Dar|3.18.1
vscode-faker|dee|1.5.0
vscode-npm-source|dku|1.0.0
git-extension-pack|don|0.1.3
gitlens|eam|11.1.3
EditorConfig|Edi|0.16.4
vscode-npm-script|eg2|0.3.13
json-tools|eri|1.0.2
vs-code-xml-format|fab|0.1.5
vscode-pull-request-github|Git|0.22.0
beautify|Hoo|1.5.0
search-node-modules|jas|1.3.0
c-cpp-flylint|jbe|1.7.1
vscode-gist|ken|3.0.3
contextualduplicate|laf|0.2.0
git-indicators|lam|2.1.2
node-module-intellisense|lei|1.5.0
sftp|lix|1.12.9
ecdc|mit|1.4.0
vscode-filesize|mkx|2.1.4
perl-debug|mor|0.6.3
hg|mrc|1.7.1
vscode-language-pack-ru|MS-|1.52.2
csharp|ms-|1.23.8
remote-wsl|ms-|0.52.0
powershell|ms-|2020.6.0
typescript-javascript-grammar|ms-|0.0.55
debugger-for-chrome|msj|4.12.11
vscode-json-editor|nic|0.2.3
vscode-extension-auto-import|Nuc|1.4.3
indent-rainbow|ode|7.5.0
quicktype|qui|12.0.46
vscode-xml|red|0.14.0
vscode-sort-json|ric|1.19.2
perl6-lsp|scr|0.3.0
view-in-default-application|see|3.3.0
git-merger|sha|0.4.1
code-spell-checker|str|1.10.2
code-spell-checker-russian|str|0.2.9
gitflow|vec|1.2.1
vscode-icons|vsc|11.1.0
vscode-todo-highlight|way|1.0.4
vscode-import-cost|wix|2.13.0
change-case|wma|1.0.0
JavaScriptSnippets|xab|1.8.0
luahelper|yin|0.1.46
html-css-class-completion|Zig|1.20.0
vscode-open-in-github|ziy|1.3.6


</details>
<!-- generated by issue reporter -->

created time in 42 minutes

issue closedmicrosoft/vscode

Can't run commands from remote extension in a disconnected window

  • Connect to a remote
  • Lose the connection so that the status bar indicator says "Disconnected from ..."
  • Try to run a command contributed by the Remote extension, such as "Connect to host"
  • This should work because the Remote-* extension is a local extension, but nothing happens

I think the local EH gets shut down when the window becomes disconnected. This is not a good experience, the user wants to connect again at this time. Example: https://github.com/microsoft/vscode-remote-release/issues/2050#issuecomment-570835836

closed time in 43 minutes

roblourens

issue commentmicrosoft/vscode

Can't run commands from remote extension in a disconnected window

https://github.com/microsoft/vscode-internalbacklog/issues/1740

roblourens

comment created time in 43 minutes

issue commentmicrosoft/vscode

Offer to open a workspace from empty explorer

I'm still a fan of adding a split button for open folder and allowing extensions to contribute. The open folder can be: Open WSL/Codespace, Open Workspace, Clone Repo, etc. and would help reduce the amount of content that we currently have:

image

We can definitely bring it up in the UX sync this week.

bpasero

comment created time in 44 minutes

issue commentmicrosoft/microsoft-ui-xaml

Question: When is MapControl coming to WinUI 3.x?

I haven't thought WinUI 3.0 could be incompatible with existing UWP app. Please provide controls which were available in UWP. It is a bad tone to decide to throw away controls! This is a really a stopper problem for my app.

robloo

comment created time in an hour

pull request commentdotnet/msbuild

Reduce byte array allocations when reading/writing packets

I had the same concern.

It would make things much simpler if the last write was synchronous as well. Are we sure that making that last write fire-and-forget async is significant for perf?

KirillOsenkov

comment created time in an hour

pull request commentdotnet/runtime

Add more logging for abrupt test failures on Linux

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

danmosemsft

comment created time in an hour

PR opened dotnet/runtime

Add more logging for abrupt test failures on Linux

Relates to https://github.com/dotnet/runtime/issues/46516 .. we continue to get 1-2 failures every day, only on Ubuntu 18.04, always SIGKILL.

The zlib readme is unrelated, but not worth its own PR.

+29 -17

0 comment

3 changed files

pr created time in an hour

more