text:
tests: set an explicit value for core.abbrev config

Users can have a value for core.abbrev different than the default one in their ~/.gitconfig, this makes some tests fail because when comparing the output, they expect hashes to be 7 chars long. Fix by setting an explicit value of 7 when initializing a repo inside a test.

Thanks!

authors: arxanas melko

repo: arxanas/git-branchless


text:
independent remapping of reads

When both reads from a read pair overlap a single variant, the reads that are generated for remapping should not be independent (i.e. if read1 has alternate allele, so should read2).

Unfortunately, reads are currently generated on a per-single-pair basis. Either I can resolve generated reads from the same pair that overlap the same SNP after they've been processed, or I can alter the two methods that do the processing generate_reads() and generate_haplo_reads() to accept tuples of data when there are pairs involved and then generate reads that are not independent.
I think the second strategy will probably be more efficient. Let's do that.

Nevermind. New strategy:
Fix the reads after they've been generated using another function that accepts the old reads, the generated reads, the snp indeces, and the snp positions in the read sequences.

Ok. So the new strategy didn't work either. I think we should go back to the idea of altering generate_reads() and generate_haplo_reads() directly, so that they may accept tuples of data when there are pairs involved.

Upon further reflection, I realized that the generation functions probably wouldn't have to be altered to do this. Instead, I could just create a separate function to handle generating combinations of read pairs. That function should

Classify the generated reads (for both pairs) by whether or not they contain the reference or alternate allele for each SNP. This should lead to 2^n groupings where n is the number of SNPs.
Generate unique combinations of read pairs, but only among groups that have been classified the same (so that reads with the reference allele for SNP1 are paired only with reads with the reference allele for SNP1, for example).

In the end, it should look something like this

source: gharchive/issue

license_type: permissive

license_source: github-api


text:
Nested pages

Implement #25
Enabling nested will nest the pages like following
data: {
  // ... pageData
  children:  [
    { /* subpage */ },
    { /* subpage */ },
  ]
}

I think deep will not work correctly with nested, see comments
TODO

[ ] version bump

Thanks @rrelmy, really appreciate the work on this. I'll review everything in the next week or so and merge it in if there's no issues/questions.

Sorry for the delay, only just had a chance to take a look at this! There's a few small changes I'd like to make, but I'll just merge this in and refactor some bits from there.
Thanks again @rrelmy!

source: gharchive/pull-request

authors: aryehraber rrelmy

repo: aryehraber/statamic-fetch

license: MIT


text:
a: too many "New" functions

github.com\as\a\col.go:23,24:  func NewCol(src screen.Screen, wind screen.Window, ft *font.Font, sp, size image.Point, files ...string) *Col {
github.com\as\a\col.go:57,58:  func NewCol2(g *Grid, filenames ...string) (w Plane) {
github.com\as\a\col.go:77,78:  func New(co *Col, filename string) (w Plane) {
github.com\as\a\grid.go:15,16: func NewGrid(src screen.Screen, wind screen.Window, ft *font.Font, sp, size image.Point, files ...string) *Grid {

mostly resolved in v0.6.7

repo: as/a


text:
Add an option to open with MPlayerX

Similar to the --vlc argument, I think you should add a flag that opens with MPlayerX (--mplayerx)

Hm, running peerflix [magnet] --mplayerx or peerflix [magnet] --mplayer isn't opening the magnet link for me. Is it working for you?
I'm planning on putting a separate prompt that asks the user which player they want to open the selected torrent with. I'll make it so it's super simple to add support for any player option peerflix supports.

I dont think peerflix's --mplayer flag works with OSX's MplayerX. My bad, I thought that would just work

add termflix to npm doe

It should be on there. Here's the link: https://www.npmjs.com/package/termflix

authors: AndrewSB asarode

repo: asarode/termflix

license: mit

license_source: bigquery


text:
Categorize by Movies/TV Shows

I'm submitting a ...

[ ] bug report
[x] feature request
[ ] support request

General information
Prerequisites

[x] Are you running the latest version?

Description
Would it be possible to make two main categories for Movies and TV Shows? Now when I select any of the entries in the main menu I get Movies and TV shows all mixed up. It also affects the active View type so it switches to the view according to the first entry on the list.
Context (Environment)
Installation

[ ] I installed the plugin via zip from the Releases page
[x] I´m using the Netflix Repo
[ ] I´m using a different source (Please tell which)

Operating System

[ ] Linux (x86/x64)
[ ] OSX (x86/x64)
[x] Windows (x86/x64)
[ ] Linux (ARM)
[ ] Android

Other information
Screenshots

Unfortunately you can't due to the fact the Netflix API is structured.
We do get the information for each item, but there is no way to build a UI like the
the Amazon plugin does.

authors: asciidisco oomek


text:
Import of PDF page is broken

The function to import a PDF page into the current document is broken, subsequently braking all features that rely on it (like the PDF cover page). This happened when we upgraded Prawn (and, in turn, PDF Core). One of the methods that Prawn Template uses is no longer present in PDF Core.

We can make a fix for now. However, eventually, we're going to have to remove the dependency on Prawn Template and bring that code into Asciidoctor PDF as the maintainers of Prawn are no longer supporting (or testing) Prawn Template.

cc: @rlopez133

repo: asciidoctor/asciidoctor-pdf


text:
SQL 语句前面存在空白行时，错误提示未能在正确的位置显示

当 SQL 语句前面存在空白行时，解析结果中的 error.suggestions.token 为null，导致无法正确提示发生错误的位置，现象如下：

解析结果如下：
{
  "success": false,
  "ast": null,
  "cursorKeyPath": [],
  "nextMatchings": [
    {
      "type": "string",
      "value": "UPDATE"
    },
    {
      "type": "string",
      "value": "set"
    },
    {
      "type": "string",
      "value": "insert"
    },
    {
      "type": "string",
      "value": "create"
    },
    {
      "type": "string",
      "value": "select"
    }
  ],
  "error": {
    "suggestions": [
      {
        "type": "string",
        "value": "select"
      },
      {
        "type": "string",
        "value": "create"
      },
      {
        "type": "string",
        "value": "insert"
      },
      {
        "type": "string",
        "value": "set"
      },
      {
        "type": "string",
        "value": "UPDATE"
      }
    ],
    "token": null,
    "reason": "incomplete"
  },
  "debugInfo": {
    "tokens": [
      {
        "type": "word",
        "value": "selec",
        "position": [
          2,
          6
        ]
      }
    ],
    "callVisiterCount": 38,
    "costs": {
      "lexer": 0,
      "parser": 0
    }
  }
}

Demo 中关于错误提示位置的处理：
https://github.com/ascoders/syntax-parser/blob/5818f52f7dbdcef610d2600aa1fb04b4a9e55fb7/src/demo/monaco-plugin/index.ts#L60-L72
期望结果：
未完整的语句，error.suggestion.token 能给出错误位置的token，如{type: "string", value: "selec", position: [1, 6]}

debugInfo 中有这个未完成语句的 token 信息，用这个信息可以设置正确的错误提示位置，但是这个是 debugInfo

repo: ascoders/syntax-parser


text:
Run CI on MacOS

Add MacOS to list of build runners.

Codecov Report

Merging #72 (300e280) into main (aa053f3) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #72   +/-   ##
=======================================
  Coverage   56.63%   56.63%
=======================================
  Files          73       73
  Lines        2470     2470
  Branches      166      166
=======================================
  Hits         1399     1399
  Misses       1015     1015
  Partials       56       56

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

authors: ascopes codecov-commenter

repo: ascopes/jct


text:
Bugfix: Require ActiveSupport::ParameterFilter before inheriting from it

Addresses #66. It is not guaranteed that all of ActiveSupport will be loaded at the time this gem gets loaded, and indeed in smaller builds, that is exactly what is causing the bug. I couldn't test this in an automated way without adding a dependency on Rails, but manually adding this fixed my issue locally. Additionally, adding this to an application where the setup already worked merely resulted in the require call returning false and the application loading correctly.

thanks for the contribution @flanger001 👏


text:
Dead link

Show where you found the issue
https://ash-hq.org/docs/guides/ash_phoenix/latest/tutorials/getting-started-with-ash-and-phoenix#continue-learning
Share the problematic documentation
Read more about how to query the data in your resources. is a dead link.

Thank you for the report! I've fixed the link and it will update on the next release of the package.

authors: DaniruKun zachdaniel


text:
Support for rotation of the bomb while processing module commands

This is a particular edge case presented by Perspective Pegs, which requires specific orientations of the bomb to inspect the faces of the extruded pegs.
This may be remedied by potentially allowing yielding of a Quaternion to set the orientation of the bomb to. An identity Quaternion would leave the orientation in the normal state looking directly at the module; any other Quaternion would rotate the bomb in a local-space manner.

Added processing of yielded Quaternion objects for this purpose.


text:
Broken after new AUTO1111 update.

Hello,
Since the new update from AUTO the extension stops working. Issue state:
File "I:\stable-diffusion-webui\modules[scripts.py](https://scripts.py/)", line 256, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "I:\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "I:\stable-diffusion-webui\extensions\sd_webui_SAG\scripts[SAG.py](https://sag.py/)", line 18, in
from modules.script_callbacks import on_cfg_denoiser,CFGDenoiserParams, CFGDenoisedParams, on_cfg_denoised, AfterCFGCallbackParams, on_cfg_after_cfg
ImportError: cannot import name 'AfterCFGCallbackParams' from 'modules.script_callbacks' (I:\stable-diffusion-webui\modules\script_callbacks.py)
Hope you can fix it soon. Thank you.

FYI. Your stealth_pnginfo also broken due to new update.

Can confirm it stops working because script_callback.py and sd_samplers_kdiffusion.py need to be patched again.
After manually patching it because the patcher didn't work I managed to get it working.

That link didn't work for me so I've created my own patch here on GitHub's gists - https://gist.github.com/CamWiseOwl/eb13ba59e8750717f20db3af7f8364db
Looks like it's only sd_samplers_kdiffusion.py that needed updating for the latest update.

That link didn't work for me so I've created my own patch here on GitHub's gists - https://gist.github.com/CamWiseOwl/eb13ba59e8750717f20db3af7f8364db
Looks like it's only sd_samplers_kdiffusion.py that needed updating for the latest update.

Would you mind explaining briefly how I can apply this script? I don't mind looking up the finer details, I just need to understand where this script is applied. Thanks.

Strange, it works for me...
Here goes mediafire then - https://www.mediafire.com/file/ozddr7248gmecr0/patched.zip/file

That link didn't work for me so I've created my own patch here on GitHub's gists - https://gist.github.com/CamWiseOwl/eb13ba59e8750717f20db3af7f8364db
Looks like it's only sd_samplers_kdiffusion.py that needed updating for the latest update.

Would you mind explaining briefly how I can apply this script? I don't mind looking up the finer details, I just need to understand where this script is applied. Thanks.

Either download @Squibeel's zip and directly replace the files or save my gist somewhere then run git apply in the root A1111 folder like the readme describes how to do -
git apply --ignore-whitespace path/to/updated.patch

Strange, it works for me... Here goes mediafire then - https://www.mediafire.com/file/ozddr7248gmecr0/patched.zip/file

Thank you but still did not work.
Traceback (most recent call last):
File "I:\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "I:\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "I:\stable-diffusion-webui\extensions\04.sd_webui_SAG\scripts\SAG.py", line 18, in
from modules.script_callbacks import on_cfg_denoiser,CFGDenoiserParams, CFGDenoisedParams, on_cfg_denoised, AfterCFGCallbackParams, on_cfg_after_cfg
ImportError: cannot import name 'AfterCFGCallbackParams' from 'modules.script_callbacks' (I:\stable-diffusion-webui\modules\script_callbacks.py)

authors: CamWiseOwl Squibeel enternalsaga hobologna


text:
first video in a list is not playing

Hi any one help first video in a tableview is not playing only sound is coming please provide me update on this issue

Hello @sudarvizhi3026 , Did you get any solution?

no @sudarvizhi3026

@ashish0309  Can you give a solution for Video in the First cell is not playing when it appears the first time, we have to drag its bottom slightly to play the video.
Plz, help me with that. Thanks in advance.

I got one solution for that, Put pausePlayeVideos() method in Api call after reload table view. This works for me.

I solved it with this. There is an issue with your current and fully visible item of collectionview.
Add this method in ASVideoPlayerController  above  pausePlayeVideosFor.
func fullyVisibleCells(_ inCollectionView: UICollectionView) -> [UICollectionViewCell] {

        var returnCells = [UICollectionViewCell]()

        var vCells = inCollectionView.visibleCells
        vCells = vCells.filter({ cell -> Bool in
            let cellRect = inCollectionView.convert(cell.frame, to: inCollectionView.superview)
            return inCollectionView.frame.contains(cellRect)
        })
        vCells.forEach({
            returnCells.append($0)
        })
        return returnCells
    }

Replace first line of pausePlayeVideosFor
       let visisbleCells = collectionView.visibleCells
to
       let visisbleCells = fullyVisibleCells(collectionView)

I solved it with this. There is an issue with your current and fully visible item of collectionview.
Add this method in ASVideoPlayerController above pausePlayeVideosFor.
func fullyVisibleCells(_ inCollectionView: UICollectionView) -> [UICollectionViewCell] {

        var returnCells = [UICollectionViewCell]()

        var vCells = inCollectionView.visibleCells
        vCells = vCells.filter({ cell -> Bool in
            let cellRect = inCollectionView.convert(cell.frame, to: inCollectionView.superview)
            return inCollectionView.frame.contains(cellRect)
        })
        vCells.forEach({
            returnCells.append($0)
        })
        return returnCells
    }

Replace pausePlayeVideosFor to this
       func pausePlayeVideosFor(collectionView: UICollectionView, appEnteredFromBackground: Bool = false) {
        let visisbleCells = fullyVisibleCells(collectionView)
        var videoCellContainer: ASAutoPlayVideoLayerContainer?
        var maxHeight: CGFloat = 0.0

        for cellView in collectionView.visibleCells {
            guard let containerCell = cellView as? ASAutoPlayVideoLayerContainer,
                let videoCellURL = containerCell.videoURL else {
                    continue
            }
            let height = containerCell.visibleVideoHeight()
            if maxHeight < height {
                maxHeight = height
                videoCellContainer = containerCell
            }
            pauseRemoveLayer(layer: containerCell.videoLayer, url: videoCellURL, layerHeight: height)
        }

        guard let videoCell = visisbleCells.first as? ASAutoPlayVideoLayerContainer,
            let videoCellURL = videoCell.videoURL else {
                return
        }

        let minCellLayerHeight = videoCell.videoLayer.bounds.size.height * 0.5
        /**
         Visible video layer height should be at least more than max of predefined minimum height and
         cell's videolayer's 50% height to play video.
         */
        let minimumVideoLayerVisibleHeight = max(minCellLayerHeight, minimumLayerHeightToPlay)
        if maxHeight > minimumVideoLayerVisibleHeight {
            if appEnteredFromBackground {
                setupVideoFor(url: videoCellURL)
            }
            playVideo(withLayer: videoCell.videoLayer, url: videoCellURL)
        }
    }

Can You help to achieve my collection view with auto video support

try
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) {
                                    self.pausePlayeVideos()
                                }

after reloading the tableview / collectionview


text:
how to get captcha key

how bro im confused

https://www.google.com/recaptcha/admin/
Get it from here.

ok


text:
Fix new tuple feature

Thanks for reporting, I'll take a look later today or tomorrow.

It looks like you just need to add a reference.
http://tryroslyn.azurewebsites.net/#b:master/f:r/K4Zwlgdg5gBAygTxAFwKYFsDcAoADsAIwBswBjGUogQxBBgGEYBvbGNmfYsmANwHswAExgBZABQBKZq3ayeVAE4wAHjAC8MMQEYANACYJOWQF9sxoA==

As a temporary workaround, I pasted all of their source in http://tryroslyn.azurewebsites.net/#b:master/f:[encoded data, 13442 characters]

@AviAvni @SLaks Thanks for waiting! Even though this shows up as fixed, it may take up to 1.5 hours for the build to push it through.

authors: AviAvni SLaks ashmind

repo: ashmind/TryRoslyn


text:
Readme_Update Required

Describe the changes that you want to make in the documentation
Small update in readme file by adding animated emojis in place of static emojis with some allignment fixing and adding some sections to readme to make it more attracting
Significance of the changes made
Will attract more and more contributors to contribute to this project .

hey @Meetjain1 ,
You can start working on this task. Please keep us updated on your progress. Once you have a working solution, we will review it. If everything looks good, we'll proceed with merging it.
Thank you!

hey @Meetjain1 , You can start working on this task. Please keep us updated on your progress. Once you have a working solution, we will review it. If everything looks good, we'll proceed with merging it.
Thank you!

Sure @maha-sachin


text:
Wanted to add some animations it the instant when page loads.

Hey @ashwin3005 i wanted to add some animations over the website when the page loads!

Okay, Go ahead

@ashwin3005 can you pls give the hacktober tag :)

thenks :)


text:
[BUG] Build fails on Illumos

Describe the bug
When compiling on Illumos (more specifically OmniOS), the build fails with
# github.com/hpcloud/tail
/root/go/pkg/mod/github.com/hpcloud/tail@v1.0.0/tail.go:127:17: undefined: OpenFile
/root/go/pkg/mod/github.com/hpcloud/tail@v1.0.0/tail.go:191:20: undefined: OpenFile

This stops owncloud-ocis from building on Illumos.
Environment:
Go Version: go version go1.15.5 solaris/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="solaris"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="solaris"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/local/go115"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/local/go115/pkg/tool/solaris_amd64"
GCCGO="/usr/bin/gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/tmp/go-micro_temp/go-micro/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build693290589=/tmp/go-build -gno-record-gcc-switches"

The issue comes from hpcloud/tail.
Copy pasting what I said in the owncloud ticket:

There has been an issue  open in hpcloud/tail for more than a year and a half at this point, and the package itself has not been updated in more than two years. This  seems to be a viable fork, whose inclusion would fix the above error.

@asim It seems you already use nxadm/tail but probably have not migrated everything over from hpcloud/tail.

The issue comes from hpcloud/tail.
Copy pasting what I said in the owncloud ticket:

There has been an issue  open in hpcloud/tail for more than a year and a half at this point, and the package itself has not been updated in more than two years. This  seems to be a viable fork, whose inclusion would fix the above error.

@asim It seems you already use nxadm/tail but probably have not migrated everything over from hpcloud/tail.

PR a fix?

PR a fix?

@asim Unfortunately I only have a cursory understanding of Go, I would not touch a codebase this complex. Of course this is not a priority for you - rightfully so - but since you already know the code well nxadm/tail should be a drop-in replacement so it shouldn't be too difficult.

@asim Unfortunately I only have a cursory understanding of Go, I would not touch a codebase this complex. Of course this is not a priority for you - rightfully so - but since you already know the code well nxadm/tail should be a drop-in replacement so it shouldn't be too difficult.

authors: asim francescocarzaniga

repo: asim/go-micro


text:
removed unneeded 'self' parameter.

this makes the migrations work.

Thanks!  This was fixed by #88

django-celery 2.4.2 is available at PyPI now.

authors: akumria ask

repo: ask/django-celery


text:
add tap, touch support for mobile or touch screen device

please add tap and touchmethod when interact with the screen

Touch input maps to mouse events, eg MousePress. If you need more specific input events use winit events.

when i use mouse events it deviated on mobile screen touch

Touch input maps to mouse events, eg MousePress. If you need more specific input events use winit events.

You'll have to be more specific than that

on mobile i touch at [0,0] it get at [1,1]

You'll have to be more specific than that

on mobile if I touch at [0,0] it will touch at [1,1]

authors: adezukZ asny

repo: asny/three-d


text:
User-accessible abort mechanism

This would be the runtime version of gh-66, similar to Rust's panic!() or the C++ std::abort().

Oh wait I forgot about the abort() built-in:
https://github.com/asoffer/Icarus/blob/2e94748d1b5bd556244c95727b77d78971ccdfb0/stdlib/core.ic#L95
But I'll leave this open until we have something that accepts a string for the error message (maybe implemented in the Icarus stdlib)

Print and then abort? This feels like LOG(FATAL) which is valuable but needs a lot of design work.

authors: asoffer perimosocordiae

repo: asoffer/Icarus


text:
[Bug]: updating go deps broken with bzlmod

What happened?
Crashes or really slow when updating go deps in bzlmod.
Version
Development (host) and target OS/architectures:
Output of bazel --version:
Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:
Language(s) and/or frameworks involved:
How to reproduce
See https://aspect-build.slack.com/archives/C04281DTLH0/p1729081900853419

Any other information?
See fix in gazelle sh script: https://github.com/bazel-contrib/bazel-gazelle/blob/b160ccd46fb7c19a49530d08906165c73c343dd1/internal/gazelle.bash.in#L101-L106

I will try to create a PR next week if I find some time. Do you know how to deduce the -repo_config path of the top of your head?

I will try to create a PR next week if I find some time. Do you know how to deduce the -repo_config path of the top of your head?

Hmm, this is more complicated than I first thought. Does aspect configure need to run bazel first to generate the  gazelle~~go_deps~bazel_gazelle_go_repository_config/WORKSPACE repository that contains the go_repository(...) declarations?
The WORKSPACE files looks something like that:
go_repository(
    name = "@gazelle~",
    importpath = "github.com/bazelbuild/bazel-gazelle",
    module_name = "gazelle",
)
go_repository(
    name = "@rules_go~",
    importpath = "github.com/bazelbuild/rules_go",
    module_name = "rules_go",
)
go_repository(
    name = "co_honnef_go_tools",
    importpath = "honnef.co/go/tools",
)
...

[Here] is a repo to reproduce this behavior. The results of gazelle vs aspect configure:
❯ time bzl configure
Updating BUILD files for go
2 BUILD files visited
0 BUILD files updated
bazelisk configure  18.23s user 3.18s system 140% cpu 15.257 total

❯ time bzl run gazelle
INFO: Analyzed target //:gazelle (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //:gazelle up-to-date:
  bazel-bin/gazelle-runner.bash
  bazel-bin/gazelle
INFO: Elapsed time: 0.073s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/gazelle
bazelisk run gazelle  0.10s user 0.13s system 88% cpu 0.258 total

Hmm, is this really fixed? 🤔
I see the same behavior from latest main.

It is fixed in the aspect private repo. If you're using the cli from this repo you'll have to wait till the change gets pushed here. Sorry I guess that's confusing when it gets closed from the private repo :/

Aha, I understand. I'm just glad to hear it's fixed. Thanks!
On Wed, 6 Nov 2024, 20:24 Jason Bedard, @.***> wrote:

It is fixed in the aspect private repo. If you're using the cli from this
repo you'll have to wait till the change gets pushed here. Sorry I guess
that's confusing when it gets closed from the private repo :/
—
Reply to this email directly, view it on GitHub
https://github.com/aspect-build/aspect-cli/issues/760#issuecomment-2460593019,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADM3WLVSJ74FVWZU6MBBMODZ7JUFHAVCNFSM6AAAAABQGW54IKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRQGU4TGMBRHE
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

This will be in the next release which is currently publishing

repo: aspect-build/aspect-cli


text:
[Bug]: Unable to run Vite

What happened?
Reproduction repo: https://github.com/jschaf/bazel-rules-js-vite
Version
Development (host) and target OS/architectures:
Output of bazel --version: bazel 7.4.0
Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:
bazel_dep(name = "aspect_bazel_lib", version = "2.7.7")
bazel_dep(name = "aspect_rules_js", version = "2.1.0")
bazel_dep(name = "aspect_rules_swc", version = "2.0.1")
bazel_dep(name = "aspect_rules_ts", version = "3.2.1")
bazel_dep(name = "bazel_skylib", version = "1.6.1")
bazel_dep(name = "rules_nodejs", version = "6.3.1")

Language(s) and/or frameworks involved:
JavaScript and TypeScript
How to reproduce
git clone https://github.com/jschaf/bazel-rules-js-vite
cd bazel-rules-js-vite
bazelisk run //:vite -- --help

Any other information?
The main differences that I noticed from the example repos are:

This repo uses pnpm lock version 9.0
Running Vite in the same directory as the node_modules.

Here's the failing stack trace.
$BAZEL_OUT/darwin_arm64-fastbuild/bin/vite_/vite.runfiles/_main/node_modules/.aspect_rules_js/rollup@4.24.3/node_modules/rollup/dist/native.js:63
                throw new Error(
                      ^

Error: Cannot find module @rollup/rollup-darwin-arm64. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at requireWithFriendlyError ($BAZEL_OUT/darwin_arm64-fastbuild/bin/vite_/vite.runfiles/_main/node_modules/.aspect_rules_js/rollup@4.24.3/node_modules/rollup/dist/native.js:63:9)
    at Object.<anonymous> ($BAZEL_OUT/darwin_arm64-fastbuild/bin/vite_/vite.runfiles/_main/node_modules/.aspect_rules_js/rollup@4.24.3/node_modules/rollup/dist/native.js:72:76)
    ... 3 lines matching cause stack trace ...
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at cjsLoader (node:internal/modules/esm/translators:346:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:286:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24) {
  [cause]: Error: Cannot find module '@rollup/rollup-darwin-arm64'

The problem was I had no_optional = True. I think I copied it from an example.


text:
fix: Rust code blocks' language tag in markdown files

Switched language tags in markdown files from
```rs

to
```rust

Since the syntax highlighting wasn't working on my firefox

I'll fix the tests

authors: aspenluxxxy figsoda

repo: aspenluxxxy/nanorand-rs

license: Zlib


text:
Add two sections with details about scaffolding into server-side blazor apps

With auth.
Without auth.

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

ID: 804e24dd-7e30-8cf5-2c99-1ffacb4582f6
Version Independent ID: 3e25547b-e2c9-6634-2c38-2a77207f17d4
Content: Scaffold Identity in ASP.NET Core projects
Content Source: aspnetcore/security/authentication/scaffold-identity.md
Product: aspnet-core
Technology: aspnetcore-security
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Since I'm not currently aware of any difference for scaffolding into a Blazor Server app (configured for auth from the template or without) over a web app, I'll need more guidance to work this. Let's put it on the Blazor.Docs project for more info when this is triaged.

Related: https://github.com/aspnet/AspNetCore/issues/16972

... and cross-link from ASP.NET Core Blazor authentication and authorization.

@javiercn what details are you interested in here to be covered?

@javiercn  @mkArtakMSFT  bot closing due to lack of information.

Running the Identity scaffold on Blazor server Core 3.1 does not work.  I created a new Server app with local identity in my SQL database. The error is "Scheme already exists: Identity.Application".
We really need instructions for Blazor for 1) run the scaffolding, 2) create ApplicationUser custom class, and 3) change the UserId in database from nvarchar(450) to Guid. BTW, the use of nvarchar(450) prevents the ability to use compound primary keys.

Ainda não conseguimos utilizar 'Scaffold Identity' com Blazor, mesmo na versão .NET Core 3.1.
Alguma previsão?

@VR-Architect

The error is "Scheme already exists: Identity.Application".

That has nothing to do with Blazor. I've seen that error when you create a new web app with authorization, register a user, then scaffold.
Drop the DB, run update and try again.
Verify that \Areas\Identity\IdentityHostingStartup.cs doesn't have a duplicate AddDefaultIdentity call.

change the UserId in database from nvarchar(450) to Guid.

See Identity model customization in ASP.NET Core

Is it possible to add an example with some custom Identity provider implementation?
For example this can be useful:
https://github.com/Robynhu/AspNetCore.Identity.PostgreSQL
It uses PostgreSQL as a user storage and does not use EF. No any Migrations etc, only creation db structure by script.

@mkArtakMSFT I've researched this a bit more. The issue that I opened (and just closed) at #16944 is a dup of this issue, so I'm going to work the scenarios from here.
I took a look at the scaffolding topic at ...
https://docs.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-3.1&tabs=visual-studio
... and it's similar ... the steps are about the same, but that topic so RP/MVC-ish (code and markup examples), that I think we'd be better served by placing the Blazor scaffolding into Blazor's auth topic or creating a new topic for it in the Blazor TOC. Conversely, the current scaffolding topic would need work to make it more generic so that it would apply to all three scenarios (RP, MVC, and Blazor).
🤔 Your thoughts?

creating a new topic for it in the Blazor TOC (probably the better choice).

That gets my non-counting vote. I think that's better than adding Blazor to the existing doc.

Yeah ... it's gonna be a fight to get it in there .... looks a bit overhaul-ish to make that work and avoid lots of duplication in that topic (i.e., if just sections are added). If we go with a little Blazor version of it over here, I can work it right after those high priority Blazor docs issues get worked, and those go forward right after the current crop of PRs merge.

@guardrex I think having a generic identity scaffolding topic is fine, and for the Blazor TOC, we can have a tiny writeup, where we can say something like "The auth for Blazor Server is exactly what it is for MVC and/or RP, so please look into there (link here) for how to scaffold identity).

@Rick-Anderson Scaffold Identity is one of your 👶. Resolving this issue might require significant structural and content changes to the topic. I looked briefly, but that was my impression given the examples and markup shown. Do you want me to go ahead and stomp around in there 🐾, or would you prefer to work this one?

@guardrex  can't you just add a Blazor section outlining what needs to be done? Do we need a complete walk through like I provided for MVC/RP?

I can try. I have a feeling that there will be a lot of duplication with what you have there. The current guidance is about right for Blazor ... it's just that all of the examples/markup aren't the same.
Let's do that ... I'll try it with only sections and see how it composes. If it starts to go badly tho ... hitting problems ... I'll ping back here with it for further discussion.

Note to self ...
https://github.com/dotnet/aspnetcore/issues/19148#issuecomment-602022059

@bdnts ... I've finally come to a day that I can dedicate to this one. Thanks for your notes over on https://github.com/dotnet/aspnetcore/issues/19148.
I think I see what I'd like to do on the PR with this to get the ball rolling with basic coverage that we can revise and extend thereafter. I'll ping you on the PR, which should land this evening.
You spoke about converting some number of page-based auth endpoints over to Razor components. Idk what the design will be later for that ... will they make a set of component-based auth endpoints for the OOB experience? I'll :pray: to the server gods for it! ... but I'd like to link a set of components from a Blazor node sample folder attached to the topic ... not show them ... just cross-link a set of them. Potentially, it could save a massive number of developer hours. If you have a set, would you be willing to provide them?
I understand from your notes that the Login page presents a major challenge, and I get that devs have been using an API-based approach for that. Those points are probably worth mentioning because devs are going to want to know what's possible today. Did you ultimately work out a SignalR approach? If not, which approach did you land on?

authors: Rick-Anderson VR-Architect guardrex javiercn mkArtakMSFT rogmauri win32nipuh


text:
Update MovieGenreViewModel to contain only properties in stead of fields

It's odd to have two PUBLIC fields and two public properties. Those should all be properties I think

Thank you for the contribution, @LocalJoost! We're currently in a content freeze. This change will be merged on Monday.

authors: LocalJoost scottaddie


text:
Kestrel server does not get grade A in SSL tests because it has no cipher suit preference

Description
From ASP Core 3.0 preview6 and newer it is now possible to get a grade B, instead of a previous grade F, on the SSL test (https://www.ssllabs.com/ssltest/). Because from 3.0 the insecure cipher suits are now disabled by default.
But still in 3.0-preview8, the Kestrel server does not have any cipher suit preference. This caps the SSL test grade to B instead of A. Grade A servers are regarded the most secure servers.
Describe the solution you'd like
The server should prefer the "Perfect Forward Secrecy" compliant cipher suits (ECDHE) over the weaker cipher suits.
Additional context
Here is the SSL report from the cipher suit chapter (on a 3.0-preview8 application):

Cipher Suites
TLS 1.2 (server has no preference)
TLS_RSA_WITH_AES_128_CBC_SHA (0x2f) WEAK 128
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (0xc013) ECDH secp521r1 (eq. 15360 bits RSA) FS WEAK 128
TLS_RSA_WITH_AES_128_CBC_SHA256 (0x3c) WEAK 128
TLS_RSA_WITH_AES_128_GCM_SHA256 (0x9c) WEAK 128
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xc027) ECDH secp521r1 (eq. 15360 bits RSA) FS WEAK 128
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (0xc02f) ECDH secp521r1 (eq. 15360 bits RSA) FS 128
TLS_RSA_WITH_AES_256_CBC_SHA (0x35) WEAK 256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (0xc014) ECDH secp521r1 (eq. 15360 bits RSA) FS WEAK 256
TLS_RSA_WITH_AES_256_CBC_SHA256 (0x3d) WEAK 256
TLS_RSA_WITH_AES_256_GCM_SHA384 (0x9d) WEAK 256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (0xc028) ECDH secp521r1 (eq. 15360 bits RSA) FS WEAK 256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030) ECDH secp521r1 (eq. 15360 bits RSA) FS 256
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (0xcca8) ECDH secp521r1 (eq. 15360 bits RSA) FS 256

Here is the description from SSL labs why the Kestrel server is capped to grade B:

Penalty for not using forward secrecy (B)
Forward secrecy (FS) also known as perfect forward secrecy (PFS), is a property of secure communication protocols in which compromises of long-term keys does not compromise past session keys. Forward secrecy protects past sessions against future compromises of private key. The very popular RSA key exchange doesn’t provide forward secrecy. You need to support and prefer ECDHE suites in order to enable forward secrecy with modern web browsers.

SSL Labs will start penalizing servers that don’t support forward secrecy; Grade will be capped to B. We will not penalize sites that use suites without forward secrecy provided they are never negotiated with clients that can do better.

Simply making the server prefer the existing ECDHE cipher suits over the weak cipher suits will suffice for getting a grade A.

Was this Windows, Linux, or Mac? You'll get different results because Kestrel does not control this ordering, it's controlled by the operating system (or OpenSSL for Linux).

Was this Windows, Linux, or Mac? You'll get different results because Kestrel does not control this ordering, it's controlled by the operating system (or OpenSSL for Linux).

Hosted by Linux under this official Docker- image: https://hub.docker.com/_/microsoft-dotnet-core-aspnet
(mcr.microsoft.com/dotnet/core/aspnet:3.0)
We have not really touched the OS at all, just deployed the application inside the official Docker image and deployed it to a Kubernetes cluster.

I'll forward this to the SslStream owners to see if it's configurable in their OpenSsl usage.

This issue was moved to dotnet/corefx#40830

authors: ChrML Tratcher

repo: aspnet/AspNetCore


text:
API proposal: IMultiplexedConnectionListenerFactory and company

Today, when accepting a connection from an IConnectionTransport, you get a ConnectionContext that has information about the connection. However, for scenarios like QUIC, after you get the connection, you need to accept again in order to get a QUIC stream on said connection. This is fairly awkward and isn't intuitive as the System.IO.PipeReader/PipeWriter will be unusable.
When implementing HTTP/3, right now we have the following:

public interface IConnectionListenerFactory
{
    ValueTask<IConnectionListener> BindAsync(EndPoint endpoint, CancellationToken cancellationToken = default);
}

public interface IConnectionListener : IAsyncDisposable
{
    EndPoint EndPoint { get; }
    ValueTask<ConnectionContext> AcceptAsync(CancellationToken cancellationToken = default);
    ValueTask UnbindAsync(CancellationToken cancellationToken = default);
}

public interface IQuicStreamListenerFeature
{
    ValueTask<ConnectionContext> AcceptAsync(CancellationToken cancellationToken = default);
}

Usage:
IConnectionListener connectionListener = connectionListenerFactory.BindAsync(new IPEndPoint());
ConnectionContext context = await connectionListener.AcceptAsync();
IQuicStreamListenerFeature feature = context.ConnectionFeatures.Get<IQuicStreamListenerFeature>();
ConnectionContext streamContext = await feature.AcceptAsync();

I'd like to propose a new API for accepting connections and streams from a multiplexed connection. Though this may only apply to QUIC for now, the notion of streams/connections will probably apply to other scenarios.
public interface IMultiplexedConnectionListenerFactory : IConnectionListenerFactory
{
}
public interface IMultiplexedConnectionListener : IConnectionListener // Need to downcast
{
    ValueTask<MultiplexedConnectionContext> AcceptMultiplexedAsync(CancellationToken cancellationToken = default);
}
public class MultiplexedConnectionContext : ConnectionContext
{
    ValueTask<StreamConnectionContext> AcceptStreamAsync();
    ValueTask<StreamConnectionContext> ConnectStreamAsync(bool unidirectional); // undirectional or bidirectional stream, like half open/half close
}
public class StreamConnectionContext : ConnectionContext
{
    int StreamId { get; }
    bool Unidirectional { get; }
}

Also, we could see how IMultiplexedConnectionListenerFactory without implementing IConnectionListenerFactory.
Usage:
IMultiplexedConnectionListener connectionListener = connectionListenerFactory.BindAsync(new IPEndPoint()) as IMultiplexedConnectionListener;
MultiplexedConnectionContext context = await connectionListener.AcceptAsync();
ConnectionContext streamContext = await context.AcceptAsync();

To me this feels a bit cleaner that what we are doing with features.

cc @davidfowl @halter73 @scalablecory thoughts?

Should the StreamConnectionContext indicate in what way the stream is unidirectional (i.e send-only or receive-only)?

Good point, we may need it to be an enum instead stating which direction.

Does IMultiplexedConnectionListenerFactory exist just so you can tell early what type of listener you'll get from it? It doesn't add any methods, so BindAsync will still return a plain old IConnectionListener which you'd need to cast to a IMultiplexedConnectionListener either way. You might as well save the as-casting until you get the listener.
Or better yet, keep IMultiplexedConnectionListenerFactory but don't have it derive from IConnectionListener at all. Kestrel could inject both kinds of listeners and use the right one where appropriate.
Also, do you think MultiplexedConnectionContext should derive from ConnectionContext? Before we had no choice since it was returned from IConnectionLister.AcceptAsync(). But now that it's returned from IMultiplexedConnectionListener.AcceptMultiplexedAsync(), we could reconsider that. One thing I like about this design is we could avoid having ConnectionContext that would can be neither read from nor written to. Even though the only property you don't want from ConnectionContext is probably the Transport IDuplexPipe, I still think it will be better if the type system prevents people from thinking the Transport IDuplexPipe will work.
Having a StreamConnectionContext that derives from ConnectionContext makes a lot of sense even if we stick with something closer to the old design with a IQuicStreamListenerFeature.

It has to be a connection context. Do you really want another middleware pipeline that only works for multiplexed connections?

Does IMultiplexedConnectionListenerFactory exist just so you can tell early what type of listener you'll get from it?

As you mentioned, I'd like for kestrel to inject both listener factories. You can resolve IMultiplexedConnectionListenerFactory and IConnectionListenerFactory individually.

Or better yet, keep IMultiplexedConnectionListenerFactory but don't have it derive from IConnectionListener at all. Kestrel could inject both kinds of listeners and use the right one where appropriate.

That could work. To make sure I'm on the same page, it would look like:
public interface IMultiplexedConnectionListenerFactory
{
}
public interface IMultiplexedConnectionListener
{
    ValueTask<MultiplexedConnectionContext> AcceptMultiplexedAsync(CancellationToken cancellationToken = default);
}
public class MultiplexedConnectionContext : ConnectionContext
{
    ValueTask<StreamConnectionContext> AcceptStreamAsync();
    ValueTask<StreamConnectionContext> ConnectStreamAsync(bool unidirectional); // undirectional or bidirectional stream, like half open/half close
}
public class StreamConnectionContext : ConnectionContext
{
    int StreamId { get; }
    Direction Direction{ get; }
}
// Wordsmith this pls.
public enum Direction
{
   Bidirectional,
   UnidirectionalInbound,
   UnidirectionalOutbound
}

And as @davidfowl mentioned, everything we return needs to return a ConnectionContext, so I'll keep both of these deriving from ConnectionContext.

Do you really want another middleware pipeline that only works for multiplexed connections?

Spicy question (though I'm not entirely sold either way yet): Is there middleware that can work on both a Multiplexed and a Non-Multiplexed connection?
I suppose I can think of some that just operate on features, such as a filtering middleware that rejects connections based on some conditions (remote IP, TLS cipher selections, etc.).
What about pulling up a new base class or interface that doesn't have a body pipe for those shared middleware to use? We're really early in bedrock, so it's a good time to think about this kind of refactoring (if we're ever going to do it).

public class MultiplexedConnectionContext : ConnectionContext
{
    ValueTask<StreamConnectionContext> AcceptStreamAsync();
    ValueTask<StreamConnectionContext> ConnectStreamAsync(bool unidirectional); // undirectional or bidirectional stream, like half open/half close
}
public class StreamConnectionContext : ConnectionContext
{
    int StreamId { get; }
    Direction Direction{ get; }
}

These APIs are too rigid IMO. QUICv1 is likely to only have the one "attribute" associated with a stream (its directionality), but what if QUICv2 adds a new attribute that should be specified during "Connect"? What about other multiplexed protocols? Will they all have a concept of directionality?
Also, we talked in corefx about using the term Open for streams since there isn't really a connection handshake involved.

I suppose I can think of some that just operate on features, such as a filtering middleware that rejects connections based on some conditions (remote IP, TLS cipher selections, etc.).

Maybe we can ask more questions here, What does this mean for SignalR? How would we go about changing it to work in a world where there are multiplexed streams? How far does it need to bleed?

What about pulling up a new base class or interface that doesn't have a body pipe for those shared middleware to use? We're really early in bedrock, so it's a good time to think about this kind of refactoring (if we're ever going to do it).

Make sense, but what would take the interface? Where would it be used?

These APIs are too rigid IMO. QUICv1 is likely to only have the one "attribute" associated with a stream (its directionality), but what if QUICv2 adds a new attribute that should be specified during "Connect"? What about other multiplexed protocols? Will they all have a concept of directionality?

That's what features are for. I think if we're going to do a multiplexed stream type, it needs to be lowest common denominator (like ConnectionContext currently is).

Right but the ConnectStreamAsync takes a single argument. How would that scale to other attributes?

We have this same problem on the client side BTW, ConnectAsync should take a property bag.

Alright, I think we have something we can spike here. I'll make a PR once I merge the initial HTTP/3 PR.

I’m writing up something for how SignalR would use it

We have this same problem on the client side BTW, ConnectAsync should take a property bag.

This also applies to ConnectionAsync for the IConnectionFactory.

Spicy thought (I already talked to @jkotalik about this). What if ConnectStreamAsync and ConnectAsync took an IFeatureCollection? That's a pretty good "strongly-typed property bag" we have already. I don't think it would necessarily be that the implementation takes that IFeatureCollection and uses it as the base feature collection for the resulting ConnectionContext, it just seems like the a nice kind of "property bag" we already have...

That’s not spicy, it’s logical 😬

I went ahead and tried my original proposal and I wasn't happy with the results. Here are my findings:

Splitting IConnectionListener(Factory) and IMultiplexedConnectionListener(Factory) didn't feel good when dealing with shared code. For example, in KestrelServer.cs, we have a list of listeners we are accepting from, a dispatcher, etc. that make it hard to split the world on, when in reality they are doing very similar things.
Muxing/demuxing a connection to a stream doesn't really work if the MultiplexedConnectionContext doesn't derive from ConnectionContext. For HTTP/3, we need to be able to accept a connection up to HttpConnection/Http3Connection. With that, it needs to go through all of the connection middleware first or we would need to short circuit the connection middleware pipeline and just create an HttpConnectionContext (see HttpConnectionMiddleware). The question remains if we should create a separate pipeline of connection middleware for multiplexed connections.

So I'm going to be a lot more conservative with this proposal now: I'm only targeting removing the odd features that expose accept and connect functionalities.
Here is the updated proposal:
public class MultiplexedConnectionContext : ConnectionContext
{
    ValueTask<StreamConnectionContext> AcceptAsync(CancellationToken token = default);
    ValueTask<StreamConnectionContext> ConnectAsync(IFeatureCollection features = null, bool unidirectional = false, CancellationToken token = default);
}
public class StreamConnectionContext : ConnectionContext
{
    long StreamId { get; } // ConnectionId is a string today, StreamId for HTTP/3 needs to be a long, figure out how to consolidate.
    Direction Direction{ get; }
}
public enum Direction
{
   BidirectionalInbound,
   BidirectionalOutbound,
   UnidirectionalInbound,
   UnidirectionalOutbound
}
public class IConnectionFactory
{
   ValueTask<ConnectionContext> ConnectAsync(IFeatureCollection features = null, CancellationToken token = default);
}

The question remains if we should create a separate pipeline of connection middleware for multiplexed connections.

I that the plan was that there would be two pipelines. Why wouldn't there be?

So I'm going to be a lot more conservative with this proposal now

Having MultiplexedConnectionContext derive from ConnectionContext is not conservative. The more conservative action is to not have the is-a relationship. It could easily be added later, but removing the base class would be more tricky.

I that the plan was that there would be two pipelines. Why wouldn't there be?

What concerns me is how we would handle this in Kestrel as well as handling it in connection middleware. As I mentioned before:
For HTTP/3, we need to be able to accept a connection up to HttpConnection/Http3Connection. With that, it needs to go through all of the connection middleware first or we would need to short circuit the connection middleware pipeline and just create an HttpConnectionContext (see HttpConnectionMiddleware).
Maybe that's okay to have duplicated HttpConnectionMiddleware and a duplicated pipeline, but it was starting to smell so I aborted that idea for now in my draft.

Having MultiplexedConnectionContext derive from ConnectionContext is not conservative. The more conservative action is to not have the is-a relationship. It could easily be added later, but removing the base class would be more tricky.

I think at this point, we should have a design meeting, as I am pulling back from my original proposal after prototyping.

@halter73 it forks everything to avoid a null IDuplexPipe and that's a reasonable concern but it's a non trivial change to kestrel and bedrock and we should be sure that it's worth forking at that layer.

I'm not saying it's trivial, but if we are going to split the pipeline, it will be easier to do it earlier rather than later.

authors: anurse davidfowl halter73 jkotalik


text:
How does DI work in regard to DbContext and hubs?

According to the documentation at https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-2.2:

Entity Framework contexts should be added to the service container using the scoped lifetime. This is handled automatically with a call to the AddDbContext method when registering the database context. Services that use the database context should also use the scoped lifetime.

And the definition for a scoped lifetime:

Scoped lifetime services are created once per request.

What does that mean when injecting scoped instances into hubs, e.g. DbContexts? Are they disposed of at the end of the request - i.e. when the websocket gets closed? Or when a method call ends?

We periodically close 'discussion' issues that have not been updated in a long period of time.
We apologize if this causes any inconvenience. We ask that if you are still encountering an issue, please log a new issue with updated information and we will investigate.

authors: aspnet-hello emilmuller


text:
Add a way to import additional settings from a file outside the repository root.

Also add support for running tests on fewer TFMs in developer environments.

🆙 📅

Any examples of a AspNetCoreSettings.props?

@Tratcher
<Project>
    <PropertyGroup>
        <DeveloperBuild>false</DeveloperBuild>
    </PropertyGroup>
</Project>

It's just a regular ol' msbuild props file.

authors: Tratcher pranavkm

repo: aspnet/Common


text:
Adding Benchmarks configuration

CSV exporter instead of Markdown
Method name, common stats, and diagnoser columns
Run in-proc (like Profile) to handle perfview automation

I'll merge after I have tested this works as expected when embedding this source package with a test app.

/cc @BrennanConroy @anurse @pakrym

authors: rynowak sebastienros


text:
Create a Azure KeyVault based configuration provider

CoreCLR based KeyVault SDK will be ready late August per @glennc.
Let's sit down and come up with the design.

@muratg @glennc how is this progressing? looks interesting.

@brentschmaltz We haven't started any real work yet, just some initial discussion and design.

Given two vaults:

myvault1-europe - https://myvault1-europe.vault.azure.net

Sql-ConnectionString: Server=...
Sql-ConnectionString-Module2: Server=...
ApplicationInsightsKey: 11111111-2222-3333-4444-555555555555
SomePassword: 123456

myvault2-us - https://myvault2-us.vault.azure.net

DbConnectionString: Server=...
ApplicationInsightsKey: 11111111-2222-3333-4444-555555555555
SomeImportantKey: SecretValue

I'd like to do the following things:

I want to reference the vault by alias in my code - e.g. config["myvault1"] instead config["myvault1-europe"].

I do NOT want to use Configuration["myvault1-europe:..."] because this name will likely be different for every environment (dev, production)
I could also have to change it for failover/scale out reasons.

I want to reference secret names by alias - e.g config["myvault1:ConnectionString"] instead config["myvault1:Sql-ConnectionString".

Key Vaults may be managed by different people who have their own naming structure.
Secret names could contain characters which are not valid C# characters for properties and therefore break mapping to objects.

I want to use multiple aliases for a single secret - e.g. config["myvault1:CnnStr"] and config["myvault1:SqlConnectionString"] where both return myvault1-europe/Sql-ConnectionString

There could be different Options-classes with different property names - e.g. MyModule1Options.CnnStr, MyModule2Options.SqlConnectionString.

The secret aliases should support a prefix to support mapping multiple physical secrets to Options-classes with the same property name

Example: I have Module1Options.ConnectionString which should point to Sql-ConnectionString and Module2Options.ConnectionString which should point to Sql-ConnectionString-Module2

I want to specify that all secrets from a vault should be loaded
I want to specify that only a given set of secrets should be loaded

The system shouldn't have secrets in memory which it doesn't need

I want to be able to use multiple vaults
I want to be able to decide whether both vaults are loaded into a single IConfiguration or multiple ones
There should be an option to throw an exception if the specified secret alias is not found in the vault

This should make sure typos etc. are noticed

I want to be able to specify the clientId and clientSecret/clientThumbprint which is required to access the vault from another IConfiguration element (to get it from environment variables or a different file)

To support most of this, we ended up building a solution that uses a two step process for loading secrets - we have a config file which defines the mappings and this is then used to load the secrets. This is how we use it:
KeyVaults.json - this defines the aliases and is used in alle environments:
{
  "KeyVaults": {
    "myvault1": {
      "Secrets": {
        "DbConnectionString": "Sql-ConnectionString",
        "Module1/SqlConnectionString": "Sql-ConnectionString",
        "Module2/SqlConnectionString": "Sql-ConnectionString-Module2",
        "ApplicationInsightsKey": "ApplicationInsightsKey"
      }
    }
  }
}

KeyVaults.Development.json - this defines the physical names of the vaults and the access credentials:
{
  "ClientID": "75e92952-701b-43f7-9f8b-8769bdd804de",
  "CertThumbprint": "a909502dd82ae41433e6f83886b00d4277a32a7b",
  "StoreLocation": "LocalMachine",
  "KeyVaults": {
    "myvault1": {
      "KeyVaultName": "myvault1-europe"
    }
  }
}

On startup, we first load this configuration with a ConfigurationBuilder and then we have a separate IKeyVaultProvider which is used to access the secrets. We also have a helper method which allows us to map stuff from this provider into an object using IServiceCollection.Configure<Options>. So, in code we can use it like this: services.Configure<Module1Options>(KeyVaultProvider, "myvault1", prefix: "Module1");
I could provide some code if you're interested - it's not really beautiful tough :smile:

Is the selection of europe vs us known at startup and doesn't change? or is it that some code paths want to use one and some want to use the other?

Our current scenario is that we have different vaults for different environments. this means, it is known at startup and doesn't change.
If we would scale-out one service to additional data centers we might just use another environment key and create another mapping file. So this case would also be known at startup. (We don't yet have this scenario so I haven't given much thought into it)
We also don't yet regularly refresh secrets, so Key Vault outages while our application is running are no concern for us atm.
Not sure what requirements people have that use multi-tenancy etc.

Ok cool, so connecting to different key vault instances in different environments is fine then, with some code when you add it. However, the ability to ask for "ConnStr" and have that map to two different named keys in the vault isn't something that I had thought about at all.
You want this because you don't control the vaults and they end up with slightly different names. Right?

exactly! let's say we have one big Key Vault for our application that contains connection strings for all modules (each uses a separate DB). In Key Vault, you would have to give them different names - e.g. "CustomersConnectionString", "SalesConnectionString", ...
In code, you might have separate libraries for each module and each might have an options class - e.g. CustomersOptions, which just contains a ConnectionString property.
If you want to use services.Configure<CustomerOptions>(...) there must be some way to map the secret "CustomersConnectionString" to the property "ConnectionString".

of course, all of this might be pretty advanced - maybe having just a 1:1 mapping covers most people?! but for us, this was/is essential.

Is your app ASP.NET Core or are you dumping all the things you needed for a different app?

we use one key vault per bounded context. one bounded context usually contains an ASP.NET Core based web API and there might also be background workers that process stuff from Azure Service Bus / Azure Event Hubs etc.
since we have more than 50 services, having one key vault per service seems to be too much administrative overhead. That's why we decided to see one bounded context as a security border and all services within one context are allowed to access all secrets from the vault (AFAIK you can't put permissions on a single secret in Azure Key Vault).

I'd like to separate key vaults based on the risks they pose.  So you end with something like this:

Monitoring Vaults used by monitoring systems and acceptance tests to run synthetic transactions, this includes the credentials used for monitoring and any supporting information used to persists the results of the transactions, e.g. database connection strings etc.
Deployment Vaults used to store information needed to deploy systems.
Operational Vaults used to store certificates, SSH keys, virtual machine username and passwords
Application vaults used to store application specific information. Several applications share the same vault, but this really depends on whether the application deals with regulated data, e.g. healthcare, financial or PII.

As @cwe1ss mentioned, access control is per vault, not per secret, so the number of vaults used by an application depends on its business need.  Vaults are often deployed to each site (westus, eastus) to ensure disaster recovery.
Secrets are uniquely named across vaults to ensure we're able to move a secret from one vault to another. The name doesn't include the location.  Secrets follows a naming convention such as <bu>-<project>-<service>-<role>-<n1>-<n2>-<nn> where n1 thru nn are qualifiers. Here is an example of some secret names:
bl-sample-domain-username
bl-sample-domain-password
bl-sample-app1-web-01-username
bl-sample-app1-web-01-password
bl-sample-app1-web-01-certificate
bl-sample-app1-web-01-connectionstring
bl-sample-app1-web-01-app2-clientid
bl-sample-app1-web-01-app2-clientsecret
bl-sample-app1-web-01-app2-tenantid

The dashes are used to ease parsing.
So like environment variables, I'd rather register one or more vaults with the configuration system and optionally add a prefix (e.g. bl-sample-app1-web-01). Getting a section may be a tad more challenging, since there are restrictions on naming of secrets.  But one could register a prefix e.g. bl-sample-app1-web-01-app2 and then request App2 as the section.  It would simply look for values in bl-sample-app1-web-01-app2 (which is clientid, clientsecret and tenantid). All other keys are ignored.
You can also use tags to categorize secrets.  For example, have a tag netfx-cfg-section which is used for the section name, another tag netfx-cfg-name so you know which name to use.  There is a limit in the number of tags in a resource and be mindful that its used for numerous things (e.g. billing).
The pattern here is no different than that of ini files or environment variables, with some additional capabilities to benefit from additional metadata.

One problem is azure key vault secret names cannot contain a colon yet this is what Configuration uses for sub-property names. Maybe add support for overriding name through the use of a "ConfigKey" tag like your article uses https://azure.microsoft.com/en-us/documentation/articles/guidance-multitenant-identity-keyvault/#implementation

@bloudraak What you are describing sounds pretty much exactly like what we were thinking of.
@mcm-ham This is a problem with other sources as well, the environment variable one for example. IIRC we just use _ there and transparently translate : to _.

sad to see this closed without any further discussion. I'm afraid the current solution will only cover the most basic requirements. Unfortunately, I don't have enough time right now to finish #502, but maybe it's useful for somebody.

@cwe1ss we are definitely going to iterate on KeyVault provider more, We just want to get simpler prerelease version out so people can actually start using it.

I'm not sure if this is the same KeyVaultProvider as this:  Microsoft.SqlServer.Management.AlwaysEncrypted.AzureKeyVaultProvider.
I need the above to work with .NET Core.  The above lib is currently incompatible with NetStandard.   Looks like it is dependent on the old Microsoft.Azure.KeyVault 1.0.0, which is incompatible. However the latest version of Microsoft.Azure.KeyVault is 2.0.6, which is compatible with NetStandard. Is it possible to update you provider library to use Microsoft.Azure.KeyVault 2.0.6 so that it is .NET Core compatible?

@moraleslos the provider in this repo is neither of those things -- it's an ASP.NET Core Configuration provider. Perhaps you're looking for this repo: https://github.com/Azure/azure-sdk-for-net

I had the chance to play around with this last weekend and found that most stuff was configurable and extendable for most of my use case.
You can see my secret manager here: https://gist.github.com/pksorensen/6f067c2d2e62db05e996c39254790acd#file-configuration-cs-L256
Now the thing I would like added is, that for each secret to control what is added to Data from IKeyVaultSecretManager. Right now it just add the value as a string. So you have to do IOption to get it out.
I just prefixed all keys with "KeyVault--" allowing me to do a KeyVaultOption with all secrets using configuraiton.
We have metadata stored in tags and also would liek access to attributes and content type of the secrets. So if the source called the secretmanager to actually populate Data, then we could extend it to add value as a value key, tags under a tags key ect.
And basicly you can have a model for your secret that can be resolved from configuration also and not just the value.

@pksorensen I am not able to understand what you are describing, but if this is a feature request for the KeyValue provider, please create a new issue.

authors: bloudraak brentschmaltz cwe1ss divega glennc mcm-ham moraleslos muratg pakrym pksorensen

repo: aspnet/Configuration


text:
Diagnosing project dependency failures

DNX -> Diagnosing project dependency failures
http://davidfowl.com/diagnosing-dependency-issues-with-asp-net-5/

No longer relevant now that we are moving from DNX to the new .NET CLI

repo: aspnet/Docs


text:
Space added between words

Space added between - The .Net type forrowversion is a byte array.

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

Thanks for the fix.

authors: anuraj dnfclas spboyer


text:
fixing a minor typo "aboout" instead of about

When creating a new PR, please do the following and delete this template text:

Reference the issue number if there is one:
Fixes #Issue_Number

The "Fixes #nnn" syntax in the PR description causes
GitHub to automatically close the issue when this PR is merged.

Suggest reviewers if you know who should review the PR, using the GitHub Reviewers UI.

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@JuanMejiaVelez Thank you for the contribution.

authors: JuanMejiaVelez dnfclas scottaddie


text:
Identity Server Link to Original Tutorial

This may or may not be desired, but this link used to go to this page: https://identityserver4.readthedocs.io/en/release/, but now goes to the Identity Server 4 home page. You have to make extra clicks to get to the tutorial.
When creating a new PR, please do the following and delete this template text:

Reference the issue number if there is one:
Fixes #Issue_Number

The "Fixes #nnn" syntax in the PR description causes
GitHub to automatically close the issue when this PR is merged.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: DrakeLambert sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

@DrakeLambert Could you sign the CLA. I'll merge this as soon as you sign. Thanks.

authors: DrakeLambert dnfclas guardrex


text:
API conventions cleanup for 2.2

Addresses https://github.com/aspnet/Docs/issues/9134
Internal Review Page

@scottaddie 	FYI WIP label no longer triggers WIP validation. It needs to be in the title.

@Rick-Anderson Should we delete the WIP label? Since it no longer works with the WIP app, I can't think of a purpose that it serves.

@scottaddie 	yes. cc @tdykstra 	@guardrex

@Rick-Anderson That WIP label has been deleted from the repo.

authors: Rick-Anderson scottaddie


text:
Update ASP.NET Core docs link

Noticed this in passing.

@guardrex,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

entity-framework/core/get-started/aspnetcore/index.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Both URLs resolve to the same location, so closing, but thanks anyway!

@ajcvickers It's a redirect. We don't use that address any longer.

@danroth27 What's your URL preference? My understanding is that "https://docs.microsoft.com/aspnet/core/" is preferred over "docs.asp.net".

I actually like docs.asp.net better. It's easier to remember.

However, none of the options work for offline books if we're generating those for EF. You need relative paths ofr that.

authors: ajcvickers bradygaster danroth27 dnfclas guardrex mairaw scottaddie


text:
Projection with multiple aggregates only running last one

If you have a projection with multiple aggregates (I've only tried with combinations of Sum and Count) only the last one seems to get run, and each property gets the results from that last query.
dnx: 1.0.0-rc1-16048
EF: 7.0.0-rc1-16147
Repro:
public partial class MyContext : DbContext
{
    public MyContext()
    {

    }

    public DbSet<Forum> Forums { get; set; }
    public DbSet<Topic> Topics { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        optionsBuilder.UseSqlServer(
            @"Server=(localdb)\mssqllocaldb;Database=EF7.AspNet5;Trusted_Connection=True;");
    }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
    }
}

public class Forum
{
    public Forum()
    {
        Topics = new HashSet<Topic>();
    }

    public int Id { get; set; }
    public string Title { get; set; }

    public ICollection<Topic> Topics { get; set; }
}

public class Topic
{
    public int Id { get; set; }
    public string Title { get; set; }
    public int ForumId { get; set; }
    public int Counter { get; set; }

    [ForeignKey(nameof(ForumId))]
    [InverseProperty("Topics")]
    public Forum Forum { get; set; }
}

Query:
var forums = _context.Forums.Include(f => f.Topics).Select(f => new
        {
            f.Id,
            Counter = f.Topics.Sum(t => t.Counter),
            TopicCount = f.Topics.Count(),
        }).ToList();

Sample data:
var forum = new Forum();
forum.Title = "SAMPLE";

var topic = new Topic();
topic.Title = "SAMPLE";
topic.Forum = forum;
topic.Counter = 10;

forum.Topics.Add(topic);

var topic2 = new Topic();
topic2.Title = "SAMPLE2";
topic2.Forum = forum;
topic2.Counter = 9;

forum.Topics.Add(topic2);

context.Forums.Add(forum);

context.SaveChanges();

Running the above query with this sample data results in:
Id: 1
Counter: 2
TopicCount: 2

When we should get a Counter of 19. This is the resulting SQL query:
SELECT (
     SELECT COUNT(*)
     FROM [Topic] AS [t]
     WHERE [f].[Id] = [t].[ForumId]
), [f].[Id]
FROM [Forum] AS [f]

I also updated a sample MVC repo with an example of this issue: https://github.com/davezych/EF7_3029/tree/SumCount

I also have the same issue. A fix would be appreciated.

I can provide some samples if you want.

@GunterGlad please do provide samples (you can paste them in the comments).

Here is my expression:
var list3 = context.Customers.Select(x => new
{
Name = x.Name,
PaymentTotal = x.Payments.Sum(p => p.PaymentAmount),
PaymentTotalPlus = x.Payments.Sum(p => p.PaymentAmount + 5)
}).ToList();
public class AppDBContext: DbContext, {
public DbSet Customers { get; set; }
public DbSet Payments { get; set; }
}
Here are my classes:
public class Customer
{
public string Name { get; set; }
public virtual ICollection Payments { get; set; }
}
public class Payment
{
#region Customer
public int CustomerID { get; set; }
public virtual Customer Customer { get; set; }
#endregion Customer
public decimal PaymentAmount { get; set; }
}

Fixed in e697bd49359b50e4a385f199c0e4aabff769aca2

I am having the same issue. Example:
var test = await _context.Transports
                .Include(t => t.Boxes)
                .Where(t => t.Id == 123)
                .Select(s => new
                {
                    Weight = (from b in b.Boxes
                              join p in _context.Packages on c.Id equals p.BoxId
                              select p).Sum(p => p.Weight),
                    Volume = (from c in s.Boxes
                              join p in _context.Packages on c.Id equals p.BoxId
                              select p).Sum(p => p.Volume)
                })
                .ToListAsync();

would return a list of objects where Weight would be always the same value as Volume because the Weight aggregate is never executed in database. Same thing as described above.
I can see it was fixed in November 2015, however I am testing it with "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final" and it still has this problem.
Isn't this fix part of the final RC1? If not, how should I apply the fix? Thank you

@realavaloro the fix is not part of the RC1, we took a snapshot on the 18th. Also there is no easy way to update the packages to the nightly ones - you would have to move the entire project to the nightly packages and might have some stability problems at the moment. The best course of action is apply the workaround for now (produce two queries, each having just one aggregate).
We don't have the dates for RC2 just yet, but you can follow https://github.com/aspnet/Home/wiki/Roadmap
Dates will appear there, when they are known. It should happen soon.

@maumar  Thank you. The workaround will be enough for now then.

authors: GunterGlad davezych maumar realavaloro

repo: aspnet/EntityFramework


text:
Reverse Engineer: Require a flag to overwrite existing files

Per discussion in #3849 we overwrite existing files, we should probably error and require a flag to do this.

Added -f|--force flag to command line (= -Force flag for powershell). Commit c698d65.

authors: lajones rowanmiller


text:
GroupBy query cause error Sequence contains more than one element.

I have query like this:
var data = _context.Invoices.Where(i => i.Status == InvoiceStatus.Paid) .GroupBy(i => new { ProductId = i.Service.Package.Product.Id })
 .Select(i => new
 {
     Id = i.Key.ProductId,
     Count = i.Count(),
     Amounts = i.Sum(s => s.PayableAmount)
 }).ToList();

when I run the query with EF version 7.0.0-rc1 I get this error:
Sequence contains more than one element.
here is stcktrace:
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at Microsoft.Data.Entity.Query.EntityQueryModelVisitor.<>c__DisplayClass79_0`1.<BindMemberExpression>b__0(IEnumerable`1 ps, IQuerySource qs)
   at Microsoft.Data.Entity.Query.EntityQueryModelVisitor.BindMemberExpressionCore[TResult](MemberExpression memberExpression, IQuerySource querySource, Func`3 memberBinder)
   at Microsoft.Data.Entity.Query.EntityQueryModelVisitor.BindMemberExpression[TResult](MemberExpression memberExpression, IQuerySource querySource, Func`3 memberBinder)
   at Microsoft.Data.Entity.Query.EntityQueryModelVisitor.BindMemberExpression(MemberExpression memberExpression, Action`2 memberBinder)
   at Microsoft.Data.Entity.Query.ExpressionVisitors.Internal.RequiresMaterializationExpressionVisitor.VisitMember(MemberExpression memberExpression)
   at System.Linq.Expressions.MemberExpression.Accept(ExpressionVisitor visitor)
   at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
   at Microsoft.Data.Entity.Query.ExpressionVisitors.ExpressionVisitorBase.Visit(Expression expression)
   at System.Linq.Expressions.ExpressionVisitor.VisitMember(MemberExpression node)
   at Microsoft.Data.Entity.Query.ExpressionVisitors.Internal.RequiresMaterializationExpressionVisitor.VisitMember(MemberExpression memberExpression)
   at System.Linq.Expressions.MemberExpression.Accept(ExpressionVisitor visitor)
   at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
   at Microsoft.Data.Entity.Query.ExpressionVisitors.ExpressionVisitorBase.Visit(Expression expression)
   at System.Linq.Expressions.ExpressionVisitor.VisitMember(MemberExpression node)
   at Microsoft.Data.Entity.Query.ExpressionVisitors.Internal.RequiresMaterializationExpressionVisitor.VisitMember(MemberExpression memberExpression)
   at System.Linq.Expressions.MemberExpression.Accept(ExpressionVisitor visitor)
   at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
   at Microsoft.Data.Entity.Query.ExpressionVisitors.ExpressionVisitorBase.Visit(Expression expression)
   at System.Linq.Expressions.ExpressionVisitor.VisitAndConvert[T](ReadOnlyCollection`1 nodes, String callerName)
   at Remotion.Linq.Parsing.RelinqExpressionVisitor.VisitNew(NewExpression expression)
   at System.Linq.Expressions.NewExpression.Accept(ExpressionVisitor visitor)
   at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
   at Microsoft.Data.Entity.Query.ExpressionVisitors.ExpressionVisitorBase.Visit(Expression expression)
   at Remotion.Linq.Clauses.ResultOperators.GroupResultOperator.TransformExpressions(Func`2 transformation)
   at Remotion.Linq.QueryModel.TransformExpressions(Func`2 transformation)
   at Microsoft.Data.Entity.Query.ExpressionVisitors.Internal.RequiresMaterializationExpressionVisitor.VisitSubQuery(SubQueryExpression subQueryExpression)
   at Remotion.Linq.Clauses.Expressions.SubQueryExpression.Accept(ExpressionVisitor visitor)
   at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
   at Microsoft.Data.Entity.Query.ExpressionVisitors.ExpressionVisitorBase.Visit(Expression expression)
   at Remotion.Linq.Clauses.FromClauseBase.TransformExpressions(Func`2 transformation)
   at Remotion.Linq.QueryModel.TransformExpressions(Func`2 transformation)
   at Microsoft.Data.Entity.Query.ExpressionVisitors.Internal.RequiresMaterializationExpressionVisitor.FindQuerySourcesRequiringMaterialization(QueryModel queryModel)
   at Microsoft.Data.Entity.Query.QueryCompilationContext.FindQuerySourcesRequiringMaterialization(EntityQueryModelVisitor queryModelVisitor, QueryModel queryModel)
   at Microsoft.Data.Entity.Query.EntityQueryModelVisitor.CreateQueryExecutor[TResult](QueryModel queryModel)
   at Microsoft.Data.Entity.Storage.Database.CompileQuery[TResult](QueryModel queryModel)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Data.Entity.Query.Internal.QueryCompiler.<>c__DisplayClass18_0`1.<CompileQuery>b__0()
   at Microsoft.Data.Entity.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)
   at Microsoft.Data.Entity.Query.Internal.QueryCompiler.CompileQuery[TResult](Expression query)
   at Microsoft.Data.Entity.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
   at Microsoft.Data.Entity.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
   at Remotion.Linq.QueryableBase`1.GetEnumerator()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Implementation.Product.ProductRepository.GetProducSaleReport(SaleFilterDto filter, Int64& totalCount) in D:\Projects\SalePortal\SalePortal\Implementation\Product\ProductRepository.cs:line 62
   at Implementation.Product.ProductService.GetSaleList(SaleFilterDto filter, Int64& totalCount) in D:\Projects\SalePortal\SalePortal\Implementation\Product\ProductService.cs:line 107
   at Web.Admin.Controllers.ReportController.GetSales(SaleFilterDto filter) in D:\Projects\SalePortal\SalePortal\Web.Admin\Controllers\ReportController.cs:line 145

Why there is Single in generated query:
System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)  ...
Query works fine in LINQPad and here is generated TSQL:
DECLARE @p0 Int = 2
-- EndRegion
SELECT COUNT(*) AS [Count], SUM([t0].[PayableAmount]) AS [Amounts], [t3].[Id] AS [ServiceName]
FROM [Invoice] AS [t0]
INNER JOIN [Service] AS [t1] ON [t1].[Id] = [t0].[ServiceId]
INNER JOIN [Package] AS [t2] ON [t2].[Id] = [t1].[PackageId]
INNER JOIN [Product] AS [t3] ON [t3].[Id] = [t2].[ProductId]
WHERE [t0].[Status] = @p0
GROUP BY [t3].[Id]

Can you try .GroupBy(i => i.Service.Package.Product.Id) rather than .GroupBy(i => new { ProductId = i.Service.Package.Product.Id })

I tried and got same error.

This should be fixed now. Please re-open if you experience any issues.

authors: anpete mo-esmp rowanmiller


text:
EF6 microbenchmarks are flaky

The EF6 microbenchmarks fail on cleanup sometimes, potentially leaving the database in an invalid state.
Test collection for Microsoft.EntityFrameworkCore.Microbenchmarks.EF6.Query.RawSqlQueryTests (1)
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Diagnostics.Tracing.EventListener.DisposeOnShutdown(Object sender, EventArgs e)

http://aspnetci/viewLog.html?tab=buildLog&buildTypeId=Lite_EntityFramework&buildId=88056#_focus=12730

There doesn't seem to be anything actionable on this one. The EF6 benchmarks don't do any cleanup work and it looks like every test in the run failed with the same error (not just the benchmarks).

Discussed with @AndriySvyryd  and it's a little unclear from the log what exactly causes the Collection was modified exception.

authors: AndriySvyryd rowanmiller


text:
Add tests for creating and using custom value generator

See issue #5303.

:shipit:

Merged

authors: ajcvickers anpete


text:
[SMALL] Fix to #5499 - Local variable null check incorrectly translates to SQL

Problem was that during null semantics rewrite we were only looking at constant and column expressions, never taking parameter expressions into account. Those can be optimized out in some cases as we know the value of the parameter during sql generation. Added another pass of PredicateReductionExpressionOptimizer after null semantics is applied to get rid of redundant true/false constants that may now be produced.

@anpete

new version up

:shipit:

authors: maumar smitpatel


text:
Feature proposal - [REVENG] Add a default pluralizer implementation

@bricelam suggests adding Humanizer as a default pluralizer for Reverse eng. See https://github.com/ErikEJ/EFCorePowerTools/issues/243 - willing to do a PR if there is interest in this?

Dupe of #11160

Should it be an additional NuGet package, like your EF6 pluralizer, @bricelam ?

No, I think EFCore. Design can reference Humanizer directly

authors: ErikEJ bricelam

repo: aspnet/EntityFrameworkCore


text:
Support '?' to match single character in globbing pattern

From @natemcmaster on Monday, September 26, 2016 12:56:46 PM
Syntax: The ? wildcard character matches a single character.
This would allow us to use globbing to match MSBuild wildcard syntax (see https://msdn.microsoft.com/en-us/library/ms171453.aspx#Anchor_3).
Example scenario: creating a file watcher for an MSBuild file....maybe.
Copied from original issue: aspnet/FileSystem#236

Thanks for your feedback. We appreciate your letting us know about the problem you've encountered or suggestion but we are not planning to take further action on this issue because our focus has been on issues with significantly higher customer interest and issues impacting a broad number of customers.

repo: aspnet/Extensions


text:
Implicit references

If an app makes an explicit reference to some assembly in some package, you would expect it to have that package listed in the project.json file.
However what happens if there is an implicit reference? The one use-case we have is that the Hosting:Application environment variable may be set and this allows an alternative Startup class to be executed when the app starts up. This has nothing to do with the app itself (the environment variable applies to all apps) so the app would not have an entry in the project.json file. However when you try to run the app, it fails because the runtime is trying to find the global Startup class and since there is no entry in the project.json file for the appropriate package the load fails even if the package is available in the packages folder.
This begs the question on how such corner cases for implicit references should be handled. Ideally there should be a way (env variable etc.) to specify which package contains the assembly containing the global startup. Or am I doing something wrong with my setup?

Yeah, that’s not supposed to work. The package directory is not searched by Assembly.Load, packages must be directly or transitively referenced from the project.json. I think it would work if the assembly were in the GAC or in the root application directory.

GAC is not a viable options since we are targeting CoreCLR.  And asking each app to package an assembly in their root folder is a bit odd.
I think the Hosting:Application value should contain both the package and assembly name and get resolved by the runtime as a complete unit.
Sujit

We don't have first class support for adding to the dependency closure outside of the project.json file. It's doable with a custom assembly loader, it's also possible to do it if you launch dnx manually and pass in search paths. At that point tho the version resolution has already happened so if your hosting:application and its dependency closure use anything that conflicts with the application, it may fail (but that's no different to what happens today in regular .NET apps).
The DNX resolves the dependency graph upfront based on your project.json (it doesn't load the assemblies, it just resolves them), so for any assemblies you load outside of that, you're on your own.

Thanks @Tratcher  @davidfowl  for the explanation. The only issue is that this negates the usage of the Hosting:Application feature. I am not sure how this was intended to be used but if an application has to have a reference to an assembly that it does not actually use, but may get called implicitly by the StartupLoader based on the environment variable, then that design is a bit flawed IMHO.

I am not sure how this was intended to be used but if an application has to have a reference to an assembly that it does not actually use.

Just because you don't use the API doesn't mean you aren't "using" the package. Applications never call Hosting directly but reference it because it loads within the scope of the user's dependencies.

That's fair. Thanks.

authors: Tratcher davidfowl sujitdmello

repo: aspnet/Home


text:
No authentication handler is configured to handle the scheme: Linkedin

I'm trying to follow this tutorial  and when I click the button to do the external authentication with LinkedIn I get the following error:

InvalidOperationException: No authentication handler is configured to handle the scheme: Linkedin

the code:
app.UseStaticFiles();
app.UseIdentity();

app.UseCookieAuthentication(new CookieAuthenticationOptions
{
    AutomaticAuthenticate = true,
    AutomaticChallenge = true,
    LoginPath = new PathString("/login"),
    LogoutPath = new PathString("/logout")
});

app.UseOAuthAuthentication(new OAuthOptions
{
    AutomaticAuthenticate = true,
    AutomaticChallenge = true,
    AuthenticationScheme = "LinkedIn",
    ClientId = "",
    ClientSecret = "",
    CallbackPath = "/signin-linkedin", //Account / ExternalLoginCallback
    AuthorizationEndpoint = "https://www.linkedin.com/oauth/v2/authorization",
    TokenEndpoint = "https://www.linkedin.com/oauth/v2/accessToken",
    UserInformationEndpoint = "https://api.linkedin.com/v1/people/~:(id,formatted-name,email-address,picture-url)",
    Scope = { "r_basicprofile", "r_emailaddress" }
});

app.UseGoogleAuthentication(new GoogleOptions{}); // code removed on purpose
app.UseFacebookAuthentication(new FacebookOptions{}); // code removed on purpose

I've tried to add the route manually but it didn't work
app.UseMvc(routes =>
 {
 // routes.MapRoute(
 //  name: "signin-linkedin",
 //  template: "signin-linkedin",
 //  defaults: new { controller = "Account", action = "ExternalLoginCallback" });
 routes.MapRoute("default","{controller=Home}/{action=Index}/{id?}");
 });

The other external authentication methods work as expected, any ideas?

This is not an identity issue, it needs to be filed in https://github.com/aspnet/Security/issues

Copied into https://github.com/aspnet/Security/issues/1015

authors: blowdart pedrommuller

repo: aspnet/Identity


text:
Angular2 Wallaby config for testing

Has anybody successfully configured wallaby.js in VS code or Visual Studio using the Angular2 SPA?
I think I am close but still getting some errors.  Here is my wallaby.js config file:
var webpack = require('webpack');
var wallabyWebpack = require('wallaby-webpack');
var webpackConfig = require('./webpack.config.js')[0];
// Adjust the config as required
// webpackConfig.plugins.push(...);
var normalModuleRepPlugin = new webpack.NormalModuleReplacementPlugin(/.(gif|png|scss|css|html)$/, 'node-noop');
webpackConfig.plugins.push(normalModuleRepPlugin);
var wallabyPostprocessor = wallabyWebpack(webpackConfig);
module.exports = function (wallaby) {
return {
files: [
{ pattern: 'wwwroot/dist/vendor.js', load: false, instrument: false},
{ pattern: 'ClientApp/app//*.ts', load: false, instrument: true},
'!ClientApp/app//*.spec.ts'
    ],

    tests: [
        { pattern: 'ClientApp/app/**/*.spec.ts', load: false, instrument: true}
    ],

    postprocessor: wallabyPostprocessor,

    env: {
        type: 'browser'

    },

    setup: function () {
        // required to trigger test loading
        window.__moduleBundler.loadTests();
    }

};

};
I get several runtime errors in the Wallaby.js console:
[Error] Runtime error: ReferenceError: Can't find variable: vendor_d74cddb63548c1c3ebc4
Any help would be greatly appreciated.

Full rebuild getting away this error for me. I think asp.net create hash for vendor.js files. And after installing new packages hashes are not equal.

I don't know about Wallaby.js specifically, but if you get this error (or similar):
Can't find variable: vendor_d74cddb63548c1c3ebc4

... it means your .js files don't match up with the vendor .js bundles (e.g., you are serving a main.js files that's dependent on a different version of vendor.js than you are serving).
To fix this, all you need to do is rebuild both the vendor and non-vendor bundles, e.g., run
webpack --config webpack.config.vendor.js
webpack

I'll close this since it doesn't appear to be any bug in any JavaScriptServices code, but any discussion about using wallaby.js can of course continue here if desired!

authors: SteveSandersonMS bperry77 parys

repo: aspnet/JavaScriptServices


text:
Has anyone swapped in React/MobX in place of React/Redux?

Before I start on this myself, and as I am still new to MobX, I wondered if someone had taken the React/Redux template and ported it to use MobX instead....?
I would appreciate any pointers / links to repos, if they exist...
(p.s. don't try to type a post on GitHub using a tablet, when sitting next to a playful 2 year old Labrador)

Doesn't sound like this is a common project setup, though in principle it certainly should be possible.
I'll mark this as closed as it's not a bug or enhancement, but people can feel free to continue discussing it here if desired.

authors: SteveSandersonMS mcquiggd


text:
LoggerExtensions in Abstractions Folder

LoggerExtensions.cs should be moved out of the Abstractions folder. It's already not in that namespace.

I don't understand the suggestion.

LoggerExtensions isn't an abstraction, but the file is in the Abstractions folder.
The class isn't in the Abstractions namespace, which adds weight to the argument that the class does not belong in that folder.

LoggerExtensions contains extension methods for ILogger, which is an abstraction and in the same namespace as LoggerExtensions. Are you arguing that we move the extension methods out of the assembly of the type they are extending?

I think my understanding of the project organization wasn't very good when I opened this issue. I had thought that Abstractions was a folder within the Logging project, not necessarily its own package, and having the extensions within that folder, but in a different namespace, seemed odd to me. Now I see that it is in fact a separate package, which does change things a bit. I still think it a bit odd that there doesn't appear to be any use of a namespace for Abstractions, and my initial reaction to seeing non-interfaces/base types in an Abstractions namespace is confusion, but if you're basically treating the extensions as extensions on the interfaces (which appears to be the case), and not as a place where real logic is occurring, then it makes sense for things to stay as they are.
Sorry for the long comment - I'll close the issue. Thanks.

authors: ardalis davidfowl glennc

repo: aspnet/Logging


text:
Add App Service on Linux support to Microsoft.Extensions.Logging.AzureAppServices

I'm running a dotnetcore 1.1 based api in a docker container on azure. When I activate "Application Logging (Blob)" under "Diagnostics logs" in the azure portal my application crashes with the following exception:
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: instanceId
   at Microsoft.Extensions.Logging.AzureAppServices.Internal.AzureBlobLoggerProvider..ctor(String outputTemplate, String appName, String instanceId, String fileName, Int32 batchSize, Int32 backgroundQueueSize, TimeSpan period)
   at Microsoft.Extensions.Logging.AzureAppServices.Internal.AzureAppServicesDiagnosticsLoggerProvider..ctor(WebAppContext context, AzureAppServicesDiagnosticsSettings settings)
   at Microsoft.Extensions.Logging.AzureAppServicesLoggerFactoryExtensions.AddAzureWebAppDiagnostics(ILoggerFactory factory, AzureAppServicesDiagnosticsSettings settings)

I'm using the Microsoft.Extensions.Logging.AzureAppServices 1.0.0 package from nuget.
Are azure App Services on Linux already supported by Microsoft.Extensions.Logging.AzureAppServices?

It looks like HOME and WEBSITE_INSTANCE_ID environment variables for App Services on Linux are not set correctly.
In my dotnet core app HOME is set to /root and WEBSITE_INSTANCE_ID is undefined but the azure logging middleware requires this data:
https://github.com/aspnet/Logging/blob/dev/src/Microsoft.Extensions.Logging.AzureAppServices/Internal/WebAppContext.cs#L21

Microsoft.Extensions.Logging.AzureAppServices is not supported on linux right now

/cc @muratg

@davidebbo do you know why these values are null on linux?

@nickwalkmsft it seems like a bug if WEBSITE_INSTANCE_ID is not set on Linux.

Yes, I'll track this on the App Service on Linux side. I dont't think any change should be needed to this library but I'll check.

We are closing this issue because no further action is planned for this issue. If you still have any issues or questions, please log a new issue with any additional details that you have.

FYI for anyone following this, we are tracking this internally from the App Service side.
We now set $WEBSITE_INSTANCE_ID correctly on Linux apps, but the handling of $HOME is still an open issue.

authors: davidebbo davidfowl muratg nickwalkmsft pakrym skolmer