text:
User invalid

Context

App is using Enhanced Access Control
Backend: nodejs using dolby HTTP REST api
Frontend: Firefox/Chrome

Web SDK
is implemented like mentioned on https://docs.dolby.io/communications-apis/docs/getting-started-with-the-javascript-sdk
Error
when pressing the join button an error happens:
webrtc Failed to join conference ServerError: User is not valid

it seems to be related to this HTTP call
https://comms.sdk.dolby.io/v1/conferences/638485b8-c514-44a9-92fe-8d2828ed26b8/join
{
  "sync": true,
  "sdp_version": "SDP_V6",
  "user": {
    "type": "user"
  },
  "options": {
    "constraints": {
      "audio": {
        "autoGainControl": true,
        "googAutoGainControl": true,
        "noiseSuppression": true,
        "echoCancellation": true
      },
      "video": false
    },
    "mixing": {
      "enabled": false,
      "uri": "638485b8-c514-44a9-92fe-8d2828ed26b8"
    },
    "simulcast": false,
    "preferSendMono": true,
    "preferRecvMono": false,
    "forwardingStrategy": "lastSpeakerStrategy",
    "dvwc": false,
    "videoFilterOptions": {},
    "supportedAVSyncFakeAudio": true,
    "supportedSpatialAudioStyles": [
      "shared",
      "disabled",
      "individual"
    ],
    "supportedMultiScreenShare": "sendrecv"
  }
}

Which results in 403
{
  "type": "ErrorResponse",
  "error_code": 113,
  "error_reason": "invalid_cat_user",
  "error_description": "User is not valid"
}

Information
The button call triggers this
await VoxeetSDK.conference.join({
   id: conferenceId
}, {
  conferenceAccessToken: userToken
});

ConferenceId and userToken comes from calling /v2/conferences/create. userToken is e.g. "participantA"
{

  conferenceId: "638485b8-c514-44a9-92fe-8d2828ed26b8",

  ...

  usersTokens: {
    "participantA": "some long token"
  }
}

Unfortunately i have no access to the /v1/ API documentation, so i have no idea what could be the problem.
Thanks for the help

just updated the information about how i call VoxeetSDK.conference.join()
im not calling VoxeetSDK.conference.create() like in the example, because i am creating the conference in my backend before hand with a different client access token

When you provide the conference access token back to the end user, are you certain that you provide the token for the right user? Meaning that in your example, you create a conference and get an access token for participantA:
{
  conferenceId: "638485b8-c514-44a9-92fe-8d2828ed26b8",
  ...
  usersTokens: {
    "participantA": "some long token"
  }
}

But are you opening a session (client side SDK) with a user that has the external name participantA?
await VoxeetSDK.session.open({externalId: "participantA"});

until now i did  VoxeetSDK.session.open("participantA");
but i changed the code to VoxeetSDK.session.open({externalId: "participantA"});
and made sure it's sending the correct token (observing the http headers sent) and it still gives me the same error

I also found .fetch() which might be what i need here but that still throws the same error
const conference = await VoxeetSDK.conference.fetch(conferenceId)

await VoxeetSDK.conference.join(conference, {
    conferenceAccessToken: tokenOfParticipantA,
    constraints: {
        audio: true,
        video: true,
    }
});

not sure about that particular conference. But the latest one i created is 6c0a0409-2003-4f70-b7bb-db9aa99c14a9
where i used participant_1 and participant_2

Yeah, i force enabled video VoxeetSDK.conference.join(conference, {constraints: {audio: true, video: true}} but was testing from http.
That error is gone with https now, but still, always getting those "User is not valid" messages. And then the sdk just logs out (both chrome, firefox)

Could you share a sample app where I can reproduce the problem?

sure, this will be temporarily available
https://dev.mentis-recruitment.com/playground/conference
it is reusing the same configuration every time you load the page

Oh I see the problem. You are using a Client Access Token to join the conference. The Client Access Token is only meant to be used for initializing the SDK.
When you want the user to join a conference you call the client-config endpoint. In that backend code, you need to request a Client Access Token for the client SDK to initialize, then you call the conference create with the id of that participant, you will get Conference Access Token that you need to return to your client.
So the client will receive the conference ID, the client access token and the conference access token. Use the Client AT to initialize the SDK and the Conf AT to join the conference.

did that change (see headers), still the error.
just to make sure: I'm scoping the client_access_token to 'session:update' i hope that is fine

Also interesting: when i tried to use conferenceAccessToken for sdk init and usersToken for conference.join, i broke something else
{
  "type": "ErrorResponse",
  "error_code": 90,
  "error_reason": "Illegal argument",
  "error_description": "No enum constant com.reactive.common.model.ConferenceAccessType.Permission.ROLE_CUSTOMER"
}

I would recommend to use notifications:set for the client access token.
Also, replace:
await joinConference(conferenceId, clientAccessToken)

by
await joinConference(conferenceId, userToken)

another victim of the cache...
yeah that code change is now visible and i changed the scope in the backend code, still error

When you create a Client Access Token, are you setting an external ID? If not, could you set the external ID of the client.

that fixed it.
What a journey. thanks for the time Fabien, highly appreciated it!

authors: FabienLavocat alpalex


text:
[Question]: Hide client_secret when using OAuthUsePkce()

What are you wanting to achieve?
I am trying to do OAuthUsePkce() but the client_secret is visible in the auth dialog box below. I can enter anything to it and it does not influence the Keycloak authentication flow. The flow works but client_secret appears unnecessarily as in the image below. How to hide client_secret properly? I want to avoid css gymnastics if possible, but it would be good to know if there was an alternative way?

What code or approach do you have so far?
using System.Reflection;
using MyApp.Core.Configuration;
using Microsoft.OpenApi.Models;

namespace MyApp.Service.Web.Registrations;

public static class SwaggerRegistrations
{
    public static IHostApplicationBuilder AddMyAppSwaggerGen(
        this IHostApplicationBuilder builder,
        MyAppConfiguration myappConfiguration
    )
    {
        builder.Services.AddSwaggerGen(options =>
        {
            options.SwaggerDoc("v1", new OpenApiInfo
            {
                Title = "MyApp", Version = "v1"
            });

            options.AddSecurityDefinition("Keycloak", new OpenApiSecurityScheme
            {
                Type = SecuritySchemeType.OAuth2,
                Flows = new OpenApiOAuthFlows
                {
                    AuthorizationCode = new OpenApiOAuthFlow()
                    {
                        AuthorizationUrl =
                            new Uri($"{myappConfiguration.OpenId.Authority}/protocol/openid-connect/auth"),
                        TokenUrl = new Uri($"{myappConfiguration.OpenId.Authority}/protocol/openid-connect/token"),
                        Scopes = new Dictionary<string, string>
                        {
                            { "openid", "openid" },
                            { "profile", "profile" },
                            { "email", "email" }
                        }
                    },
                }
            });

            OpenApiSecurityScheme keycloakSecurityScheme = new()
            {
                Reference = new OpenApiReference
                {
                    Id = "Keycloak",
                    Type = ReferenceType.SecurityScheme,
                },
                In = ParameterLocation.Header,
                Name = "Bearer",
                Scheme = "Bearer",
            };

            options.AddSecurityRequirement(new OpenApiSecurityRequirement
            {
                { keycloakSecurityScheme, Array.Empty<string>() },
            });

            var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
            var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
            options.IncludeXmlComments(xmlPath);
        });

        return builder;
    }

    public static WebApplication UseMyAppSwaggerUi(this WebApplication app)
    {
        app.UseSwagger(options => { options.RouteTemplate = "/openapi/{documentName}.json"; });
        app.UseSwaggerUI(options =>
        {
            options.SwaggerEndpoint("/openapi/v1.json", "MyApp API V1");
            options.OAuthClientId("myorg-myapp");
            options.OAuthClientSecret("secret");
            options.OAuthScopeSeparator(" ");
            options.OAuthScopes("openid", "profile", "email");
            options.OAuthUsePkce();
        });

        return app;
    }
}

Additional context
My understanding is that client_secret should not be involved in a situation of PKCE.
References

Authentication using Swagger and Keycloak
SwaggerUI With PKCE
OpenApiOAuthFlows Class
Authorization Code with PKCE

Any hiding of UI elements would be a Swagger UI feature, so that's a question for their repo of you want to do it without custom CSS.

And so it seems PKCE is being encouraged to be used with client_secret.
As per the following:

https://github.com/swagger-api/swagger-ui/issues/7913
https://oauth.net/2/pkce/
https://www.oauth.com/oauth2-servers/pkce/

I will no longer push for this.

source: gharchive/issue

authors: bangonkali martincostello

license: MIT

license_type: permissive

license_source: github-api


text:
Authorization header not present in request

After upgrade the version from 1.2.0 to 2.3.0 the Authorization header was not sent anymore in the request from the Swagger UI.
I am using ApiKey Authorization.

Dup of #608. For future reference, please search the existing issues before creating new ones. Thanks.

Doh - that should be #603

authors: brunoavpinheiro domaindrivendev


text:
Hiding Properties in swagger ui example

Hi, I'm using swagger, beside dotnet standard 2.0 web api.
It's a sample model that i used in my application. most of them are common between database entities and controllers input and return values
public class Grade
{
    public int Id { get; set; }

    public virtual ICollection<Student> Students {get; set;}
    public virtual ICollection<Class> Classes {get; set;}
    public virtual ICollection<LessonTitle> LessonTitles {get; set;}

    [Timestamp]
    public byte[] RowVersion { get; set; }
}

I want to hide virtual properties and RowVersion property just in swagger example.
It is possible for dotnet core 2.0 ?

Just Try [Ignore] annotation.

[Ignore] Annotation not working for me, i couldn't find reference for it.
I've found my solution here:
Exclude properties from being listed in Swagger UI
It works fine for me to use [JsonIgnore]
@matzheng

@mvakili Be aware that JsonIgnore wont allow you to seriealize/deserialize

[JsonIgnore] from System.Text.Json.Serialization namespace will work as Swashbuckle uses System.Text.Json by default.

authors: abaslam matzheng mvakili syaifulnizamyahya

repo: domaindrivendev/Swashbuckle

license_source: bigquery


text:
expect to be rejected with a property

it's probably a feature request but I write my environment details because maybe it's a bug
Node version: 8.6.0
npm version: 5.2.0
chai-as-promised version: 7.1.1
chai version: 4.1.2
I have the following code:
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');

chai.use(chaiAsPromised);

const expect = chai.expect;

const error = new Error;
error.foo = 123;

expect(Promise.reject(error)).to.be.rejectedWith(Error, { foo: 123 });

Actual behavior:
(node:51977) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): AssertionError: expected promise to be rejected with an error including { foo: 123 } but got ''
(node:51977) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Expected behavior:

Of cource if the rejected error doesn't have the expected field or its field has another value, it should fail.

It also doesn't work:
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');

chai.use(chaiAsPromised);

const expect = chai.expect;

const error = new Error;
error.foo = 123;

expect(Promise.reject(error)).to.be.rejectedWith(Error).and.have.property('foo', 123);

I obtain:
/Users/piotr.sroczkowski/brainhub/dmx/npm-dmx-sdk/node_modules/chai/lib/chai/assertion.js:141
      throw new AssertionError(msg, {
      ^
AssertionError: expected {} to have property 'foo'
    at Object.<anonymous> (/Users/piotr.sroczkowski/brainhub/dmx/npm-dmx-sdk/1.js:11:66)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:607:3

It works when I add .eventually
so such a test succeeds:
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');

chai.use(chaiAsPromised);

const expect = chai.expect;

const error = new Error;
error.foo = 123;

expect(Promise.reject(error)).to.be.eventually.rejectedWith(Error).and.have.property('foo', 123);

Therefore IMO you should improve README because nowhere I can see .eventually.rejectedWith.

I didn't find that eventually resolved my problem with the following specs
Node version: 10.6.0
npm version: 6.1.0
chai-as-promised version: 7.1.1
chai version: 4.1.2
--posting here so there's a solution as this is a major problem
given the following test
var chaiAsPromised = require("chai-as-promised");
var chai = require("chai");
chai.use(chaiAsPromised);

var should = chai.should();
var expect = chai.expect;
var asyncFunc = async function(){
  return true;
}
it("Async function should throw error", () => {
	expect(asyncFunc()).to.be.rejected; //should fail
});

This function passes with
  ✓ Async function should throw error
(node:11142) UnhandledPromiseRejectionWarning: AssertionError: expected promise to be rejected but it was fulfilled with true
(node:11142) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11142) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

  1 passing (12ms)

and can be fixed by using await keyword on the expect function!
it("Async function should throw error", async () => {
	await expect(asyncFunc()).to.be.rejected;
});

Now returns:
 1) Async function should throw error

  0 passing (12ms)
  1 failing

  1) Async function should throw error:
     AssertionError: expected promise to be rejected but it was fulfilled with true

Not entirely sure why this is the case, I think it might be failing due to the way .to.be.rejected() wraps the function in a Promise.

@piotr-s-brainhub
Hi, just tested your solution and I can confirm it works, thank you! And I agree with updating the docs :)

@Ceesjansen
Anyway now you can use async/ await so chai-as-promised is no longer needed.

this works too:
expect(Promise.reject).to.be.rejectedWith(Error).eventually.with.property('name', 'YourError')

authors: Ceesjansen piotr-s-brainhub samcodrington unicornist

repo: domenic/chai-as-promised


text:
TODO

Note Will not be linking pull requests to this issue.

Frontend

[ ] Layout - Minimal UI, no overwhelming mock ups & huge TODOs
[ ] UI Library - Reuseful components for inner/outer layouts
[ ] Setup styling - Less / Stylus space, font, rounding, color systems, may be inherited from other projects
[ ] JSDocs - Page & Utility documentation
[ ] Documentation - GitBook or Docusarurus for managing shakespeare
[ ] Landing page - Small upload page
[ ] Static data fetching - APIs for internal data
[ ] Meta tags - Dynamic open graph & twitter tags
[ ] Media layout - Custom inner media layout inherited from minimal UI of outer layout
[ ] Dashboard page - Management panel for user & configuration purposes

Backend

[x] API - Basics of ShareX REST + additional features
[x] Minifiers - Consider on adding minifiers to media load times
[x] Database - Setup Prisma for analytics & users
[x] Storage - Should be a middleware to S3 for additional use case
[ ] Deployment - Should be considered a compatibility check
[ ] Unit testing - Either Jest or Mocha
[x] Security - Lucia or Clerk for auth, environment variables over object notation files
[x] JSDocs - Explain every service & controller
[ ] Documentation - OpenAPI specification additional modification to ShareX docs
[ ] Boilerplate guides - additional content for different IaaS, PaaS, Web Hosting setups
[ ] Performance overload - final stage of release

As of 9th june, for backend there are not much things left: analytics endpoints, lib jsdocs, documentation

The active work is still underway: for the given number of pages, the ui is partially done & functional register & login pages were made, right now all eyes on profile page
The way to optimize client view of uploads is being thought through. Trying to include as less javascript to client-side as possible.
Database may face polishing for the sake of correct DX in the future.

^
Added View model to the database in order to fix view date issue, leads to breaking changes.

repo: domin-mnd/shakespeare


text:
Documentation for the Sky programming model

Better docs would help develop a better mental model of how Sky works for new developers adopting it.  Some questions that came up for me:

What's the lifecycle of a Widget?  When is it Ok to call which methods?
It seems that you can only create new Widgets from build() methods.  What are other restrictions that generate a runtime error but aren't enforced by static checks?
When can the developer use existing Widgets, and when do you have to subclass Component and StatefulComponent?
What is a contract on the Component implementation?  What should I do and what can't I do?  What's the deal with syncConstructorArguments()?
How is Sky model different from Swing and GWT frameworks?

/cc @Hixie
I'll take a pass at a first draft of this doc.

Some of these topics are addressed at the end of the tutorial https://flutter.github.io/tutorial/, but we should present the information in reference form.

What's the lifecycle of a Widget?

Sorry it took so long to answer your question.  When I drew out the diagram for the lifecycle of a widget, it didn't many any sense, so we did a big refactoring project to fix it.  Now the state machines make sense and are draw in this slide deck:
https://docs.google.com/presentation/d/1cw7A4HbvM_Abv320rVgPVGiUP2msVs7tfGbkgdrTy0I/edit?usp=sharing

When is it Ok to call which methods?

This is now documented in dartdoc for each method.

It seems that you can only create new Widgets from build() methods.

This is no longer the case.  Now you can create widget whenever you like.

What are other restrictions that generate a runtime error but aren't enforced by static checks?

There are lots of them.  We use asserts liberally throughout the codebase to enforce various path-dependent invariants of the system.  For example, initState needs to call super.initState or it will trigger an assert.  Hopefully these asserts have reasonable messages that explain the issue.  If you run into some that are mysterious, please file bugs and we'll attempt to demystify them.

When can the developer use existing Widgets, and when do you have to subclass Component and StatefulComponent?

Widgets are meant to be used by composition rather than subclassing.  That means you almost always subclass StatelessComponent or StatefulComponent and return tree of Widgets in your build function.  There are still a few cases where we subclass widgets (e.g., Scrollable), but we've been using less of that over time.
It's very possible that we shouldn't be using subclassing in Scrollable either.  We might want to look at that issue at some point.

What is a contract on the Component implementation? What should I do and what can't I do?

This should now be documented in dartdoc comments.  If the dartdoc comments are insufficient, please file a bug with specifics and we'll improve them.

What's the deal with syncConstructorArguments()?

We've removed syncConstructorArguments from the system because it was too confusing.

How is Sky model different from Swing and GWT frameworks?

The main difference is that Flutter is a functional-reactive system, which means the "create" and "update" steps in Swing and GWT are combined into a single "build" step.  The other major difference is that you build Flutter widgets by composition rather than inheritance.  I'm not sure how best to document these ideas other than to say them in the getting started guide and in the tutorial.  If you have specific ideas for how we can improve the docs in connection with this question, would you be willing to talk with me in person?  That's probably a better way to get something useful here than creating a long bug thread.
Thanks for filing this issue.  Working through your questions motivated me to make a lot of improvements to the system (e.g., drawing out the component lifecycle made me very interested in doing fn3).

authors: abarth mishadynin


text:
Multi-window WebRTC

Currently peerjs is limited to one game per window, as a new window would request a new PeerID, which is against the current design of Peered. Therefore we need to come up with a solution so that people can play multiple games.
The only way I can imagine this work right now is if the PeerJS object is stored in localstore and continuously accessed when opening new browser windows. This obviously needs to be researches about its weaknesses. Anyone has some ideas?

Not possible.

repo: domschiener/peered


text:
Send config file to email

Need send to email config file.
How i can add this function ?

Sending email is not implement yet. But is a good idea ;)

repo: donaldzou/WGDashboard


text:
PMO: Unable to run documentjs on Windows

donejs : C:\Users\Matthew\dev\place-my-order\node_modules\q\q.js:126
At line:1 char:1
+ donejs document 2> err
+ ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (C:\Users\Matthe...ules\q\q.js:126:S
   tring) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

                    throw e;
                    ^

Error: ENOENT: no such file or directory, open
'C:\Users\Matthew\dev\place-my-order\docs\place-my-order|restaurant|list.html'
    at Error (native)

npm

ERR!
 Windows_NT 10.0.10586

npm

ERR!

argv
 "C:\\Program Files\\nodejs\\node.exe" "C:\\Program
Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "document"

npm

ERR!

node
 v5.3.0

npm

ERR!

npm
 v3.3.12

npm

ERR!

code
 ELIFECYCLE

npm

ERR!
 place-my-order@0.0.0 document: `documentjs`

npm

ERR!
 Exit status 1

npm

ERR!

npm

ERR!
 Failed at the place-my-order@0.0.0 document script 'documentjs'.

npm

ERR!
 Make sure you have the latest version of node.js and npm installed.

npm

ERR!
 If you do, this is most likely a problem with the place-my-order package,

npm

ERR!
 not with npm itself.

npm

ERR!
 Tell the author that this fails on your system:

npm

ERR!
     documentjs

npm

ERR!
 You can get their info via:

npm

ERR!
     npm owner ls place-my-order

npm

ERR!
 There is likely additional logging output above.

npm

ERR!
 Please include the following file with any support request:

npm

ERR!
     C:\Users\Matthew\dev\place-my-order\npm-debug.log

Error: Command `npm` did not complete successfully
    at ChildProcess.<anonymous>
(C:\Users\Matthew\dev\place-my-order\node_modules\donejs-cli\lib\utils.js:37:23)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at ChildProcess.cp.emit (C:\Users\Matthew\dev\place-my-order\node_modules\cro
ss-spawn-async\lib\enoent.js:37:29)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

This is probably the underlying issue: https://github.com/bitovi/documentjs/issues/216

Replacing the | with __ does fix the issue.

Fixed by DocumentJS 0.4.2

repo: donejs/donejs

license: mit


text:
support ios?

are there any plans to support ios?

My team is using testflight, so I didn't support it later. Do you need to use it?

authors: dongorigin hnsylitao

repo: dongorigin/fastlane-plugin-fir


text:
“海南藏族自治州”无法正确解析

地区名无法正确解析

使用parse_location()函数无法正确识别地级行政区“海南藏族自治州”。

版本(Version):

python 版本: 3.10.5
jionlp 版本:1.4.7

jionlp的调用代码与输入文本(Code & Text):

import jionlp as jio
print(parse_location("海南藏族自治州"))

解析结果如下:

{'province': '海南省', 'city': None, 'county': None, 'detail': '藏族自治州', 'full_location': '海南省藏族自治州', 'orig_location': '海南藏族自治州'}

已修复

authors: dongrixinyu skahanium

repo: dongrixinyu/JioNLP


text:
Support CUDA?

Hi, thank you so much for your project
Does this library support use cuda?

have not supported now.

have not supported now.

OK, thanks again. And, look forward to support.

authors: dongrixinyu mortal-Zero

repo: dongrixinyu/pyFFmpeg


text:
Ability to specify "--force-subtitle" by language code

Hi there!
I was wondering if you would consider adding the ability to set the forced subtitle by language code instead of the index.
So for example: --force-subtitle NLD.
Perhaps aborting with an error in the rare case where multiple indexes with the same language code are found, since you can't force multiple subtitles. Or maybe just forcing the first match.
When transcoding many files, finding the specific index of a language for each file in a batch separately, can be quite a pain :)
Thank you! 🙏🏼

@notDavid I understand the difficulty you're having but I don't want to introduce a behavior that would either often fail or seem to behave capriciously. By definition both --burn-subtitle and --force-subtitle have a one-to-one mapping. Adding a language as an argument makes this semantically confusing.
So, I'm have to say "no" this time. Sorry about that.

Yea i understand, it wouldn't be a perfectly clean/solid solution...
Although the alternative, using --scan and grep voodoo to find the index, is not very solid either 😅

authors: donmelton notDavid


text:
Multiple mention decorators

hi , Great plugin you have there , simple lightweight , i've used before the mention plugin from draft-js-plugins , and this feels like  a 100 times lighter , fast and simple .
while i was changing my code to use your plugin , i've noticed that a couple of things are missing when you compare it to the mention plugin , some features needs to be added in order to make it more flexible , mention key should be configurable via props . Also it lacks the ability to load multiple decorators , example : a list for '@' , another one for '#'...
I'm working on it right now , if you are interested in these features , i'll make a PR for it once it is done. feeback is wellcome.

Hi @jvaill , it is almost done , in fact it is working , now we must decide which way to go with it .
try '@' and '#'
http://jsfiddle.net/kcaewmw0/2/
How we handle the config ? Because at this time , i'm using a couple a dumb checks to render the correct list , check the filterPeople function to see what i am talking about.
The best way i can think of is to inject into props an array of mapped lists example:

var lists = {
    "@":['person1' , 'person2'],
    "#":['pet1', 'pet2']
};

Then we pass the current key '@' or '#' and the list to the filter function and the handleTypeaheadReturn too.
This will eliminate the dumb checks and it will be cleaner and simpler to add this plugin and configure.
What do you think?
Lastly i have an annoying issue that i think is related to draft js , in the fiddle when you add a mention with '@' there's another function fired that will add a '#' at the end of the line  after 1 second , the expected behavior would be to show the list , but unfortunately , it doesn't  , if someone can help with this , i'll be truly grateful !

repo: dooly-ai/draft-js-typeahead


text:
Change location of toc

It is confusing to see the toc including the Why use Poolboy? when you have just read it.

@gemantzu good catch 👍

source: gharchive/pull-request

authors: doomspork gemantzu

repo: doomspork/elixir-school


text:
[Feature request] Return as changed array

Rather than returning an object with { [key]: 'true' | 'false' }, it would be great if the paths-filter could optionally return an array.
Such that, instead of:
{
  dir1: 'true',
  dir2: 'false',
  dir3: 'true'
}

... the paths filter would return:
['dir1', 'dir3']

This could then easily be used for things like matrix strategies.

Oh! Derp! Apparently this is already returned as changes. Thanks!

repo: dorny/paths-filter


text:
Testing and Deployment

Ticket: Testing and Deployment
Description: Ensure that the contract is thoroughly tested on a testnet before deployment to the mainnet. Provide comprehensive unit tests to cover all functionality and edge cases.
Acceptance Criteria:

The contract should be deployed and tested on a testnet (e.g., Rinkeby, Ropsten).
Comprehensive unit tests should be written to cover all contract functionality and edge cases.
Tests should include:

Quest creation
User registration
Interaction submission
Quest completion checks
Reward distribution

Tests should verify:

Correct parameter storage and retrieval
Accurate tracking of user interactions and statuses
Proper validation and security checks
Prevention of multiple reward distributions

Ensure that the contract behaves as expected under various scenarios and edge cases.
Upon successful testnet deployment and passing all tests, prepare for mainnet deployment.

Testing and Deployment Steps:

Deploy Contract to Testnet:

Deploy the contract to a testnet such as Rinkeby or Ropsten.
Ensure the contract is functioning as expected on the testnet.

Develop Unit Tests:

Use a testing framework like Truffle, Hardhat, or Remix to write unit tests.
Cover all contract functions and edge cases.

Sample Unit Test Code (JavaScript using Hardhat):
const { expect } = require("chai");

const { ethers } = require("hardhat");

describe("EventAmbassadorQuest", function () {

    let QuestContract, questContract;

    let admin, user1, user2;

    beforeEach(async function () {

        [admin, user1, user2] = await ethers.getSigners();

        QuestContract = await ethers.getContractFactory("EventAmbassadorQuest");

        questContract = await QuestContract.deploy();

        await questContract.deployed();

    });

    it("should allow admin to create a quest", async function () {

        await questContract.connect(admin).createQuest(1, 1622505600, 1625097600, 3, "token", ethers.constants.AddressZero, 0, 100);

        const quest = await questContract.quests(1);

        expect(quest.eventId).to.equal(1);

        expect(quest.requiredInteractions).to.equal(3);

    });

    it("should allow user to register for a quest", async function () {

        await questContract.connect(admin).createQuest(1, 1622505600, 1625097600, 3, "token", ethers.constants.AddressZero, 0, 100);

        await questContract.connect(user1).registerForQuest(1);

        const userInteraction = await questContract.userInteractions(1, user1.address);

        expect(userInteraction.isRegistered).to.be.true;

    });

    it("should allow user to submit interactions and complete the quest", async function () {

        await questContract.connect(admin).createQuest(1, 1622505600, 1625097600, 3, "token", ethers.constants.AddressZero, 0, 100);

        await questContract.connect(user1).registerForQuest(1);

        await questContract.connect(user1).submitInteraction(1);

        await questContract.connect(user1).submitInteraction(1);

        await questContract.connect(user1).submitInteraction(1);

        const userInteraction = await questContract.userInteractions(1, user1.address);

        expect(userInteraction.isCompleted).to.be.true;

    });

    it("should distribute reward upon quest completion", async function () {

        await questContract.connect(admin).createQuest(1, 1622505600, 1625097600, 3, "token", ethers.constants.AddressZero, 0, 100);

        await questContract.connect(user1).registerForQuest(1);

        await questContract.connect(user1).submitInteraction(1);

        await questContract.connect(user1).submitInteraction(1);

        await questContract.connect(user1).submitInteraction(1);

        const userInteraction = await questContract.userInteractions(1, user1.address);

        expect(userInteraction.rewardDistributed).to.be.true;

    });

    it("should prevent multiple reward distributions", async function () {

        await questContract.connect(admin).createQuest(1, 1622505600, 1625097600, 3, "token", ethers.constants.AddressZero, 0, 100);

        await questContract.connect(user1).registerForQuest(1);

        await questContract.connect(user1).submitInteraction(1);

        await questContract.connect(user1).submitInteraction(1);

        await questContract.connect(user1).submitInteraction(1);

        await expect(questContract.connect(user1).submitInteraction(1)).to.be.revertedWith("Quest already completed");

        const userInteraction = await questContract.userInteractions(1, user1.address);

        expect(userInteraction.rewardDistributed).to.be.true;

    });

});

Deployment Steps:

Deploy to Testnet:

Deploy the contract to the chosen testnet.
Verify contract functionality on the testnet.

Run Unit Tests:

Execute the unit tests to ensure all functionality and edge cases are covered.
Use testing frameworks like Hardhat or Truffle to run the tests.

Verify Test Results:

Ensure all tests pass successfully.
Address any issues or bugs identified during testing.

Prepare for Mainnet Deployment:

After successful testing on the testnet, prepare for mainnet deployment.
Ensure all necessary contract parameters and configurations are correctly set for mainnet deployment.

This comprehensive approach ensures the contract is thoroughly tested and verified before being deployed to the mainnet, covering all specified functionalities and edge cases.

points: 1, 2, 3, 5, 8, 13, 21
@russlive215
@Fr0z0n3
@noireconnect2024
@wvwatson
@tierra-d
points:

repo: dossinstitute/sidequest


text:
[WIP] Full Gallery front end re-implementation

This branch will do a complete re-design and implementation of how the Gallery front end works. There are several flaws and errors that need to be fixed, as well as the new version of Cropper.js having a somewhat new API.
Todo:

[x] Upgrade Cropper.js to newest version
[x] Get rid of old js
[x] Create a minimalist event system instead of polling
[ ] Redo the Gallery module's handling of pane selection and click events
[ ] Redo how UnhandledImages are displayed in the manage pane
[ ] Implement the cropping view using the new Cropper.js dynamic options
[ ] Implement support for the presets introduced in the Gallery backend refactor branch
[ ] Include a microlib for HTML templating (needed for widgets, ajax search etc).
[ ] Re-write the widget code for ResponsiveImage form fields
[ ] Add additional cropper controls and view modes as seen on http://cropperjs.com

underscore.js is a great lib for HTML templating.

Underscore is massive tho. Was thinking more along the lines of T.js, Transparency, or something similar that just handles templating (like Handlebars), and not everything else aswell.
Was going to use Transparency because the simplicity of the API is just awesome, but it hasn't been maintained for a few months and i'm experiencing a bug.
http://jsperf.com/transparency-vs-handlebars-infinite-list
Performs quite well, so I'm still looking for something similar.

On second thought, underscore offers quite a few things we need, so we could just go for it regardless.

Yeah, underscore has a lot of functionality that we can use besides the template functionality. I only mentioned it because I've had great experience with it in the past. However, I guess you can find identical functionality in other libraries as well.
Also, it looks like underscorejs i still in active development? https://github.com/jashkenas/underscore/commits/master

Ah, I just checked their releases tab. I can see there's a lot of underscore vs lodash discussion around, with talks of merging the two aswell. So i guess we can pick and choose then, which is nice.

Sure :)

Underscore is now included in our codebase.

I think this branch has enough glue and makeup on now that it can be merged and tested.

authors: OptimusCrime myth


text:
[java] generated enum arguments lack validation

Which packages are impacted by your issue?
@graphql-codegen/java
Describe the bug
Reading in arguments with generated types crashes due to enum arguments lacking null validation.
Your Example Website or App
https://stackblitz.com/edit/github-val3pw
Steps to Reproduce the Bug or Issue

Create an input type with with an enum field and some other field(s)
Generate types for the query
Create query where the enum field is not provided but some other fields are
Try creating a new instance of query arguments with the graphql-java DataFetchingEnvironment from the query

Expected behavior
Creating a new instance of query arguments should not crash if some field is not defined in the arguments provided in an incoming query.
Screenshots or Videos
No response
Platform

OS: Linux
NodeJS: v16.20.2
graphql version: 16.8.1
@graphql-codegen/java version(s): 4.0.0

Codegen Config File
No response
Additional context
The code crashes because it tries to call enum's valueOf method with a null value.

released @graphql-codegen/java@4.0.1

authors: optionsome saihaj


text:
typed-document-node: camelCase exports by default?

First of all, thank you for this amazing plugin!
By default it generates TypedDocumentNodes in PascalCase. While it makes sense for all generated TypeScript types, it probably should be camelCase for nodes as they are values rather than types. For example, typescript-react-apollo generates functions that start with lowercase letters.
There's a config option namingConvention, but setting it to change-case-all#camelCase changes the case of types as well, which is not what we're looking for.
It also looks like omitOperationSuffix property doesn't work. Ideally, I would like to see the following being generated:
export const getUserQuery = ...;
export const deleteUserMutation = ...;

Is there a config property I'm missing?

Thank you for the quick response, @dotansimha, but I'm not sure about this. Both issues are resolved in typescript-react-apollo plugin, so I think these issues are typed-document-node-specific

There's no need to change how namingConvention works as long as documentNodes are exported as camelCase by default.

@A-Shleifman Can you send a PR with failing tests for omitOperationSuffix?

Sorry, @n1ru4l  and @dotansimha for not getting back to this for so long. omitOperationSuffix is no longer relevant as useQuery(GetUserDocument) works much better. The other problem is still relevant. I think typed-document-node should generate Documents in camelCase instead of PascalCase as they are variables, not types.
For example:
type GetUserResult = ResultOf<typeof GetUserDocument>;

this looks like we're trying to get typeof Type. I think it should be getUserDocument.
If I try to configure it myself:
overwrite: true
schema: "./schema.gql"
documents: "queries.gql"
generates:
  graphql.tsx:
    plugins:
      - typescript
      - typescript-operations
      - typed-document-node:
          namingConvention: change-case-all#camelCase

Then the generated variable contains incorrect camelCase types, which should stay PascalCase:
export const getUserDocument = {...} as unknown as DocumentNode<getUserQuery, getUserQueryVariables>;

Here's an example with TypeScript complaining in graphql.tsx

Somewhat related: is it possible to generate TDNs like GetUserQuery instead of GetUserDocument? I couldn't find a config option for that. Thanks!

It seems there should probably be a new option for namingConvention, called variableNames maybe, to limit its affect to const/var/let exports.

Disappointing to see this option doesn't exist.

repo: dotansimha/graphql-code-generator


text:
Show symbol index that caused an error

When the line parsed with an error is long, say DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/$\{POSTGRES_DB}"
it's rather hard to understand which symbol had caused a parsing error.
This PR makes it a bit more clearer.
It would be even more descriptive to actually highlight the wrong symbol instead with some symbol, say ^, but not sure if it's a good approach for the library crate.

I don't understand the codecov status, is it stating that the PR had increased the coverage but it's not enough still?
Looks rather unfair to me.

It's just saying that of the code changed 88% was covered whereas the target is 90%. There is a reason I don't have codecov listed as a required status.

authors: SomeoneToIgnore dgriffen

repo: dotenv-rs/dotenv


text:
Update "ASP.NET Core and Entity Framework 6" for .NET Core 3.0

To use Entity Framework 6, your project has to compile against .NET Framework, as Entity Framework 6 doesn't support .NET Core. If you need cross-platform features you will need to upgrade to Entity Framework Core.

This is no longer the case for ef6.3
Edit by @Rick-Anderson
6K PV
See Announcing Entity Framework 6.3 Preview with .NET Core Support
See also #15684 if it's relevant.

EDIT : 6K PV
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f376ed07-b726-292f-eb33-7a918337367b
Version Independent ID: 817b265f-0769-80e1-b42c-e1b0d05ff13b
Content: Get Started with ASP.NET Core and Entity Framework 6
Content Source: aspnetcore/data/entity-framework-6.md
Product: aspnet-core
Technology: aspnetcore-data
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Hi, is this a good first timer item?  If I understand correctly someone just needs to delete the paragraph from the documentation?

@alrz It looks like quite a bit needs to be rewritten.

@pgrudzien12  @damienpontifex let me know if you're interested in updating this for EF 6.3

(I think you meant to mention @attrib75)

Also relates to https://devblogs.microsoft.com/dotnet/announcing-ef-core-3-0-and-ef-6-3-general-availability/

I'll certainly take any part of this if anyone wants me to.  I just need a little direction to understand.  If not, that's cool too. I'll look out for another beginner issue

@alrz  you're welcome to work on this. Let us know before you start.

@attrib75 , go ahead and make the edit you feel comfortable with.  I will take a look and add on any additional changes if needed and we can get your first doc improvement published.  :)

@Rick-Anderson Is there any recent progress on this issue?

~@alrz~ @attrib75 you're welcome to work on this. Let us know before you start.

Whoops!  Somehow I missed this

6K PV. Hopefully @wadepickett can get to this next month.

Sorry, I haven't been working with EF6 for a while so it'd be back to basics for me again researching what would be needed here.

Same answer as @damienpontifex for me.

@attrib75  all we need is a sample app using EF 6 and ASP.NET Core 3.1
If you can do that I'll help with the article.

@Rick-Anderson Sure. I can do that.  Help me to understand.  Just make a very basic ASP.NET Core app with EF6?  Just bare bones, nothing else in it?  How do I submit it to this?  How would the app link in the article?  Thanks for helping a beginner contributor!

Yes, just a basic sample. Most folks seem to do the EF6 code  calls from a web API project so that's fine.
Create the sample in the AspNetCore.Docs/aspnetcore/data/entity-framework-6/3.xsample
so you'll need to create the 3.x sample.
If you select version 2.2 or lower in the version selector, you get this version
We can use that to create the 3.1 version. You might want to use that code.

Ok thanks, I'll give that a go this weekend.

@Rick-Anderson I made a PR:  #19537
thanks

@attrib75 I brought your commits over to #19546, where I'll continue to work on it. Thanks for doing this, I should have something for you to review in a couple days.

@attrib75  thanks again for all your help. The new doc is now live https://docs.microsoft.com/en-us/aspnet/core/data/entity-framework-6

@Rick-Anderson How cool is that?! My pleasure.

@attrib75 feel free to edit in browser and change the link on your name.
At the top right of the article, select the Edit pen icon:

Select the pen icon again. Save.

authors: Rick-Anderson Varorbc alrz attrib75 damienpontifex tdykstra wadepickett


text:
asp-for get expression name from expression

This documentation describes how the asp-for attribute of a label or input tag helper is used to specify an 'expression name' which is the property of the model that the server should use to generate the appropriate label or input markup, i.e. label display name and input validation as specified by the model property's attributes.
What it doesn't explain is how do you specify this expression name via an expression as opposed to hard-coding it. If for example you are using the tag helper in a partial then having a hard coded expression name is not going to be very useful, since your partial is likely to want to target different properties at each place where the partial is used.
Here is a concrete example
I have a form in a Razor page containing loads of fields, all with identical markup.
@page "{id:int}"
@model RazorPagesMovie.Pages.Movies.EditModel

<form method="post">

      <input asp-for="Movie.Title" class="form-control" />

      <input asp-for="Movie.ReleaseDate" class="form-control" />

      <input asp-for="Movie.Genre" class="form-control" />

</form>

Rather than my page file being stuffed with all this copy/paste I decide to eliminate the code duplication using the feature the ASP documentation says I should be using for this, namely a partial.
So I create a partial
@model object

   <input asp-for="@Model" class="form-control" />

...and reference that from my page file using
<partial name="_MovieField" for="Movie.Title" />

Only problem, nothing works. The asp-for="@Model" in the label doesn't resolve the display name for the property so the label is blank, and none of the validation works either.
I've tried passing the desired property in ViewData and accessing that in the partial, but that doesn't work.

I've even tried reflection, but that doesn't work either.

Is there any way to get this to work? If not and you simply can't use tag helpers that expect expression names in partials, then that would seem to make partials pretty useless.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: a96bbb2e-2611-525f-129d-b86a491e423c
Version Independent ID: 4e39097d-b058-d4e2-8780-31b0067b6717
Content: Tag Helpers in forms in ASP.NET Core
Content Source: aspnetcore/mvc/views/working-with-forms.md
Product: aspnet-core
Technology: aspnetcore-mvc
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

@NTaylorMullen can you take a quick look?

@Rick-Anderson I no longer work on the ASP.NET Core runtime team and am not quite sure the correct expectations in this scenario 😢

@Neutrino-Sunset,
Using @Model is not correct since it doesn't compute names but just the value of the input field. asp-for expects a property path in order to compute the right names. However, in this case, the path is empty, and an empty path is not accepted by asp-for (this might be considered a bug). Conclusion?
In this case, you can't use Tag helpers but you must implement your partial view with Html helpers. With Html helpers you represent properties with lambda expressions, thus you can represent also an empty property path as m => m, thus overcoming the issue.

@Neutrino-Sunset  if this is still a problem,

create the simplest possible project that reproduces the issue
Create an issue at https://github.com/dotnet/aspnetcore/issues with a link to the public GitHub repo
mention this issue.

authors: NTaylorMullen Neutrino-Sunset Rick-Anderson frankabbruzzese


text:
Missing instructions

In blazor webAssembly section.
In the section Add a SignalR hub we have this:
using Microsoft.AspNetCore.SignalR;

namespace BlazorWebAssemblySignalRApp.Server.Hubs
{
    public class ChatHub : Hub
    {
        public async Task SendMessage(string user, string message)
        {
            await Clients.All.SendAsync("ReceiveMessage", user, message);
        }
    }
}

But the compiles says it doesn't knows what the Clients are, right  after the await.
The using Microsoft.AspNetCore.SignalR; is not being underlined so it is detected even without adding any nuget package to the server

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 85af7a99-672c-0438-dcc2-e8edfaf70c54
Version Independent ID: 85af7a99-672c-0438-dcc2-e8edfaf70c54
Content: Use ASP.NET Core SignalR with Blazor
Content Source: aspnetcore/blazor/tutorials/signalr-blazor.md
Product: aspnet-core
Technology: aspnetcore-tutorials
GitHub Login: @guardrex
Microsoft Alias: riande

Hello @Ricardoaraujo00 ... I can't explain that behavior. Open an issue for the product unit at ...
https://github.com/dotnet/aspnetcore/issues
Please add ...
cc: @guardrex https://github.com/dotnet/AspNetCore.Docs/issues/26105

... to the bottom of your opening comment so that I follow along. I might re-open this for doc work depending on what they say.

btw @Ricardoaraujo00 ... When you say you didn't add a package, you must add the Microsoft.AspNetCore.SignalR.Client package to the BlazorWebAssemblySignalRApp.Client project, so make sure that you did that. See ...
https://docs.microsoft.com/en-us/aspnet/core/blazor/tutorials/signalr-blazor?view=aspnetcore-6.0&tabs=visual-studio&pivots=webassembly#add-the-signalr-client-library

Thank you for your suggestion but I believe this is a documentation issue. I don't want to mess around with issues for the development team when I think it is documentation related.
If you try to implement SignalR in a clean WebAssembly application according to those instructions you will face the problem I'm reporting. If i find the problem I'll report it back here for documentation correction.
Thank you

I'm sorry. Everything is fine with the code. The problem is that it is a bit susceptible to errors following along because the lines we are supposed to add up are mixed with lines that already exist in the base model, and for a proper standout maybe they should be in bold.
For example, I must add two lines of this code section:
builder.Services.AddSignalR(); builder.Services.AddControllersWithViews(); builder.Services.AddRazorPages(); builder.Services.AddResponseCompression(opts => {     opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(         new[] { "application/octet-stream" }); });
And maybe they should standout be:
**builder.Services.AddSignalR();** builder.Services.AddControllersWithViews(); builder.Services.AddRazorPages(); **builder.Services.AddResponseCompression(opts => {     opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(         new[] { "application/octet-stream" }); });**
This way I know that I must add the first line. It was a lack of attention of mine, but nevertheless... I leave that suggestion.

Ok ... that's fine ... except that I can't do that in the doc with the doc features that we have. Let me work on that tho ... I'm sure that I can distill it down and clarify what's being added where to solve that.


text:
Published feature which not working

You publish features that have not been going for months.
You read the documentation and are happy that you can use it, only to spend hours to find out that it doesn't work at all.
bind:get / bind :set
No info, no workaround.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: b211df59-e1c9-86c0-c904-31fa3c361e6d
Version Independent ID: 3f912dfc-5ba5-6c6c-ba93-1ae78508a5cc
Content: ASP.NET Core Blazor data binding
Content Source: aspnetcore/blazor/components/data-binding.md
Product: aspnet-core
Technology: aspnetcore-blazor
GitHub Login: @guardrex
Microsoft Alias: riande

Hello @scatman255 ... Those features should work for 7.0. Open an issue for the product unit on their GitHub repo. Explain out with your code example what's not working, and they probably need you to put up a minimal project on GitHub that demonstrates the problem that you're having.
If you are using Visual Studio, there's a known problem in the UI described at https://github.com/dotnet/aspnetcore/issues/44957, but that should only apply to @bind:after, not get/set for @bind.
Here's their repo issues where you can open a support request with them ...
https://github.com/dotnet/aspnetcore/issues
Please add ...
cc: @guardrex https://github.com/dotnet/AspNetCore.Docs/issues/28571

... to the bottom of your opening comment so that I can follow along. I might re-open this for doc work depending on what they say.

I confirm that with 7.0.200 SDK @bind:set does not work

authors: FLAMESpl guardrex scatman255


text:
Microsoft.Data.SqlClient Transitive Packages

I have a .NET Framework 4.8 app and I just installed the NuGet package for Microsoft.Data.SqlClient 5.1.2.
It added 38 transitive packages. I was hoping for just a few additional files, but that's a lot of additional DLLs to add to my distribution.
Am I doing something wrong?

partially related to https://github.com/dotnet/SqlClient/issues/1108

partially related to #1108

I read through that, and in my case I am connecting to an Azure database using MFA. I'm OK with needing the Azure DLLs.
What I'm confused about is all of the "System." Dlls. For example, System.Memory. If I remove the System.Memory.dll file from the output directory the program fails to load with an error that it can't find the file of that version.
Forgive me if I just don't understand enough about this, but wouldn't that DLL be part of the framework? Is it part of the framework but Microsoft.Data.SqlClient needs a different version of the DLL?
Do I just go ahead and distribute all of these System DLL files with my application and put them in the same folder as my EXE on the installation target folder?

System.Memory.dll is shipped in a nuget. it has never been shipped as part of net4x

Do I just go ahead and distribute all of these System DLL files with my application and put them in the same folder as my EXE on the installation target folder?

yes

Microsoft.Data.SqlClient is an individual NuGet package, unlike System.Data.SqlClient.

@TRCarbone this is by design. There is nothing could be done.

authors: DavoudEshtehari JRahnama SimonCropp TRCarbone

repo: dotnet/SqlClient


text:
Downgrade Xunit, Improve exception handling for Diagnonstic Tests

Description: While doing some investigation into improving the diagnostic tracing tests, I noticed that test failures are logged very non-descriptly by remote executor. To resolve this issue, we have to downgrade xunit to v2.4.2. Here's the rationale for this change:

RemoteExecutor throws XunitExceptions from xunit.assert nuget and uses the (string, string) constructor
The (string, string) constructor was removed in >=2.5 of xunit.assert
  * RemoteExecutor was fixed to inherit from Exception in newer versions, but for us to take this requires upgrading to .net 7 or 8 (which I imagine is a much larger lift)
In order to downgrade xunit.assert, we need to downgrade xunit
In order to downgrade xunit, we also need to downgrade Microsoft.DotNet.XunitExtensions
Without this change, exceptions from RemoteExecutor will fail to construct, masking all errors with "MethodNotFound"

Although normally downgrading is bad for security reasons, I believe this to be a safe change since it only affects tests.
This PR also makes a bunch of improvements to the DiagnosticTests:

Remove conditional facts when test TDS server is used
Remove try/catch with empty catch block, replace with assert.throws
Ensure that connections are opened before trying test conditions
Document scenarios where test TDS server doesn't obey actual behavior, or where test TDS server cannot be used
Formatting improvements

Testing:

All tests (that are expected to pass) continue to pass
In a synthetic failure of diagnostic tests, here's the before and after of the error messages:

Before:System.MissingMethodException: Method not found: 'Void Xunit.Sdk.XunitException..ctor(System.String, System.String)'.

System.MissingMethodException
Method not found: 'Void Xunit.Sdk.XunitException..ctor(System.String, System.String)'.

After:Microsoft.DotNet.RemoteExecutor.RemoteExecutionException: Remote process failed with an unhandled exception.

Microsoft.DotNet.RemoteExecutor.RemoteExecutionException
Remote process failed with an unhandled exception.
Child exception:
  Xunit.Sdk.FailException: Assert.Fail(): Foo
   at Microsoft.Data.SqlClient.ManualTesting.Tests.DiagnosticTest.<>c.<SyntheticFailure>b__1_0() in
C:\Projects\benrr101\sqlclient\src\Microsoft.Data.SqlClient\tests\ManualTests\TracingTests\DiagnosticTest.cs:line 34

I am not a fan of this change since it is downgrading the version. If there is a missing functionality we need to reach out to xunit maintainers and ask them for an update or to add a functionality. Plus, since net6 will be out of support at the end of this year, I am not sure how the compatibility will work on lower versions of xunit and net8 and net9. We may end up upgrading that again which will make it redundant.

I'm on the fence about the version downgrades. At a high level, for the next MDS release we want to:

Bump to v6.0.
Remove .NET Standard support.
Remove .NET 6 support.
Switch the netfx project to .NET SDK style.

So upgrading to .NET 8 can come sooner than later.
I don't see MDS 6.0 GAing before .NET 6 EOLs Nov 12, so I think it would be safe to drop it for all the previews. If you have bandwidth to take on any of these larger tasks, that would be great. We will need to coordinate pipeline changes with 2 and 3, which may be made easier after the migration to YAML pipelines (in progress). Once they are in YAML, pipeline and code changes can be part of the same PR.

@David-Engel I have a draft branch with .netstandard Removal. Maybe I will leave until yaml pipeline is ready?

@JRahnama In this case, there isn't anything required of xunit - dotnet/arcade has already fixed the issue by having the remote executor exception inherit from Exception directly. However, we cannot take that newer version because the package it requires .net 7 or 8. As much as I'd like to just bump the test project versions up, I presume that will break many things.
@David-Engel So, it sounds like there's no interest in taking downgrading xunit to improve error messages on remote executor tests? Basically, hold on until we can upgrade everything to net7.0+? If that's the case, I'll at least resubmit the improvements to the diagnostic tests.

So, it sounds like there's no interest in taking downgrading xunit to improve error messages on remote executor tests? Basically, hold on until we can upgrade everything to net7.0+? If that's the case, I'll at least resubmit the improvements to the diagnostic tests.

Like I said, I'm on the fence. I'm fine with it as long as we don't forget to bump it back up once we remove .NET 6.

Maybe an issue to upgrade should be created?

In this case, there isn't anything required of xunit - dotnet/arcade has already fixed the issue by having the remote executor exception inherit from Exception directly. However, we cannot take that newer version because the package it requires .net 7 or 8. As much as I'd like to just bump the test project versions up, I presume that will break many things.

I was wondering, if we could have different versions of xunit based on our versionprops for different TFM?

@David-Engel Understood, thanks for the approval. If it were me, when the upgrade to net7.0+ comes, I'd also do a sweep to upgrade all packages in the non-product projects (eg, tests). But I suppose I can create an issue to upgrade as per @ErikEJ 's suggestion?
@JRahnama Perhaps, but I need a bit of help to understand. What's TFM? I'm also having difficulty in tracing all the conditionals that go into building the tests. My gut feeling is we should reduce the number of conditionals in the projects/props to make it simpler to manage. If the conditions we would split xunit versions on already exists, let me know the required changes and I'll update this PR. But, if we'd need to introduce more conditionals to make it happen, I think we should probably avoid that.

Perhaps, but I need a bit of help to understand. What's TFM?

Certainly.
Recently, we introduced VersionsNet8OrLater.props for .NET 8 and later versions. Essentially, if we have a different dependency version for .NET 8, the values are read from this file. You can add a newer version of xunit and xunitextension from the Arcade to that folder and update the one in Versions.props to the lower version. In this scenario, .NET 8 could utilize the newer version of xunit, while .NET 6 will utilize the lower version. You don't need to perform any additional steps; just add different versions in different folders, and theoretically that should suffice.
TFM -> Target Framework Monikers

@JRahnama Added the newer version of xunit (the original one) and the latest version of the arcade nugets to the .net8+ version props file. I think 😅 I'm a little unsure how to build specifically for .net8 versus .net6, tho. Let me know if I did something wrong or how I can validate it better on my end, please. Thanks!

authors: David-Engel ErikEJ JRahnama benrr101


text:
Looking forward to introducing CV_CUDA

If torchsharp could introduce CVCUDA, it would be even more perfect，https://github.com/CVCUDA/CV-CUDA
The official mentioned that the running speed of this library can reach about 30 times that of OpenCV, which can greatly improve the preprocessing speed of image algorithms, increase data throughput, and I believe it will also be of great help to improving the. NET ecosystem

That library seems to be completely separate from PyTorch. While a wrapper might be beneficial for the .NET ecosystem, I think the wrapper should be its own project, rather than part of TorchSharp.

Share a link through Discussion so we can follow your work

https://github.com/dotnet/TorchSharp/discussions/333#discussioncomment-11559753
We soon have more than one official persons supporting this project

Performance Comparison Between CV-CUDA and OpenCV

Project Address：CV_CUDA

repo: dotnet/TorchSharp


text:
"View logs" link from Traces doesn't show logs

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
When clicking the "View Logs" link on a trace, I'd expect it to show logs assosciated with the trace, but instead it shows no results

Interestingly, if you click on the "Filter", then the field name seems to be missing

If you add in the traceid filter, then traces do show up, and the filter in the url changes from TraceId to log.traceid
https://localhost:17127/structuredlogs?filters=TraceId:equals:a348a0cfcb70b0188d38a3ba0a97a68e
https://localhost:17127/structuredlogs?filters=log.traceid:equals:a348a0cfcb70b0188d38a3ba0a97a68e
Expected Behavior
I'd expect clicking the"View Logs" link to show me all the logs associated with the trace

Steps To Reproduce
Click the "View Logs" link on a trace

Exceptions (if any)
N/A
.NET Version info
.NET SDK:
 Version:           8.0.303
 Commit:            29ab8e3268
 Workload version:  8.0.300-manifests.d7126b9e
 MSBuild version:   17.10.4+10fbfbf2e

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22621
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.303\

.NET workloads installed:
 [aspire]
   Installation Source: SDK 8.0.300, VS 17.10.35027.167
   Manifest Version:    8.1.0/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.1.0\WorkloadManifest.json
   Install Type:        FileBased

Host:
  Version:      8.0.7
  Architecture: x64
  Commit:       2aade6beb0

.NET SDKs installed:
  6.0.424 [C:\Program Files\dotnet\sdk]
  8.0.300-preview.24203.14 [C:\Program Files\dotnet\sdk]
  8.0.303 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Anything else?
Aspire 8.1

@JamesNK

Thanks for reporting this.
This issue is a known bug in 8.1. It's fixed in https://github.com/dotnet/aspire/pull/5023. The next version of Aspire will include this fix.

Awesome.  Thanks @JamesNK.

authors: JamesNK adamint afscrome

repo: dotnet/aspire


text:
Can't create aspire apphost from the dotnet cli since upgrading to .net 9

Is there an existing issue for this?

[x] I have searched the existing issues

Describe the bug
Trying to add a new apphost to a new solution, but running into an error:
➜  Notifications git:(main) dotnet new aspire-apphost -o TSWCloud.NotificationService.AppHost
No templates or subcommands found matching: 'aspire-apphost'.

To list installed templates similar to 'aspire-apphost', run:
   dotnet new list aspire-apphost
To search for the templates on NuGet.org, run:
   dotnet new search aspire-apphost

For details on the exit code, refer to https://aka.ms/templating-exit-codes#103
➜  Notifications git:(main) dotnet new list aspire-apphost
No templates found matching: 'aspire-apphost'.

To search for the templates on NuGet.org, run:
   dotnet new search aspire-apphost

For details on the exit code, refer to https://aka.ms/templating-exit-codes#103
➜  Notifications git:(main) dotnet new search aspire-apphost
Searching for the templates...
Matches from template source: NuGet.org
No templates found matching: 'aspire-apphost'.

For details on the exit code, refer to https://aka.ms/templating-exit-codes#103

This is one Fedora Workspace 41.
Upgraded to .net 9 via the shell script here: https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual
Using the command ./dotnet-install.sh --channel 9.0
I've installed it this way because I'm having trouble getting the latest version via the Fedora package manager. (A bit of that saga is described here: https://github.com/dotnet/aspire/issues/5205)
Expected Behavior
It creates an apphost project for me.
Steps To Reproduce
Run the command dotnet new aspire-apphost -o TSWCloud.NotificationService.AppHost
Exceptions (if any)
No response
.NET Version info
Output of dotnet --info
➜  Notifications git:(main) dotnet --info
.NET SDK:
 Version:           9.0.100
 Commit:            59db016f11
 Workload version:  9.0.100-manifests.3068a692
 MSBuild version:   17.12.7+5b8665660

Runtime Environment:
 OS Name:     fedora
 OS Version:  41
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /home/grant/.dotnet/sdk/9.0.100/

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.0
  Architecture: x64
  Commit:       9d5a6a9aa4

.NET SDKs installed:
  8.0.303 [/home/grant/.dotnet/sdk]
  8.0.400 [/home/grant/.dotnet/sdk]
  9.0.100 [/home/grant/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.7 [/home/grant/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.8 [/home/grant/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.0 [/home/grant/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.7 [/home/grant/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.8 [/home/grant/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.0 [/home/grant/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/home/grant/.dotnet]

global.json file:
  /home/grant/Code/Notifications/global.json

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Anything else?
No response

Did you install the aspire templates?
https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/aspire-sdk-templates?pivots=dotnet-cli

@davidfowl Wow, I was being really dumb.
Didn't think that updating to dotnet 9 would require having to add the templates.
Makes sense in retrospective.
➜  dotnet new install Aspire.ProjectTemplates
The following template packages will be installed:
   Aspire.ProjectTemplates

Installing the template package(s) will override the available template package(s).
The following template package(s) are already available:
   Aspire.ProjectTemplates::8.2.2

To install the template package(s) anyway, apply '--force' option:
   dotnet new install Aspire.ProjectTemplates --force

For details on the exit code, refer to https://aka.ms/templating-exit-codes#106
➜  dotnet new list aspire
These templates matched your input: 'aspire'

Template Name                      Short Name              Language  Tags
---------------------------------  ----------------------  --------  -------------------------------------------------------
.NET Aspire App Host               aspire-apphost          [C#]      Common/.NET Aspire/Cloud
.NET Aspire Empty App              aspire                  [C#]      Common/.NET Aspire/Cloud/Web/Web API/API/Service
.NET Aspire Service Defaults       aspire-servicedefaults  [C#]      Common/.NET Aspire/Cloud/Web/Web API/API/Service
.NET Aspire Starter App            aspire-starter          [C#]      Common/.NET Aspire/Blazor/Web/Web API/API/Service/Cloud
.NET Aspire Test Project (MSTest)  aspire-mstest           [C#]      Common/.NET Aspire/Cloud/Web/Web API/API/Service/Test
.NET Aspire Test Project (NUnit)   aspire-nunit            [C#]      Common/.NET Aspire/Cloud/Web/Web API/API/Service/Test
.NET Aspire Test Project (xUnit)   aspire-xunit            [C#]      Common/.NET Aspire/Cloud/Web/Web API/API/Service/Test

➜  Code mkdir aspire-test
➜  Code cd aspire-test
➜  aspire-test dotnet new aspire-starter -o test.apphost
The template ".NET Aspire Starter App" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/dotnet/aspire/8.0-third-party-notices for details.

Processing post-creation actions...
Restoring /home/grant/Code/aspire-test/test.apphost/test.apphost.sln:
Restore succeeded.
Restoring /home/grant/Code/aspire-test/test.apphost/test.apphost.AppHost/test.apphost.AppHost.csproj:
Restore succeeded.
Restoring /home/grant/Code/aspire-test/test.apphost/test.apphost.ServiceDefaults/test.apphost.ServiceDefaults.csproj:
Restore succeeded.
Restoring /home/grant/Code/aspire-test/test.apphost/test.apphost.ApiService/test.apphost.ApiService.csproj:
Restore succeeded.
Restoring /home/grant/Code/aspire-test/test.apphost/test.apphost.Web/test.apphost.Web.csproj:
Restore succeeded.

➜  aspire-test

The aspire templates are not part of the .NET sdk as yet


text:
Refactor WASM+Identity sample app to remove Swashbuckle?

@JeremyLikness ... The Backend app of the WASM+Identity sample app uses Swashbuckle ...
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />

... but I thought it wasn't supported for 8.0 per ...
https://learn.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle?view=aspnetcore-7.0&tabs=visual-studio

Right. Agreed.

authors: JeremyLikness guardrex

repo: dotnet/blazor-samples


text:
Update App Types document

As agreed with Ron, updating this document to point to the deployment document. Also added a sub-section in the self-contained applications section to talk a bit about the smaller application creation and again point to Ron's document that will be describing that.
Fixes #Issue_Number
@rpetrusha @richlander @mairaw @BillWagner

Also added a sub-section in the self-contained applications section to talk a bit about the smaller application creation and again point to Ron's document that will be describing that.

Shouldn't that link be added only after the content it links to actually exists? And then link to a specific section of that article?

Or, we can update and merge this PR after Ron finishes the deployment section and adds it. Seems to me both are good options. :)
Thanks,
Z
Sent from my tricorder
On Tue, Jul 19, 2016 at 5:45 PM -0700, "Petr Onderka" <notifications@github.commailto:notifications@github.com> wrote:
Also added a sub-section in the self-contained applications section to talk a bit about the smaller application creation and again point to Ron's document that will be describing that.
Shouldn't that link be added only after the content it links to actually exists? And then link to a specific section of that article?

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/dotnet/core-docs/pull/823#issuecomment-233808345, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AC-H_Dux4LUUDK_y2Ps8-AcDvNBZB25Mks5qXW_CgaJpZM4JQTVk.

With two corrections, LGTM.

Would love to rename the file from "app-types" to something more about publishing or deployment.

@blackdwarf Is this ready to merge, or will there be further changes?

@BillWagner further changes as agreed with @rpetrusha and @richlander. I just need to find the time to sit down and write. 😃 🎉

Hi Z,
Since I just finished most of the work for the Framework 4.6.2 release, I should have some time to work on this tomorrow and Friday, if you’re too busy. (I’m on vacation next week.)
--Ron
From: Zlatko Knezevic [mailto:notifications@github.com]
Sent: Tuesday, August 02, 2016 12:16 PM
To: dotnet/core-docs
Cc: Ron Petrusha; Mention
Subject: Re: [dotnet/core-docs] Update App Types document (#823)
@BillWagnerhttps://github.com/BillWagner further changes as agreed with @rpetrushahttps://github.com/rpetrusha and @richlanderhttps://github.com/richlander. I just need to find the time to sit down and write. 😃 🎉
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/dotnet/core-docs/pull/823#issuecomment-237012703, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKYfMSJM2vwzcBS7DW3US1Uc1O1pr2Fwks5qb5dWgaJpZM4JQTVk.

where we are with this PR @blackdwarf? Is this WIP or should I do a review and see if it's ready to be merged?

@mairaw will be working on this this week. It is WIP.

@mairaw @rpetrusha @richlander @BillWagner this is now ready for review.

Open Publishing Build Service: The pull request content has been published and here are some sample preview links:

Docset 1: core-docs

closing and re-opening to kick off the build again.

Overall, LGTM.
Found a couple small edits (1 bad link, 1 typo).
:shipit: once those are addressed.
(Removed the WIP on the title of the PR above).

Open Publishing Build Service: The pull request content has been published and here are some sample preview links:

Docset 1: core-docs

Open Publishing Build Service: The pull request content has been published and here are some sample preview links:

Docset 1: core-docs

Open Publishing Build Service: The pull request content has been published and here are some sample preview links:

Docset 1: core-docs

Open Publishing Build Service: The pull request content has been published and here are some sample preview links:

Docset 1: core-docs

OK, seems that stuff is done. We ready to merge this?

Yes.

Thanks @blackdwarf!

authors: BillWagner blackdwarf mairaw qinezh richlander rpetrusha svick

repo: dotnet/core-docs


text:
Is there a migration path for System.EnterpriseServices?

We have a lot of code in .NET 4.0 using System.EnterpriseServices. Can you suggest a migration path to .NET 5?

@jeffschwMSFT do you know who the best contact is for answering this question?

One library you might try is Polly, but it really depends on what features you were using in EnterpriseServices.
@Pilchie do you have any advice here?

Also tagging @glennc.  Unfortunately, I'm not very familiar with EnterpriseServices.

EnterpriseServices is COM+ (dynamic com with remoting).  There is not a straight equivalence in .NET Core.  I am seeking the right set of folks to include.

authors: Pilchie carlossanlop jeffschwMSFT pappasa scalablecory

repo: dotnet/core


text:
erro de build na hora de instalar o programa

Problem encountered on https://dotnet.microsoft.com/pt-br/learn/dotnet/hello-world-tutorial/run
Operating System: windows
Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.

C:\Users\roger\MyApp\MyApp\Program.cs(2,1): error CS8802: Apenas uma unidade de compilação pode ter instruções de nível
superior. [C:\Users\roger\MyApp\MyApp.csproj]
C:\Users\roger\MyApp\obj\Debug\net7.0\MyApp.AssemblyInfo.cs(19,12): error CS0579: Duplicar atributo "System.Reflection. sistema operacional 64bits


text:
Add Cursor to ReadableBufferReader and dispatch from Pipe

@davidfowl

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

@pakrym why is the CI failing?

@davidfowl because dispatched continuation was not awaited, removed dispatch from this PR.

public ReadCursor Move(ReadCursor cursor, int count), yes please :)

authors: aL3891 davidfowl dnfclas pakrym

repo: dotnet/corefxlab


text:
Updated span.md with proper stackalloc syntax.

cc: @ahsonkhan, @VSadov, @ericstj

LGTM

LGTM

authors: KrzysztofCwalina VSadov joshfree


text:
Move planning.md to ../docs/specs/gpio.md

Move the GPIO planning md file to the docs directory

@edgardozoppi


text:
Reflection Missing Symbols

I am using some minimal reflection in my (closed-source) app to implement System.Resources.ResourceManager. The use of reflection is limited to the following calls:

Type.GetTypeInfo()
TypeInfo.Assembly getter
Assembly.GetName()
AssemblyName.Name getter

However, when I try to compile this code with CoreRT, ILC finishes successfully, but the linker gives undefined-symbol errors for the following methods:
System_Private_Reflection_Core_System_Reflection_Runtime_TypeInfos_NativeFormat_NativeFormatRuntimeNamedTypeInfo__get_Assembly
System_Private_Reflection_Core_System_Reflection_Runtime_TypeInfos_RuntimeBlockedTypeInfo__get_Assembly
System_Private_Reflection_Core_System_Reflection_Runtime_TypeInfos_RuntimeNoMetadataNamedTypeInfo__get_Assembly
System_Private_Reflection_Core_System_Reflection_Runtime_TypeInfos_RuntimeConstructedGenericTypeInfo__get_Assembly
System_Private_Reflection_Core_System_Reflection_Runtime_TypeInfos_RuntimeHasElementTypeInfo__get_Assembly
System_Private_Reflection_Execution_Internal_Reflection_Execution_ConstraintValidator_InstantiatedTypeInfo__get_Assembly
System_Private_Reflection_Core_System_Reflection_Runtime_TypeInfos_RuntimeGenericParameterTypeInfo__get_Assembly

This all worked several months ago, before the switch to csproj. Is there anything I can do to resolve this? Thanks!

This looks like a bug with LazilyBuiltVTableSliceNode. One part of the system believes that TypeInfo.Assembly method is necessary, but other part believes that it is not necessary.
You can try working around this by calling type(MyProgram).GetTypeInfo().Assembly at the start of your program. Also, if you can distill this to a repro that you can share with us, we will be happy to take a look?
@MichalStrehovsky Any other ideas?

@jkotas No good. I have added typeof(Program).GetTypeInfo().Assembly at the top of my Main method, and it still fails to link.

I have seen linking failures similar to this if there's a generic virtual method (or generic interface method) somewhere in the compiled app. We don't support them yet and the blocking we have in place is subpar. We need a repro, otherwise this is not very actionable.

@MichalStrehovsky I'll try to create a repro for you sometime tomorrow.

I think I've got a repro. Using a copy of CoreRT as of commit  2c70a97c46c7eaba1df56ce687d8a87682c61fa1 (I am currently using the tip of the PR branch for #2390, but that commit is the last change that affected ILC itself), attempt to compile the following program with ILC:
using System;
using System.Reflection;

class Program
{
    static void Main(string[] args)
    {
        // This one line is really all you should need.
        Assembly asm = typeof(Program).GetTypeInfo().Assembly;
    }
}

I have found that if TypeInfo.get_Assembly is referenced anywhere in the program, it will trigger this bug. Let me know if this helps!

Yup, this helps. This is because TypeInfo.get_Assembly was moved to System.Type as part of the NetStandard 2.0 work. The compiler expects a callvirt to the method on System.Type, but sees a callvirt to the one on System.Reflection.TypeInfo instead. This is legit IL, but the C# compiler would never have generated it if we were compiling against the NetStandard 2.0 reference assemblies.
We should keep this open because this is legit IL and we should support it, but it's probably lower priority (until we start looking at supporting Visual Basic, I guess).
You can work around this by adding a typeof(Program).GetTypeInfo().Module line somewhere. get_Module internally calls get_Assembly (but through System.Type) and makes all the dependencies light up.

it's probably lower priority (until we start looking at supporting Visual Basic, I guess)

It is a problem for all existing code (nuget libraries in particular) that is compiled against 1.X NetStandard.

authors: MichalStrehovsky jkotas wjk

repo: dotnet/corert


text:
Compiling source to native code failed on Windows 7 Chinese version

I have followed https://github.com/dotnet/corert/blob/master/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md
When execute
dotnet publish /p:NativeCodeGen=cpp -r win-x64

got the following output, it seems a problem with file encoding:
用于 .NET Core 的 Microsoft (R) 生成引擎版本 16.0.225-preview+g5ebeba52a1
版权所有(C) Microsoft Corporation。保留所有权利。
G:\test\pp.csproj(2,1): warning MSB4011: 无法再次导入“C:\Program Files\dotnet\sdk\3.0.100-preview-009812\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props”。可能已在“G:\test\pp.csproj”处导入过它。这很可能是生成创作错误。将忽略此后续导入。
G:\test\pp.csproj : warning MSB4011: 无法再次导入“C:\Program Files\dotnet\sdk\3.0.100-preview-009812\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets”。可能已在“G:\test\pp.csproj (7,3)”处导入过它。这很可能是生成创作错误。将忽略此后续导入。
G:\test\pp.csproj(2,1): warning MSB4011: 无法再次导入“C:\Program Files\dotnet\sdk\3.0.100-preview-009812\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props”。可能已在“G:\test\pp.csproj”处导入过它。这很可能是生成创作错误。将忽略此后续导入。
G:\test\pp.csproj : warning MSB4011: 无法再次导入“C:\Program Files\dotnet\sdk\3.0.100-preview-009812\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets”。可能已在“G:\test\pp.csproj (7,3)”处导入过它。这很可能是生成创作错误。将忽略此后续导入。
正在还原 G:\test\pp.csproj 的包...
正在生成 MSBuild 文件 G:\test\obj\pp.csproj.nuget.g.props。
正在生成 MSBuild 文件 G:\test\obj\pp.csproj.nuget.g.targets。
G:\test\pp.csproj 的还原在 196.83 ms 内完成。
G:\test\pp.csproj(2,1): warning MSB4011: 无法再次导入“C:\Program Files\dotnet\sdk\3.0.100-preview-009812\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props”。可能已在“G:\test\pp.csproj”处导入过它。这很可能是生成创作错误。将忽略此后续导入。
G:\test\pp.csproj : warning MSB4011: 无法再次导入“C:\Program Files\dotnet\sdk\3.0.100-preview-009812\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.targets”。可能已在“G:\test\pp.csproj (7,3)”处导入过它。这很可能是生成创作错误。将忽略此后续导入。
C:\Program Files\dotnet\sdk\3.0.100-preview-009812\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(142,5): message NETSDK1057: 你正在使用 .NET Core SDK 的预览版。可通过当前项目中的 global.json 文件来定义 SDK 版本。详细信息请访问 https://go.microsoft.com/fwlink/?linkid=869452 [G:\test\pp.csproj]
pp -> G:\test\bin\Debug\netcoreapp3.0\win-x64\pp.dll
Generating native code
The method or operation is not implemented. ([S.P.CompilerGenerated]Internal.CompilerGenerated..InvokeRetO<Nullable`1>(object,native int,ArgSetupState&,bool))
pp.cpp
G:\test\Program.cs(7189): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [G:\test\pp.csproj]
G:\test\Program.cs(7692): error C2001: 常量中有换行符 [G:\test\pp.csproj]
G:\test\Program.cs(7693): error C2064: 项不会计算为接受 1 个参数的函数 [G:\test\pp.csproj]
G:\test\Program.cs(7693): error C2143: 语法错误: 缺少“)”(在“;”的前面) [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(3395): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(3643): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(3644): error C2064: 项不会计算为接受 1 个参数的函数 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(3644): error C2143: 语法错误: 缺少“)”(在“;”的前面) [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(3885): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(3886): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(3886): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(3965): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(4113): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(4114): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(4114): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(15512): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(15979): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(15980): error C2064: 项不会计算为接受 1 个参数的函数 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\Console.cs(15980): error C2143: 语法错误: 缺少“)”(在“;”的前面) [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\ConsolePal.Windows.cs(4094): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\ConsolePal.Windows.cs(4856): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\ConsolePal.Windows.cs(4857): error C2146: 语法错误: 缺少“)”(在标识符“int32_t”的前面) [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\ConsolePal.Windows.cs(4857): error C2146: 语法错误: 缺少“;”(在标识符“int32_t”的前面) [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\ConsolePal.Windows.cs(4898): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\ConsolePal.Windows.cs(4899): error C2146: 语法错误: 缺少“)”(在标识符“int32_t”的前面) [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\ConsolePal.Windows.cs(4899): error C2146: 语法错误: 缺少“;”(在标识符“int32_t”的前面) [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\ConsolePal.Windows.cs(4908): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\ConsolePal.Windows.cs(4909): error C2146: 语法错误: 缺少“)”(在标识符“int32_t”的前面) [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Console\src\System\ConsolePal.Windows.cs(4909): error C2146: 语法错误: 缺少“;”(在标识符“int32_t”的前面) [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5238): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5315): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5316): error C2064: 项不会计算为接受 1 个参数的函数 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5316): error C2143: 语法错误: 缺少“)”(在“;”的前面) [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5522): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5523): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5523): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5530): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5531): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5531): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5538): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5539): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5539): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5546): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5547): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\System.Runtime.Extensions\src\System\OperatingSystem.cs(5547): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\ConsoleEncoding.cs(12875): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\artifacts\obj\System.Console\netcoreapp-Windows_NT-Release\System.SR.cs(7988): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\artifacts\obj\System.Console\netcoreapp-Windows_NT-Release\System.SR.cs(8409): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\artifacts\obj\System.Console\netcoreapp-Windows_NT-Release\System.SR.cs(8410): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\artifacts\obj\System.Console\netcoreapp-Windows_NT-Release\System.SR.cs(8410): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\artifacts\obj\System.Console\netcoreapp-Windows_NT-Release\System.SR.cs(8414): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\artifacts\obj\System.Console\netcoreapp-Windows_NT-Release\System.SR.cs(8415): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\artifacts\obj\System.Console\netcoreapp-Windows_NT-Release\System.SR.cs(8415): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\artifacts\obj\System.Console\netcoreapp-Windows_NT-Release\System.SR.cs(9496): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\ConsoleEncoding.cs(456): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\ConsoleEncoding.cs(457): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\ConsoleEncoding.cs(457): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\ConsoleEncoding.cs(461): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\ConsoleEncoding.cs(462): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\ConsoleEncoding.cs(462): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\OSEncoder.cs(822): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\OSEncoder.cs(1762): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\OSEncoder.cs(1763): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\OSEncoder.cs(1763): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\OSEncoder.cs(1767): error C2001: 常量中有换行符 [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\OSEncoder.cs(1768): error C2144: 语法错误:“void”的前面应有“)” [G:\test\pp.csproj]
E:\A_work\7\s\corefx\src\Common\src\System\Text\OSEncoder.cs(1768): error C2144: 语法错误:“void”的前面应有“;” [G:\test\pp.csproj]
C:\Users\hzexe.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\1.0.0-alpha-27228-02\targets\Microsoft.NETCore.Native.targets(249,5): error MSB3073: 命令“cl @"obj\Debug\netcoreapp3.0\win-x64\native\cl.rsp"”已退出，代码为 2。 [G:\test\pp.csproj]

This issues still exists, and I've checked test.csproj and Program.cs, whether they're Unicode or utf-8, the same mistake

Looks like a dup of #663: The generated cpp file requires BOM header.

authors: hzexe jkotas


text:
Port string.Compare changes from CoreCLR

This ports the string.Compare changes made in dotnet/coreclr#6603 and dotnet/coreclr#6891.
A couple of notes:

I moved the now CompareOrdinalHelper function next to the other CompareOrdinalHelper overload.

Compare(string, int, string, int, int, bool) does not exist in this repo, however Compare(string, string, bool) does. This is presumably because it is not exposed in the contracts yet-- see dotnet/corefx#10216 and dotnet/corefx#10066 which track this. This presents a problem, since I changed one of the other overloads to forward to it. So I took the liberty of adding it to the String class here.

cc @jkotas

LGTM. Thanks!

authors: jamesqo jkotas


text:
Fix regression bot json schema validation

/cc @catcherwong
I haven't found why yet ... but that seems to fix the validation

@sebastienros I'm sorry for this problem.
JsonSchema.Net only supports draft 6 and later, update to draft 7 can solve it,
https://json-everything.net/json-schema#schema-versions

authors: catcherwong sebastienros

repo: dotnet/crank


text:
Controlling the Prediction Score Range

Hi everyone,
I have a question in regards to the Prediction Score.
I was wondering if there is any way I set up a range for the score between 0 to 1
For example:
0.5 > positive
0.5 = neutral
0.5 < negative
I'm currently using Cognitive Service Text Analytics API, and as you probably know their score between 0-1 Link
> The sentiment analyzer classifies text as predominantly positive or negative, assigning a score in the range of 0 to 1. Values close to 0.5 are neutral or indeterminate. A score of 0.5 indicates neutrality. When a string cannot be analyzed for sentiment or has no sentiment, the score is always 0.5 exactly. For example, if you pass in a Spanish string with an English language code, the score is 0.5.
Let me know if you know an easy way to implement this method.
Thanks
Diego

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: edace175-268c-7428-dad5-95cd974422c3
Version Independent ID: 707aed84-b636-088a-bf57-1cc5e4f69631
Content: What is ML.NET and how does it work? - ML.NET
Content Source: docs/machine-learning/how-does-mldotnet-work.md
Product: dotnet-ml
GitHub Login: @natke
Microsoft Alias: nakersha

Closing because it is a duplicate of #12242

authors: dorofino luisquintanilla

repo: dotnet/docs