Pulseaudio librespot implementation not playing audio

Describe the bug
Streaming service using built in libre-spot not outputting audio on pulseaudio backend
To Reproduce
Compile with the following command:
cargo install spotify_player --no-default-features --features pulseaudio-backend,streaming,media-control
try to play audio using the built in librespot implementation
Expected behaviour
When I play music via the built in streaming player, i hear audio out from pulseaudio.
Log and backtrace
spotify-player-24-06-11-06-30.log
Environment

OS: Arch

Application version: spotify_player 0.18.2

Application features: if applicable, provide cargo features used to build spotify_player
pulseaudio-backend,streaming,media-control

Additional context
I was able to get audio to play by compiling librespot with pulse audio, and compiling spotify_player using without streaming or pulseaudio backends, and running librespot first and using this app to control it. But it seems like the implementation of librespot in the program doesn't work correctly on my system.
In addition, I can control a broken session from my phone, so I know librespot exists and is talking to spotify. There's just nothing coming out from the audio backend.
Potentially related to issue #435

Sorry, missed this issue. Please see my note in https://github.com/aome510/spotify-player/issues/496#issuecomment-2212862946. Can you try a different audio backend instead?


Add support for long vectors of small types in the global push constant struct.

This stops us hitting an assert that would otherwise happen when a long vector kernel arg didn't fit in regular push constant memory (or was forbidden from it by a flag like -no-16-bit-storage).
This contribution is being made by Codeplay on behalf of Samsung.

is there a way to trigger a CI retry? I think that would be the appropriate response to this failure:
/usr/bin/ld: out of memory allocating 1000 bytes after a total of<PHONE_NUMBER> bytes

I'm getting through these PRs, but I was away for a couple weeks. Please bear with me.

No worries!


DCOS-41310, DCOS-41842, DCOS-42506

Update the node count whenever we filter by framework.
Closes https://jira.mesosphere.com/browse/DCOS-41310 .
Closes https://jira.mesosphere.com/browse/DCOS-41842 .
Closes https://jira.mesosphere.com/browse/DCOS-42506 .
Testing
DCOS-41310:

Go to nodes page.
Use the "filter by framework" dropdown to filter.
Verify that every time it shows the correct number of nodes above the filter (also when using "Clear" to clear).
Verify that the added tests make sense.

DCOS-41842:

Go to nodes page.
Type something in the filter.
Click "Clear".
Verify that the filter is empty.
Select something from the filter dropdown (for example "healthy" or "unhealthy").
Click "Clear".
Verify that the filter is empty.
Verify the same filter is reset after refreshing the page.
Verify that the added test makes sense.

DCOS-42506:

Go to nodes page.
Switch to graph view.
Apply a filter using the dropdown.
Switch to gable view.
Verify that the filter is reset.
Verify that the added test makes sense.

Trade-offs
None.
Dependencies
None.
Screenshots
https://jira.mesosphere.com/browse/DCOS-41310
Before

After

https://jira.mesosphere.com/browse/DCOS-41842
Before

After

https://jira.mesosphere.com/browse/DCOS-42506
Before

After

@DanielMSchmidt , for the case of switching between the different modes the filter is being reset on master as well. I only reset the dropdown selection so that it's clear that we are not filtering.

Same for visiting the site with filters. Right now if you apply a filter, for example "unhealthy", copy the URL and open it in another tab, the filter will show "unhealthy", but the table will not be actually filtered.

I am aware and the bug ticket points out that this is an inconsistency. Instead of fixing it towards the "clear the textfield" side we should resolve the inconsistency by applying the filters that are set via query params

Instead of fixing it towards the "clear the textfield" side we should resolve the inconsistency by applying the filters that are set via query params

@DanielMSchmidt , why do you think that we should?

I think we should take what the URL gives us as query parameters and put the into the DSL form and apply the filter. And I think if there is something missing as an URL query parameter we should add it. In the end I would like to be able to deep link to a specific search here. By taking the URL as a single source of truth we can actually remove quite some complexity I would imagine.
But that's only my opinion, @nLight what do you think is the right mix  of customer first / ship it here?

@DanielMSchmidt , I don't know if the filters ever worked as you described. If they didn't, it's not a bug, but a feature and out of scope here.

If they never did they were build with this bug. Because there is no explanation why you should change the URL to reflect your filtering if you don't want to enable anyone to deep link to this filter

Even though the jira was created by Fabs, the bug was reported by me. And the bug I saw was that we didn't clear the filtering. If the URL thing is a bug, it is a different bug for me.

I talked with @nLight and he says we should fix the filter when visiting a URL with a filter.

to me it feels like we have to unravel a lot of logic to start the data-flow from the routing and also make the selected-framework-filter a part of the DSL-filter (as suggested in DCOS-41310). that's going to be a bigger refactoring but i think it will be well worth it.
in the meantime the current behaviour is quite a bit better than on master although some things i'd suspect to work (select-framework-via-url, updating the url updates the filters) and that would fit the context of these issues could still be addressed.
while digging into the code some cleanups/changes emerged, which you might want to have a look at. if you think it does not make sense to incorporate those, i'd save them for a spike day.

@pierrebeitz , I definitely agree with the need for a refactoring, but I don't think that a bug fix PR is the right place for this.

I will take care of the file conflict tonight or tomorrow.

@natmegs , thank you for the review.

For me it shows the correct number of nodes, but it doesn't show the actual node in the table (this is using fixtures to have more options to choose from)

This shouldn't happen, I will take a look.

The filters do not refresh on reset for me as they seem to be persisted in the url (which is a good thing I think? Just wanted to check)

Yes, this is expected, I hadn't updated the testing instructions.

(^ Switching between graph and table). Filter is not reset when I switch from graph -> table

Same here, it's expected, I didn't update the testing instructions.

Everything behaves as expected, and the changes look good to me.
I noticed one potential issue, but I think it may just be an issue with fixtures:
I'm not sure if the node count is correct. When I use fixtures and filter by "Draining" status, it says "300 out of 5000". Then if I add the "Unhealthy" filter, it still says "300 out of 5000". See screen recording: https://cl.ly/f07e6ff9099f

@mperrotti , I also think that this is related to fixture and is not a real issue. For me, only if we observe something similar happening on a real cluster (soak for example), then we should be alarmed.

:tada: This PR is included in version 2.137.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


cannot add scalar value without an associeted key

Hello everyone,
I have deployed a waf on cloud (azure) app gateway waf,
I have a false positive ( CANNOT ADD SCALAR VALUE WITHOUT AN ASSOCIETED KEY)
I don't know why waf detect a request as a bad traffic,
this is the totaly request:
`
POST https://edu-pp.tactileo.fr/profile/internal/permissions HTTP/1.1
cache-control: no-cache
Accept: application/json
Content-Type: application/json
Authorization: Bearer
Host: edu-pp.tactileo.fr
cookie: ARRAffinity=e66763d6606203ca589c508b2ec0185c5b193bb84d15f36169a81d20ed13dc09
accept-encoding: gzip, deflate
content-length: 13
[ "teacher" ]
the rule id generated is 0
@victorhora was telling me that:
"
The error message you mentioned "Cannot add scalar value without an associated key" usually happens when the JSON parser can't associate a key to a given JSON value as the code normally expects a key/value format (e.g. [profession: "teacher"]) data for JSON and your request only contains the value ([ "teacher" ]).
#1576 might be related so maybe you could retry with the current proposed solution for v2 at #1577.
Still, as far as I can remember this error message shouldn't be causing a false positive... Unless maybe if this issue is causing the request body parser to fail and triggering rule 200002..."
I have seen in: https://fossies.org/linux/modsecurity/apache2/msc_json.c
<
"int json_add_argument(modsec_rec *msr, const char *value, unsigned length)
20 {
21     msc_arg arg = (msc_arg ) NULL;
22
23     /
24      * If we do not have a prefix, we cannot create a variable name
25      * to reference this argument; for now we simply ignore these
26      */
27     if (!msr->json->current_key) {
28         msr_log(msr, 3, "Cannot add scalar value without an associated key");
29         return 1;
30     }

thhis information but i'm not sure if the request is really ignored or not (because on logs the waf blocked the request)
But the application works fine, (no error)

@mrahmatellah,
So you're not getting a false positive after all? :)
I might be missing something here, but what I could understand now is that you don't have any issue really but you're just trying to figure out (and fix?) why you're getting these messages on your logs?
Maybe it would help if you could provide details on the ModSecurity version, environment, logs etc.
Have you tried what what I proposed you at https://github.com/SpiderLabs/ModSecurity/issues/1073#issuecomment-344072205
"#1576 might be related so maybe you could retry with the current proposed solution for v2 at #1577."?

Two things to note:

A naked JSON array is a valid JSON data structure, so the parser should handle it appropriately, to avoid the warning, but more importantly, to be able to analyse the JSON content!
The warning is just a log pollution. It does not block the request, but makes it very difficult to analyse the logs and identify real blocking issues. Some softwares using ModSecurity provide no way to reliably filter out those minor issues from serious ones.

We are currently in the process of deploying a WAF in front of our production environment, so we are very concerned with every issue and false positive introduced by the new component before we can confidently switch to prevention mode (i.e. active protection instead of just alerts). This makes it a real pain to configure it properly!
Modifying the schema of the request content would work, but:

It forces us to add a new workaround in our API, and we also have to remember this rule for all other endpoints. Maintainance is made more difficult.
We could host a third party API component which we can't modify (non-open source 3rd party library or software), and the workaround would be impossible to implement.

While revisiting an issue related with JSON today (#1879) I was looking into YAJL API  and realized there are a few options available which we are not using today. One of them is yajl_allow_multiple_values.
By enabling this option YAJL can parse requests such as:
POST https://edu-pp.tactileo.fr/profile/internal/permissions HTTP/1.1
cache-control: no-cache
Accept: application/json
Content-Type: application/json
Authorization: Bearer
Host: edu-pp.tactileo.fr
cookie: ARRAffinity=e66763d6606203ca589c508b2ec0185c5b193bb84d15f36169a81d20ed13dc09
accept-encoding: gzip, deflate
content-length: 13

[ "teacher" ]

Debug logs:
[4] Starting phase REQUEST_BODY. (SecRules 2)
[4] Adding request argument (JSON): name "json.array_0", value "teacher"
...
[4] (Rule: 1111) Executing operator "Contains" with param "teacher" against ARGS.
[9] Target value: "teacher" (Variable: ARGS:json.array_0)
[9] Matched vars updated.
[4] Running [independent] (non-disruptive) action: log
[9] Saving transaction to logs
[9] Rule contains a `block' action
[4] Rule returned 1.

Also, empty JSONs such as the ones described at #1767, #1392 (maybe #1822) doesn't trigger invalid body errors anymore.
Some manual tests and testcases are passing fine with this but I'm still wondering if there's any scenario I'm missing where yajl_allow_multiple_values would make the parser more fragile or allow for a bypass. Ideas?

Hi @madmox, I guess that you are using the old 2.x family where this was an issue till today.  Having #1576 and #1577 closed, this was consequently closed. Notice that the solution adopted on 2.x is not fancy as it is on v3. However, should solve this specific problem.


Required changes in syntax

https://docs.google.com/document/d/1Xy0sJi3BCFB_mKcWNWB0iGJRjB_IOPycZJ_aWdpPz7I/edit?usp=sharing

Done in <IP_ADDRESS>


Changing levels via scale sometimes results in missing Tiles

STR:
Pinch and zoom aggressively.  At some point you'll notice some areas are not filled.

Fixed in 3.0.1 https://github.com/moagrius/TileView/releases/tag/v3.0.1


Compatible with react-native-router-flux

Is this component Compatible with react-native-router-flux?

I didn't try but I guess it should be possible to make it compatible
<GiftedForm
openModal={(route) => {
// the trick will be here
}}
The purpose of openModal prop is to navigate to the modal. The content of the modal is defined by the
route object https://github.com/FaridSafi/react-native-gifted-form/blob/master/widgets/ModalWidget.js#L72 which contains renderScene, getTitle, configureScene, renderLeftButton, renderRightButton functions
Maybe #1 can help you

how if I just simply install both router? is it just working out of the box without crashing?

It might work

Thanks for the response, I'll try it @FaridSafi .

@radiegtya Did you make this works with react-native-router-flux?

I've managed to get it partially working. I struggled for a while attempting to get the renderRight/Left buttons returned from the ModalWidget working properly with router-flux.
My eventual solution did require me to fork and make this small change (I could not get the displayValue to update properly, this is most likely not in line with the authors intent for navigator usage): https://github.com/deldreth/react-native-gifted-form/blob/master/widgets/ModalWidget.js#L143
The project that this is in reference to is still using react-native-router-flux @ 2.x.
Outside of that...
My modal component... I'm going for simplicity here
import React, {
  Component
} from 'react-native';

export default class FormModal extends Component {
  constructor (props) {
    super(props);
  }

  componentWillUnmount () {
    this.props.updateDisplayValue();
  }

  render () {
    return this.props.renderScene();
  }
}

FormModal.propTypes = {
  renderScene: React.PropTypes.func,
  updateDisplayValue: React.PropTypes.func
};

My GiftedForm and openModal prop:
Actions from react-native-router-flux.
<GiftedForm
  openModal={route => {
     Actions.formModal({ ...route, title: route.getTitle() });
  }}>
</GiftedForm>

My Route Configuration:
<Route name='form' title='Installer Signup' component={Form}/>
<Route name='formModal' component={Modal}/>

I could not reliably get right/left navigation bar rendering to work (it may be in relation to the older version of react-native-router-flux this project uses).

@deldreth thank's to help, and I found navigation right button render on props.renderRightButton() and props.renderLeftButton()
Then we can get inline function onPress()
const btnItem = this.props.renderRightButton()
btnItem.props.onPress()
Actions.pop()

Got this mostly working with react-native-router-flux v3.30, but could use some tips on how to move the confirm button to the right, currently it renders on the left like this:

ended up adding some styling to the TouchableOpacity to the renderRightButton in ModalWidget.js to address the positioning

@bsy could you say how to did it with react-native-router-flux 3.30?

@deldreth @aa900031 @bsy it would be of great help if any one of you can share how you got the left/right button to get working and show up at the navbar.

@ramneekhanda @sudugo and others...
I know it's been several months, but I was able to modals working using<EMAIL_ADDRESS>+<EMAIL_ADDRESS>and figured I'd share my solution in case you (and anyone else reading this) are [still] interested...
The React component for the modal (I leave the styling up to you)
import React from 'react'
import { ScrollView  } from 'react-native'

export default class FormModalScreen extends React.Component {
  render () {
    return (
      <ScrollView>
        { this.props.renderScene() }
      </ScrollView>
    )
  }
}

The react-native-router-flux configuration
import FormModal from '...'

<Router>
  ...
  <Scene
    key='formModal'
    component={FormModal}
    direction='vertical'
    rightTitle='Save'
  />
  ...
</Router>

The openModal function
import { Actions } from 'react-native-router-flux'

<GiftedForm
  openModal={(route) => {
    Actions.formModal({
      title: route.getTitle(),
      renderScene: route.renderScene,

      /*
        Option 1: If you like the buttons react-native-gifted-form
        gives you, then use this step:
      */
      renderRightButton: route.renderRightButton.bind(route, Actions),

      /*
        Option 2: If you prefer your own right button (or text), then
        use this step:
      */
      // onClose: route.onClose.bind(null, null, Actions)
    })
  }}
/>

The reason why you need to use the .bind function passing in Actions is because those methods eventually use that to call navigator.pop() in an onClose function.  Without this, the app will crash complaining about how navigator.pop is not a function.
Anyways, hope this helps.

(The screencast animation is a bit strange, but anyways it works)

@henrythach works perfectly!

In case you have a custom navigation bar like me with react-native-router-flux you can simply use @henrythach solution but with modal instead:
Modal Component
`'use strict';
import React, { Component} from 'react';
import {View, Button, Modal} from 'react-native';
import {Actions} from 'react-native-router-flux'
class FromModal extends Component {
constructor() {
super();
this.state = {
modalVisible: true
};
}
onClick() {
Actions.pop();
}
render() {
    return (
        <Modal visible={this.state.modalVisible} transparent={false}>
            { this.props.renderScene() }
            <View>
                <Button onPress={() => this.onClick()} title="X"/>
            </View>
        </Modal>
    )
}

}
export default FromModal;`
the rest similar to the solution above. You can also style your modal on where you want to have you close button or save button etc.

Hello, someone help me with the following error I am using the following react-native-gifted-form library, for android.
https://github.com/FaridSafi/react-native-gifted-form
<GiftedForm.ModalWidget
Title = 'Country'
DisplayValue = 'country'
Image = {require ('../../images/passport.png')}
ScrollEnabled = {false}

<GiftedForm.SelectCountryWidget
Code = 'alpha2'
Name = 'country'
Title = 'Country'
AutoFocus = {true}
/>
</GiftedForm.ModalWidget>

@ramneekhanda @sudugo and others...
I know it's been several months, but I was able to get modals working using<EMAIL_ADDRESS>+<EMAIL_ADDRESS>and figured I'd share my solution in case you (and anyone else reading this) are [still] interested...
The React component for the modal (I leave the styling up to you)
import React from 'react'
import { ScrollView  } from 'react-native'

export default class FormModalScreen extends React.Component {
  render () {
    return (
      <ScrollView>
        { this.props.renderScene() }
      </ScrollView>
    )
  }
}

The react-native-router-flux configuration
import FormModal from '...'

<Router>
  ...
  <Scene
    key='formModal'
    component={FormModal}
    direction='vertical'
    rightTitle='Save'
  />
  ...
</Router>

The openModal function
import { Actions } from 'react-native-router-flux'

<GiftedForm
  openModal={(route) => {
    Actions.formModal({
      title: route.getTitle(),
      renderScene: route.renderScene,

      /*
        Option 1: If you like the buttons react-native-gifted-form
        gives you, then use this step:
      */
      renderRightButton: route.renderRightButton.bind(route, Actions),

      /*
        Option 2: If you prefer your own right button (or text), then
        use this step:
      */
      // onRight: route.onClose.bind(null, null, Actions)
    })
  }}
/>

The reason why you need to use the .bind function passing in Actions is because those methods eventually use that to call navigator.pop() in an onClose function. Without this, the app will crash complaining about how navigator.pop is not a function.
Anyways, hope this helps.

(The screencast animation is a bit strange, but anyways it works)

Hello
it's not work with last version
"react-native": "0.57.7",
"react-native-router-flux": "^4.0.6",
it give me this error when i click the modal
_reactNativeRouterFlux.Actions.Modal is not a function

openModal
    ca37f261-62ec-3543-960e-62950ae397f1:167563:13
onPress
    ca37f261-62ec-3543-960e-62950ae397f1:185354:9
onPress/<
    ca37f261-62ec-3543-960e-62950ae397f1:185460:13
setter/</id<
    ca37f261-62ec-3543-960e-62950ae397f1:56417:9
_callTimer
    ca37f261-62ec-3543-960e-62950ae397f1:24014:9
callTimers
    ca37f261-62ec-3543-960e-62950ae397f1:24219:9
__callFunction
    ca37f261-62ec-3543-960e-62950ae397f1:2470:22
callFunctionReturnFlushedQueue/<
    ca37f261-62ec-3543-960e-62950ae397f1:2243:11
__guard
    ca37f261-62ec-3543-960e-62950ae397f1:2424:13
callFunctionReturnFlushedQueue
    ca37f261-62ec-3543-960e-62950ae397f1:2242:9
onmessage
    debuggerWorker.js:72:25

i hope some one help me


Am I forced to authenticate manually on local environment?

Question
Hi there,
In a FastAPI Project, I'd like to avoid authenticating manually with logfire auth command, even on local environment.
I configured my project this way:
Settings
class Settings(BaseSettings):
    LOGFIRE_SEND_TO_LOGFIRE: bool
    LOGFIRE_TOKEN: str | None = None

    model_config = SettingsConfigDict(
        env_file=BASE_DIR / ".env",
        env_ignore_empty=True,
        env_prefix="FAPI_",
        case_sensitive=True,
        extra="forbid",
    )

.env file
FAPI_LOGFIRE_SEND_TO_LOGFIRE=true
FAPI_LOGFIRE_TOKEN=<my-real-write-token>

main.py file
app = FastAPI(..)
if settings.LOGFIRE_SEND_TO_LOGFIRE:
    logfire.configure(send_to_logfire=True)
    logger.configure(handlers=[logfire.loguru_handler()])
    logfire.instrument_fastapi(app)

No matter what I tried, When running fastapi dev I get a LogfireConfigError: You are not authenticated. Please run 'logfire auth' to authenticate. error.
But in the documentation, it seems I should be able to authenticate via token, event during development.
What am I missing here? Thanks

You need to either pass the token via logfire.configure(settings.LOGFIRE_TOKEN), or change the environment variable from FAPI_LOGFIRE_TOKEN to LOGFIRE_TOKEN.

Thanks for the answer!

pass the token via logfire.configure(token=settings.LOGFIRE_TOKEN)

Works 👌🏻 thank you!

change the environment variable from FAPI_LOGFIRE_TOKEN to LOGFIRE_TOKEN

I'd prefer not, as FAPI is my env prefix for Pydantic-settings (which is a good practice to have IMO).


Obey draw_mode and introduce set/getIndices (fix #293)

Somehow, we weren't obeying the draw_mode.  That should be fixed now.
Also, deprecated get/setTriangles() in GVRMesh.  Replaced with
get/setIndices() which is a less confusing and more general name.
GearVRf-DCO-1.0-Signed-off-by: Tom Flynn
<EMAIL_ADDRESS>

Code looks good. Tried and it works as expected.


[Question]: why after the end of the answer, it will turn into an error

Describe your problem
Using ubuntu in wsl2 and docker-desktop integration,

At first it will give a nice answer,  but at the end the error "ERROR: can only concatenate str (not "NoneType") to str" replaces the answer the it looked like this instead

using zhipu api does not report such a problem, i guess it is the issue of moonshot kimi llm then.

I have same error with openAI LLM, but with deepseek everything working fine

Also seeing this error with open AI

thank for your mention #1728  already fix it


skiaSharp 2.80.3 usage

Hi, This nuget package is very helpful. Thank you for creating it. The requirement for this package is to have skiaSharp >= 2.80.3. But there is an issue with this version: https://github.com/mono/SkiaSharp/issues/1860 https://github.com/mono/SkiaSharp/issues/1767
It works with skiaSharp version 2.80.2. There is any issue with using this version?

There should be no problems from my point of view.


build: enable multiple Dockerfiles

Codecov Report

Merging #211 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #211   +/-   ##
=======================================
  Coverage   93.05%   93.05%
=======================================
  Files           4        4
  Lines         144      144
=======================================
  Hits          134      134
  Misses          5        5
  Partials        5        5

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f67993...5697c1b. Read the comment docs.


feat: Add predicate and script templates

Description
When DevRel creates more tutorials on predicates and scripts, it's not ideal to use the same template designed for contracts and ask developers to erase everything and start afresh. It's clearer to have developers use a template tailored for the respective program type.
These templates are already compatible with existing forc commands like
Predicate

forc new --predicate MyPredicate
cargo generate --init fuellabs/sway templates/sway-predicate-test-rs --name MyPredicate

Script

forc new --script MyScript
cargo generate --init fuellabs/sway templates/sway-script-test-rs --name MyScript

Checklist

[x] I have linked to any relevant issues.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have updated the documentation where relevant (API docs, the reference, and the Sway book).
[x] I have added tests that prove my fix is effective or that my feature works.
[x] I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
[x] I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
[x] I have requested a review from the relevant team or maintainers.

Ready for review once https://github.com/FuelLabs/sway/pull/5720 is merged

I'm not convinced that we should merge this into the base layer of forc. Currently, forc is very much focused around sway and does not suppose any other language.
While I can sympathize that the above changes make bootstrapping a project with a rust integration harness a little easier than using cargo generate, perhaps this could be implemented as a forc plugin that users who use rust can opt into downloading.

Maybe I'm missing something here but this PR shouldn't affect forc it is simply alternate templates for predicates and scripts using cargo generate.


Load sidebar only on demand

Privacy is key, so sending all the visited URLs to any third-party is inacceptable. Why not showing the sidebar only after clicking the button, so that only the page I want will be searched for comments?

+1 I'd rather preserve my privacy and search for a HN thread only when I'm interested in comments, in the same way I sometimes make the conscious decision to jump to the bottom of an article looking for in-page comments.

I wouldn't always show a floating HTML button on every page. I would have an extension icon in the Chrome toolbar which I would click as needed.

I modified the extension to enable on-demand search for HN:
https://github.com/huyz/hn-sidebar
I didn't create a pull request because it should be a user option to have one behavior or the other and I didn't implement that toggle.


FEATURE REQUEST: FLUENT ICONS CAN BE EDITED WITH OUR OWN ICONS

What feature or improvement do you think would benefit Files?
One of the best features of File Explorer is the ability to change icons to whatever icons we wish. I'd love this on the Files app.
Requirements
I can change the icon through a right-click option or in the Files settings.
Files Version
Version: <IP_ADDRESS>
Windows Version
Windows 11 21H2
Comments
No response

This is already available in the properties window under the customization tab.

This is already available in the properties window under the customization tab.

No, it's not. I'm talking about the Fluent Icons (Home, Favorites, Drives, Tags). I can't change the icons for those menus, they are stuck with the default fluent icons.


Add Tests

I recreated the branch to make it a bit easier to read
I did the following changes:

Removed pwn import - was causing a loop
Moved colors into its own class, and have it use an init to prevent the import from accessing args which is preventing us from using pytest (as args cannot be externally provided)
Created a pytest of two modules

If this flow is ok, let me know, I will add more pytest
I already found one bug using the pytest related to the rfi bug you already fixed

@nrathaus I like this way of testing and thanks for this recommendation. Cool way to find bugs within the code, however noticed there is a bit of a learning curve if others will want to join writing tests like these. Feel free to add more if you want.

For me this test fails, though.
test_tests.py::test_test_rfi PASSED
test_tests.py::test_test_cmd_injection FAILED
Failed with message: We are expecting 2 'requests', got: 7
If I understand this correctly, this test fails, because test functions are used within the same context, so if we initialize stats dictionary and both functions consume it, stats will be shared and accessible across the board.
In other words, when we first run test_test_rfi , stats["requests"] will be 5 as we send 5 RFI requests.
Afterwards, inside test_test_cmd_injection, then number of requests would indeed be 2, (without previous RFI tests), but with the previous ones we should check if stats["requests"] == 5+2.

I fixed the issue you raised: https://github.com/hansmach1ne/LFImap/pull/103


Option for field short names

The help file already offers code that attempts to rename variables to their field short names:
foreach var of varlist _all {
	if "`:char `var'[Odk_group]'" != "" {
		local name = "`:char `var'[Odk_name]'" + ///
			cond(`:char `var'[Odk_is_other]', "_other", "") + ///
			"`:char `var'[Odk_geopoint]'"
		local newvar = strtoname("`name'")
		capture rename `var' `newvar'
	}
}

However, it'd be nice to add this as an odkmeta option (short?) such that the naming is very robust. There's also a discrepancy now between the variable names chosen by insheet and those produced by strtoname() in the loop: given the same column header, insheet and strtoname() may result in different variable names.

Hey Matt,
As you look in to the PR I sent previously, a couple of items to note with regards to how SurveyCTO currently exports field names.  As of SurveyCTO 2.0 there are three options for exporting of fieldnames.

Add groups to exported field names ("groupname-fieldname")
Exclude groups, but still use them internally.
Ignore groups so fields with the same name export together.

The first, of course, was the default going way back and is how odkmeta assumes the data to be organized. The second is meant as SCTO's way of circumventing Stata's 32 character limit for variable names. The third is meant to help streamline output in the case that a field is removed from a grouping mid-survey, but can be dangerous if the user has many fields with the same name.
Right now a lot of users are opting to use the second option and the SCTO generated do-files to circumvent the 32 character limit. If we include a shortnames option in the next release of odkmeta, then we might want to account for both the case that the user starts with data exported in format 1 and the case that they have exported it using option 2. However, I know that the latter case may interfere with the way that odkmeta expects the csv to be organized based on reading the XLSForm. So I wanted to gauge your thoughts about how best to proceed. I am happy to start pulling more programming weight going forward as I know your time is limited.
Chris

I remember discussing this with Lindsey back in the day, and I think we concluded that as long as it's easy for users to select option 1, we don't need to support .csv files with short-name column headers. Any change to the initial .csv import (implemented in  `ODKMetaController'::write_fields() is usually a fairly heavy lift, so I'd shy away from supporting option 2 unless it's a priority. I also think it could be confusing to have two short name options, one for importing .csv files with short names and one for importing .csv files with long names and then converting them to short names.

That sounds fine. Alternatively, would it be easy to capture case 2 and have odkemta display an intelligible error message telling the user to export using the group-names option? If not we can just make sure our messaging is on point.

Nice idea, that definitely sounds possible! For .csv files that include fields inside groups, maybe we could check the column headers and see if they include the group delimiter (-), and if not, issue an error message. That would also help catch users trying to use odkmeta with unsupported flavors that use a group delimiter other than -.
I'd recommend implementing these two features in separate PRs. I could review the shortnames PR in the current sprint, then review the messaging PR in the next one.


Refactor UserPagePermissionsProxy to use PagePermissionPolicy

Follow-up to #10470. Closes #9594. When merging, please credit Tidiane Dia as co-author.
Performance improvement ⚡
Anecdotal performance increase with my current setup of bakerydemo:
Loading the dashboard
Details

main branch, before and after cache is primed

this branch, before and after cache is primed

Loading the page editor as an editor
Details

main branch, before and after cache is primed

this branch, before and after cache is primed

Please check the following:

[x] Do the tests still pass?[^1]
[x] Does the code comply with the style guide?

[x] Run make lint from the Wagtail root.

[x] For Python changes: Have you added tests to cover the new/fixed behaviour?

Please describe additional details for testing this change.
[^1]: Development Testing
[^2]: Browser and device support
[^3]: Accessibility Target

I added a new commit (515008b) that moves the caching (apart from the GroupPagePermission objects) to UserPagePermissionsProxy.

Merged via #10562.


[donotmerge]Chore/add requests limits alpha charts

Description

How has this been tested?

Checklist

[ ] changelog was updated with notable changes
[ ] documentation was updated

/e2e --tests=sdk


Added I/O events sample.

Description
Added an I/O Event example that listens to a Commerce event, handles the data and send to a Slack channel.
Related Issue
None
Motivation and Context
Accelerates onboarding to I/O Events and improves developer experience.
How Has This Been Tested?
Tested by triggering the Commerce event and check the slack channel for the data.
Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] I have signed the Adobe Open Source CLA.
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

This sample looks like the /action folder is directly under /events. Do we need to create folders for each sample under events and move it under there?


Create AnnotationUsage for entity in XML

<entity/> -> @Entity and friends

https://github.com/sebersole/hibernate-models2/issues/3
https://github.com/sebersole/hibernate-models2/issues/4
https://github.com/sebersole/hibernate-models2/issues/8
https://github.com/sebersole/hibernate-models2/issues/12
https://github.com/sebersole/hibernate-models2/issues/13
https://github.com/sebersole/hibernate-models2/issues/14
https://github.com/sebersole/hibernate-models2/issues/15
https://github.com/sebersole/hibernate-models2/issues/16
https://github.com/sebersole/hibernate-models2/issues/17
https://github.com/sebersole/hibernate-models2/issues/18
https://github.com/sebersole/hibernate-models2/issues/19
https://github.com/sebersole/hibernate-models2/issues/20


ddl: Fix the storage instance may be physically dropped when the region is not removed

What problem does this PR solve?
Issue Number: close https://github.com/pingcap/tiflash/issues/8710
Problem Summary:
There are some case that a region may not be removed from TiFlash when there are unhealth peers. However, after the tiflash replica is set to zero, the data still be physically dropped after gc safepoint exceed.
What is changed and how it works?

Prevent the storage instance being physically dropped when the region is not removed
Throw exception when the storage instance is not exist after schema synced

Check List
Tests

[x] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

Fix the issue that the tiflash replica data may be corrupted after setting the tiflash replica to 0 and add it back later

/run-all-tests

/run-all-tests

/hold

/run-all-tests

/run-unit-test

/run-all-tests

/unhold

This PR also prevent data being unexpected dropped when the region is not removed like https://github.com/pingcap/tiflash/issues/8777


Firebase plugins cause errors in Flutter app

From @Stoneman790 on April 13, 2018 11:11
URL: https://pub.dartlang.org/packages/firebase_auth#-installing-tab-
I am new to this so please be kind.  I know this is a known issue and I have tried all of the suggestions, workarounds, etc.  Nothing works.
Copied from original issue: dart-lang/pub-dartlang-dart#1202

Any information about what the error is?
Please also add the output of flutter doctor -v

I can add Firebase podfiles to the project and the project runs on my iOS device and in the simulator. As soon as I add the dependencies in the pubspec.yaml file, and run the debugger it causes the error, "fatal error: 'firebase_auth/FirebaseAuthPlugin.h' file not found"
[flutter] flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.2.8, on Mac OS X 10.13.5 17F35e, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 26.0.2)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
[✓] Android Studio (version 3.1)
[✓] IntelliJ IDEA Community Edition (version 2017.3.3)
[✓] Connected devices (1 available)
• No issues found!
exit code 0
After adding a plugin to pubspec.yaml and running debug I get this:
Running "flutter packages get" in ...
Launching lib/main.dart on iPhone 8 in debug mode...
Xcode build done
Failed to build iOS app
Error output from Xcode build:
↳
2018-04-13 07:23:46.747 xcodebuild[74072:4413287] [MT] PluginLoading: Required plug-in compatibility UUID EE23884D-A5C0-4163-94CF-DBBF3A5ED8D6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/RealmPlugin.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2018-04-13 07:23:46.747 xcodebuild[74072:4413287] [MT] PluginLoading: Required plug-in compatibility UUID EE23884D-A5C0-4163-94CF-DBBF3A5ED8D6 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
** BUILD FAILED **
Xcode's output:
↳
/Users/mac/Desktop/Flutter Projects//ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'google_sign_in/GoogleSignInPlugin.h' file not found
#import <google_sign_in/GoogleSignInPlugin.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone 8.
Exited (sigterm)
I don't understand why it's giving the errors about the Realm and Alcatraz Plugins.  I don't use Realm in this project and I have no idea where the Alcatraz plugin came from.
The file not found error is the one I get anytime I add a dependency in pubspec.yaml.
I hope you can help. I have tried every suggestion and workaround I could find.  Thanks.

Sorry for the late response.
Is this still an issue?
Running pod update in ios/ might help.


Enhancement: Find a path through closed doors

Would it be possible to add an option which works out the shortest path but ignores the presence of closed doors when working that distance out? I want to try and make a pathfinding system which allows tokens to move to a closed door, open it, move through, and then close it behind them.

Your module idea sounds pretty fun and your proposal is certainly doable. It should be extremely simple to build into the gridless routing (it's probably enough to change a few lines of code). I'll have to look at how much would need to be changed to make it work in the gridded routing, since that component is likely to rely on foundry for collision testing. If so, then there would need to be a way in foundry to perform a collision check that ignores closed doors - otherwise a big chunk of code would need to be reimplemented to make this work.
I guess whether I'll implement your enhancement idea depends on how much code that could be re-used from foundry has to be re-implemented in routinglib to make it work.


Use inspect.getfullargspec() in Python3

Closes #60
Select which getargspec based on python version

Thanks for the PR! Could u add a unit tests for this as well?

Sure thing, just through the fix together last night so I could quiet the warning on my project. I'll put something together tonight :)

Sorry, this dropped off my radar. I'll hopefully get to it tonight.

Without this PR we get an exception on Python 3.7 (not a warning as shown in #60):
/usr/local/lib/python3.7/site-packages/validators/utils.py in wrapper(func, *args, **kwargs)
     79         if not value:
     80             return ValidationFailure(
---> 81                 func, func_args_as_dict(func, args, kwargs)
     82             )
     83         return True

/usr/local/lib/python3.7/site-packages/validators/utils.py in func_args_as_dict(func, args, kwargs)
     41         OrderedDict.fromkeys(
     42             itertools.chain(
---> 43                 inspect.getargspec(func)[0],
     44                 kwargs.keys()
     45             )
/usr/local/lib/python3.7/inspect.py in getargspec(func)
   1073         getfullargspec(func)
   1074     if kwonlyargs or ann:
-> 1075         raise ValueError("Function has keyword-only parameters or annotations"
   1076                          ", use getfullargspec() API which can support them")
   1077     return ArgSpec(args, varargs, varkw, defaults)

ValueError: Function has keyword-only parameters or annotations, use getfullargspec() API which can support them

Here's some minimal code to trigger the exception:
@validators.validator
def instance_of(value, *, type):
    return isinstance(value, type)

instance_of(2, type=str)

@kvesteri I'm happy to contribute some tests to get this merged. Can you let me know how to update travis to that the needed version of python is sourced? https://travis-ci.org/kvesteri/validators/jobs/244621297
It's complaining that it need a version of python > 3.3.
``

Oh! I see the problem.  PyPy3 v2.4.0 (which is being used for the test) is only feature compatible with Python 3.2.5.  The most current PyPy3 release (6.0.0) is feature compatible with Python 3.5.3.
Python 3.2.6 has this function documented
Here are the options as I see it:

Change if six.PY2:  to if sys.version_info < (3.2.6):  (add an import sys),  This would retain Python 3.2 compatibility, which few care about.  This seems slightly better code to peg the function change to a specific python version.
Update travis testing of Pypy3 to Python 3.5 compatible version.  - "pypy3.5"

Is Travis CI still broken? Or it is fixed now?
At least regarding the deprecated warning, it is still happening:
/home/myself/Projects/myproject/Lambda/venv/lib64/python3.6/site-packages/validators/utils.py:43: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  inspect.getargspec(func)[0],

-- Docs: https://docs.pytest.org/en/latest/warnings.html

Maybe it is just a matter to merge the branch?

@glasswalk3r Travis should be working now.  pypy3 on Travis's end was upgraded to be python 3.5 compatible.
I think this PR needs to updated (term?) to master in order for Travis to pass.

#110 has been merged, which does this.  Can this be closed?

By all means, please go ahead!


Proposed RUSTSEC advisory for CVE-2022-46176 (git2-rs, cargo)

Hi.  When I read the Rust upstream reports about the cargo vuln, I was surprised and investigated what the underlying bug is. It appears to me to be in git2-rs, and I think other callers will be affected.
So I have filed https://github.com/rustsec/advisory-db/pull/1518.
I think it might be nice to publish a git2-rs version 0.15.1 which at least changes the default behaviour.

Closing per the discussion at https://github.com/rustsec/advisory-db/pull/1520.


Windows Docker Swarm - Portainer Setup Instructions

I was having issues getting portainer agents to work on Windows Docker Swarm, and after much investigation and references online, I have created the following steps to make it work properly -

Create a network over the swarm
docker network create --driver overlay --attachable portainer_agent_network

Create Portainer service
docker service create --name portainer --network portainer_agent_network --publish 9000:9000 --publish 8000:8000 --replicas=1 --constraint 'node.role == manager' portainer/portainer -H "tcp://portainer_agent:9001" --tlsskipverify

For each docker node, run the following command
docker run -d -p 9001:9001 --name portainer_agent --network portainer_agent_network --restart=always -v \.\pipe\docker_engine:\.\pipe\docker_engine -e AGENT_CLUSTER_ADDR=portainer_agent portainer/agent

Note that the main issue I found was the AGENT_CLUSTER_ADDR cannot have a value with a dot "." (e.g. the documentation in https://portainer.readthedocs.io/en/stable/agent.html used the value tasks.portainer_agent, which was causing networking issues in Windows docker swarm)
Can you please kindly update the documentation for future reference please? Hopefully that will help solve some issues.
I am using Windows Server SAC 1903 and Docker version 19.03.2 with Portainer 1.22.0

Hi there,
In step 2 of your instructions you are missing a bind mount meaning you wont have persistence, if portainer restarts for any reason you will lose the PortainerDB and all of your config. Due to this bug, deploying Portainer as a service with a volume bind mount is not possible. Portainer 1.22.1 will introduce a workaround for the bug meaning you will once again be able to deploy portainer as a service and keep your bind mount.
We recently published this blog post with our recommended deployment until the release of Portainer 1.22.1
Also our documentation is currently in the process of being updated; you can find the WIP version here
I will close this for now as I believe the question has been answered. If our recommended deployment does not work for you feel free to leave a comment and I will re-open this issue and we can continue the discussion.

Hi,
I have tried the setup https://www.portainer.io/2019/09/deploying-portainer-on-a-pure-windows-2019-swarm-cluster/  but cannot connect to portainer on port 9000. It just hangs, Looking at the logs for the portainer container it gets as far as [message: starting tunnel management process]. I have checked firewall ports etc, swarm is fine overlay networks running. I have also tried running another container running on 8080 and I can connect to that one fine. Please see output from portainer below. I have also tried server ip address etc instead of localhost.
PS C:\Windows\system32> docker run -d –name portainer -v portainer_data:C:\data –network portainer_agent_network –publish 9000:9000 portainer/portainer -H “tcp://tasks.portainer_agent:9001” –tlsskipverify
b28696cd3da00aa5f911371d133215a291559fcb296b2063d33744f8379d099c
PS C:\Windows\system32> docker logs b28
2019/10/02 11:59:36 Templates already registered inside the database. Skipping template import.
2019/10/02 11:59:36 Instance already has defined endpoints. Skipping the endpoint defined via CLI.
2019/10/02 11:59:36 server: Reverse tunnelling enabled
2019/10/02 11:59:36 server: Fingerprint 16:b2:b6:54:4c:2d:9a:64:b4:85:4c:71:02:fa:84:6b
2019/10/02 11:59:36 server: Listening on <IP_ADDRESS>:8000…
2019/10/02 11:59:36 Starting Portainer 1.22.0 on :9000
2019/10/02 11:59:36 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process]
I have tried from host running portainer
PS C:\Windows\system32> curl http://localhost:9000
and through browser from other pcs.
docker version
Client: Docker Engine - Enterprise
Version:           19.03.2
API version:       1.40
Go version:        go1.12.8
Git commit:        c92ab06ed9
Built:             09/03/2019 16:38:11
OS/Arch:           windows/amd64
Experimental:      false
Server: Docker Engine - Enterprise
Engine:
Version:          19.03.2
API version:      1.40 (minimum version 1.24)
Go version:       go1.12.8
Git commit:       c92ab06ed9
Built:            09/03/2019 16:35:47
OS/Arch:          windows/amd64
Experimental:     false
Windows version 18.09 OS Build 17763.774

I am also having trouble with this. When the service is being created, one of the tasks just hangs forever...

Hi there,
It seems there is quite a few issues with docker on windows that weren't taken into account on the blog post I linked. @ncresswell spent quite a while on this issue yesterday and finally has working instructions for docker version 19.03 which you can view here


6.0 alpha 4 not finding the yt-dlp.exe or youtube-dp.exe that is placed in the same folder as gropple.exe, while 5.5 was

where the 5.5-version didn't need the yt-dlp.exe to be added to the systems path on windows and just used the one that is sitting in the same folder as gropple's-executable, the 6.0 alpha v4 demands that it's added to the path or will not start the download.
error starting command 'yt-dlp': exec: "yt-dlp": cannot run executable found relative to current directory
Can this be reverted back to like 5.5 works ?
so that the 6.0 version is a drop-in replacement?

This was a security problem, fixed in the go compiler in version 1.19:
https://pkg.go.dev/os/exec#hdr-Executables_in_the_current_directory
You should be able to use .\yt-dlp.exe or maybe ./yt-dlp.exe instead

can confirm that replacing "yt-dlp" (which is working in the 5.5-config) to ".\yt-dlp.exe" in all profiles (and not just 1)  allows the configuration to be saved with 6.0a4 without the error that yt-dlp can not be found in path.
however, trying to use it will still give the above error
error starting command './yt-dlp.exe': exec: "yt-dlp.exe": cannot run executable found relative to current directory
and
error starting command '.\yt-dlp.exe': exec: "yt-dlp.exe": cannot run executable found relative to current directory

because it will become a question:
yes yt-dlp.exe is in the same folder as gropple.
Directory of E:_gropple
15/09/2019  21:32        67.081.216 ffmpeg.exe
15/09/2019  21:32        66.966.528 ffplay.exe
15/09/2019  21:32        66.993.152 ffprobe.exe
09/04/2022  03:59        10.327.040 gropple-5.5.exe
14/03/2023  19:49        11.105.792 gropple-6.0.exe
21/01/2022  09:00         8.170.320 youtube-dl.exe
29/10/2023  15:35        13.848.884 yt-dlp.exe

reading the info in the linked doc:
----quote----
var ErrDot = errors.New("cannot run executable found relative to current directory")
ErrDot indicates that a path lookup resolved to an executable in the current directory due to ‘.’ being in the path, either implicitly or explicitly. See the package documentation for details.
Note that functions in this package do not return ErrDot directly. Code should use errors.Is(err, ErrDot), not err == ErrDot, to test whether a returned error err is due to this condition.
----end quote----
sounds like this is not the case in the code?

The other statement in the doc:

Code that always wants to run a program from the current directory can be rewritten to say "./prog" instead of "prog".

Suggests that subverting the error should be unnecessary.
I will investigate, though I don't have easy access to a windows machine.

same problem persists in 1.1.0
error starting command './yt-dlp.exe': exec: "yt-dlp.exe": cannot run executable found relative to current directory
likewise if i use a \ instead of /
if i don't use the ./ or ., it keeps whaling about 'not found in path', and if i use them hte config can be saved without an error, but it doesn't execute.
why does yt-dlp or youtube-dl have to be in the path anyway?
if it's not a full path or relative path given - for which the current workdir has to be known as well,
why can't it just first search in the workdir, or same folder as were gropple.exe itself is located ?
if that fails, go check $PATH

I know it still persists in 1.1.0, that's why I didn't close the bug.
As I said above, I do not have easy access to a windows machine for testing, or a lot of personal motivation to support windows as a platform. You will have to be patient.
I may be able to change it to work as you suggest, however the reason why looking in the current directory for executables was removed from go is because it is a security problem, and I'm not in the business of making software with deliberately introduced security problems.

Hi @soulmaestro, there is a test release v1.1.1-alpha.1 that may fix your problem.
Please be aware that I have not validated this entirely - it may break non-portable mode and may need rework or reverting at least temporarily.

oh sorry for that, that was indeed my fault, i didn't look at the full patchnotes of 1.1.0.
I just noticed it not longer being an alpha-version and as such tested it, and gave the above update/feedback.
thanks for looking into it and i understand your stance on it.
testing with 1.1.1 alpha does seem to work (again) as 0.5.5 does/did with youtube-dl.exe and yt-dlp.exe in the same folder as gropple.exe
it's just that it has always been a drop-in update and it kept working like before, while all of the sudden it didn't anymore.
ps: my stance is that only looking at $path can be the same security risk as not doing it, as a malicious app or version of yt-dlp.exe or youtube-dl.exe can add itself to or overwrite $PATH and be used instead of the non-malicious version in the same dir as gropple.exe.
once again: tyvm for looking into it, finding a workable solution, and for the other QoL updates added to this very handy tool.

Good to know, thanks.
I'll leave this open until I've run some tests and made sure it doesn't break non-portable mode.

Assuming still fixed.


petrinizer: fix build

take z3 haskell package from haskellPackages
take sbv 7.13 from haskellPackages, apply patch fixing build
with GHC >= 8.8.8

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

I guess it would be nice if we could move pkgs/applications/science/logic/petrinizer/default.nix to one of our non-hackage-packages in pkgs/development/haskell-modules/non-hackage-packages.nix, but that's probably too much work for this PR.

I'm not sure if we really want that, but given that the packages outside of pkgs/development/haskell-modules are not really maintained for the most part we may want to do that at some point.
Nevertheless, I'd like to do that in a PR which does all of those cleanups at once.


fix: unescape tabs before writing to pom.xml

https://github.com/google/osv-scanner/issues/1184
When encoding tokens to pom.xml, tabs are escaped and this is not what we want.
In this PR, before writing to pom.xml, we replace all escaped tabs with unescaped characters.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.27%. Comparing base (aedd49a) to head (91cf7b8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1190      +/-   ##
==========================================
+ Coverage   65.79%   66.27%   +0.48%
==========================================
  Files         165      165
  Lines       13915    10784    -3131
==========================================
- Hits         9155     7147    -2008
+ Misses       4257     3131    -1126
- Partials      503      506       +3

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

nice! just have some questions:

will this result in unrelated diffs in the result?

Yes, but I think this is definitely better than having 	 in the result.

is there a bug in the Go encoding/xml package, or some more context you can give on why this occurs?

I believe this is due to EncodeToken escaping the text: https://github.com/golang/go/blob/master/src/encoding/xml/marshal.go#L222
Also from https://github.com/golang/go/issues/47464, I don't think Go refers this as a bug.

nice! just have some questions:

will this result in unrelated diffs in the result?

Yes, but I think this is definitely better than having 	 in the result.

This is a bit of a hack, but is it possible to replace this with a sentinel value. e.g. "REPLACEWITHTAB", and then replace this ourselves when we're about to write it to the output?

is there a bug in the Go encoding/xml package, or some more context you can give on why this occurs?

I believe this is due to EncodeToken escaping the text: https://github.com/golang/go/blob/master/src/encoding/xml/marshal.go#L222
Also from golang/go#47464, I don't think Go refers this as a bug.

Got it, so it's correct but non-ideal behaviour.

I think replacing with some sentinel value may not work since this will make the pom.xml no longer valid. However this hints me that maybe we could let the texts be escaped during writing and replace all escaped 	 by \t at the end. I will investigate the possibility.

I think replacing with some sentinel value may not work since this will make the pom.xml no longer valid. However this hints me that maybe we could let the texts be escaped during writing and replace all escaped 	 by \t at the end. I will investigate the possibility.

yeah, great point. we can just unescape if we are able to hook into that part of the output.


Unsubscribe since the client MessageReceived callback

Hi,
I try to use your library in my application, in my application, i would subscribe/unsubscribe since the MessageReceived client callback. This use can be done in version 2.7.4 but when i tried with version 2.8.0 and highter, i can't do that.
In the latest versions, when the subscription/unsubscription is done since the client MessageReceived callback, the sub/unsub message is sent by the client, received by the broker and the broker sent respective ack but the client doesn't receive or treat the ack (the message is missing in the log).
When the same action is done out of the MessageReceived callback, the Ack is present in the log.
One effect of this problem is the client disconnection after a time without KeepAlive packet as is shown in the logs.
I have done a example project in annex of message with two clients:

client1 subscribe to the topic, display a console message at reception. After a moment, the client1 unsubscrbe to th topic
client1 subscribe to the topic, display a console message at reception and ask an unsubscribe frome the callback.
The log below, show the result of this.

Broker log:
2018-10-08 14:41:34,835 - [DEBUG] - [10] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: TX >>> Publish: [Topic=toto/a/la/plage] [Payload.Length=12] [QoSLevel=AtMostOnce] [Dup=False] [Retain=False] [PacketIdentifier=] 2018-10-08 14:41:34,835 - [DEBUG] - [3] - [MqttServer.MqttClientSessionsManager.MqttClientSession.MqttClientPendingPacketsQueue] - [Broker]: Enqueued packet sent (ClientId: toto1). 2018-10-08 14:41:34,835 - [DEBUG] - [3] - [MqttServer.MqttClientSessionsManager.MqttClientSession.MqttClientPendingPacketsQueue] - [Broker]: Enqueued packet (ClientId: toto1). 2018-10-08 14:41:34,835 - [DEBUG] - [10] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: TX >>> Publish: [Topic=toto/a/la/plage] [Payload.Length=12] [QoSLevel=AtMostOnce] [Dup=False] [Retain=False] [PacketIdentifier=] 2018-10-08 14:41:34,835 - [DEBUG] - [3] - [MqttServer.MqttClientSessionsManager.MqttClientSession.MqttClientPendingPacketsQueue] - [Broker]: Enqueued packet sent (ClientId: toto2). 2018-10-08 14:41:34,836 - [DEBUG] - [3] - [MqttServer.MqttClientSessionsManager.MqttClientSession.MqttClientPendingPacketsQueue] - [Broker]: Enqueued packet (ClientId: toto2). 2018-10-08 14:41:34,841 - [DEBUG] - [10] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: RX <<< Unsubscribe: [PacketIdentifier=2] [TopicFilters=toto/a/la/plage] 2018-10-08 14:41:34,843 - [DEBUG] - [12] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: TX >>> UnsubAck: [PacketIdentifier=2] 2018-10-08 14:41:36,121 - [DEBUG] - [10] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: RX <<< Unsubscribe: [PacketIdentifier=2] [TopicFilters=toto/a/la/plage] 2018-10-08 14:41:36,121 - [DEBUG] - [12] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: TX >>> UnsubAck: [PacketIdentifier=2] 2018-10-08 14:41:46,102 - [DEBUG] - [10] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: RX <<< PingReq 2018-10-08 14:41:46,102 - [DEBUG] - [11] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: TX >>> PingResp 2018-10-08 14:41:47,383 - [DEBUG] - [11] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: RX <<< PingReq 2018-10-08 14:41:47,383 - [DEBUG] - [4] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: TX >>> PingResp 2018-10-08 14:41:58,644 - [DEBUG] - [10] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: RX <<< PingReq 2018-10-08 14:41:58,644 - [DEBUG] - [11] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: TX >>> PingResp 2018-10-08 14:42:09,907 - [DEBUG] - [10] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: RX <<< PingReq 2018-10-08 14:42:09,907 - [DEBUG] - [11] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: TX >>> PingResp 2018-10-08 14:42:11,125 - [WARN ] - [7] - [MqttServer.MqttClientSessionsManager.MqttClientSession.MqttClientKeepAliveMonitor] - [Broker]: Client 'toto2': Did not receive any packet or keep alive signal. 2018-10-08 14:42:11,135 - [DEBUG] - [7] - [MqttTcpServerAdapter.MqttTcpServerListener.MqttChannelAdapter] - [Broker]: Disconnecting [Timeout=00:00:15] 2018-10-08 14:42:11,138 - [WARN ] - [10] - [MqttServer.MqttClientSessionsManager.MqttClientSession] - [Broker]: Client 'toto2': Communication exception while receiving client packets. MQTTnet.Exceptions.MqttCommunicationException: Impossible d'accéder à un objet supprimé.
Client log:
2018-10-08 14:41:34,837 - [DEBUG] - [6] - [Client] - [toto1]: Message received on topic toto/a/la/plage with payload 48-65-6C-6C-6F-20-77-6F-72-6C-64-21. 2018-10-08 14:41:34,837 - [DEBUG] - [16] - [Client] - [toto2]: Message received on topic toto/a/la/plage with payload 48-65-6C-6C-6F-20-77-6F-72-6C-64-21. 2018-10-08 14:41:34,841 - [DEBUG] - [5] - [MqttClient.MqttChannelAdapter] - [toto2]: TX >>> Unsubscribe: [PacketIdentifier=2] [TopicFilters=toto/a/la/plage] 2018-10-08 14:41:36,121 - [DEBUG] - [8] - [MqttClient.MqttChannelAdapter] - [toto1]: TX >>> Unsubscribe: [PacketIdentifier=2] [TopicFilters=toto/a/la/plage] 2018-10-08 14:41:36,124 - [DEBUG] - [17] - [MqttClient.MqttChannelAdapter] - [toto1]: RX <<< UnsubAck: [PacketIdentifier=2] 2018-10-08 14:41:46,102 - [DEBUG] - [8] - [MqttClient.MqttChannelAdapter] - [toto2]: TX >>> PingReq 2018-10-08 14:41:47,383 - [DEBUG] - [17] - [MqttClient.MqttChannelAdapter] - [toto1]: RX <<< PingResp 2018-10-08 14:41:47,383 - [DEBUG] - [12] - [MqttClient.MqttChannelAdapter] - [toto1]: TX >>> PingReq 2018-10-08 14:41:58,644 - [DEBUG] - [6] - [MqttClient.MqttChannelAdapter] - [toto1]: RX <<< PingResp 2018-10-08 14:41:58,645 - [DEBUG] - [17] - [MqttClient.MqttChannelAdapter] - [toto1]: TX >>> PingReq 2018-10-08 14:42:09,907 - [DEBUG] - [17] - [MqttClient.MqttChannelAdapter] - [toto1]: RX <<< PingResp 2018-10-08 14:42:09,908 - [DEBUG] - [18] - [MqttClient.MqttChannelAdapter] - [toto1]: TX >>> PingReq 2018-10-08 14:42:21,170 - [DEBUG] - [18] - [MqttClient.MqttChannelAdapter] - [toto1]: RX <<< PingResp 2018-10-08 14:42:21,170 - [DEBUG] - [7] - [MqttClient.MqttChannelAdapter] - [toto1]: TX >>> PingReq
MQTT_Test.zip

Does this still occur in the latest version of MQTTnet?

The last tests done are with the version 2.8.5. I dont try with version 3 or upper. In the initia post, you will found a ZIP file with a project to reproduce this problem with old version.
My project has blocked the version to use on 2.7.2 where this problem isn't present.

There have been significant improvements from version 2.8.5 to 3.0.x.
For further reference, I have checked the zip file: https://www.virustotal.com/gui/file-analysis/NzNlYTQ0ZjcwODdkYWExZTFmYmUzMGU0Y2Q0OWE2MjA6MTU2MTczODc3Ng==/detection. It's clean. I have added the project to: https://github.com/mqttnettest/Issue432Test.
For reference: Project type is .Net Framework 4.6.
@chkr1011: I'm not able to get the message handlers to work in the latest version when referring to https://github.com/chkr1011/MQTTnet/wiki/Upgrading-guide#client. It always wants some Action<> or Func<> because it cannot distinugish between the calls?:

The relevant line in code is: https://github.com/mqttnettest/Issue432Test/blob/ad1bb081ad93cd208d05211e30e3d38a7dfda509/MQTT_Test_3.0.x/ClassLibrary1/Client.cs#L37
 _mqttClient.ConnectedHandler = new MqttClientConnectedHandlerDelegate(new Action<MqttClientConnectedEventArgs>(OnConnected));
_mqttClient.DisconnectedHandler = new MqttClientDisconnectedHandlerDelegate(new Action<MqttClientDisconnectedEventArgs>(OnDisconnected));
_mqttClient.ApplicationMessageReceivedHandler = new MqttApplicationMessageReceivedHandlerDelegate(new Action<MqttApplicationMessageReceivedEventArgs>(OnMessageReceived));

I was trying to check whether this still occurs in the 3.0.x version but wasn't successfull.

I will close this issue now due to inactivity. Please feel free to contact us again if this still occurs.


Add and use a Port struct for Uri::port()

Add the uri::Port struct an use it with Authority::port_path, and Uri::port_path methods, which deprecate Authority::port and Uri::port methods.
Closes #173 - Consider a Port type for Uri::port()

@carllerche updated :)

Ahh damn, sorry.
@carllerche should be fixed up properly now

Looks good to me when nits are fixed. Thanks!


PCs seem to incorrectly get a free recovery at the beginning of phase 12.

Additionally on the first turn (starting segment 12) we seem to be double charging people for active powers.


Backport - Use a server ring instead of a cycling iterator

Guava's cycling iterator does not seem to be threadsafe, as it replaces the underlying iterator between
calling hasNext() and next(), which can cause a ConcurrentModificationException.
This is a backport of #316 to the 1.0.x branch.

Coverage decreased (-0.04%) to 47.085% when pulling 5baa302e964c24a16bc40dedad411007f9bcea63 on joeslice:fix-concurrency-es_1.0 into 1363d75d675cfc9e5cb964aac8e5a4b878e6289a on searchbox-io:es_1.0.

Thank you for your contribution @joeslice !

Yay!  Great to see it has been merged.  I was just about to build a private release to our internal maven repo, unless you have some plans to release (at least 1.0.x) anytime soon?
Thanks for getting this merged so quickly!

unless you have some plans to release (at least 1.0.x) anytime soon?

As usual there is the automated snapshot release but I'm afraid a proper release will need to wait for the weekend :)

Thank you @kramer !


Implement Custom Data Universe Selection Model

Expected Behavior
Provide a framework version of CustomDataUniverseAlgorithm that shows how to use universe selection of custom data.
Actual Behavior
No equivalent of CustomDataUniverseAlgorithm.
Potential Solution
Implements CustomDataUniverseSelectionModel and CustomDataUniverseSelectionFrameworkAlgorithm.
Checklist

[x] I have completely filled out this template
[x] I have confirmed that this issue exists on the current master branch
[x] I have confirmed that this is not a duplicate issue by searching issues

Close by https://github.com/QuantConnect/Lean/commit/b03c9daa6fb00cd5615c9b389a7dafb69fbc1ab8


Fix System.CommandLine documentation.

While the System.CommandLine description states the goals for the library, it claims that Mono.Options does not fulfill the requirements set on the document.   Yet, it fulfills every one of those requirements.

Support for Unix and GNU-style?  Check.   (Also Windows style)
Low level, no reflection or attribute discovery?  Check
Minimal setup? Check

Yet, the document portrays Mono.Options as not fulfilling those roles.   That said, Mono.Options is also arguably more pleasant to use and provides better customization.

@migueldeicaza
Thanks for the feedback. I should probably expand this a bit more. Mono.Options -- as far as I can tell -- doesn't support the notions of registering parameters and commands. It seems it only covers options and leaves it for the consumer to handle parameters and commands.

With the stated benefits of System.CommandLine, will it make sense that the following repos take dependency on this assembly, so to test / evolve the implementation and overcome the shortcomings rapidly?

https://github.com/dotnet/buildtools
https://github.com/dotnet/codeformatter
https://github.com/dotnet/cli
https://github.com/dotnet/roslyn
https://github.com/Microsoft/msbuild (this presents challenges of parsing BATCH style arguments /p:Configuration=Debug etc.)

Each one of these repos have their own ways of parsing command line arguments..
However, following repos are referencing System.CommandLine:

https://github.com/dotnet/corert
https://github.com/dotnet/core-setup
https://github.com/dotnet/jitutils


Refactor ChangeProcessor

ChangeProcessor acts as both a store and a processor of that store. Refactor this complexity. Remove any unnecessary tests.
Aha! Link: https://nginx.aha.io/features/NKG-46

@pleshakov can we close this?

I can't find the issue that fixed it. But it has been fixed


CAW-4: Fix coverage

Description for CAW-4
Fixes the coverage script by adding --watchAll=false
📋 Acceptance Criteria

Checked off by the PR Assignee(s)

[x] npm run test:test:coverage collects coverage

🔎 Reviewer Checklist

Checked off by the PR Reviewers

Required

These always need to be checked

[ ] Merge destination is correct
[ ] Code is correct as understood and conforms to quality standards
[ ] Tests have been added where appropriate (unit, visual, end-to-end)
[ ] Acceptance Criteria have been met

Roles & Responsibilities
👨💻 Assignee

Initiator of this PR (be sure to set in GitHub UI)
Addresses feedback and change requests
Merges PR once approved (usually deletes branch unless develop or release)

👩💻 Reviewer

Invited to review PR by Assignee (via GitHub UI)
Is expected to complete a review and address followup

Codecov Report

Merging #42 into develop will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           develop    #42   +/-   ##
======================================
  Coverage      100%   100%
======================================
  Files            2      2
  Lines            3      3
======================================
  Hits             3      3

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c53a646...99cebd4. Read the comment docs.


Refactor prepare_body

@Lukasa Here's an alternative fix to #3066 (discussed in PR #3181), where I refactored PreparedRequest.prepare_body and PreparedRequest.prepare_content_length so that prepare_content_length is always called.
My only question is in the case when the body is a stream (which it is in the case that brought up this issue) that the current position will always be 0 when the length is calculated. Previously, in cases where prepare_auth was not called, the content length was being calculated with super_len, now it would be calculated using self.headers['Content-Length'] = builtin_str(max(0, end_pos - curr_pos)). As far as I can tell, this will give the same result (as long as the current position is 0), and this is how it's been computed in cases where authorization is being used. But I'm curious if you have thoughts about this.

So, I think in general I like this better. However, your point about super_len is a real one.
I think the solution here is to rewrite prepare_content_length to have it always call super_len. super_len does use tell to do a little dance here, so I think it's probably going to be good enough: @sigmavirus24, does that seem right to you?

@Lukasa in that case, could we get rid of the first elif statement and just go to the case where body is not None? Looking at super_len, I think it would calculate length in the same way. So in what I'm proposing, prepare content length would look like this:
    def prepare_content_length(self, body):
        if 'Transfer-Encoding' in self.headers:
            return
        elif body is not None:
            l = super_len(body)
            if l:
                self.headers['Content-Length'] = builtin_str(l)
        elif (self.method not in ('GET', 'HEAD')) and (self.headers.get('Content-Length') is None):
            self.headers['Content-Length'] = '0'

All tests pass with this change.

Ok, I think I'm happy with this, though I'd like @sigmavirus24 to review before we merge. =)

I'm not sure of the right way to do this, but this will allow someone to do:
r = requests.post(url, headers={'Transfer-Encoding': 'chunked'}, data='foo')

Which will generate an invalid request to the server. I would much rather forcibly strip the TE header from something where we can determine the length than ignore adding the Content-Length header if a TE is present.

@sigmavirus24 Arg, good spot. Hrm. We need to have some extra logic here to get this right.

@Lukasa @sigmavirus24 it looks to me like the try/except of using super_len to calculate the length of the body could be moved to prepare_content_length - and then both the Content-Length and Transfer-Encoding headers would be set there. If content length can be calculated, then we strip the TE header, and otherwise, we strip the CL header. I think this would be the most clear, and would ensure that the headers are mutually exclusive, regardless of what a user enters.

@davidsoncasey I think we want to keep the try...except in super_len: that method gets used outside requests quite frequently. It won't hurt to do the check twice.

@Lukasa sounds good. I'll see if I can put something together for that. Thanks for helping work through this.

@Lukasa @sigmavirus24 I updated this PR to make the Content-Length and Transfer-Encoding headers mutually exclusive, regardless of whether a user manually provides a value, as @sigmavirus24 showed in his comment. While working on this, I stumbled upon #1648. I hadn't realized that this had been a subject of so much discussion, and that people have differing opinions about how this should work. This is obviously related to that issue, so I understand if you decide that this isn't the fix that you're looking for. It could be refactored to raise an error if a user has provided a CL header when TE is set, and vice versa, instead of silently removing the unneeded header. Let me know what you think.

I'm not sure which behaviour I want (if we must merge something before 3.0). I think I'd rather raise an exception though.

I'd be inclined to want to raise an exception, but I also think we should consider discussing this at PyCon.

@Lukasa @sigmavirus24 I'll go ahead and alter it to raise an exception for now (perhaps InvalidHeadersError? Or is there an existing exception that would make sense to raise?). And then we can leave this PR open until it's decided what the best behavior is.
Also, are you planning on coming to Portland for PyCon? I didn't get a ticket in time, but I live in Portland and it would be great to meet up and discuss the project.

Yup, we'll be in Portland: we're planning to have a "state of Requests" chat at some point that'll be able to tackle things like these.

Fantastic, I'd love to participate.

@Lukasa @sigmavirus24 I made a few more changes and a bit more refactoring of prepare_body and prepare_content_length. These include:

Moving the logic set Transfer-Encoding header to the prepare_content_length method. This makes it more explicit that the headers should be mutually exclusive, and does not rely on implicitly connected logic in two methods.
Raises an InvalidHeaderError if a user manually sets either header when it should not be set (let me know if you think that there's a preexisting exception that could be raised instead).
Added tests to check different cases of when each header should be set.

I understand we may need to wait to decide if this is the desired behavior, so no need to review or merge this right away. We can leave this PR open until you've had a chance to discuss and agree upon the desired behavior.

I've got a note inline, but I don't mind this change: it's definitely backward-incompatible though, so we'll need to release this as part of 3.0.0.

Once we've cleaned this up, can we squash some of these commits together and send this to proposed/3.0.0?

@sigmavirus24 @Lukasa sounds good. I'll make those small cleanup changes and squash extraneous commits.

I squashed some commits together and it looks like there's a conflict now. I'll get a fresh pull of the master branch and get that resolved.

@Lukasa @sigmavirus24 alright, it took me a bit to get back to this, but I've cleaned it up a bit and it should be ready to merge into the proposed branch. The conlflict is in AUTHORS.rst. Let me know if there's anything else here you'd like to see changed, otherwise I'll try to find another issue to get started on.

Thanks @davidsoncasey, I've left a few more notes.

Ok, good by me. @sigmavirus24?

So this looks great, but:

Should this be against proposed/3.0?
Can we resolve the merge conflicts?

@sigmavirus24 I'll open a new PR into proposed/3.0. As far as the conflict, that was only in the contributors.rst, and I was thinking it would be a little cleaner if one of you resolved it on merge, instead of back merging master into this branch and fixing it there. I'm happy to do that if you like though.

needs a rebase

closing due to inactivity (not sure if that's our fault or not). please re-open if you're still interested in getting this in!


arc-green theme selected text doesn't have dark enough styling

Gitea version (or commit ref): 1.7.2
Git version: 2.1.4
Operating system: Debian GNU/Linux 8.11 (jessie)
Database (use [x]):

[ ] PostgreSQL
[ ] MySQL
[ ] MSSQL
[x] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ ] No
[x] Not relevant (try.gitea.io uses light theme)

Log gist:

Description
When you link to certain lines or click the line numbers on the left hand side of the file viewer, the selection becomes very bright and seems to use the same colors as a light / default theme gitea installation. This is very straining for the eyes, and has caused me to generally opt out of sharing links to specific lines when sending someone a link to some code. Screenshots attached.
Screenshots

Noooo this is still an issue!

Issue remains in 1.9.2

It seems like this got fixed sometime between my last post and 1.10.0 (also confirmed the same look in 1.10.2):

I'm closing this issue now, upgrade to 1.10 guys!


The right way to implement google login

Documentation issue

I am attempting to implement google login for my app. It's not clear to me based on the documentation for this plugin exactly how that works. I have been able to put some code together that seems to work based on guesses and experimentation but I'm not sure if it's really the right way to do it. If somebody can verify the validity of this approach, I'd be glad to update the docs with an example.
// cordova app code

window.FirebasePlugin.authenticateUserWithGoogle(clientId, credential => {
    window.FirebasePlugin.signInWithCredential(credential, () => {
        FirebasePlugin.getCurrentUser(user => {
            // verify user with our server and store basic user data here
            const googleProvider = user.providers.find((p: any) => p.providerId === 'google.com');
            const googleAccountId = googleProvider.uid;
            const idToken = credential.idToken;
            myService.validateGoogleAuth(googleAccountId, idToken);
        });
    });
});

// web service code

const { OAuth2Client } = require('google-auth-library');

async verifyGoogleAuth(accountId: string, idToken: string): Promise<boolean> {
    const googleAuthClient = new OAuth2Client(MY_GOOGLE_OAUTH_WEB_CLIENT_ID);

    const ticket = await this.googleAuthClient.verifyIdToken({
        idToken,
        audience: MY_GOOGLE_OAUTH_WEB_CLIENT_ID
    });

    const payload = ticket.getPayload();
    const googleUserId = payload.sub;
    return clientUserId === googleUserId;
}

In the past I've used the cordova-plugin-googleplus plugin to achieve this functionality but it's difficult to get that plugin to play nicely with this one so I'm trying to use this one for google auth.
In particular, with the other plugin, after the user signs in you get their google user id along with an id token. We pass these to our back end server where we use those values with another google server api to verify the id token is valid. Is that necessary with this plugin? Does signInWithCredential() take care of that step or should we still do that ourselves as well?
We generally also store information about their google account include the ID, name, email, etc. in our back end.

This plugin just wraps the native Firebase SDK components so doesn't perform any additional validation on top of what the Firebase SDK itself performs. If you want to store/validate Google account info on your back end then your above code seems appropriate

Great, thank you for verifying that. As promised, here is a PR to update the documentation related to this subject.


hydrus: use the native test runner

Description of changes
This eliminates a nose dependency and lets us actually run all the tests. Even though it throws up exceptions about the missing SWF tools, I have verified that the tests are actually getting run properly (i.e., if you adjust an assertion to compare against bogus values, the build does fail).
Things done

Built on platform(s)

[ ] x86_64-linux
[x] aarch64-linux
[x] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Thanks a lot!


Switched quotation marks that looked like the second derivative

Either this, or another way to make this clear. At the moment, the quotation marks make it look like the second derivative, especially since this chapter discusses just that - the second derivative.
This is a quick fix however might not be desirable, but a clarification needs to be made here to make it easier to understand that it is a string and not something to do with the second derivative.

Thanks for the remark - I've instead removed the quotes and done \emph{} instead.


Update to latest version

@alvinhochun  Latest version is now up to 1.12.0... good time to update the playground...
Beware there may be new Token variants...

Would you like to submit a PR? 🙂
(I may get to it some time later, maybe in a few days...)

I actually run this on Windows 😄

How did you do that?  Did you run on WSL?

It is giving me this:
><EMAIL_ADDRESS>build
> rimraf dist pkg && webpack

🧐  Checking for wasm-pack...

ℹ  Installing wasm-pack

Error: spawn npm ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Looks like it is failing to run npm. Is your nodejs install available on PATH?

Hhhmmm....  npm seems to be running fine AFAIK...
OK, I'll add C:\Program Files\nodejs to PATH and see...

Hmm, no idea. I have C:\Program Files\nodejs\npm.cmd, though my node.js is v12.18.1, which is quite old.

I updated the playground in my fork, you can check it here: https://fabriziosestito.github.io/playground/dev/

Well, I pushed a couple of commits to fix certain things, and now seems to have mucked up the CI...
I'll just leave it as is, so somebody more knowledgeable can fix it!
In the future, I promise I'm touching nothin'...

Yeah if you bumped some of the node.js packages they may be too new for node.js 12.
https://github.com/rhaiscript/playground/blob/7d6bd91a2c897457d22b27047e3fbe61cbcc8be4/.github/workflows/dist.yml#L24-L27

@alvinhochun running npm audit fix seems to fix CI. I added the fix in #23.

Manually run this action should do the trick https://github.com/rhaiscript/playground/actions/workflows/publish_stable_from_dev.yml

OK, let me try...

Trying to compile to the latest Rhai version, but keeps getting this error:
Child worker:
     2 assets
    Entrypoint main = b1edef6286f5d7c275aa.worker.js
    [0] ./pkg/index.js 22.3 KiB {0} [built]
    [1] (webpack)/buildin/harmony-module.js 573 bytes {0} [built]
    [2] (webpack)/buildin/global.js 472 bytes {0} [built]
    [3] ./node_modules/workerize-loader/dist/rpc-worker-loader.js!./node_modules/@open-wc/webpack-import-meta-loader/webpack-import-meta-loader.js!./js/worker.js + 2 modules 2.67 KiB {0} [built]
        | ./node_modules/workerize-loader/dist/rpc-worker-loader.js!./node_modules/@open-wc/webpack-import-meta-loader/webpack-import-meta-loader.js!./js/worker.js 1.73 KiB [built]
        | ./js/wasm_loader.js 876 bytes [built]
        | ./pkg/index_bg.wasm 81 bytes [built]

    ERROR in b1edef6286f5d7c275aa.worker.js from Terser
    Error: error:0308010C:digital envelope routines::unsupported
        at new Hash (node:internal/crypto/hash:68:19)
        at Object.createHash (node:crypto:138:10)
        at C:\Git\rhai-playground\node_modules\terser-webpack-plugin\dist\index.js:217:37
        at Array.forEach (<anonymous>)
        at TerserPlugin.optimizeFn (C:\Git\rhai-playground\node_modules\terser-webpack-plugin\dist\index.js:160:259)
        at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Git\rhai-playground\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:7:1)
        at AsyncSeriesHook.lazyCompileHook (C:\Git\rhai-playground\node_modules\tapable\lib\Hook.js:154:20)
        at C:\Git\rhai-playground\node_modules\webpack\lib\Compilation.js:1409:36
        at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Git\rhai-playground\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
        at AsyncSeriesHook.lazyCompileHook (C:\Git\rhai-playground\node_modules\tapable\lib\Hook.js:154:20)
        at C:\Git\rhai-playground\node_modules\webpack\lib\Compilation.js:1405:32
        at eval (eval at create (C:\Git\rhai-playground\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:12:1)
        at C:\Git\rhai-playground\node_modules\git-revision-webpack-plugin\lib\build-file.js:12:9
        at C:\Git\rhai-playground\node_modules\git-revision-webpack-plugin\lib\helpers\run-git-command.js:22:7
        at ChildProcess.exithandler (node:child_process:414:7)
        at ChildProcess.emit (node:events:514:28)
        at maybeClose (node:internal/child_process:1105:16)
        at ChildProcess._handle.onexit (node:internal/child_process:305:5)

OK, this post shows how to fix this (essentially a Node version problem):
https://sebhastian.com/error-0308010c-digital-envelope-routines-unsupported/