Debug Log Disclosure

📜 Description
We are try to setting up LOG_LEVEL=info for backstage for prod. But it seems to it work on node level only.
Backstage is using winston. can we set log level for whole backstage project. How can we do that.
👍 Expected behavior
We should able to set LOG_LEVEL project wise.
👎 Actual Behavior with Screenshots
We can set for Node level. i did not see any other method.
👟 Reproduction steps
see logs
📃 Provide the context for the Bug.
No response
🖥 Your Environment
UAT and PROD
👀 Have you spent some time to check if this bug has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Are you willing to submit PR?
None

Hi! Backstage is already using LOG_LEVEL to globally set the log level. Here is where the root logger is initialized:
https://github.com/backstage/backstage/blob/b8467dcca38b16d3a1ae38b19ab402dade9c9c30/packages/backend-app-api/src/services/implementations/rootLogger/rootLoggerServiceFactory.ts#L36
Are you having issues with any particular plugin or?


Controlling list of source addresses in INIT chunk

Have Client/Server link between two machines using SCTP in multi-homing mode.
Client on QNX has 6 NICs but only want 2 of those source interface IPs ending up in the INIT.
Is binding the way to ensure this even though you only ever see this on the server side.
thanks

You might want to try sctp_bindx(). But the routing must be configured appropriately, since the userland stack does not maintain an up to date copy of the routing table.

Thanks for that.


fix(flags): remove _ from argv before schema validation

This PR contains a:

[X] bugfix
[ ] new feature
[ ] code refactor
[ ] test update
[ ] typo fix
[ ] metadata update

Motivation / Use-Case
Fixes #249

Breaking Changes
Nope

Additional Info
Tests added

DEPRECATED. Please use webpack-dev-server (he is in support and update mode again). Feel free to create a issue if some features are not implemented in webpack-dev-server.
Why deprecated webpack-serve ?

The author stopped developing the package.
Two development servers are misleading for developers.
Hard to maintain two packages with same purpose.
Some dependencies are not available to fixes/implement new features/etc (https://www.npmjs.com/package/webpack-hot-client and https://github.com/shellscape/koa-static) and there's nothing we can do here.
webpack-dev-server is stable.

Thanks for using webpack! We apologize for the inconvenience. In the future, we will avoid such situations.


A boot splash in JPG format doesn't work anymore.

Operating system or device - Godot version:

Fedora: Fedora release 25 (Twenty Five)
Kernel: Linux localhost.localdomain 4.8.13-300.fc25.x86_64 #1 SMP Fri Dec 9 14:52:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Gogot: v2.1.1.stable.official

Issue description (what happened, and what was expected):

What happened: A boot splash in JPG format doesn't work anymore.
What was expected: A boot splash in JPG format should work.

Steps to reproduce:

Set up a JPG boot splash.
Play the project.

Does it work in PNG/BMP format or is specific to JPG?

It works in PNG, I didn't try in BMP.

Why would you be using JPG in any other circumstance than:

You WANT grain/color noise (like for horror/dystopian games)
Your image contains many colors that would bloat a PNG (like a rendering or photograph of a complex scene)

If you want a simple splash menu (like with a game/company logo, text etc.) JPG is going to have visible artifacts on it especially if it isn't a super high resolution. JPGs don't do large flat areas of color, crisp edges, or gradients very well.
PNG images can also be further losslessly compressed than your image editor probably exports, for instance I use a program called Trimage (uses optipng, pngcrush, and advpng as well as removes EXIF data). You can also further reduce size if you reduce the amount of colors beforehand, for instance finding colors that are nearly the same and combining them (especially if they aren't touching each other) and/or reducing the resolution of the image.
Unfortunately there aren't great ways to reduce colors in PNGs aside from directly indexing to 256 colors or using thresholds+layer blend modes+selections in order to manually reduce values/colors without sacrificing detail. You might be able to use a GIMP plugin called cartoonizer but it it really depends on how cluttered/non-crisp your photo is and how much color you need for the end result.
SVG might fix it when it comes to issues with gradients (convert your PNG into an SVG... assuming ), and that's added to milestone 3.0 (issue #4826).

@insomniacUNDERSCORElemon true, but if this issue is true, nonetheless it must be fixed, because it is a bug.

Thanks for the theory but I'm not judging the advantages of one format over another. The FACT is that the editor let me select a JPG image like a splash screen. If the JPG format is not allowed for splash screen this is a bug and must be fixed, equally if it is allowed and doesn't work.

A boot splash in JPG format doesn't work anymore.

Could you explicit the "anymore" part? Did it use to work, and if so in what version?

It worked on Gogot: v2.1.stable.official

I downloaded and tested official Godot 1.1 / 2.0 / 2.1 / 2.1.1 / 2.1.2.
and 2.1.3 / 3.0 alpha custom build.
File filter for boot splash screen have only *.png and *.*
JPG file can be selected with *.* filter.
but I think JPG have not been officially supported for boot splash, even if it worked or not.

This can be closed.

This can be closed.

Can you explain why? :)

From the issue description:

What happened: A boot splash in JPG format doesn't work anymore.
What was expected: A boot splash in JPG format should work.

The first is false, it never worked, reading volzhs above.
The second is probably also false, since there is no particular reason JPG support should be added for boot splashes. PNG is fine. I mean, the engine only supports PNG everywhere?
So I think this can be closed? The issue could be summarized as "the engine allows you to use any file as boot splash with . filter, even JPG files (or .exes, I guess), which don't work as PNG". Thats.. true, but not an issue.

Thanks :)

I used to use a JPG format in one of my projects. Why should I use a heavier format for a splash screen? I can't test it right now but I will...

Why should I use a heavier format for a splash screen?

JPEGs are not renowned for their compression quality, it's a much better idea to use a PNG instead. You can optimize PNG images using oxipng.

Well if it works, I don't see any reason to prohibit it. Users can pick what works for them in all awareness. If their splash screen looks bad, it's not the engine's business :)

Yeah, but the point was that it doesn't work, in which case.. well, just use a PNG? There is no reason to support JPG for textures.

There is no reason to support JPG for textures.

JPEGs works for textures in Godot games, but not as a splash screen.

Indeed:

The reason why it's not supported is that the splash code comes from the initial initialization of the engine, where JPG support (modules/jpg) is not registered yet in the engine. While PNG support is a core component a.k.a. "driver" (drivers/png).
And yes, incidentally, using JPG as a splash screen is not a good idea as it's lossy -- unless you want to use a photo as splash screen, in which case it's debatable.

Only for records, 2.1 allowed me to use jpeg and it works, al least in the editor. But it doesn't care, the issue was originated by an artist that used to sent me many files in jpeg, "to save space".
testPNG.zip

I think I have the same issue but with Webp in Godot 4.1.1:

E 0:00:00:0222   setup2: Non-existing or invalid boot splash at 'res://icon.webp'. Loading default splash.
  <C++ Source>   main/main.cpp:2356 @ setup2()

@unfa It's the same reason too. WebP is a module and is only initialized after the boot splash is checked. The setting is actually hinted with "*.png", so no other type is suggested as supported.

But the file dialog in Project settings accepts all three formats! If WebP won't work, that's fine, but the file dialog suggests to me that it's expected to work :)

Where does it accept WebP?

You need to select All Files, which allow you to select literally anything, so it's irrelevant.

Oh! You are right - it doesn't! I must've blindly copied the path from project icon and thought I saw the file dialog for the Splashscreen, but that was for the icon!
Sorry - my bad.


constexpr llvm::ArrayRef::ArrayRef(const T*, const T*) [with T = long int]: Assertion `begin <= end' failed.

When I run the command in the terminal:    $ onnx-mlir encoder-epoch-12-avg-2-chunk-16-left-64.onnx
This is the output:
[1/6] Wed Oct 30 15:29:25 2024 (0s) Importing ONNX Model to MLIR Module from "encoder-epoch-12-avg-2-chunk-16-left-64.onnx"
[2/6] Wed Oct 30 15:29:25 2024 (0s) Compiling and Optimizing MLIR Module
onnx-mlir: /home/tjy/project_cxy/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:84: constexpr llvm::ArrayRef::ArrayRef(const T*, const T*) [with T = long int]: Assertion `begin <= end' failed.
Aborted (core dumped)
This is the onnx model
model.zip
How to solve it?

Can you tell me on which machine/os you are testing this model? And where is this model from? Model zoo?

Thank you for your reply！I'm sorry for the lack of information I provided. I tested this model on Ubuntu 24.04.1
Information about ONNX-MLIR is as follows：
onnx-mlir version 0.4.2, onnx version 1.16.2 (https://github.com/onnx/onnx-mlir.git 012f33ca777b8a0102abae316bdd8ffb02178d2b)
LLVM version 20.0.0git (https://github.com/llvm/llvm-project.git 00128a20eec27246719d73ba427bf821883b00b4)
Optimized build with assertions.
Default target: x86_64-unknown-linux-gnu
Host CPU: alderlake
The model is from https://github.com/k2-fsa/sherpa-onnx/releases/download/kws-models/sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.tar.bz2


New NodeToClientVersionOf typeclass

This allows code to check what version of the node to client protocol is needed to use the query.  For example:
ntcVersionOf $ QueryInEra qeInMode $ QueryInShelleyBasedEra qSbe QueryProtocolParameters

Whilst this function can be called directly, it is intended to be called by queryExpr eventually so that only queries that are valid for the current protocol are ever sent.

I think there is not a strong relationship between the node to client version and the era.  For example a query could be added during an era, but depending on the circumstances, the added query might work for an earlier era.


Add to packagist

Hi,
Could the admins please add the project to packagist (https://packagist.org/) so that installation and future updates can be done with composer?
Abdul

We've added to packagist https://packagist.org/packages/what3words/module-what3words


Summary - 'excludedChildren' feature does not exclude children

Description of the bug
Synopsis
The docs contain a description on how to exclude chosen children of a group from appearing in the summary (https://docs.altinn.studio/app/development/ux/pages/summary/). The chosen children to be excluded still appear in the summary in both the local environment and in tt02. This is tested by me and another user, the room for doing this wrong seems rather slim so we suspect that there is a bug.
Steps To Reproduce
Link: https://docs.altinn.studio/app/development/ux/pages/summary/
Summary for groups
It is also possible to exclude certain (child) components from displaying in the group summary by using the excludedChildren property. This property should be set to an array with component IDs to exclude.
Additional Information
No response

@madsenandreas this should now be fixed and is available in v3.58.0-alpha4. Could you see if this solved your problem?


Issues with dashboard variables relying on JSON API datasource

Prior to updating to the latest version, we had been able to use JSON API to fetch data and store it in a variable. Now we get the following error:

Thanks for reporting this (and sorry about that)! I'll get a fix out today.

Fixed in 0.9.2.

Thank you very much for your fast support! Really appreciate it! Everything is working fine now. 😀


[AppService] linux web app must be stopped and started to work

When I deploy a Linux web app using az appservice web create ..., az appservice web config update ... and az appservice web source-control config ... as in this script, the web app doesn't work till I go into the portal and click the "Stop" and then "Start" button.
See also #1501, where one can't send a start command from the CLI, which makes this particularly troublesome. The web restart command doesn't seem to address the issue either.
The expected behavior would be that no stop/start is required.

@naziml, could you verify?
For non linux webapp, this definitely works as we have end to end tests verifying that
@joshgav , could you go to your git repository, and see whether there is a web hook created?

@yugangw-msft Yes, a web hook is there in the repo for App Service. Next time I spin it up again I'll take note of when it gets created.

I tried and it works now. Of course you should upload a git token beforehand so CLI can wire up the auto-sync. Please reactivate if you still see a repro


Any timeline on when the limitations will be fixed?

We have invested quite heavily in content types going on since 2014-2015
We also have a strong demand from security starting to classify docs. We are struggling with the fact that encryption and content types collides. Is there a hope for this being fixed or is the right way forward to somehow work without utilizing content types i.e. are content types a dead end?
Raising this in a context of an org with > 40 000 users

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

ID: 7c0f895e-4e0c-642b-3d74-f31512e555bc
Version Independent ID: 2e6549c9-35d2-aa32-a03a-fb2ced91e54c
Content: Enable sensitivity labels for Office files in SharePoint and OneDrive - Microsoft 365 Compliance
Content Source: microsoft-365/compliance/sensitivity-labels-sharepoint-onedrive-files.md
Service: o365-seccomp
GitHub Login: @cabailey
Microsoft Alias: cabailey

@cabailey Please help us in resolving this issue. Thanks

@fthorild  Can you tell me which content types you're most interested in?  Unfortunately, we can't provide timelines for future enhancements using GitHub Issues but if you give me some specific examples, I'll see what I can find out.  This might be a question better asked on the Yammer site: https://www.yammer.com/askipteam

Hi @cabailey - thanks for reaching out. In our case it is custom content types. Content types has been slightly over used (provisioned in a lot of sites) and that we are moving away from. However, in one particular and fairly popular case a custom content type is in use. Agree on the forum but I figured, let's start off here. Do you think it make sense to raise a premium support ticket with the question? Will jump in and post in the yammer forum, thanks for pointing it out 👍

@fthorild Since you're talking directly to Sanjoyan (the PM owner for this feature) on the Yammer site, closing this GitHub Issue that's designed to flag issues with the documentation.  I couldn't leave you in better hands :-)


playground: error when using 'show' function

I'm getting compilation error
GHC Core to PLC plugin: Error: Unsupported feature: Int: use Integer instead Context: Compiling definition of: GHC.Show.show Context: Compiling definition of: Main.correctGuess Context: Compiling definition of: Main.validateGuess Context: Compiling expr at "main:Main:(37,25)-(37,67)"

when trying to use show method in function
correctGuess :: HashedString -> ClearString -> Bool
correctGuess (HashedString actual) (ClearString guess') =
    traceH (show "asdf") False

expected - no error
tested on
https://alpha.plutus.iohkdev.io/
https://testnet.iohkdev.io/plutus/tools/playground/

Full script

-- A game with two players. Player 1 thinks of a secret word
-- and uses its hash, and the game validator script, to lock
-- some funds (the prize) in a pay-to-script transaction output.
-- Player 2 guesses the word by attempting to spend the transaction
-- output. If the guess is correct, the validator script releases the funds.
-- If it isn't, the funds stay locked.
import qualified Language.PlutusTx          as PlutusTx
import qualified Language.PlutusTx
import           Language.PlutusTx.Prelude
import           Ledger
import           Ledger.Value
import           Playground.Contract
import           Wallet
import qualified Data.ByteString.Lazy.Char8 as C

data HashedString = HashedString ByteString

PlutusTx.makeLift ''HashedString

data ClearString = ClearString ByteString

PlutusTx.makeLift ''ClearString

correctGuess :: HashedString -> ClearString -> Bool
correctGuess (HashedString actual) (ClearString guess') =
    traceH (show "asdf") False

validateGuess :: HashedString -> ClearString -> PendingTx -> Bool
validateGuess dataScript redeemerScript _ =
    correctGuess dataScript redeemerScript

-- | The validator script of the game.
gameValidator :: ValidatorScript
gameValidator =
    ValidatorScript ($$(Ledger.compileScript [|| validateGuess ||]))

-- create a data script for the guessing game by hashing the string
-- and lifting the hash to its on-chain representation
gameDataScript :: String -> DataScript
gameDataScript =
    DataScript . Ledger.lifted . HashedString . plcSHA2_256 . C.pack

-- create a redeemer script for the guessing game by lifting the
-- string to its on-chain representation
gameRedeemerScript :: String -> RedeemerScript
gameRedeemerScript =
    RedeemerScript . Ledger.lifted . ClearString . C.pack

-- | The address of the game (the hash of its validator script)
gameAddress :: Address
gameAddress = Ledger.scriptAddress gameValidator

-- | The "lock" contract endpoint. See note [Contract endpoints]
lock :: MonadWallet m => String -> Value -> m ()
lock word vl =
    -- 'payToScript_' is a function of the wallet API. It takes a script
    -- address, a currency value and a data script, and submits a transaction
    -- that pays the value to the address, using the data script.
    --
    -- The underscore at the end of the name indicates that 'payToScript_'
    -- discards its result. If you want to hold on to the transaction you can
    -- use 'payToScript'.
    payToScript_ defaultSlotRange gameAddress vl (gameDataScript word)

-- | The "guess" contract endpoint. See note [Contract endpoints]
guess :: (WalletAPI m, WalletDiagnostics m) => String -> m ()
guess word = do
    let redeemer = gameRedeemerScript word
    -- 'collectFromScript' is a function of the wallet API. It consumes the
    -- unspent transaction outputs at a script address and pays them to a
    -- public key address owned by this wallet. It takes the validator script
    -- and the redeemer scripts as arguments.
    --
    -- Note that before we can use 'collectFromScript', we need to tell the
    -- wallet to start watching the address for transaction outputs (because
    -- the wallet does not keep track of the UTXO set of the entire chain).
    collectFromScript defaultSlotRange gameValidator redeemer

-- | The "startGame" contract endpoint, telling the wallet to start watching
--   the address of the game script. See note [Contract endpoints]
startGame :: MonadWallet m => m ()
startGame =
    -- 'startWatching' is a function of the wallet API. It instructs the wallet
    -- to keep track of all outputs at the address. Player 2 needs to call
    -- 'startGame' before Player 1 uses the 'lock' endpoint, to ensure that
    -- Player 2's wallet is aware of the game address.
    startWatching gameAddress

$(mkFunctions ['lock, 'guess, 'startGame])

{- Note [Contract endpoints]

A contract endpoint is a function that uses the wallet API to interact with the
blockchain. We can look at contract endpoints from two different points of view.

1. Contract users

Contract endpoints are the visible interface of the contract. They provide a
UI (HTML form) for entering the parameters of the actions we may take as part
of the contract.

2. Contract authors

As contract authors we define endpoints as functions that return a value of
type 'MockWallet ()'. This type indicates that the function uses the wallet API
to produce and spend transaction outputs on the blockchain.

Endpoints can have any number of parameters: 'lock' has two
parameters, 'guess' has one and 'startGame' has none. For each endpoint we
include a call to 'mkFunction' at the end of the contract definition. This
causes the Haskell compiler to generate a schema for the endpoint. The Plutus
Playground then uses this schema to present an HTML form to the user where the
parameters can be entered.

-}

validateGuess :: HashedString -> ClearString -> PendingTx -> Bool
validateGuess dataScript redeemerScript p =
    traceH (show $ pendingTxHash p) (correctGuess dataScript redeemerScript)

doesnt work either
GHC Core to PLC plugin: Error: Unsupported feature: Kind: GHC.Types.RuntimeRep Context: Compiling definition of: GHC.Base.$ Context: Compiling definition of: Main.validateGuess Context: Compiling expr at "main:Main:(37,25)-(37,67)"

thought it has show instance
https://github.com/input-output-hk/plutus/blob/0e1576b598c111a409c042ed5f43f7cbea452164/plutus-wallet-api/ledger/Ledger/Validation.hs#L225-L229

The first error is strange.  Then the 1 might get defaulted to Int rather than Integer, which as the error message says, isn't supported.
The second error is a problem with $. The $ exported by the Haskell prelude is ... very polymorphic, in ways that are hard to deal with. I've been meaning to export a simpler version from the Plutus Tx Prelude, I'll do that and that should make this okay.

@michaelpj

Are you sure you weren't doing trace (show 1) ...?

yes
here is the code

-- A game with two players. Player 1 thinks of a secret word
-- and uses its hash, and the game validator script, to lock
-- some funds (the prize) in a pay-to-script transaction output.
-- Player 2 guesses the word by attempting to spend the transaction
-- output. If the guess is correct, the validator script releases the funds.
-- If it isn't, the funds stay locked.

import qualified Language.PlutusTx          as PlutusTx
import           Language.PlutusTx.Prelude
import           Ledger                     (Address, DataScript (DataScript), PendingTx,
                                             RedeemerScript (RedeemerScript), ValidatorScript (ValidatorScript),
                                             compileScript, lifted, plcSHA2_256, scriptAddress)
import           Ledger.Value               (Value)
import           Playground.Contract
import           Wallet                     (MonadWallet, WalletAPI, WalletDiagnostics, collectFromScript,
                                             defaultSlotRange, payToScript_, startWatching)

import qualified Data.ByteString.Lazy.Char8 as C

data HashedString = HashedString ByteString

PlutusTx.makeLift ''HashedString

data ClearString = ClearString ByteString

PlutusTx.makeLift ''ClearString

correctGuess :: HashedString -> ClearString -> Bool
correctGuess (HashedString actual) (ClearString guess') =
    traceH (show "asdf"::String) False

validateGuess :: HashedString -> ClearString -> PendingTx -> Bool
validateGuess dataScript redeemerScript _ =
    correctGuess dataScript redeemerScript

-- | The validator script of the game.
gameValidator :: ValidatorScript
gameValidator =
    ValidatorScript ($$(Ledger.compileScript [|| validateGuess ||]))

-- create a data script for the guessing game by hashing the string
-- and lifting the hash to its on-chain representation
gameDataScript :: String -> DataScript
gameDataScript =
    DataScript . Ledger.lifted . HashedString . plcSHA2_256 . C.pack

-- create a redeemer script for the guessing game by lifting the
-- string to its on-chain representation
gameRedeemerScript :: String -> RedeemerScript
gameRedeemerScript =
    RedeemerScript . Ledger.lifted . ClearString . C.pack

-- | The address of the game (the hash of its validator script)
gameAddress :: Address
gameAddress = Ledger.scriptAddress gameValidator

-- | The "lock" contract endpoint. See note [Contract endpoints]
lock :: MonadWallet m => String -> Value -> m ()
lock word vl =
    -- 'payToScript_' is a function of the wallet API. It takes a script
    -- address, a currency value and a data script, and submits a transaction
    -- that pays the value to the address, using the data script.
    --
    -- The underscore at the end of the name indicates that 'payToScript_'
    -- discards its result. If you want to hold on to the transaction you can
    -- use 'payToScript'.
    payToScript_ defaultSlotRange gameAddress vl (gameDataScript word)

-- | The "guess" contract endpoint. See note [Contract endpoints]
guess :: (WalletAPI m, WalletDiagnostics m) => String -> m ()
guess word = do
    let redeemer = gameRedeemerScript word
    -- 'collectFromScript' is a function of the wallet API. It consumes the
    -- unspent transaction outputs at a script address and pays them to a
    -- public key address owned by this wallet. It takes the validator script
    -- and the redeemer scripts as arguments.
    --
    -- Note that before we can use 'collectFromScript', we need to tell the
    -- wallet to start watching the address for transaction outputs (because
    -- the wallet does not keep track of the UTXO set of the entire chain).
    collectFromScript defaultSlotRange gameValidator redeemer

-- | The "startGame" contract endpoint, telling the wallet to start watching
--   the address of the game script. See note [Contract endpoints]
startGame :: MonadWallet m => m ()
startGame =
    -- 'startWatching' is a function of the wallet API. It instructs the wallet
    -- to keep track of all outputs at the address. Player 2 needs to call
    -- 'startGame' before Player 1 uses the 'lock' endpoint, to ensure that
    -- Player 2's wallet is aware of the game address.
    startWatching gameAddress

$(mkFunctions
    ['lock
    , 'guess
    , 'startGame
    ])

{- Note [Contract endpoints]

A contract endpoint is a function that uses the wallet API to interact with the
blockchain. We can look at contract endpoints from two different points of view.

1. Contract users

Contract endpoints are the visible interface of the contract. They provide a
UI (HTML form) for entering the parameters of the actions we may take as part
of the contract.

2. Contract authors

As contract authors we define endpoints as functions that return a value of
type 'MockWallet ()'. This type indicates that the function uses the wallet API
to produce and spend transaction outputs on the blockchain.

Endpoints can have any number of parameters: 'lock' has two
parameters, 'guess' has one and 'startGame' has none. For each endpoint we
include a call to 'mkFunction' at the end of the contract definition. This
causes the Haskell compiler to generate a schema for the endpoint. The Plutus
Playground then uses this schema to present an HTML form to the user where the
parameters can be entered.

-}

the error message is
GHC Core to PLC plugin: Error: Unsupported feature: Int: use Integer instead Context: Compiling definition of: GHC.Show.show Context: Compiling definition of: Main.correctGuess Context: Compiling definition of: Main.validateGuess Context: Compiling expr at "main:Main:(40,25)-(40,67)"

tested here https://alpha.plutus.iohkdev.io/

The second error is a problem with $. The $ exported by the Haskell prelude is ... very polymorphic, in ways that are hard to deal with. I've been meaning to export a simpler version from the Plutus Tx Prelude, I'll do that and that should make this okay.

here is the other code, without $

-- A game with two players. Player 1 thinks of a secret word
-- and uses its hash, and the game validator script, to lock
-- some funds (the prize) in a pay-to-script transaction output.
-- Player 2 guesses the word by attempting to spend the transaction
-- output. If the guess is correct, the validator script releases the funds.
-- If it isn't, the funds stay locked.

import qualified Language.PlutusTx          as PlutusTx
import           Language.PlutusTx.Prelude
import           Ledger
import           Ledger.Value               (Value)
import           Playground.Contract
import           Wallet

import qualified Data.ByteString.Lazy.Char8 as C

data HashedString = HashedString ByteString

PlutusTx.makeLift ''HashedString

data ClearString = ClearString ByteString

PlutusTx.makeLift ''ClearString

correctGuess :: HashedString -> ClearString -> Bool
correctGuess (HashedString actual) (ClearString guess') =
    False

validateGuess :: HashedString -> ClearString -> PendingTx -> Bool
validateGuess dataScript redeemerScript p =
    traceH (show (pendingTxHash p)) (correctGuess dataScript redeemerScript)

-- | The validator script of the game.
gameValidator :: ValidatorScript
gameValidator =
    ValidatorScript ($$(Ledger.compileScript [|| validateGuess ||]))

-- create a data script for the guessing game by hashing the string
-- and lifting the hash to its on-chain representation
gameDataScript :: String -> DataScript
gameDataScript =
    DataScript . Ledger.lifted . HashedString . plcSHA2_256 . C.pack

-- create a redeemer script for the guessing game by lifting the
-- string to its on-chain representation
gameRedeemerScript :: String -> RedeemerScript
gameRedeemerScript =
    RedeemerScript . Ledger.lifted . ClearString . C.pack

-- | The address of the game (the hash of its validator script)
gameAddress :: Address
gameAddress = Ledger.scriptAddress gameValidator

-- | The "lock" contract endpoint. See note [Contract endpoints]
lock :: MonadWallet m => String -> Value -> m ()
lock word vl =
    -- 'payToScript_' is a function of the wallet API. It takes a script
    -- address, a currency value and a data script, and submits a transaction
    -- that pays the value to the address, using the data script.
    --
    -- The underscore at the end of the name indicates that 'payToScript_'
    -- discards its result. If you want to hold on to the transaction you can
    -- use 'payToScript'.
    payToScript_ defaultSlotRange gameAddress vl (gameDataScript word)

-- | The "guess" contract endpoint. See note [Contract endpoints]
guess :: (WalletAPI m, WalletDiagnostics m) => String -> m ()
guess word = do
    let redeemer = gameRedeemerScript word
    -- 'collectFromScript' is a function of the wallet API. It consumes the
    -- unspent transaction outputs at a script address and pays them to a
    -- public key address owned by this wallet. It takes the validator script
    -- and the redeemer scripts as arguments.
    --
    -- Note that before we can use 'collectFromScript', we need to tell the
    -- wallet to start watching the address for transaction outputs (because
    -- the wallet does not keep track of the UTXO set of the entire chain).
    collectFromScript defaultSlotRange gameValidator redeemer

-- | The "startGame" contract endpoint, telling the wallet to start watching
--   the address of the game script. See note [Contract endpoints]
startGame :: MonadWallet m => m ()
startGame =
    -- 'startWatching' is a function of the wallet API. It instructs the wallet
    -- to keep track of all outputs at the address. Player 2 needs to call
    -- 'startGame' before Player 1 uses the 'lock' endpoint, to ensure that
    -- Player 2's wallet is aware of the game address.
    startWatching gameAddress

$(mkFunctions
    ['lock
    , 'guess
    , 'startGame
    ])

{- Note [Contract endpoints]

A contract endpoint is a function that uses the wallet API to interact with the
blockchain. We can look at contract endpoints from two different points of view.

1. Contract users

Contract endpoints are the visible interface of the contract. They provide a
UI (HTML form) for entering the parameters of the actions we may take as part
of the contract.

2. Contract authors

As contract authors we define endpoints as functions that return a value of
type 'MockWallet ()'. This type indicates that the function uses the wallet API
to produce and spend transaction outputs on the blockchain.

Endpoints can have any number of parameters: 'lock' has two
parameters, 'guess' has one and 'startGame' has none. For each endpoint we
include a call to 'mkFunction' at the end of the contract definition. This
causes the Haskell compiler to generate a schema for the endpoint. The Plutus
Playground then uses this schema to present an HTML form to the user where the
parameters can be entered.

-}

the error message is
GHC Core to PLC plugin: Error: Reference to a name which is not a local, a builtin, or an external INLINABLE function: Variable Data.ByteString.Lazy.toStrict_goLen0 No unfolding Context: Compiling definition of: LedgerBytes.$fShowLedgerBytes_$cshow Context: Compiling definition of: Main.validateGuess Context: Compiling expr at "main:Main:(37,25)-(37,67)"

Ah, the issue is you're using the Haskell Prelude Show, which doesn't work.

The first example uses showsPrec which uses Int.
The second example uses some internal ByteString functoins.

Generally functions from other packages won't work since they're not typically INLINABLE (see the tutorial).
We don't have a great story for re-exported Haskell Prelude functions that don't work. I'll open another issue for that, maybe we should not export them...

Does it mean that in order to use show function I have to implement my own class Show?

Pretty much. String support on the Plutus side is very basic. It's mostly just limited to emitting literals at the moment, I think you'll rapidly run into the fact that there's no way to get a string representation of a integer or bytestring primitive.


[BUG]: Pressing the Enter button when it is not a newline makes too many text errors

Description
When the 'Enter' key is pressed and it isn't a newline, the game handles this as jumping to the next available newline and leaving all skipped letters as errors in the text that must be fixed. This heavily impacts a user's score as a result.
Please see video for reference.
Ideally the 'Enter' key should just be considered as a single entered character and should only produce 1 text error.
https://github.com/webdevcody/code-racer/assets/64496022/9d6e10e6-fdd6-4815-b1c0-8e117493f86b
(optional) What browsers are you seeing the problem on?
Chrome
Code of Conduct

[X] I agree to follow this project's Code of Conduct

I'll work on this.

This issue will also close #186


You could also just use IServiceProvider in your library. That interface has been in the good old BCL (mscorlib under the System namespace) since .NET 1.1. Implementing this interface for a container is literally 4 lines of code if you don't count the boilerplate of the class definition and implementing the interface itself.

Alternatively we ignore the ServiceCollection altogether and expose our own extension points, but that could potentially restrict our consumers from accessing the .NET extension points they are expecting.

What are these .NET extension points you're talking about?

We will just have to measure the impact that creating a service provider for each decorator has.

I don't think you need to do that?

There is also a potential issue that the decorated implementation could get an incorrect service dependency injected if they in turn are replaced after the decoration.

How would you ever get away from this? Hint: you can't, IServiceCollection is mutable :stuck_out_tongue_winking_eye:

I also think that Microsoft has been looking at the container implementation primarily from the .NET frameworks and from the Application side of things and missed out on some of the needs of framework developers.

Microsoft has already built a pretty decent framework on top of the IServiceProvider abstraction, namely ASP.NET :smile: This container is meant to be a bare-bones implementation to accomodate that frameworks' needs, nothing more, nothing less.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/aspnet/Home/issues/2350#issuecomment-354640634
----==_mimepart_5a49e360cb7b0_637a3f8da51e4f342001cc
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
From =
@khellang on Tuesday, May 10, 2016 12:48:50 AM

I believe you answered that yourself. As a framework we don't want to fo=
rce a specific container on the consuming application.

Exactly. You're making the point for me =F0=9F=98=89 Why is Microsoft.Extensions.Dep=
endencyInjection not a "specific container"?
I also stated that if you don't want to depend on "a specific container"=
 in your framework/library, you need to put hooks in place to "outsource" c=
omposition.

I guess it an abstraction that is already in the .NET framework.

No, it's not. It's a NuGet package you depend on, just like any other Io=
C container =F0=9F=98=
=84

Sure, we could choose to expose our own or some other existing abstracti=
on of a conforming container to which we aren't restricted to the features =
that Microsoft required in their framework, but that would mean we need add=
itional Container adapters which doesn't really help anyone in the long run=
.

Or you could put extensibility points in place to not use any "conformin=
g container" at all.
BTW, do you know that several containers already have these adapters for=
 MS.Ext.DI? Read my blog post on it <g-=
emoji alias=3D"wink" fallback-src=3D"https://assets-cdn.github.com/images/i=
con

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
<EMAIL_ADDRESS>Domain spinthemoose.com has exceeded the max emails per hour (226/200 (112%)) allowed.  Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
------ The body of the message is 8132 characters long; only the first
------ 5000 or so are included here.
Received: from o4.sgmail.github.com ([<IP_ADDRESS>]:17522)
by cp1164.blacksun.ca with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
(Exim 4.89_1)
(envelope-from<EMAIL_ADDRESS>id 1eVuXj-00020J-Nv
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 01:29:55 -0600
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com;
h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe;
s=s20150108; bh=al50YQVVAWsCWZSPWE69WOOTpY8=; b=o2geGNb2dDnAmQVO
1VU4wb393GbgenP9Z7I9MGGOirSNQmMyAbaWtHQGtmppunV2MbnSMdTvoLN0Z2Pv
/tMrax8x/k0k5drmNw4tJcnK1Bm/Lllj6ownKCAUtla9vB5gQI6pv6w4K0YRFZ5U
otSPspipdBgGBfuH4qPrQ6zCHSs=
Received: by filter0182p1las1.sendgrid.net with SMTP id filter0182p1las1-8283-5A49E35E-1B
2018-01-01 07:29:34.936468651 +0000 UTC
Received: from github-smtp2b-ext-cp1-prd.iad.github.net (github-smtp2b-ext-cp1-prd.iad.github.net [<IP_ADDRESS>])
by ismtpd0014p1iad2.sendgrid.net (SG) with ESMTP id sz_CTsnvT2ywgb6Jn7GjQw
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 07:29:34.827 +0000 (UTC)
Date: Mon, 01 Jan 2018 07:29:34 +0000 (UTC)
From: "ASP.NET Hello Bot"<EMAIL_ADDRESS>Reply-To: aspnet/Home<EMAIL_ADDRESS>To: aspnet/Home<EMAIL_ADDRESS>Cc: David Alpert<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>In-Reply-To<EMAIL_ADDRESS>References<EMAIL_ADDRESS>Subject: Re: [aspnet/Home] Allow services to decorate each other by preventing
recursive resolution (#2350)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5a49e35eb0354_1bf63ff717e04f2c2403683";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: aspnet-hello
X-GitHub-Recipient: davidalpert
X-GitHub-Reason: comment
List-ID: aspnet/Home <Home.aspnet.github.com>
List-Archive: https://github.com/aspnet/Home
List-Post<EMAIL_ADDRESS>List-Unsubscribe<EMAIL_ADDRESS>https://github.com/notifications/unsubscribe/AACpRLLMYQ_2R3xsaFWvLKM-tZPqk3Guks5tGIlegaJpZM4RQAuF
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address<EMAIL_ADDRESS>X-SG-EID: rlj3t9ahcX0BZUzAOlajQ3VmBXo43xFJc4M1ImIDJhE203Pyr2h1LbTqoQxWVOcbJA1ng3zxAyC4hC
CQxKKL73Yi3ldxjgG5ojX0WMvTH0/uZnZsNHbsqSiYBuhJDIQnNzZr8k10UwVR4dTjfNP+z4GC405m
hoRbo9mGfx+ZtYLDJE0GziVepq4fBscg7l24qnfh3jVcPaBFynF75PKyT2DKtl9WME5kFDYisJQbN8
g=
----==_mimepart_5a49e35eb0354_1bf63ff717e04f2c2403683
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @hennys on Monday, May 9, 2016 6:31:16 PM

Why can't these frameworks use any other container that already have these features?

I believe you answered that yourself. As a framework we don't want to force a specific container on the consuming application.

I don't see how this container is special and can/should be used in all kinds of libraries and frameworks, while other containers can't?

I guess it an abstraction that is already in the .NET framework. Sure, we could choose to expose our own or some other existing abstraction of a conforming container to which we aren't restricted to the features that Microsoft required in their framework, but that would mean we need additional Container adapters which doesn't really help anyone in the long run.
Alternatively we ignore the ServiceCollection altogether and expose our own extension points, but that could potentially restrict our consumers from accessing the .NET extension points they are expecting.
I think that in this case we need to insert ourselves just along the lines that you have shown in your example. We've been experimenting with something similar although I admit not as elegant as your solution. We will just have to measure the impact that creating a service provider for each decorator has. There is also a potential issue that the decorated implementation could get an incorrect service dependency injected if they in turn are replaced after the decoration.
I understand the problem for all Containers that you are describing and I have great sympathy for that side of the issue. But, I also think that Microsoft has been looking at the container implementation primarily from the .NET frameworks and from the Application side of things and missed out on some of the needs of framework developers. But maybe this group is so small that those needs should be downplayed.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/aspnet/Home/issues/2350#issuecomment-354640630
----==_mimepart_5a49e35eb0354_1bf63ff717e04f2c2403683
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
From @h=
ennys on Monday, May 9, 2016 6:31:16 PM

Why can't these frameworks use any other container that already have the=
se features?

I believe you answered that yourself. As a framework we don't want to fo=
rce a specific container on the consuming application.

I don't see how this container is special and can/should be used in all =
kinds of libraries and frameworks, while other containers can't?

I guess it an abstraction that is already in the .NET framework. Sure, w=
e could choose to expose our own or some other existing abstraction of a co=
nforming container to which we aren't restricted to the features that Micro=
soft required in their framework, but that would mean we need additional Co=
ntainer adapters which doesn't really help anyone in the long run.
Alternatively we ignore the ServiceCollection altogether and expose our own=
 extension points, but that could potentially restrict our consumers from a=
ccessing the .NET extension points they are expecting.
I think that in this case we need to insert ourselves just along the lin=
es that you have shown in your example. We've been experimenting with somet=
hing similar although I admit not as elegant as your solution. We will just=
 have to measure the impact that creating a service provider for each decor=
ator has. There is also a potential issue that the decorated implementation=
 could get an incorrect service dependency injected if they in turn are rep=
laced after the decoration.
I understand the problem for all Containers that you are describing and =
I have great sympathy for that side of the issue. But, I also think that Mi=
crosoft has been looking at the container implementation primarily from the=
 .NET frameworks and from the Application side of things and missed out on =
some of the needs of framework developers. But maybe this group is so small=
 that those needs should be downplayed.
&mda=
sh;You are receiving this because you commented.Reply to this e=
mail directly, view it on GitHub, or mute the thread.
<div itemscope itemtype=3D"http://schema.org/EmailMess

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
<EMAIL_ADDRESS>Domain spinthemoose.com has exceeded the max emails per hour (228/200 (113%)) allowed.  Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
------ The body of the message is 6693 characters long; only the first
------ 5000 or so are included here.
Received: from github-smtp2-ext4.iad.github.net ([<IP_ADDRESS>]:44416 helo=github-smtp2a-ext-cp1-prd.iad.github.net)
by cp1164.blacksun.ca with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.89_1)
(envelope-from<EMAIL_ADDRESS>id 1eVuXm-00020x-RE
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 01:29:58 -0600
Date: Sun, 31 Dec 2017 23:29:38 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com;
s=pf2014; t=1514791778;
bh=X1JnwM92E24KkROxMqshbtUng5wfXOo29TgmxR/MoWU=;
h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID:
List-Archive:List-Post:List-Unsubscribe:From;
b=PYje3/ZjcFkG6CQIm39UKDuuP7MF3UzMsROfHQQvSNrHgO1QJcQXNHUSwX5MaLHmo
UTBPcw77Pqi/KJxMOHa1z6uzss3zEJYTp5EV7o1rBILgtBTL7CI21agqLIZk9sJHi3
0JmkqfadiBdrRuquqohn6tS5Dn/315s6LdmNPJVo=
From: "ASP.NET Hello Bot"<EMAIL_ADDRESS>Reply-To: aspnet/Home<EMAIL_ADDRESS>To: aspnet/Home<EMAIL_ADDRESS>Cc: David Alpert<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>In-Reply-To<EMAIL_ADDRESS>References<EMAIL_ADDRESS>Subject: Re: [aspnet/Home] Allow services to decorate each other by preventing
recursive resolution (#2350)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5a49e3625d196_1dc83f8da51e4f343445935";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: aspnet-hello
X-GitHub-Recipient: davidalpert
X-GitHub-Reason: comment
List-ID: aspnet/Home <Home.aspnet.github.com>
List-Archive: https://github.com/aspnet/Home
List-Post<EMAIL_ADDRESS>List-Unsubscribe<EMAIL_ADDRESS>https://github.com/notifications/unsubscribe/AACpRFrlCeZYV7xEVcobh_9ou0Jkw59cks5tGIligaJpZM4RQAuF
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address<EMAIL_ADDRESS>----==_mimepart_5a49e3625d196_1dc83f8da51e4f343445935
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @khellang on Thursday, September 8, 2016 4:29:56 AM
Hey folks!
I just polished up and included the Decorate<TService> APIs from my gist above into Scrutor (v1.9).
Here's an example on how to use it (from the README.md):
var collection = new ServiceCollection();

// First, add our service to the collection.
collection.AddSingleton<IDecoratedService, Decorated>();

// Then, decorate Decorated with the Decorator type.
collection.Decorate<IDecoratedService, Decorator>();

// Finally, decorate Decorator with the OtherDecorator type.
// As you can see, OtherDecorator requires a separate service, IService. We can get that from the provider argument.
collection.Decorate<IDecoratedService>((inner, provider) => new OtherDecorator(inner, provider.GetRequiredService<IService>()));

var serviceProvider = collection.BuildServiceProvider();

// When we resolve the IDecoratedService service, we'll get the following structure:
// OtherDecorator -> Decorator -> Decorated
var instance = serviceProvider.GetRequiredService<IDecoratedService>();

--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/aspnet/Home/issues/2350#issuecomment-354640638
----==_mimepart_5a49e3625d196_1dc83f8da51e4f343445935
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
From @khellang on Thursday, September 8, 2016 4:29:56 AM
Hey folks!
I just polished up and included the Decorate<TService> APIs from my gist above into Scrutor (v1.9).
Here's an example on how to use it (from the README.md):
va=
r collection =3D new ServiceCollection();
// First, add our service to the collection.
collection.AddSingleton<IDecoratedService, Decorated>();
// Then, decorate Decorated with the Decorator type.=

collection.Decorate<();

// Finally, decorate Decorator with the OtherDecorat=
or type.
// As you can see, OtherDecorator requires a separat=
e service, IService. We can get that from the provider argument.
collection.Decorate<((inner, provider) =3D> new OtherDecorator(inner, provide=
r.GetRequiredService<IService>()));

var serviceProvider </s=
pan>=3D collection.BuildServiceProvider();
// When we resolve the IDecoratedService service, we=
'll get the following structure:
// OtherDecorator -> Decorator -> Decorated</s=
pan>
var instance =3D=
serviceProvider.GetRequiredService<IDecoratedService>();
&m=
dash;You are receiving this because you commented.Reply to th=
is email directly, view it on GitHub, or mute the thread.

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
<EMAIL_ADDRESS>Domain spinthemoose.com has exceeded the max emails per hour (231/200 (115%)) allowed.  Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
Received: from github-smtp2-ext7.iad.github.net ([<IP_ADDRESS>]:46185 helo=github-smtp2a-ext-cp1-prd.iad.github.net)
by cp1164.blacksun.ca with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.89_1)
(envelope-from<EMAIL_ADDRESS>id 1eVuXr-00021l-N1
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 01:30:03 -0600
Date: Sun, 31 Dec 2017 23:29:43 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com;
s=pf2014; t=1514791783;
bh=YuzXs0M3paLRQFdRcCUhGpmQTYjgVl66xdoU6Nm0d6Q=;
h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID:
List-Archive:List-Post:List-Unsubscribe:From;
b=fMz4QGxPqV/t/EM8MXRxfJCGfIhddwWMSbJPyhgMVmgBc2lTz6/yoPQ7qClxhl/Vf
ea0VvYBwbdPiGunCtAlAmXKuIA1NQZn+dXG+4BcMRe5JsE+iwE26KWIFjuHT3oZT0Q
SqEM2+U6wooA+rQYWe3FEF2vsYdgHR+5YwuxU7tQ=
From: "ASP.NET Hello Bot"<EMAIL_ADDRESS>Reply-To: aspnet/Home<EMAIL_ADDRESS>To: aspnet/Home<EMAIL_ADDRESS>Cc: David Alpert<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>In-Reply-To<EMAIL_ADDRESS>References<EMAIL_ADDRESS>Subject: Re: [aspnet/Home] Allow services to decorate each other by preventing
recursive resolution (#2350)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5a49e3674a709_6dab3fbb505e8f3029911cd";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: aspnet-hello
X-GitHub-Recipient: davidalpert
X-GitHub-Reason: comment
List-ID: aspnet/Home <Home.aspnet.github.com>
List-Archive: https://github.com/aspnet/Home
List-Post<EMAIL_ADDRESS>List-Unsubscribe<EMAIL_ADDRESS>https://github.com/notifications/unsubscribe/AACpRI3aV0EQufB0ebLCKhUJAGq8tfVqks5tGIlngaJpZM4RQAuF
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address<EMAIL_ADDRESS>----==_mimepart_5a49e3674a709_6dab3fbb505e8f3029911cd
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @infinnie on Sunday, July 2, 2017 8:56:14 PM
@brockallen How were decorators used in the internal implementation of IdentityServer4?
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/aspnet/Home/issues/2350#issuecomment-354640647
----==_mimepart_5a49e3674a709_6dab3fbb505e8f3029911cd
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @infinnie on Sunday, July 2, 2017 8:56:14 PM
@brockallen How were decorators used in the internal implementation of IdentityServer4?
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_5a49e3674a709_6dab3fbb505e8f3029911cd--

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
<EMAIL_ADDRESS>Domain spinthemoose.com has exceeded the max emails per hour (230/200 (114%)) allowed.  Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
Received: from o4.sgmail.github.com ([<IP_ADDRESS>]:28205)
by cp1164.blacksun.ca with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
(Exim 4.89_1)
(envelope-from<EMAIL_ADDRESS>id 1eVuXq-00021W-Su
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 01:30:03 -0600
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com;
h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe;
s=s20150108; bh=XFM9b227nsTKCRkUoouHmFAN3G4=; b=pwH2y2Du0upIEEeJ
2qzpHrMcHM3H3d0cJmowJx4mvA1nswe4MNnUwKMMj5w/joWLs2jH3SFk7bYOBFZE
EOpUAUSIWWxSB9xiAVOfLoGExvKw1nggPuw5aSvzoOfGxKTQ15buClOK2l1Sm2wY
r8ohoHEimuyVUXMKb/IpJd+7zq8=
Received: by filter0231p1las1.sendgrid.net with SMTP id filter0231p1las1-11066-5A49E365-5
2018-01-01 07:29:41.713073216 +0000 UTC
Received: from github-smtp2a-ext-cp1-prd.iad.github.net (github-smtp2a-ext-cp1-prd.iad.github.net [<IP_ADDRESS>])
by ismtpd0003p1iad2.sendgrid.net (SG) with ESMTP id 8gvlrDO9Tl2J4bJMjyRNqA
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 07:29:41.615 +0000 (UTC)
Date: Mon, 01 Jan 2018 07:29:41 +0000 (UTC)
From: "ASP.NET Hello Bot"<EMAIL_ADDRESS>Reply-To: aspnet/Home<EMAIL_ADDRESS>To: aspnet/Home<EMAIL_ADDRESS>Cc: David Alpert<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>In-Reply-To<EMAIL_ADDRESS>References<EMAIL_ADDRESS>Subject: Re: [aspnet/Home] Allow services to decorate each other by preventing
recursive resolution (#2350)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5a49e36550180_7f303f84f8762f3446006c";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: aspnet-hello
X-GitHub-Recipient: davidalpert
X-GitHub-Reason: comment
List-ID: aspnet/Home <Home.aspnet.github.com>
List-Archive: https://github.com/aspnet/Home
List-Post<EMAIL_ADDRESS>List-Unsubscribe<EMAIL_ADDRESS>https://github.com/notifications/unsubscribe/AACpRJR1nzYCd4FNgI-QcybnqHMhyZYNks5tGIllgaJpZM4RQAuF
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address<EMAIL_ADDRESS>X-SG-EID: rlj3t9ahcX0BZUzAOlajQ3VmBXo43xFJc4M1ImIDJhHjGKIzFnfzzziCPhFyu5l9V2Mqz7zrSRS6cV
tFOoUQL53gDuN8Biqe0XvJzaVDB8z8Wz6bluPpVInafyxX+RMiSvU8Unj6kLZzLd1qRZ0RfPePGxH8
8cNni/EwkeDm7uaAUqvEV/OcTVt027NjMptsk3d/hSSD5J+7HEluUu0NsjVNuxkz9UtaYktddnidNL
Q=
----==_mimepart_5a49e36550180_7f303f84f8762f3446006c
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @MatthewLymer on Friday, March 3, 2017 12:02:25 PM
@khellang Thank you for providing your project, it helped me out.
It would be nice if the decorator functionality was added to the default offering.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/aspnet/Home/issues/2350#issuecomment-354640643
----==_mimepart_5a49e36550180_7f303f84f8762f3446006c
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @MatthewLymer on Friday, March 3, 2017 12:02:25 PM
@khellang Thank you for providing your project, it helped me out.
It would be nice if the decorator functionality was added to the default offering.
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_5a49e36550180_7f303f84f8762f3446006c--

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
<EMAIL_ADDRESS>Domain spinthemoose.com has exceeded the max emails per hour (229/200 (114%)) allowed.  Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
Received: from o5.sgmail.github.com ([<IP_ADDRESS>]:43612)
by cp1164.blacksun.ca with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
(Exim 4.89_1)
(envelope-from<EMAIL_ADDRESS>id 1eVuXo-00021C-Ka
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 01:30:00 -0600
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com;
h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe;
s=s20150108; bh=HlLrlf+vKWDGLZ2GjpKWFYzkG34=; b=k0PIc8FJIyioDiy2
NWzDZLr8F4XMxzCthtVOfQWFj0Sa7s1MzWCkvu0yXrWKfdw20IwG9Nxs1WAd1yqM
mqcRjhXU/vRZ/1Q0EXn8/lPZsSbDO3eRvLqR5u8zP5eaoX6BcVh9vFVPEvGAip0Q
Kif/BPg7pxr4AeTyatVRBZ/mqqw=
Received: by filter0504p1las1.sendgrid.net with SMTP id filter0504p1las1-25804-5A49E363-12
2018-01-01 07:29:39.475231111 +0000 UTC
Received: from github-smtp2b-ext-cp1-prd.iad.github.net (github-smtp2b-ext-cp1-prd.iad.github.net [<IP_ADDRESS>])
by ismtpd0014p1iad2.sendgrid.net (SG) with ESMTP id -VPURYcJRvqbLO3Ba4f5aA
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 07:29:39.611 +0000 (UTC)
Date: Mon, 01 Jan 2018 07:29:39 +0000 (UTC)
From: "ASP.NET Hello Bot"<EMAIL_ADDRESS>Reply-To: aspnet/Home<EMAIL_ADDRESS>To: aspnet/Home<EMAIL_ADDRESS>Cc: David Alpert<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>In-Reply-To<EMAIL_ADDRESS>References<EMAIL_ADDRESS>Subject: Re: [aspnet/Home] Allow services to decorate each other by preventing
recursive resolution (#2350)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5a49e3637e56c_5bd73fcebbd0ef341113775";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: aspnet-hello
X-GitHub-Recipient: davidalpert
X-GitHub-Reason: comment
List-ID: aspnet/Home <Home.aspnet.github.com>
List-Archive: https://github.com/aspnet/Home
List-Post<EMAIL_ADDRESS>List-Unsubscribe<EMAIL_ADDRESS>https://github.com/notifications/unsubscribe/AACpRM_WsP2S0fQj2fwk3ILAJBcgKWIEks5tGIljgaJpZM4RQAuF
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address<EMAIL_ADDRESS>X-SG-EID: rlj3t9ahcX0BZUzAOlajQ3VmBXo43xFJc4M1ImIDJhGXJQzSTGI6hxBJd5+/t9l8CZL3EvNfJbw1mu
AWi2LPOznh5x/8a4HKdGgGtoXFKEL4FdoO76jdJU6xzNFmOnL1KKQyBHVX+qktr+HbQpPxida3ilSk
PKeHgLSgVFsvZl3v19WsSbaTh6WL7IXJ6zoE8zdW7n493OSWDaJkWSCZWa+ZPR5etOKOnh2B5rl34K
Sff/bW4YEZ0NI6uqwuYmsS
----==_mimepart_5a49e3637e56c_5bd73fcebbd0ef341113775
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @brockallen on Thursday, September 8, 2016 5:34:04 AM
@khellang yea, that's pretty much what we had to add to IdentityServer...
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/aspnet/Home/issues/2350#issuecomment-354640642
----==_mimepart_5a49e3637e56c_5bd73fcebbd0ef341113775
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @brockallen on Thursday, September 8, 2016 5:34:04 AM
@khellang yea, that's pretty much what we had to add to IdentityServer...
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_5a49e3637e56c_5bd73fcebbd0ef341113775--

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
<EMAIL_ADDRESS>Domain spinthemoose.com has exceeded the max emails per hour (232/200 (115%)) allowed.  Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
Received: from o6.sgmail.github.com ([<IP_ADDRESS>]:33217)
by cp1164.blacksun.ca with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
(Exim 4.89_1)
(envelope-from<EMAIL_ADDRESS>id 1eVuXu-00022F-7e
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 01:30:06 -0600
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com;
h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe;
s=s20150108; bh=lRy9nwSZhhH+cfuntt0kFMOMRGM=; b=F7Htt6rGBdFoldnb
1den3+KsWMaEULZmiyfrAdWaOHvLNn7LkpbrUbDOGeLZGFQZJt77C4WmcnVVVXlo
W8p4vPDV2N4Acd0JjjOFg5Ou/wxvZgXW1vn+brFR5/XFs6DZmwWBVIhLmwPNuzbp
dNLnDTCVt623qbPvSbJbQiVo7Sg=
Received: by filter0549p1mdw1.sendgrid.net with SMTP id filter0549p1mdw1-15998-5A49E369-5
2018-01-01 07:29:45.263967176 +0000 UTC
Received: from github-smtp2b-ext-cp1-prd.iad.github.net (github-smtp2b-ext-cp1-prd.iad.github.net [<IP_ADDRESS>])
by ismtpd0010p1iad2.sendgrid.net (SG) with ESMTP id g5QuPQ9ITi-v48WenTfIlw
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 07:29:45.177 +0000 (UTC)
Date: Mon, 01 Jan 2018 07:29:45 +0000 (UTC)
From: "ASP.NET Hello Bot"<EMAIL_ADDRESS>Reply-To: aspnet/Home<EMAIL_ADDRESS>To: aspnet/Home<EMAIL_ADDRESS>Cc: David Alpert<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>In-Reply-To<EMAIL_ADDRESS>References<EMAIL_ADDRESS>Subject: Re: [aspnet/Home] Allow services to decorate each other by preventing
recursive resolution (#2350)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5a49e369238f3_2d733fcebbd0ef3435344a0";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: aspnet-hello
X-GitHub-Recipient: davidalpert
X-GitHub-Reason: comment
List-ID: aspnet/Home <Home.aspnet.github.com>
List-Archive: https://github.com/aspnet/Home
List-Post<EMAIL_ADDRESS>List-Unsubscribe<EMAIL_ADDRESS>https://github.com/notifications/unsubscribe/AACpROLBf5piqHU43ixpRvRJHB_NH9rhks5tGIlpgaJpZM4RQAuF
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address<EMAIL_ADDRESS>X-SG-EID: rlj3t9ahcX0BZUzAOlajQ3VmBXo43xFJc4M1ImIDJhF+8lQRjprSR66yXKIXFMpqSqu1NI/S0APeg9
JwcPL1P/5RFB5bcaNOUQmmQeenJ5P+WBpjh28JPQc9+xsnaw0kqoUusYGTfNhzsi4oHRrK+zlqBA+i
68YCPxWUdn1KzReLjPmJGklFKT/KLA+T9nOhDy8UPCvpr/X/iFO4Duyr6eW1q5ntFdJmLffSrCbGW8
o=
----==_mimepart_5a49e369238f3_2d733fcebbd0ef3435344a0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @brockallen on Monday, July 3, 2017 4:51:11 AM

@brockallen How were decorators used in the internal implementation of IdentityServer4?

Mainly caching around services that load data from a store, but we also need to do this to wrap some of the built-in authentication services to enhance their functionality.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/aspnet/Home/issues/2350#issuecomment-354640651
----==_mimepart_5a49e369238f3_2d733fcebbd0ef3435344a0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
From @brockallen on Monday, July 3, 2017 4:51:11 AM

@brocka=
llen How were decorators used in the internal implementation of Identit=
yServer4?

Mainly caching around services that load data from a store, but we also =
need to do this to wrap some of the built-in authentication services to enh=
ance their functionality.
&mda=
sh;You are receiving this because you commented.Reply to this e=
mail directly, view it on GitHub, or mute the thread.

=
----==_mimepart_5a49e369238f3_2d733fcebbd0ef3435344a0--

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
<EMAIL_ADDRESS>Domain spinthemoose.com has exceeded the max emails per hour (233/200 (116%)) allowed.  Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
Received: from o5.sgmail.github.com ([<IP_ADDRESS>]:31416)
by cp1164.blacksun.ca with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
(Exim 4.89_1)
(envelope-from<EMAIL_ADDRESS>id 1eVuXw-00022V-MV
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 01:30:08 -0600
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=github.com;
h=from:reply-to:to:cc:in-reply-to:references:subject:mime-version:content-type:content-transfer-encoding:list-id:list-archive:list-post:list-unsubscribe;
s=s20150108; bh=f9O7WA9XoSi+6Qegij8sByQa2+o=; b=AscTeu8+LLZd8TR9
R1ko0rRSf5Q9WUSVFt23JZRgoq+uXiO7t4WEs85mNkBKWbkqo1pc9Wrgk4ajKkOh
3sD1VpU0R1eC5CYjrzReeUflCD1e2FlTPGUC7KrHzsuFpasu/Hw2AmOh1Syfo1Ls
4qGo7Wj0uF9KUUBfbaTaZ/D6Hfo=
Received: by filter0160p1las1.sendgrid.net with SMTP id filter0160p1las1-19176-5A49E36B-B
2018-01-01 07:29:47.623545791 +0000 UTC
Received: from github-smtp2a-ext-cp1-prd.iad.github.net (github-smtp2a-ext-cp1-prd.iad.github.net [<IP_ADDRESS>])
by ismtpd0002p1iad1.sendgrid.net (SG) with ESMTP id oYSP50E4T8Sw09-2QNCDng
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 07:29:47.537 +0000 (UTC)
Date: Mon, 01 Jan 2018 07:29:47 +0000 (UTC)
From: "ASP.NET Hello Bot"<EMAIL_ADDRESS>Reply-To: aspnet/Home<EMAIL_ADDRESS>To: aspnet/Home<EMAIL_ADDRESS>Cc: David Alpert<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>In-Reply-To<EMAIL_ADDRESS>References<EMAIL_ADDRESS>Subject: Re: [aspnet/Home] Allow services to decorate each other by preventing
recursive resolution (#2350)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5a49e36b6d49d_5ae03f84f8762f34546744";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: aspnet-hello
X-GitHub-Recipient: davidalpert
X-GitHub-Reason: comment
List-ID: aspnet/Home <Home.aspnet.github.com>
List-Archive: https://github.com/aspnet/Home
List-Post<EMAIL_ADDRESS>List-Unsubscribe<EMAIL_ADDRESS>https://github.com/notifications/unsubscribe/AACpRLrAjr4--AfeBFfAMmE7Qn7jA4YFks5tGIlrgaJpZM4RQAuF
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address<EMAIL_ADDRESS>X-SG-EID: rlj3t9ahcX0BZUzAOlajQ3VmBXo43xFJc4M1ImIDJhEbE8gy+NLwMRNudvTjA2gsxVIXw6nPN7So8S
xuIRfKup3XBsydhA22c2/868dKy1j8UT6Hm/52nfi05nqC6NRc2L6T6TWjdbjaiVRUKU3EpIJtlkOy
+xKy6U5RciALoY1/QyApQmCtLfi8AHUNofIwE8Sm4X73cvS8CeAGeYa+iJOi0qJv6oNwxwy95rapMI
o=
----==_mimepart_5a49e36b6d49d_5ae03f84f8762f34546744
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @andersborum on Wednesday, July 12, 2017 5:47:53 AM
@davidfowl Using decorators with DI isn't a very specific feature (in my oppinion); on the contrary, it's a fundamental pattern in the SOLID principles that easily facilitates the SRP principle.
However, it's quite easy (although not as elegant) to get around this by using the factory lamda method provided by the container. Would like to see generic support for this.
var collection = new ServiceCollection()     .AddSingleton<IPackageService>(p => new FaultHandlingPackageService(p.GetService<PackageService>()));
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/aspnet/Home/issues/2350#issuecomment-354640654
----==_mimepart_5a49e36b6d49d_5ae03f84f8762f34546744
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
From @andersborum on Wednesday, July 12, 2017 5:47:53 AM
@davidfo=
wl Using decorators with DI isn't a very specific feature (in my oppini=
on); on the contrary, it's a fundamental pattern in the SOLID principles th=
at easily facilitates the SRP principle.
However, it's quite easy (although not as elegant) to get around this by=
 using the factory lamda method provided by the container. Would like to se=
e generic support for this.
var collection =3D new ServiceCollection() .AddSingleton<IPacka=
geService>(p =3D> new FaultHandlingPackageService(p.GetService<Pac=
kageService>()));
&mda=
sh;You are receiving this because you commented.Reply to this e=
mail directly, view it on GitHub, or mute the thread.

=
----==_mimepart_5a49e36b6d49d_5ae03f84f8762f34546744--

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a temporary error. The following address(es) deferred:
<EMAIL_ADDRESS>Domain spinthemoose.com has exceeded the max emails per hour (234/200 (117%)) allowed.  Message will be reattempted later
------- This is a copy of the message, including all the headers. ------
Received: from github-smtp2-ext7.iad.github.net ([<IP_ADDRESS>]:47925 helo=github-smtp2a-ext-cp1-prd.iad.github.net)
by cp1164.blacksun.ca with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
(Exim 4.89_1)
(envelope-from<EMAIL_ADDRESS>id 1eVuXw-00022b-OY
for<EMAIL_ADDRESS>Mon, 01 Jan 2018 01:30:08 -0600
Date: Sun, 31 Dec 2017 23:29:48 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com;
s=pf2014; t=1514791788;
bh=yf0hVXwU7DJr/Pf+41tuQ7+KtqHGNtEYLHNFzXHOZvk=;
h=From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID:
List-Archive:List-Post:List-Unsubscribe:From;
b=VZ5X/7p2/sbDI99YdgfvnqXOLdSBUrinKuYtJOyXFGZmthgnDrPdmVpQD0nxjvDFQ
ycIAP3sEhv0hq6OtJuTl7tfVni0x2Uy/y3KRwhdQFqSeqRvZ3lzW1/OAz/Y+WUQcKJ
x/BWaqm6iyEORRafEKWL+nb4b/PYOOZJiOUVB1+w=
From: "ASP.NET Hello Bot"<EMAIL_ADDRESS>Reply-To: aspnet/Home<EMAIL_ADDRESS>To: aspnet/Home<EMAIL_ADDRESS>Cc: David Alpert<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>In-Reply-To<EMAIL_ADDRESS>References<EMAIL_ADDRESS>Subject: Re: [aspnet/Home] Allow services to decorate each other by preventing
recursive resolution (#2350)
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_5a49e36c8891a_77773f976a148f342805b0";
charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: aspnet-hello
X-GitHub-Recipient: davidalpert
X-GitHub-Reason: comment
List-ID: aspnet/Home <Home.aspnet.github.com>
List-Archive: https://github.com/aspnet/Home
List-Post<EMAIL_ADDRESS>List-Unsubscribe<EMAIL_ADDRESS>https://github.com/notifications/unsubscribe/AACpREpBjOAnRL53Vmg6cvTChijSqBKzks5tGIlsgaJpZM4RQAuF
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address<EMAIL_ADDRESS>----==_mimepart_5a49e36c8891a_77773f976a148f342805b0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @khellang on Wednesday, July 12, 2017 5:49:54 AM
@andersborum This is precisely what I'm doing with Scrutor. Look at the code. It's nothing.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/aspnet/Home/issues/2350#issuecomment-354640657
----==_mimepart_5a49e36c8891a_77773f976a148f342805b0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
From @khellang on Wednesday, July 12, 2017 5:49:54 AM
@andersborum This is precisely what I'm doing with Scrutor. Look at the code. It's nothing.
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

----==_mimepart_5a49e36c8891a_77773f976a148f342805b0--

We'd recommend using Scrutor for this feature.

In my blogpost I described how several relatively simple extension methods can solve this problem easily. Here is an example from that post which shows how decorator configuration may look like:
services.AddDecoratorScoped<IEmailMessageSender, EmailMessageSenderWithRetryDecorator>(
    childServices =>
    {
       childServices.AddScoped<IEmailMessageSender, SmtpEmailMessageSender>();
    });

Hello, in my blogpost I described how a relatively simple extension method can solve this problem easily. Here is an example from that post which shows how decorator configuration may look like:
  services.AddDecorator<IEmailMessageSender, EmailMessageSenderWithRetryDecorator>(
    decorateeServices =>
    {
        decorateeServices.AddScoped<IEmailMessageSender, SmtpEmailMessageSender>();
    });


Userscript version

I love this script, so i want to request if you can make a userscrpt version of this, for use in other browsers (even Edge using tampermonkey).
Is this possible?

1


literature search example dies during indexing

When I try to run the holmes extractor using this example, it reaches the end of all the parsing, spawns a lot of (?) worker threads during indexing, and then the program gets killed, presumably because it exceeded system resources.
What's going on, and how to fix?

Hi @PDDeane, which literature example are you running and which version of Holmes are you running and on which operating system?

example_search_EN_literature.py
holmes_extractor.4.0.3
ubuntu 20.04 LTS

A couple of things you could try:

add number_of_workers=1 at line 24. This means only one worker thread will be created. However, on Ubuntu worker threads are forked rather than spawned, so while this should reduce the CPU load it won't have much impact on memory use.
define a swap file (https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-20-04/)

Hello,
I encountered the same problem today using Ubuntu 22.04.1 LTS while using the mentioned example or a custom smaller scale example.

define a swap file (https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-20-04/)

Now that I have activated a large enough swap partition, I can confirm that the advice above worked for me. :+1:
(On my system, at peak memory usage 32 GB RAM and about 9-10 GB Swap were used for indexing the Harry Potter corpus. When ready for search total memory usage dropped to a bit more than 32 GB.)


Enhance volunteer recruitment

Can we put a form in the members area to collect feedback?
E0 U3 S5 C6: P14

Form drafted, but improvements needed.
Embed code for the form:
Loading...
Link: https://goo.gl/forms/zEKBuoHVRYnHTP8j1

Is this still  a requirement it has been inactive since smrr723 left

@DeniseColbert to check state of play with this.


refactor(elements|ino-sidebar): remove component

Closes #405
Component ino-sidebar got removed out of elements packages

currently blocked by #694


Add Facebook Messenger

There's no URL, because there are no relevant help articles, or anything. There's not even an account page or anything alike, it's all inside the mobile app.

Hello @hobarrera ,
This repo is not being maintained anymore, but we are trying to keep it alive on a fork here, would you kindly submit your PR there and close this one here? :)

Closing due to project deadness.


活捉ConfigCenterConfig配置变动导致timeout判断无效的问题

首先声明此问题从2.7.0版本~2.7.3版本全部都受到影响，ConfigCenter的配置键是以config.开头，比如config.timeout，而org.apache.dubbo.common.constants.CommonConstants.TIMEOUT常量的定义则是String TIMEOUT_KEY = "timeout"; 在配置初始化的时候，初始化时长如果不超过预设的5秒则不会出问题，如果超出的话则会抛出如下异常
RROR CuratorFrameworkImpl:694 - Background operation retry gave up org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss
经过我的排查发现只有使用apache curator的版本在2.x的时候才不会有该异常，使用3.x和4.x都会出现，虽然此异常并不会有什么其他的影响，但是每次启动工程的时候都会抛出，非常难受，希望可以解决一下，具体的几个关键处代码我已经放到截图中。

@complone I think your solution is not right, because the zookeeper transporter is not only used by config-center. It will not use "config.timeout" as timeout key when it is used by Zookeeper Registry.

@complone I think your solution is not right, because the zookeeper transporter is not only used by config-center. It will not use "config.timeout" as timeout key when it is used by Zookeeper Registry.

So what do I do right?I followed the ‘dubbo-samples/dubbo-samples-annotation’ and reported the error. My configuration file is as follows:

@complone I think your solution is not right, because the zookeeper transporter is not only used by config-center. It will not use "config.timeout" as timeout key when it is used by Zookeeper Registry.

Thank you for your correction.I saw your Dubbo-4760


Use button entity for pulse switches

@lbbrhzn, I can't test on a live system at the moment. If you're able to on your charger before merging that'd be great.

I tried your branch, but it failed (see below). Let me known when I can try again.
2021-12-17 22:55:12 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry central for button
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/homeassistant/config_entries.py", line 313, in async_setup
result = await component.async_setup_entry(hass, self)  # type: ignore
File "/usr/local/lib/python3.9/site-packages/homeassistant/components/button/init.py", line 64, in async_setup_entry
return await component.async_setup_entry(entry)
File "/usr/local/lib/python3.9/site-packages/homeassistant/helpers/entity_component.py", line 147, in async_setup_entry
platform = await async_prepare_setup_platform(
File "/usr/local/lib/python3.9/site-packages/homeassistant/setup.py", line 309, in async_prepare_setup_platform
platform = integration.get_platform(domain)
File "/usr/local/lib/python3.9/site-packages/homeassistant/loader.py", line 530, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/local/lib/python3.9/site-packages/homeassistant/loader.py", line 535, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/config/custom_components/ocpp/button.py", line 19, in
class OcppButtonDescription(ButtonEntityDescription):
File "/config/custom_components/ocpp/button.py", line 22, in OcppButtonDescription
press_action: str | None = None
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

i can see the buttons, and reset works for me. Unlock does not: my charger responds with 'Unsupported'.

Should we also add a button for a  RemoteStopTransaction?

looks good to me!

This will only work with 2021.12 and above so perhaps give it a while before tagging into a release. I have updated the slider but that's not yet compatible with a 2021.12.3, hopefully it'll be in .4

Should we also add a button for a RemoteStopTransaction?

The 'Charge_Control' switch when switched off while charging already performs a RemoteStopTransaction.  So in my view it's not required.

i can see the buttons, and reset works for me. Unlock does not: my charger responds with 'Unsupported'.

Not sure on best way to handle chargers that don't support 'Unlock' as it is not known until the command is sent. What's your view? Eg on return of 'Unsupported' the button availability could be set to false?


chore: Add watch command to automatically reload during development.

It's helpful to have an automatic reloading and re-starting command available during development.
To accomplish that, this PR adds watch and start commands to the package.json file.  This utilizes tsc-watch to accomplish the watching functionality.
Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

[x] I acknowledge that all my contributions will be made under the project's license.

Seems to work for me.  Marking as ready.

Hi @imnotjames, I think we might not have been exactly clear in #53. We need the watch mode to be something that someone using twilio-run in their project can run. And it shouldn't be watching the twilio-run project, but the project in which twilio-run is serving files.
Having said that, this is not necessarily a bad thing in this project too. Though I'll leave that up to @dkundel.

Aha, my misunderstanding.  I'll remove the closes message and investigate a more appropriate solution that matches the intended action.

Thanks for the contribution @imnotjames! I can see that you opened another PR with the intended action for #53. I don't think there's much of a benefit to re-run the script when the build works. I typically run npx tsc --watch in one tab and try to run the script in a separate one since this is a CLI. So I'll close this PR. Thank you!


Easy way to generate contour maps

I started on this for Protovis: https://github.com/jasondavies/protovis/tree/contours but there's still a bug that I need to fix (try generating a contour map at zero on a grid of zeroes).
I've also written a CONREC implementation here: https://github.com/jasondavies/conrec.js but Paul Bourke suggested simply iterating over the mesh and computing the intersections as computers are much faster now than when CONREC was devised.  This approach also works for non-uniform grids.  So this is the approach I used in my Protovis branch.
I'd be interested to know if there's a faster way to do it, otherwise I'll continue with this approach and port to D3 when I get some time.

Fixed by @jheer in @ecf796c04ad3669d658ba6548f3610651d4183db.


Support connecting to simulator endpoint

Is your feature request related to a problem? Please describe.
It would be nice if I could connect to the simulator endpoint so I don't need to wait for another laundry cycle to debug my cards
Describe the solution you'd like
A switch that allow user to change endpoint to simulator.home-connect.com
Describe alternatives you've considered
Create entities linked to simulator appliances with a switch in UI
Additional context
N/A
Thanks for reading

Nice idea. It's now supported in version 1.1.8, but read the README for caveats.


[bug 1202719] Remove unused django-appconf

Waiting until Travis is green, then will merge.

Green -> merging.


[Event Requests] Codenit 80

We need a possibility to skip creating Shipment Lines for Service and Non-Inventory Items.
For that purpose we would need following changes in Codeunit 80:
PostItemLine - External
PostItemJnlLine - External
PostUpdateOrderLine - External
GetCountryCode - External
GetCountryRegionCode - External
OnBeforeInsertPostedHeaders(SalesHeader : Record "Sales Header",Handled: boolean) - Publisher in the function InsertPostedHeaders
OnBeforeCheckDocumentType(SalesHeader : Record "Sales Header";ExecuteDocCheck : Boolean,CheckDocumentType:boolean, Handled: boolean) - Publisher in the function CheckDocumentType
Some other approach for achieving the same goal would also be fine.

We require events definitions and placement in the code for processing of requests. This is more DCR request, please use Yammer to discuss this and get other partners vote for this suggestion. Or provide detailed specification of needed events and other changes for our investigation.

Hi,
As I have succesfully achieved what our need was I would therefore only ask for following:
PostItemJnlLine - External
This function has no variable parameter and could be used externally.
Please let me know whether this can be realized through such request.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


refactor: code optimization

Codecov Report
Patch coverage has no change and project coverage change: +0.06 :tada:

Comparison is base (e661e4a) 14.96% compared to head (d2a3ca0) 15.03%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
+ Coverage   14.96%   15.03%   +0.06%
==========================================
  Files           5        5
  Lines         882      878       -4
==========================================
  Hits          132      132
+ Misses        748      744       -4
  Partials        2        2

Impacted Files
Coverage Δ

bit_buffer.go
86.04% <0.00%> (ø)

qr_segment.go
14.37% <0.00%> (ø)

qr_segment_advanced.go
6.34% <ø> (+0.13%)
:arrow_up:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Using this OpenLDAP container as consumer

Hi, I'm already having a Provide-Consumer architecture and my consumer got failed which I couldn't debug it. So is it possible that I can use this container as the consumer ? My LDAP Provider is not running in a container.

I am running this container as a consumer and as a provider. What error message do you have ?


Crash when trying to go back to the previous screen.

Trying to figure out why this is occurring but currently no idea.
Reloaded 2 of 423 libraries in 394ms.

Please add the output of flutter doctor -v
and the code of a minimal example that allows to reproduce.

@zoechi Sorry for that. I'll put the output next time. Close for now since it's not occurring anymore.

No worries. Don't hesitate to create a new issue.


[PHPUnit] Skip AddDoesNotPerformAssertionToNonAssertingTestRector on method from MockBuilder

Fixes https://github.com/rectorphp/rector/issues/6684

@TomasVotruba All checks have passed 🎉 , the pending workflow Rector Expected — Waiting for status to be reported seems unrelated.

Thanks!
İt seems the workflow is missing, could you complete it from other repository?

that's seems already applied at https://github.com/rectorphp/rector-phpunit/pull/24 ?

Yes, that was the intention :+1:


IMU (Inertial Measurement Unit) data sensor streaming

Is it possible to stream gyro/magnetometer/accel data from the Hololens's internal IMU through the sensor streaming tutorial or will I only get access to the vision sensors like the ToF sensor?

@ishakbhatt - Can you tell me what sensor streaming tutorial you are talking about?  That way I can direct this to the right subject matter expert.
Thanks,
Jesse


used GPU but got up to 100% on CPU process

face_recognition version: 1.2.3
Python version: 3.6
Operating System: ubuntu 18.04

Description
Running with flask, i have GPU, dlib installed on GPU :
dlib.DLIB_USE_CUDA
the response :
TRUE
running this code on flask :
if len(face_recognition.face_locations(img, model="cnn")) == 0:
then check with nvidia-smi :
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01    Driver Version: 440.33.01    CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla V100-PCIE...  Off  | 00000000:86:00.0 Off |                    0 |
| N/A   46C    P0    39W / 250W |  11602MiB / 32510MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|    0      9735      C   python3                                     5082MiB |

i try hit the flask to run face detection, 3 times with same time, got hight process on CPU, i see with command "top" :
 PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
9735 root      20   0 47.004g 0.011t 2.630g S 116.1 18.4   5:12.98 python3

why this happen ? the process use cpu, not all in GPU ? and the process to hard on cpu, 3 times got percentage up to 100%, any clue ?
running command  :
cat /proc/cpuinfo | grep processor | wc -l
40
then spec of my cpu :
lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              40
On-line CPU(s) list: 0-39
Thread(s) per core:  2
Core(s) per socket:  10
Socket(s):           2
NUMA node(s):        2
Vendor ID:           GenuineIntel
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz
Stepping:            4
CPU MHz:             800.018
CPU max MHz:         3000.0000
CPU min MHz:         800.0000
BogoMIPS:            4400.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            14080K
NUMA node0 CPU(s):   0-9,20-29
NUMA node1 CPU(s):   10-19,30-39

9735 root      20   0 47.004g 0.011t 2.630g S 116.1 18.4   5:12.98 python3

Top is showing that the python process is only using 1 core of the available 40, which makes sense.

did you try to do " cuda-memcheck filename.py " ? i run into poor performance on my less then 50 line program and it use CPU not GPU like your case too.


How to setup the enviroment?

Hello, the setup instruction is quite confusing, can you provide the pytorch version， required python package or  config.yaml file?

Please refer here


Fix bug with empty limit

But in empty slice with len equal 1 in strings.Split
https://github.com/golang/go/issues/39806

All done


Fix Coveralls code coverage

Currently
Randomized with seed 1113
[Coveralls] Submitting to https://coveralls.io/api/v1
[Coveralls] Couldn't find a repository matching this job.
Coverage is at 98.94%.
Coverage report sent to Coveralls.

On my fork after adding the Coveralls token
Randomized with seed 57600
[Coveralls] Submitting to https://coveralls.io/api/v1
[Coveralls] Job ##8.1
[Coveralls] https://coveralls.io/jobs/101153293
Coverage is at 98.94%.
Coverage report sent to Coveralls.

Reference a good comment: https://github.com/lemurheavy/coveralls-public/issues/1613#issuecomment-1028302521
coveralls-reborn using COVERALLS_REPO_TOKEN https://github.com/tagliala/coveralls-ruby-reborn/blob/e17e7c4c7776fb2f74a225905d421f01382f3f2b/lib/coveralls/configuration.rb#L22
The service name in .coveralls.yml must be something, though in this case it doesn't have any special meaning https://docs.coveralls.io/api-reference
NOTE: The repo token here (https://coveralls.io/github/ruby-grape/grape/settings) must be set as a secret in this repository for this to work

Closes #2061.

I added COVERALLS_REPO_TOKEN here.

Merged. Could you please check that master got coverage successfully now?

https://coveralls.io/jobs/101222049

@duffn see https://github.com/lemurheavy/coveralls-public/issues/1505, maybe you'll find a solution to this?

I’m not intimately familiar with Coveralls, but I’ll take a look at what’s going on here.