Relax connection stop checks in tests to reduce flakiness

Addresses https://github.com/aspnet/KestrelHttpServer/issues/2750. This will reduce test coverage and I'm modifying similar tests preemptively since they could probably fail in the same pattern.

Background please. What is the problem and how does this fix it?
This is 2.1 only and won't be merged to 2.2 or master, correct?

Most of the information is in the issue. There are test failures in 2.1 which were fixed in 2.2 and master via changes in #2646. However, @Eilon has asked to fix the tests without back-porting src changes since product changes for 2.1 are unlikely to be approved by shiproom unless it was reported by customers.

Yup.


remove unnecessary section attribute

section attribute was left over from previous version
replaced by section relationship

:+1:


Treatment of global modules' @next versions is inconsistent.

I have two globally installed packages at their respective @next releases. Specifically, my npm is sitting at 3.8.5 and my typescript at 1.9.0-dev.20160324.
npm -g outdated outputs pretty much what I've come to expect from installed prerelease packages.
npm -g outdated
Package                Current              Wanted  Latest  Location
npm                      3.8.5               3.8.5   3.8.3
typescript  1.9.0-dev.20160324  1.9.0-dev.20160324   1.8.9

However, npm-check -g only pays attention to npm, and suggests I downgrade. (npm-check -gu does exactly the same thing, but actually gives me a way to perform said downgrade.)
npm-check -g

npm   �  MINOR UP  Minor update available: https://docs.npmjs.com/
                   npm install --save<EMAIL_ADDRESS>to go from 3.7.3 to 3.8.3

Use npm-check -u -g for interactive update.

<EMAIL_ADDRESS>is not even installed.
This behavior seems inconsistent to me. In a perfect world, I would expect @next versions to be recognized as newer than @latest. I'm used to the npm outdated behavior, where @next packages show up in the list of outdated packages but not in the same way as pure outdateds. In this case, I'm either doing something horribly wrong, npm metadata doesn't work the way I think it does, or there's a regression in the software.
On Windows 10 Insider Preview, using Node 5.9.0 and npm 3.8.5, as mentioned above.

Great suggestions @jaccarmac, thanks for providing helpful examples! I'll see what I can do.

Still doesn't seem to work for me, as of 5.0.3.

Thanks for the update. To be sure I'm trying to do the right behavior, can you tell me what is happening and what you are expecting to happen? Thanks!

Note this is on Windows, so there are technically two installs of npm somewhere.
All globally installed packages.
C:\Users\jaccarmac>npm -g ls --depth=0
C:\Users\jaccarmac\AppData\Roaming\npm
+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>`--<EMAIL_ADDRESS>
Output from doing outdated-checking the npm way.

C:\Users\jaccarmac>npm-check -g

npm   �  PATCH UP  Patch update available. https://docs.npmjs.com/
                   npm install --save<EMAIL_ADDRESS>to go from 3.8.3 to 3.8.5

Use npm-check -u -g for interactive update

I would expect that to not show the npm update, as I am in fact running 3.8.6, where 3.8.6 > 3.8.5.
C:\Users\jaccarmac>npm --version
3.8.6

Before, if typescript were out of date, npm-check would not tell me this. I'll see if that behavior persists after the next typescript update is ready.

Hi @jaccarmac, thanks again for helping figure this out.
If it is finding the wrong location of your global modules in Windows then this is likely caused by https://github.com/jonschlinkert/global-prefix/issues/3.
I'm going to close this ticket as we have it cover in #87. Let me know if you disagree that they are the same issue. Thanks!

Looks like that is the cause of the issue with npm. However, it's still not suggesting updates to either itself or typescript.

Can you use npm-check -g --debug and tell me what it says for cwd and nodeModulesPath.
You will need to scroll back up to find it, and it looks something like:
===============================
[npm-check] debug
current state { update: false,
  global: true,
  cwd: '/Users/dgreene/.nvm/versions/node/v4.2.1/lib/node_modules',
  nodeModulesPath: '/Users/dgreene/.nvm/versions/node/v4.2.1/lib/node_modules',
 ....cut...

...
cwd: 'C:\\Program Files\\nodejs\\node_modules',
nodeModulesPath: 'C:\\Program Files\\nodejs\\node_modules',
...

Is what what you expect it to be?
I don't know if you have access to which or where, but if you are able to use either or something else can you figure out which directory these are running from:

npm
npm-check
tsc
as well as the result of npm config get prefix

My hope is that they are in same directory, and that location is where global-prefix should be pointing to in Windows.

C:\Users\jaccarmac>where npm
C:\Program Files\nodejs\npm
C:\Program Files\nodejs\npm.cmd
C:\Users\jaccarmac\AppData\Roaming\npm\npm
C:\Users\jaccarmac\AppData\Roaming\npm\npm.cmd

C:\Users\jaccarmac>where npm-check
C:\Users\jaccarmac\AppData\Roaming\npm\npm-check
C:\Users\jaccarmac\AppData\Roaming\npm\npm-check.cmd

C:\Users\jaccarmac>where tsc
C:\Users\jaccarmac\AppData\Roaming\npm\tsc
C:\Users\jaccarmac\AppData\Roaming\npm\tsc.cmd

C:\Users\jaccarmac>npm --version
3.8.6

Interesting... Given that the npm version being reported is newer than the one that comes installed with Node globally, I assumed that the binary was also the newer one. Looks like, for whatever reason, an old version of the npm binary is reporting a newer version number. My best guess would be that I'm using an outdated script to start npm but all its requires are resolving to stuff in AppData.
C:\Users\jaccarmac>diff "C:\Program Files\nodejs"\npm C:\Users\jaccarmac\AppData\Roaming\npm\npm
1,34c1,15
< #!/bin/sh
< (set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix
<
< basedir=`dirname "$0"`
<
< case `uname` in
<     *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
< esac
<
< NODE_EXE="$basedir/node.exe"
< if ! [ -x "$NODE_EXE" ]; then
<   NODE_EXE=node
< fi
<
< NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js"
<
< case `uname` in
<   *MINGW*)
<     NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
<     NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
<     if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then
<       NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS"
<     fi
<     ;;
<   *CYGWIN*)
<     NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g`
<     NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js"
<     if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then
<       NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS"
<     fi
<     ;;
< esac
<
< "$NODE_EXE" "$NPM_CLI_JS" "$@"
---
> #!/bin/sh
> basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
>
> case `uname` in
>     *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
> esac
>
> if [ -x "$basedir/node" ]; then
>   "$basedir/node"  "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
>   ret=$?
> else
>   node  "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
>   ret=$?
> fi
> exit $ret

C:\Users\jaccarmac>diff "C:\Program Files\nodejs"\npm.cmd C:\Users\jaccarmac\AppData\Roaming\npm\npm.cmd
1,19c1,7
< :: Created by npm, please don't edit manually.
< @ECHO OFF
<
< SETLOCAL
<
< SET "NODE_EXE=%~dp0\node.exe"
< IF NOT EXIST "%NODE_EXE%" (
<   SET "NODE_EXE=node"
< )
<
< SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
< FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
<   SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js"
< )
< IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" (
<   SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%"
< )
<
< "%NODE_EXE%" "%NPM_CLI_JS%" %*
---
> @IF EXIST "%~dp0\node.exe" (
>   "%~dp0\node.exe"  "%~dp0\node_modules\npm\bin\npm-cli.js" %*
> ) ELSE (
>   @SETLOCAL
>   @SET PATHEXT=%PATHEXT:;.JS;=;%
>   node  "%~dp0\node_modules\npm\bin\npm-cli.js" %*
> )
\ No newline at end of file

The binaries are significantly different as well. Didn't read them thoroughly yet, but is the global one selecting the newest version it can find? That would explain (some of) the weirdness.

It will use the value of npm config get prefix to figure out where your global modules are. If that value is not set, I believe it will default to the parent of the working directory.
C:\Users\jaccarmac>where npm
C:\Program Files\nodejs\npm
C:\Program Files\nodejs\npm.cmd
C:\Users\jaccarmac\AppData\Roaming\npm\npm
C:\Users\jaccarmac\AppData\Roaming\npm\npm.cmd

This makes me wonder if something like C:\Program Files\nodejs\ in your PATH before C:\Users\jaccarmac\AppData\Roaming\npm. Does that make sense?

Pretty sure that is the case. Specifically because C:\Program Files gets put in the global path, and AppData in the user path, where the effective runtime path is global path + user path.

Do you think this something you need to fix with your system or is just how it works in Windows?

Hard to say. It's easy enough to fix, but the solution is dirty. Having to remove the global links to global programs just doesn't feel right.


"Resize Images Extension" not handling grayscale images properly

[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs for a specific extension in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

For general technical questions, post a question on StackOverflow
with the firebase tag.
For general Firebase discussion, use the firebase-talk
google group.
To file a bug against the Firebase Extensions platform, or for an issue affecting multiple extensions, please reach out to
Firebase support directly.

[REQUIRED] Step 2: Describe your configuration
Create a new project and enable the Resize Images extension with default configuration values. Upload any grayscale image with an embedded ICC profile to Storage, the resized image will have compression artifacts.
[REQUIRED] Step 3: Describe the problem
Resize Images extension can't properly handle photos with an embedded ICC profile creating a lot of compression algorithms during the resize process. This is a known issue reported on the Sharp library github page (https://github.com/lovell/sharp/issues/3112). The solution is to update the Sharp version to version >=0.30.2.
The current workaround is to edit the source of the extension and the files package.json and package-lock.json. to use the 0.30.2 version and deploying the function. I implemented this in my internal test project ks-test-61539<PHONE_NUMBER>31).
Steps to reproduce:
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
I found this image on wikipedia (https://upload.wikimedia.org/wikipedia/commons/6/6a/Acapulco_Golds_ad.jpg) with a different grayscale colour profile that produces the same artifacts.

Closing this as completed as this issue fixed starting from v0.1.29. Please feel free to reopen it anytime if you still have issues.


Add Lovefest configuration, update project documents

Add Lovefest role & channel IDs to bot constants
Update environment variable name for seasonalbot (was hacktoberbot)
Update Contributor doc to reference pipenv guide rather than the deprecated Seasonalbot GH wiki

If someone was using an editor other than PyCharm, there was little to no instructions for them in the current README. Since this PR is updating the README, I've added the following changes to here to keep things together:
As a brief summary:

An index with links direct to sections has been added to help those who may want to re-reference certain sections and avoids the extra scrolling.
A requirements list has been added with links on how they can install it.
Images have been updated to new instructions.
Instructions and screenshots using hacktoberbot as the project name have been replaced.
Environment variables have been expanded to include new required values and a note about each season possibly having their own requirements.
New instructions on how to easily add all the environment variables in one step with the paste function.
PyCharm project script path updated to bot directory instead of bot.py and adding the -m interpreter option.
Mentioning feature branch workflow instead of committing to fork master to prevent pulling back your own commits from upstream again.
Noting that people shouldn't attempt to commit directly to the original repo's master. They won't have rights anyway but it was recommended to add.
Merging the Not PyCharm listed resources with Further Reading.

To quickly see the updated README without diving through the branch files or the diff:
https://gist.github.com/scragly/590f264f06352e195a4b4010dfe06471


Updated the base_url for all images

http://imgobject.com was decommissioned in late 2012. Since the last weekend the domain is down. So the URLs won´t work anymore.
For more information check out my conversation with @themoviedb on Twitter: https://twitter.com/themoviedb/status/568519156502368258

+1 for merging this asap


[WIP] 1175 spark

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: m1n0:x: pre-commit-ci[bot]You have signed the CLA already but the status is still pending? Let us recheck it.


Added markdown file

Pull-Request
Proposed Changes

Added New Branch
Added Markdown File

Additional Information

Created .md File and Added to Another Branch

Checklist

[X] Tests
[ ] Translations
[X] Documentation

Created Markdown


Memory leak in producer (long running process)

Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.

Sarama
Kafka
Go

v1.28.0
2.0.1
1.16.5

kafka container = "confluentinc/cp-kafka:5.0.1-1"
Configuration
What configuration values are you using for Sarama and Kafka?
config := sarama.NewConfig()
config.Producer.Return.Successes = true
metrics.UseNilMetrics = true

Logs
When filing an issue please provide logs from Sarama and Kafka if at all
possible. You can set sarama.Logger to a log.Logger to capture Sarama debug
output.
logs: CLICK ME

To follow - not currently enabled

Problem Description
We have a long running (several days) process (in k8s pod) that receives data and writes to kafka (in another pod)
The memory usage from this process is steadily rising.  pprof gives the following culprit

flat
flat%
sum%
cum
cum%

stack

104.90MB
18.20%
18.20%
104.90MB
18.20%
bufio.NewReaderSize (inline)
withRecover -> (*Broker)Open -> bufio.NewReader ->

75.51MB
13.10%
31.31%
83.51MB
14.49%
github.com/Shopify/sarama.(*TopicMetadata).decode
withRecover -> ...

73.37MB
12.73%
44.04%
73.37MB
12.73%
math/rand.NewSource (inline)
withRecover -> (*asyncProducer).dispatcher -> (*asyncProducer).newTopicProducer

53.02MB
9.20%
53.24%
63.52MB
11.02%
github.com/Shopify/sarama.(*client).updateMetadata
withRecover -> ...

...

Subsequent snapshots show that these values are steadily rising.  Diagram shows tree:
The writing (asynchronous) is performed by the following go routine (which exits after the select):
pMsg := sarama.ProducerMessage{
  Topic: topic,
  Key:   dataWrapper(msg.Key),
  Value: dataWrapper(msg.Value),
}
producer.Input() <- &pMsg
select {
  case <-producer.Successes():
    chResult <- stream.NewMessageWriterResultSuccess()
case producerErr := <-w.producer.Errors():
    chResult <- stream.NewMessageWriterResultError(producerErr.Err)
case <-ctx.Done():
    chResult <- stream.NewMessageWriterResultError(ctx.Err())
}

where "producer" is our single instance of sarama.AsyncProducer
"dataWrapper" is a alias for []byte to implement Encode interface (trivially)
No returns from this function are stored or passed out of the function

@AtricoSoftware can you explain your solutions? I also got this issue.

@lunango - This is a long time ago and I have since left the team (and now the company) but from what I remember....
We were sending a message based on an event (from elsewhere), We required a different producer dependent on the key within the event so we created this each time.  We never called Close()
Our solution was to store the producers in a map and look them up each time (depending upon the key contained in the event).  This limited the total number of producers created to one per key.
The map was cleaned up periodically using normal cache management techniques and cleared totally on service shutdown with Close being called on each producer that was retired from the cache.
This was user error on our part, not any kind of "feature" in Sarama.  The take away was that Close() must be called on a producer when you've finished with it.
I hope this helps


--bs-nav-link-font-weight variable missing in .nav class, v5.2.0-beta1.

Prerequisites

[X] I have searched for duplicate or closed issues
[X] I have validated any HTML to avoid common problems
[X] I have read the contributing guidelines

Describe the issue
As shown below, the css variable --bs-nav-link-font-weight is left blank (line 3826), no value/string is given in Bootstrap v5.2.0-beta1, installed via npm.
.nav {
  --bs-nav-link-padding-x: 1rem;
  --bs-nav-link-padding-y: 0.5rem;
  --bs-nav-link-font-weight: ;
  --bs-nav-link-color: var(--bs-link-color);
  --bs-nav-link-hover-color: var(--bs-link-hover-color);
  --bs-nav-link-disabled-color: #6c757d;
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

--bs-nav-link-font-weight  is used in .nav-link to set font-weight:
.nav-link {
  display: block;
  padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);
  font-size: var(--bs-nav-link-font-size);
  font-weight: var(--bs-nav-link-font-weight);
  color: var(--bs-nav-link-color);
  text-decoration: none;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

Reduced test cases
See above.
What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
v5.2

Thanks for reporting this issue @SamuelMiller.
IMO it is done on purpose as explained in the description of https://github.com/twbs/bootstrap/pull/31035.
It is null by default because not needed in Bootstrap style but can be set by projects changing the style; overriding $nav-link-font-weight for example.

Closing as duplicate of #36595. Same problem to solve here.


Log error

I tried to install ist but i receiverd this error
[20:27:36] Starting... loading /app/env.sh [20:27:36] loading libproduct.sh Fatal; PRESENCE_DETECTION_LOOP_DELAY: is not compliant, please check this setting Fatal; BLE_CMD_RETRY_DELAY: is not compliant, please check this setting Fatal; PRESENCE_DETECTION_TTL: is not compliant, please check this setting Fatal; DEBUG: is not compliant, please check this setting Fatal; TEMPERATURE_UNIT_FAHRENHEIT: is not compliant, please check this setting
i add only my finn Ip adress and password from mqtt. After the error i add the time delay etc
`# Mandatory; if multiple VINs separate with , or white space

VIN_LIST=xxxxxxxxxxxxxxxxx
Mandatory; Hostname or IP address

MQTT_SERVER=xxx.xxx.xxx.xxx
Service port # or name

MQTT_PORT=1883
If no username provided, anonymous mode.

MQTT_USERNAME=
If you have special characters, wrap with ' at both ends; escape ' if needed

MQTT_PASSWORD=xxxxxxxxxxxxxxxx
Default 5 (seconds)

BLE_CMD_RETRY_DELAY=5
Default 120 (seconds)

PRESENCE_DETECTION_LOOP_DELAY=120
Default 240 (seconds)

PRESENCE_DETECTION_TTL=240
Your timezone
Ref: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

TZ='Europe/London'
Default false

DEBUG=true

WARNING; If you run Home Assistant, keep this true unless you know what you're doing

ENABLE_HA_FEATURES=true`

Which installation method are you using?
Assuming it involves stack.env please post your exact stack.env (obsfurcate your sensitive info). When posting use a 'code block' so it displays correctly
If any parameters have special characters (e.g. the password field) how have you escaped them?
There is a back slash at the end of ENABLE_HA_FEATURES=true in your post above, is that really there?

I used a Raspberry Pi uses this Guide https://github.com/tesla-local-control/tesla_ble_mqtt_docker/blob/main/INSTALL.md
` Mandatory; if multiple VINs separate with , or white space
VIN_LIST=XXXXXXXXXXXXXXXXXX
Mandatory; Hostname or IP address
MQTT_SERVER=<IP_ADDRESS>
Service port # or name
MQTT_PORT=1883
If no username provided, anonymous mode.
MQTT_USERNAME=
If you have special characters, wrap with ' at both ends; escape ' if needed
MQTT_PASSWORD=XXXXXXXXXXXX
Default 5 (seconds)
BLE_CMD_RETRY_DELAY=5
Default 120 (seconds)
PRESENCE_DETECTION_LOOP_DELAY=120
Default 240 (seconds)
PRESENCE_DETECTION_TTL=240
Your timezone
Ref: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TZ='Europe/London'
Default false
TEMPERATURE_UNIT_FAHRENHEIT=false
Default false
DEBUG=false
WARNING; If you run Home Assistant, keep this true unless you know what you're doing
ENABLE_HA_FEATURES=true
`

Or did i put it in wrong directories?

I get it done by mysef
i used the wrong command to stop and start the container
After i used  docker compose up -d all works fine

Excellent glad you got it sorted


add multipart signature ed25519ph

Add support of crypto_sign_ed25519ph_{init,update,final_create,final_verify}() to libsodium-sys and via structure crypto::sign::ed25519::State.
Should fix https://github.com/dnaq/sodiumoxide/issues/166. This is supposed to do the same than https://github.com/dnaq/sodiumoxide/pull/170 but the test of this branch didn't pass on my machine.
Feedbacks are welcome!

@Gawen is this dead?

No
On Sun, 29 Apr 2018 at 18:55, Arvid E. Picciani<EMAIL_ADDRESS>wrote:

@Gawen https://github.com/Gawen is this dead?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/dnaq/sodiumoxide/pull/188#issuecomment-385265144, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABPVBe3zt81jviJ9FL52zx4ABn0AFaPkks5ttfB1gaJpZM4RQ6cC
.

Please see #203

This has been open long enough to cause some conflicts and needs a lot of work to be done. Closing this. @Gawen feel free to resubmit a new PR complete with test vectors from libsodium.


Accept EULA without Cortex API Call

Is it possible to accept the EULA manually without using Cortex's acceptLicense method?
One account using the EmotivPro license can successfully create sessions, but another account is getting a "EULA has not been accepted by the user error...", even after registering a new application and successfully logging into EmotivPro.

At the moment when you login to an Emotiv app it will pop-up the EULA acceptance dialog if you haven't accepted it. Do you have the same problem on EmotivBCI app?

@beefsuprimo , if you don't want to implement  acceptLicense on your app. You can let consumer acceptLicense manually on Cortex app. after that, they can use your app normally.


Wrong window possition in remote app

I have caught some bug in the positioning of the child window on my laptop.
I have use MS WORD as remoteapp and just pressed ALT-F4 to close file.

$ ~/build/FreeRDP/client/X11/xfreerdp -version
This is FreeRDP version 1.2.0-dev (git b73e61d)
$ uname -a
Linux dejavu-ThinkPad-T61 3.16.0-30-generic #40-Ubuntu SMP Mon Jan 12 22:07:27 UTC 2015
i686 GNU/Linux

Any suggestions?

Rails has been greatly improved in the 2.0 release candidates.
Create a new issue if still not solved.


Add crowbar test

This PR sounds boring but I think there's a nice intuition hiding in step 2:

As suggested by @talex5, it uses crowbar to generate random expressions (with dynamic conditions and binds opportunities), then checks that their evaluation with Current_incr produces the same outcome as the naïve evaluation. It then updates some of the inputs to validate that propagate keeps on yielding the same results as the full re-computation from scratch.
Current_incr also works very hard to recompute the least amount of things -- Can we test this? (without reimplementing another SAC engine with its own bugs!)
My proposal here is that the naïve evaluation can produce a log of all the operations it performs. After updating the inputs and recomputing, we get a second naïve trace: The diff between the first and second log describes "which operations are new and should have been recomputed by Current_incr" and also "which operations have become unnecessary and should have been released by Current_incr".
It turns out that Current_incr performs everything in exactly the same order as the naïve evaluation (this is not guaranteed by other SAC engines!) So if we keep track of Current_incr activity during a propagate (= read and on_release performed), we can check that its incremental log is actually the smallest patch to update the naïve log :)
This gave me a much stronger understanding of the order in which side effects are performed by Current_incr!

Tested with afl-fuzz, also against the proposed fix for the memory leak https://github.com/ocurrent/current_incr/pull/9
A few reasons not to merge this PR but keep it on the side:

Type injectivity is required for the generator (type !'a) which bumps the ocaml version to 4.12.0
Separate is not currently by tested, as the evaluation ordering is a bit different from the naïve evaluation
Debugging is a bit hard as the generated expressions are never shown

FWIW, I don't think we should need to worry about the first reason

Thanks for the added comments! The generator is indeed quite involved, as the more straightforward approach tended to generate either super-simple expressions or infinite recursions... perhaps it could use some sort of fuel to control the resulting expression's size, rather than the gen''' variations that attempt to guide the random generator into a sweet spot.
Regarding afl-fuzz, it was my first time using it and I still have no idea of "what a good input file" should be... I had to bump the memory limit with -m 500 as otherwise it was registering fake crashes, but I haven't seen the premature end of file before: I will keep it running longer to see if I can replicate. I'm guessing it's because the generator is allowed to generate expressions of arbitrary sizes and so it can run out of random data?
For reference, I'm using these commands with a custom ocaml switch 4.12.0~alpha1+afl, crowbar 0.2.1 and afl-fuzz 2.52b:
$ head -c 512 /dev/urandom > input/rnd  # or head -c 1k
$ afl-fuzz -m 500 -i input -o output _build/default/test/exhaust.exe @@

But I'm not confident at all of my usage so any advice is more than welcome! Shamefully, my understanding of afl-fuzz stops as soon as it fails to discover crashes... I still have a lot to read.

Adding fuel to the generator sounds useful. It would be nice if crowbar could just generate an expression that evaluates to 0 or something when it runs out of input, but I'm not sure how that works internally.
For now, I think it's fine to just document how to run afl-fuzz in the README.

Thanks!


Defining a fragment before the query results in an error

Hi,
I've been implementing the Type Registry, following the docs:
https://webonyx.github.io/graphql-php/schema-definition/#lazy-loading-of-types
and using the example
https://github.com/webonyx/graphql-php/tree/master/examples/01-blog
What i've found is that if you define a fragment before the query like this:
fragment Name on User {
  firstName
}

{
  user(id: 1) {
    ...Name
  }
}

it throws an exception: Exception: Unknown graphql type: User
if you write the query the other way around
{
  user(id: 1) {
    ...Name
  }
}

fragment Name on User {
  firstName
}

It returns the user record correctly.
I've been having this problem in my own implementation and spent a long time trying to fix my code and accidentally found that removing the fragment removed the error, so I realised it was some sort of issue with the fragment.
Is this a bug of graphql-php or is this a problem with the Type Registry implementation?
For reference, I ran the same query against an express-graphql implementation and it doesn't matter which way around the fragment is defined.
Thanks
Mike

@shmax I believe the issue here is that the implementation of Types::byTypeName() introduced in https://github.com/webonyx/graphql-php/pull/1363 is insufficient. That function is used as Schema.typeLoader, it needs to be able to locate and instantiate types that were not yet loaded.


[Event Request] - OnBeforeValidateSocialSecurityCode in Table 12113 "Tmp Withholding Contribution"

Hello, please consider adding the following event to Table 12113 "Tmp Withholding Contribution"
[IntegrationEvent(false, false)]
local procedure OnBeforeValidateSocialSecurityCode(var Rec: Record "Tmp Withholding Contribution"; var xRec: record "Tmp Withholding Contribution"; var IsHandled: Boolean)
begin
end;

and call it accordingly inside the "OnValidate" trigger of field 50 "Social Security Code":
    trigger OnValidate()

    **var
        IsHandled: Boolean;**

    begin

        **OnBeforeValidateSocialSecurityCode(Rec, xRec, IsHandled);
        if IsHandled then
            exit;**

        CalculateSocialSecurity("Taxable Base");
    end;

Thank you !

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. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 52143.


Requiring rails 4.2 compatible nokogiri version

@dlt: How can I apply this patch to my code if they don't merge this change into the real repo?

Thanks for this! Just tested it. Should work fine. Please merge.

This should be fixed by: https://github.com/bvandenbos/copyscape-rb/commit/6bf2bc8f657246ec820f5d8bbf068a73e422cc50.
I'll push a new version of the gem in a bit.


Check file handle limit on startup (RIPD-1024, RIPD-442)

@JoelKatz, @miguelportilla

Current coverage is 69.65%

Merging #1633 into develop will decrease coverage by -0.05% as of 14ba52d

@@            develop   #1633   diff @@
=======================================
  Files           907     907
  Stmts         67382   67420    +38
  Branches          0       0
  Methods           0       0
=======================================
- Hit           46971   46960    -11
  Partial           0       0
- Missed        20411   20460    +49

Review entire Coverage Diff as of 14ba52d

Powered by Codecov. Updated on successful CI builds.

:+1:
The code looks great but we may want to consider raising the 128 value. Websocket subscriptions can live long and therefore 128 might be low. Take for instance the case where an admin set the hard limit to be 4200. On a default RocksDB(2kFD) with Online delete enabled, after subtracting peers it leaves us with a server that can easily be crashed with about a hundred sockets.
Are we taking SQLite file descriptor usage into account?


Issues between versions

Hi,
We have recently updated from jsonfield2 to jsonfield and we are experiencing issues when we have a dict data being passed in get_or_create().
The idea is we were using jsonfield2, jsonfield2==3.0.2 and when we update to latest jsonfield==3.1.0 the issue appears. In order to reproduce it you need to have a model lets say:
class MyModel:
    field_1 = models.CharField
    field_2 = JsonField()

   Meta:
      unique(field_1)

MyModel.objects.create(field_1='test', field_2={'foo':'bar'})

And while still on jsonfiield2==3.0.2 version create an entry in the database ( we use postgres ).
Now uninstall jsonfield2 and install latest jsonfield and try to do
MyModel.objects.get_or_create(field_1='test', field_2={'foo':'bar'}) - It will fail with IntegrityError and you will get "duplicate key value violates unique constraint" message. This is because if you just call MyModel.objects.get(field_1='test', field_2={'foo':'bar'}) - it raises ObjectDoesNotExist, and then the above tries to call create but there is already a entry in the database with those params and there is a unique constraint in our case.
The most important thing is that this
MyModel.objects.get(field_1='test', field_2={'foo':'bar'}) raises ObjectDoesNotExist when the entry clearly exists in the table

Hi @senadibraimoski. I added a test case in #252 but was unable to reproduce the issue. Could you provide feedback or open a separate PR that demonstrates the failure?

I can not - it's between versions - there is no way to create a PR to demonstrate this:
Create this with jsonfield2
MyModel.objects.create(field_1='test', field_2={'foo':'bar'})

uninstall jsonfiled2
install jsonfield
The just do this
MyModel.objects.get(field_1='test', field_2={'foo':'bar'})

it's between versions

Oh, right 🤦♂
Alright, I tried recreating this locally, but wasn't able to generate the error. Here's the model I used:
class Test(models.Model):
    text = models.CharField(max_length=32, unique=True)
    data = JSONField()

Using jsonfield2==3.0.2 and Django==2.2, I generated and ran the migration.
In the Django shell:
In [1]: from app.models import Test

In [2]: Test.objects.get_or_create(text='abc', data={'a': 'b'})
Out[2]: (<Test: Test object (1)>, True)

Uninstalled jsonfield2, then ran pip install jsonfield. Again, in the Django shell:
In [1]: from app.models import Test

In [2]: Test.objects.get_or_create(text='abc', data={'a': 'b'})
Out[2]: (<Test: Test object (1)>, False)

Is there anything I missed? Also, could you dump the contents of the row using the dbshell? I'm wondering if there was a serialization bug that's causing the value to appear different.

Hey @rpkilby I did also update from Django 2 to Django 3.0.4. Sure will provide more info over the weekend as well - your example is on the point our DB backend is Postgres as well I failed to mention that
So wee used Django Django==2.2.7, jsonfield2==3.0.2 - and we had those model present in the DB already. Now we switched to Django==3.0.4 and jsonfield==3.1.0 - and we got the error. When we use Django==3.0.4 and jsonfield==3.0.2 works fine.
I will provide more info during the weekend its 1:30am where I am (London) so I have to go to bed.

Postgres as well I failed to mention that

You did mention it in your OP.

When we use Django==3.0.4 and jsonfield==3.0.2 works fine.

My assumption here is that the Django version isn't going to affect the outcome, although it wouldn't hurt to test.

Hi @senadibraimoski. Any update or were you able to resolve this?

Yes @rpkilby it was an error on my part. The migrations were not being executed due to some backwards incompatible structure between me moving from Django 2 to 3.05, sorry for the false alarm - it was a proper heisenbug

No worries - glad you were able to figure it out!


[FEAT] Create API Endpoints to Retrieve User Profile Settings

Description
Create an API endpoint to allow users to view their profile settings. The user must be signed in to view their details.
Acceptance Criteria

Authentication

The user must be signed in and provide a valid token to access the view endpoint.
If a user is not authenticated, the API should return a 401 Unauthorized error.

View Profile

The API should return a JSON object with the current user's profile settings.
The response should include the following fields:

profile_picture
username
pronouns
job_title
department_team
email
bio
social_links

If the profile settings are retrieved successfully, the API should return a 200 OK status.

Response Formats

Successful View Profile Response{
  "profile_picture": "url/to/profile/picture",
  "username": "johndoe",
  "pronouns": "he/him",
  "job_title": "Software Engineer",
  "department_team": "Engineering",
  "email": "[johndoe@example.com](mailto:johndoe@example.com)",
  "bio": "Passionate developer.",
  "social_links": {
    "twitter": "https://twitter.com/johndoe",
    "linkedin": "https://linkedin.com/in/johndoe"
  }
}

Error Handling

Unauthorized Access{
  "status": "error",
  "message": "Unauthorized access. Please sign in.",
  "status_code": 401
}

Purpose
Provide an endpoint for users to view their profile settings.
Requirements

[ ] Implement an endpoint to retrieve user profile settings.

[ ] GET /api/profile to retrieve the current user's profile settings.

[ ]  Ensure the endpoint handles authentication securely with token-based authentication.

[ ] Require users to be signed in and provide a valid token to access the endpoint.
[ ] Return 401 Unauthorized if the user is not authenticated.

[ ] Handle responses and errors appropriately.

[ ] Return 200 OK with the user's profile settings on successful retrieval.
[ ] Return all error responses in JSON format with an error field containing a descriptive message.

Unit Tests

GET /api/v1/profile Endpoint:

Test that the endpoint returns the user's profile settings correctly.
Mock the data access layer to simulate different scenarios.
Verify that the response includes all expected fields (profile picture, username, pronouns, job title, etc.)

End-to-End Tests

Authenticated User:

Setup: Authenticate a test user.
Action: Send a GET request to /api/v1/profile.
Assertions: Verify 200 OK status.
Verify the response includes all expected fields.

Action: Send a GET request to /api/v1/profile.
Assertions: Verify 401 Unauthorized status.
Verify the response contains the correct error message.

Profile Data Integrity:

Setup: Create and authenticate a test user.
Action: Send a GET request to /api/v1/profile.
Assertions: Verify 200 OK status.
Verify the response data matches the stored profile data.

Expected Outcome
An API endpoint that enables users to view their profile settings seamlessly.

API should be protected

In the first requirement, update the endpoint to follow the convention

Be consistent in versioning your endpoints

Success Response formatting is not standard


Update dependencies

Awkward place for this, but if you need access to the CI GH account, hit me up at the email in my profile so I can transfer it over. (maybe good to do regardless since that definitely should've been part of my offboarding...)


Fix a bug that calculates the wrong mem_limit.

I think the two '*' was mistyped.

The ** is actually correct and means "to the power of" in Python. 1024**3 therefore is<PHONE_NUMBER>24, which is the number of Bytes in a Gigabyte.

Oh~ I was wrong. But the function get_mem_limit() can't calculate the right result if the user specify the mem_limit with absolute notation such as 500m or 2G, or as a percentage of physical memory such as 60%. which annoyed me for a while.
This function needs to be updated.


fix(lib): move to local variable instead of relying on the string constant

from RN core
fixes #62

:tada: This PR is included in version 1.1.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Uncaught Error: ENOENT, no such file or directory '/Users/paulomcnally/develop/test/img/example_resized.png'

Uncaught Error: ENOENT, no such file or directory '/Users/paulomcnally/develop/test/img/example_resized.png'
Atom Version: 0.154.0
System: Mac OS X 10.10
Thrown From: tree-view package
Steps To Reproduce

...
...

Stack Trace
At fs.js:455

Error: ENOENT, no such file or directory '/Users/paulomcnally/develop/test/img/example_resized.png'
  at Error (native)
  at Object.fs.openSync (fs.js:455:18)
  at Object.module.(anonymous function) [as openSync] (/Applications/Atom.app/Contents/Resources/atom/common/lib/asar.js:422:20)
  at Object.fs.readFileSync (fs.js:313:15)
  at Object.fs.readFileSync (/Applications/Atom.app/Contents/Resources/atom/common/lib/asar.js:329:27)
  at TreeView.module.exports.TreeView.pasteEntries (/Applications/Atom.app/Contents/Resources/app/node_modules/tree-view/lib/tree-view.js:855:58)
  at space-pen-div.atom.commands.add.tree-view:paste (/Applications/Atom.app/Contents/Resources/app/node_modules/tree-view/lib/tree-view.js:250:26)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:167:20)

This issue was moved to atom/tree-view#316


fix for both ? and form for get

This pull request breaks existing tests and doesn't add new ones.


Docs don't display for global functions

The docstrings definitely exist, and display fine in e.g vscode, but the autogenerated docs don't include them for some reason.

This seems to be an issue with the CLI too:
/m/f/P/g/d/deno_doc ❯❯❯ deno doc --builtin setTimeout
Defined in lib.deno.d.ts:3167:8

function setTimeout(cb: (...args: any[]) => void, delay?: number, ...args: any[]): number


Design tokens

I did a test with using theo to generate scss variables and a part of the documentation.
You can view the test on https://github.com/appuniversum/appuniversum/tree/feature/design-tokens
Is this something to go forward with or is it too complex for what we're doing? Any thoughts?

How do you like it yourself? Little bit afraid of overengineering here.

Would be interested to just have a file that we can agree on that looks a bit like this.
spacing
  - large: 5rem
  - medium: 2.5rem
  - small: 1rem
font-scale
  - 1: 4.8rem
  - 2: 3.6rem
  - 3: 2.8rem
colors
  - gray
    - 100: #[hex code]
    - 200: #[hex code]

So far I like it but don't have a lot of experience with design tokens so still learning. This is low priority.
Pro's:

possibility to sync with Webuniversum in the future?
option to add meaning and comments (e.g. contrast colors) to a variable in a semantic way
reuse of variables for automatic documentation generation in 11ty (e.g. colors)
maybe some integration possible with Figma?
I don't see a lot of overhead or maintenance for the moment (but that could change)
extensible to iOS, Android, etc. (although this need does not exist for the moment)

Con's:

steeper learning curve for people learning to use appuniversum
not sure of the need of above benefits

I already started on completing the color variables: https://github.com/appuniversum/appuniversum/blob/feature/design-tokens/design-tokens/helpers/color-aliases.json

Abandoned the design tokens for now but reworked the scss variable names in #31

Great <3


NDRS-421: Ignore outdated block executor requests.

https://casperlabs.atlassian.net/browse/NDRS-421

Good point. Back to the drawing board…


assertion failed: !completion_op_

In some case, below assertion failed will occur, I wonder in which case completion_op_ will be shutdown by grpc?
E0710 13:00:23.566525614   12191 server_context.cc:269]      assertion failed: !completion_op_

The provided information is insufficient for debugging/action. Please re-open the issue with additional information/instructions on reproducing the issue.

I have made a server with grpc(c++), and write an async client(python) which open 50 threads to request to server, at server side, I have open 7 threads to process requests, after running several  minutes, the assertion will occur, server crashed then.
I am using grpc v1.19.0

@veblush @yashykt

Hi @HaoLiuHust , we already have cases of gRPC use with many threads. You would need to provide something like a unit test case maybe as a github gist that we can run and verify. Also, gRPC support is limited to the previous two releases and gRPC v.1.19.0 is slightly old now.

I will try the newest version. I wonder in which case "completion_op_" will be null so I can check if I have make some mistake?

Hi @HaoLiuHust , did you figure this out?

Hi @HaoLiuHust , did you figure this out?

no, not yet...， I just replace GPR_ASSERT with if，no longer meet this issue...


Cache selected fields property on the field info.

Description
Follow-up to #1165. Selected fields are the only property that aren't trivially delegated to the graphql-core object, so it seems worth caching.
Types of Changes

[ ] Core
[ ] Bugfix
[ ] New feature
[X] Enhancement/optimization
[ ] Documentation

Issues Fixed or Closed by This PR

Checklist

[X] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[X] I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:

This release caches attributes on the Info type which aren't delegated to the core info object.

Here's the preview release card for twitter:

Here's the tweet text:
🆕 Release (next) is out! Thanks to A. Coady for the PR 👏

Get it here 👉 https://github.com/strawberry-graphql/strawberry/releases/tag/(next)

ah, mypy failed in the tests, but not when running it directly, interesting!


add schedule to listen for portrait/portrait and landscape/landscape …

We noticed that there is no UI update when changing from landscape left to right mode. That bothered us since there is a notch on most of the phones on top, so we had inconsistent button placement when doing direct switches without going via portrait.
For us it works now, but feel free to adapt the code in your own style.
Maybe there is a better solution then doing it on a schedule, but I could not find an event to register for. I guess it's fine to run every frame, since most of the time it's just a single numerical evaluation.

@azipf
Thank you so much for your contribution, I greatly appreciate it!
I ran a quick test on my device, but I wasn't able to reproduce the issue in that specific environment. The GeometryChangedEvent should trigger when moving from left to right, so I'm wondering if the problem you're encountering might be related to this bug:
https://issuetracker.unity3d.com/issues/ios-screen-dot-safearea-is-incorrectly-updated-when-rotating-the-device.
Could you let me know what version of Unity you're using and on which device you saw this issue? If it's isolated to certain Unity versions, we could potentially wrap the schedule in a compiler directive to apply it only when necessary.

Thanks for checking in. We're currently in a hot path but I will certainly come back with more information!
IIRC it sounded perfectly reasonable to me that GeometryChangedEvent will not be called, since the transform is only "rotated" and not actually resized.


Request credentials for an os-climate bucket

Requesting credentials for github user: jtoroafs
Requesting credentials for the bucket: redhat-osc-physical-landing-647521352890
Email address to send a credential download link<EMAIL_ADDRESS>Request checklist:

[ X] User can establish connection with the bucket
[ X] User can read files from the bucket
[ X] User can write files to the bucket

Best regards,

Hi @erikerlandson ,
Did you have a chance to address my resquest?
Best

@MightyNerdEric can you please provide credentials

@jtoroafs  wasnt a member of the odh-env-users team, so I've added them. Once they accept membership, they should be able to  access the creditials at this URL, by logging in with your github account: https://console-openshift-console.apps.odh-cl1.apps.os-climate.org/k8s/ns/sandbox/secrets/physrisk-s3-keys

Thansk every one.

Looks like this one is complete. Closing.


Accelerate unpacking of arxiv files

why is it so slow? CPU usage is low but if the disk is constantly busy I guess there's not much we can do about this

54.8 s per tar

With reduced storage requirements it can use an SSD, and only extracting tar files also helps.


Adding troubleshooting to auth doc.

Starting out with section about downloading keyfiles, borrowed from gcloud-common:
https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/authorization/readme.md
@jgeewax Still to come is another subsection in troubleshooting about GCE auth/scopes and then an "Advanced Customization" section about using custom http objects (not from oauth2client).

only read through briefly, but LGTM


Adding e-NDP dataset

Hi HTR-United team!
Thank you again for your open initiative !
There is a new submission for the e-NDP dataset that we have already referenced on Zenodo in the context of the e-NDP ANR project.
I hope my description is correct, let me know if I need to change anything.
Here is our dataset YAML file:
schema: https://htr-united.github.io/schema/2023-06-27/schema.json
title: eNDP-ground-truth
url: https://zenodo.org/records/7575693
authors:
 - name: Julie
   surname: Claustre
   orcid: 0000-0001-8504-3920
   roles:
     - transcriber
     - project-manager
 - name: Darwin
   surname: Smith
   roles:
     - transcriber
     - project-manager
 - name: Sergio
   surname: Torres Aguilar
   orcid: 0000-0002-1801-3147
   roles:
     - aligner
     - quality-control
     - support
 - name: Isabelle
   surname: Bretthauer
   orcid: 0000-0002-1780-772X
   roles:
     - transcriber
 - name: Pierre
   surname: Brochard
   orcid: 0000-0003-1955-556X
   roles:
     - quality-control
 - name: Olivier
   surname: Canteaut
   orcid: 0000-0003-4586-1931
   roles:
     - transcriber
     - quality-control
 - name: Emilie
   surname: Cottereau
   orcid: 0000-0001-6880-2112
   roles:
     - transcriber
 - name: Fabrice
   surname: Delivré
   roles:
     - transcriber
 - name: Mathilde
   surname: Denglos
   roles:
     - transcriber
 - name: Vincent
   surname: Jolivet
   orcid: 0000-0003-0600-0362
   roles:
     - aligner
     - quality-control
     - support
 - name: Véronique
   surname: Julerot
   roles:
     - transcriber
 - name: Thierry
   surname: Kouamé
   orcid: 0000-0001-9728-2988
   roles:
     - transcriber
 - name: Elisabeth
   surname: Lusset
   orcid: 0000-0003-1572-1890
   roles:
     - transcriber
 - name: Anne
   surname: Massoni
   orcid: 0000-0002-1690-9804
   roles:
     - transcriber
 - name: Sebastien
   surname: Nadiras
   roles:
     - transcriber
 - name: Nicolas
   surname: Perreaux
   orcid: 0000-0002-0103-817X
   roles:
     - transcriber
 - name: Hugo
   surname: Regazzi
   orcid: 0000-0002-3059-2874
   roles:
     - transcriber
 - name: Mathilde
   surname: Treglia
   roles:
     - transcriber
institutions: []
description: >-
 The e-NDP project : collaborative digital edition of the Chapter registers of
 Notre-Dame of Paris (1326-1504). Ground-truth for handwriting text recognition
 (HTR) on late medieval manuscripts.
project-name: >-
 The e-NDP project : collaborative digital edition of the Chapter registers of
 Notre-Dame of Paris (1326-1504). Ground-truth for handwriting text recognition
 (HTR) on late medieval manuscripts.
project-website: https://endp.hypotheses.org/presentation
language:
 - fra
 - lat
production-software: eScriptorium + Kraken
automatically-aligned: true
script:
 - iso: Latn
   qualify: cursive
script-type: only-manuscript
time:
 notBefore: '1326'
 notAfter: '1504'
hands:
 count: more-than-10
 precision: estimated
license:
 name: CC-BY 4.0
 url: https://creativecommons.org/licenses/by/4.0/
format: Page-XML
volume:
 - metric: pages
   count: 512
 - metric: lines
   count: 34231
 - metric: characters
   count: 3320407
 - metric: files
   count: 512
 - metric: regions
   count: 2448
transcription-guidelines: >-
 - The abbreviations have been resolved, both those by suspension (facimꝰ --->
 facimus) and by contraction (dñi --> domini). Likewise, those using
 conventional signs (⁊ --> et ; ꝓ --> pro) have been resolved.

 - The named entities (names of persons, places and institutions) have been
 capitalized. The beginning of a block of text as well as the original capitals
 used by the notary are also capitalized.

 The consonantal i and u characters have been transcribed as j and v in both
 French and Latin.

 - The punctuation marks used in the text: . and / have been transcribed, but
 the transcription has not been standardized with modern punctuation.

 - Corrections and words that appear cancelled in the manuscript have been
 transcribed surrounded by the sign $ at the beginning and at the end.

 - More specific transcription rules can be found into the file
 transcription_guidelines.pdf on Zenodo repository.

Hello Lucas,
Thank you for the contribution!
I have 3 suggestions:

for project-name you put:

project-name: >-
 The e-NDP project : collaborative digital edition of the Chapter registers of
 Notre-Dame of Paris (1326-1504). Ground-truth for handwriting text recognition
 (HTR) on late medieval manuscripts.

I think "e-NDP project" is enough, or at least this entry doesn't need the "Ground-truth for handwriting text recognition (HTR) on late medieval manuscripts" part.

for description, you put:

description: >-
 The e-NDP project : collaborative digital edition of the Chapter registers of
 Notre-Dame of Paris (1326-1504). Ground-truth for handwriting text recognition
 (HTR) on late medieval manuscripts.

You could provide more details (consider someone browsing through the HTR-United catalog and trying to get a good understanding of the different datasets).

for title you can keep "eNDP-ground-truth", but you could also consider giving it a more natural language form (even if it is just "eNDP Ground Truth").

I created a pull request (#153) so feel free to modify the yml file directly if you want to make any change!
Thank you again!

Hi @alix-tz,
Thank you very much for your reply and for PR #153!
Here is my YAML file with updated fields:
schema: https://htr-united.github.io/schema/2023-06-27/schema.json
title: ANR e-NDP Ground Truth
url: https://zenodo.org/records/7575693
authors:
 - name: Julie
   surname: Claustre
   orcid: 0000-0001-8504-3920
   roles:
     - transcriber
     - project-manager
 - name: Darwin
   surname: Smith
   roles:
     - transcriber
     - project-manager
 - name: Sergio
   surname: Torres Aguilar
   orcid: 0000-0002-1801-3147
   roles:
     - aligner
     - quality-control
     - support
 - name: Isabelle
   surname: Bretthauer
   orcid: 0000-0002-1780-772X
   roles:
     - transcriber
 - name: Pierre
   surname: Brochard
   orcid: 0000-0003-1955-556X
   roles:
     - quality-control
 - name: Olivier
   surname: Canteaut
   orcid: 0000-0003-4586-1931
   roles:
     - transcriber
     - quality-control
 - name: Emilie
   surname: Cottereau
   orcid: 0000-0001-6880-2112
   roles:
     - transcriber
 - name: Fabrice
   surname: Delivré
   roles:
     - transcriber
 - name: Mathilde
   surname: Denglos
   roles:
     - transcriber
 - name: Vincent
   surname: Jolivet
   orcid: 0000-0003-0600-0362
   roles:
     - aligner
     - quality-control
     - support
 - name: Véronique
   surname: Julerot
   roles:
     - transcriber
 - name: Thierry
   surname: Kouamé
   orcid: 0000-0001-9728-2988
   roles:
     - transcriber
 - name: Elisabeth
   surname: Lusset
   orcid: 0000-0003-1572-1890
   roles:
     - transcriber
 - name: Anne
   surname: Massoni
   orcid: 0000-0002-1690-9804
   roles:
     - transcriber
 - name: Sebastien
   surname: Nadiras
   roles:
     - transcriber
 - name: Nicolas
   surname: Perreaux
   orcid: 0000-0002-0103-817X
   roles:
     - transcriber
 - name: Hugo
   surname: Regazzi
   orcid: 0000-0002-3059-2874
   roles:
     - transcriber
 - name: Mathilde
   surname: Treglia
   roles:
     - transcriber
institutions: []
description: >-
 This repository hosts HTR ground truth created within the context of the ANR e-NDP project.

 This dataset based on 512 pages from the 26 registers of the Notre-Dame de Paris cathedral chapter.
 The volumes containing the chapter conclusions were conceived to serve as memorial records, but above all as documents for regular use and consultation in the daily practice of administration and management.
 The registers were written using a Cursive script (ca. late XIIIe - XVIe) and their content is were written mainly in Latin, the
rest in French. There are no fewer than 18 hands in these pages.

 The transcriptions were manually completed in two rounds by a group of 12 contributors, including historians and paleographers, over the course of 2021-2022 using eScriptorium.
project-name: >-
 ANR e-NDP
project-website: https://endp.hypotheses.org/presentation
language:
 - fra
 - lat
production-software: eScriptorium + Kraken
automatically-aligned: true
script:
 - iso: Latn
   qualify: cursive
script-type: only-manuscript
time:
 notBefore: '1326'
 notAfter: '1504'
hands:
 count: more-than-10
 precision: estimated
license:
 name: CC-BY 4.0
 url: https://creativecommons.org/licenses/by/4.0/
format: Page-XML
volume:
 - metric: pages
   count: 512
 - metric: lines
   count: 34231
 - metric: characters
   count: 3320407
 - metric: files
   count: 512
 - metric: regions
   count: 2448
transcription-guidelines: >-
 - The abbreviations have been resolved, both those by suspension (facimꝰ --->
 facimus) and by contraction (dñi --> domini). Likewise, those using
 conventional signs (⁊ --> et ; ꝓ --> pro) have been resolved.

 - The named entities (names of persons, places and institutions) have been
 capitalized. The beginning of a block of text as well as the original capitals
 used by the notary are also capitalized.

 The consonantal i and u characters have been transcribed as j and v in both
 French and Latin.

 - The punctuation marks used in the text: . and / have been transcribed, but
 the transcription has not been standardized with modern punctuation.

 - Corrections and words that appear cancelled in the manuscript have been
 transcribed surrounded by the sign $ at the beginning and at the end.

 - More specific transcription rules can be found into the file
 transcription_guidelines.pdf on Zenodo repository.

Cool, thank you for the update! I added the modifications to the PR and am now merging it. :)


Define personas

ADRs often needs to refer to groups/teams or people with a particular function (e.g.  "customer support team", "support engineer" etc). We shouldn't use some private jargon for these things, so they need generic terms and to be explained somewhere.

I wonder if using Glossary tooltip plugin is a way forward.
We would define an _data/actors.yml and use that to enumerate the human/system actors and provide a description.  ADRs would reference those as {% actors term_name %}.   The plugin generates a tooltip with the description which would help the reader understand the role of the actor.  This would give us a standard way to refer to actors across ADRs and enable validations/linting.
What this wouldn't address is provide a mapping back to Red Hat organisational names.

I wonder how a technical solution like that would work in practice. Training new (or even regular) contributors to the repo to use {% actors term_name %} might be a never-ending process. I can see that if we could maintain a "common lexicon" it would probably be slightly better than what we're currently trying to do with acronyms/initialisms (which is to force people to provide the expansion).
But having _data/actors.yml (or a human readable version of it), that is defining the system actors on the site would be really really useful in building that common lexicon. Once we have it, it's easier in code review to ask people to use the actors in it (e.g. where they're using other terms), or to add to it if needed.

I think what I did for ADR-76 might be relevant here? Look at any reference to RHOSAK in the following page: https://architecture.appservices.tech/adr/76/
Line 14 here is how I defined that: https://github.com/bf2fc6cc711aee1a0c2a/architecture/pull/46/files#diff-c506df10ada0737a193a7f06b1344d93d08cc9eb16bd994782cacfc3b4ac2584R14


support the character which may occupy 2 codeunits such as chinese or japanese

I found that while Chinese characters occurs in the menu, the background drawn incorrectly.

Sorry for the delay, all merged!


Implement prompt for root folder when folder doesn’t exist!

All the PRs for @whyboris! 😅
This PR prompts users to select the new location of the video root folder if the saved one doesn't exist! ✅
The only case that isn't handled now is if you move a relative vha file out of the video folder, as the current folder will always exist (the one the vha file is in!) 👎
Fixes #6!

Interesting - I didn't think of that use case - what purpose would that serve? 🤔
To support this use case, I can just add a "Continue anyway" button, which would continue with the current behaviour? ✅

Added such a button! 👍

Confirmed works beautifully on Windows and Mac 🥇


Load extra Sass

Since I like the theme, I decided to install Leonids as theme in my Jekyll-based site. I am using the Ruby Gem.
Now I have one or two pages that need a little extra styling to make things look good. This extra styling is basically a .scss file. How could I have Jekyll load that file so it will be included in the HTML output?

As reference for someone else wondering how to do this: I've copied main.scss from the Leonids gem folder (found it using bundle show leonids) to ./assets/css/main.scss and added @import statements for other Sass files that live in ./_sass/.


Adding VS 2013 compile support

Adds compilation support for VS 2013 tools. As some Windows functions are obsolete on newer Windows I have disabled the warnings with #pragmas.

@ligaz Do you have some cycles to look into this? Updating to VS 2013 would be a very nice :smile:

Hey @nethip I don't think I will have time to look into this. Also VS 2015 is just around the corner so it make sense to go straight to it.

Now we can compile with VS2015 (and I think VS2013 too).
I opened https://github.com/adobe/brackets-shell/pull/568 to discuss the changed to the script file.


Feature Request: Unicode Normalization

Working with a lot of Unicode characters from potentially many sources, I've lately found myself performing Unicode normalization on text a lot.
It would be useful to be able to perform the various Unicode normalization forms on text directly in-editor, without having to copy it elsewhere then paste in the normalized version. In my particular case this is Form D, but I can see uses for all 4 forms.
This isn't a pressing matter by any means but I thought I'd suggest it since there seems to be a built-in method group for this exact purpose in Java already.

Convert Diacritics (Accents) to ASCII is not doing what you need?

Ah, no - Unicode normalization does things like decompose characters into their component parts:
á (U+E1) -> á (U+61 U+0301)
and converting characters into their canonical forms if necessary:
ʹ (U+0374) -> ʹ (U+02B9)

I see. Adding a new action would be fine. Althought I am thinking that it could be a good idea to use icu4j (unfortunately 13MB jar) beucase JRE 11 Unicode support is limited. https://youtrack.jetbrains.com/issue/JBR-2875

I do not really work with unicode that often, so it seems to me useful to see what happens exactly. What do you say to this?

For your example:

That looks fantastic. From what I can see, everything looks good there.

You can try it:
StringManipulation.zip
Btw is your IDE version 2020.3+?

This is fantastic!
I just tried it with Rider EAP 4 2021.1, and everything seems to be working perfectly.
Thank you so much.


Continuous movement split into 10 minute time slots

This happens on the simulator when it is set to free-way ride and run for some time.
We want to make sure that stuff like this never happens, no matter the location input.

This will be resolved with the new location algorithm.


Return type polymorphism uniquely determined by input type

Is there a way to specify that a function returns type A given inputs B, and returns type C given inputs D?
Kind of like this:
// doSomething() -> number
// doSomething(100) -> boolean
function doSomething (int?: number): number|boolean {
  if (int === undefined) {
    return 1;
  } else {
    return true;
  }
}

let num = doSomething();
console.log(Math.floor(num));

This results in an error where num is claimed to be a boolean. https://flow.org/try/#0GYVwdgxgLglg9mABAEzgZTgWwKZQBYxgDmiAFIVAPwBciYImARtgE4CUt9TrAPo3HAA22AIZIA3gChEiGMDIVEAXhWJwybMELZkbRFJkyWuECyQBGANzTEAX0TZBAZ2z6bRk2cRQWIbNZlbSSDJYSg6BmUUdCxcAmJSNmsIBCchbAA6QTgiUgBZEXwM4Gy4FlIuNiSgA
In Haskell, there's multiparameter typeclasses and return type polymorphism combined with functional dependencies that deal with this. (https://stackoverflow.com/questions/20040224/functional-dependencies-in-haskell)

You can use conditional type, although it will be difficult to satisfy the conditional type


feat: add native versioning on docs

Checklist

[ ] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
[ ] Links to related issues (if applicable)
[ ] Tests for the changes have been added/updated (if applicable)
[ ] Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
[ ] For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

Move every static asset to https://github.com/datahub-project/static-assets
Embed native versioning of docusaurus
Handling Next Version (RC for docs-site),  Search based on version

This PR needs to be merged beforehand

We might have to trigger the algolia crawler manually after deployment, to enable versioning search

I'm not a huge fan of the amount of copying here - would it be possible for the entire versioned_docs/version-0.10.4 directory to live in the static assets repo as a tar.gz file, and then pull it in during the docs build process?

Closing this as outdated.


Project > Goals > Blank suggestion dropdown is displayed while the user enters text in the "Completion Description" field

Roles: All
Describe the bug
Project > Goals > Blank suggestion dropdown is displayed while the user enters text in the Completion Description field
Steps to Reproduce

Login as a root user
Create a project and open a project detail page
Add LanguageEngagement and click on the View Details
Click on the Add Goal button and enter detail in the Completion Description field

Expected Result
Blank suggestion dropdown should not be displayed while the users enter text in the Completion Description field
Actual Result
Blank suggestion dropdown is displayed while the user enters text in the Completion Description field
See video -
https://user-images.githubusercontent.com/5212585/136959042-53bdcd11-7620-439f-81dc-d39dbe7f0e7c.mp4
FYI: @ParkeBrown @michaelmarshall
cord-field# e7deacf

@CarsonF  would it work to put some placeholder text in the results that says "No Suggestions Found" or something like that?


Meross 310x with 2.1.2 Firmware (after update) doesn't work

Hi,
This morning, I updated my socket MS310x, and they updated to the last firmware 2.1.2 version.
After the update, the socket is no anymore manageable from Home Assistant. All the MSS310 devices show as unavailable; I've also the MSS310 (without X in the model name), which works correctly.
Any update on the HACS Meross LAN component that allows us to use the 2.1.2 firmware version?

Same problem! I hope they didn't mess up with the possibility of controlling the device

Hello @matfil92 and @leofabri ,
I don't know what this new firmware brings in but in most of this kind of issues everything was related to a wrong (possibly empty) key set in meross_lan. This used to work but is increasingly becoming an issue with recent firmwares updates.
When setting a correct device key in meross_lan everything works again. The key need to be retrieved from the meross cloud account and sadly enough (I'm working on this for the next release) you can't recover the key from the cloud account after the device is initially configured so you're left with dropping and reinstalling the device configuration in integrations.
If this is not the case and the device doesn't work even with the correct key then it might be that 'Houston we have a problem...'
You could then try catching a trace from the device integration configuration and post it so I could better inspect what's the issue

Hi @krahabb,
I confirm that removing and add again it works! Probably have lose the UIID


Extreme X-raying/rendering issue

CommunityMod-1.12.2-1.0.92
Forge: <IP_ADDRESS>34
Experience massive rendering issues with a small pack I'm testing out. Finally figured out that it is this mod causing it.
Log:
https://paste.dimdev.org/yozuqoheko.md


https://github.com/sorydima/REChain-/blob/main/CHANGELOG.md

Is this the right dev

Sure 😊

Is this the right dev

It's for REChain- proj


Error when doing /ce add

I tried doing /ce add and I got this error
[12:01:18 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'ce' in plugin SwarmEnchantments v1.2	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[server.jar:git-Spigot-db6de12-18fbb24]	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[server.jar:git-Spigot-db6de12-18fbb24]	at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) ~[server.jar:git-Spigot-db6de12-18fbb24]	at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1162) [server.jar:git-Spigot-db6de12-18fbb24]	at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997) [server.jar:git-Spigot-db6de12-18fbb24]	at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [server.jar:git-Spigot-db6de12-18fbb24]	at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [server.jar:git-Spigot-db6de12-18fbb24]	at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [server.jar:git-Spigot-db6de12-18fbb24]	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_91]	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_91]	at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [server.jar:git-Spigot-db6de12-18fbb24]	at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [server.jar:git-Spigot-db6de12-18fbb24]	at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [server.jar:git-Spigot-db6de12-18fbb24]	at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [server.jar:git-Spigot-db6de12-18fbb24]	at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [server.jar:git-Spigot-db6de12-18fbb24]	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]Caused by: java.lang.NullPointerException	at me.BadBones69.CrazyEnchantments.Main.onCommand(Main.java:326) ~[?:?]	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[server.jar:git-Spigot-db6de12-18fbb24]	... 15 more
Also I got this in game

The internal error was right after the command was executed.

Since you edited the code I am not sure what line 326 of the code is. For the original its this Here

					if(Api.getEnchName(i).equalsIgnoreCase(args[1])){

is the line in this part
for(String i : ECControl.allEnchantments().keySet()){
if(Api.getEnchName(i).equalsIgnoreCase(args[1])){
T = true;
if(Main.settings.getEnchs().contains("Enchantments."+i)){
color = Main.settings.getEnchs().getString("Enchantments."+i+".Color");
}
if(Main.settings.getCustomEnchs().contains("Enchantments."+i)){
color = Main.settings.getCustomEnchs().getString("Enchantments."+i+".Color");
}
en = Api.getEnchName(i);
}
}

Should be line 336 for you, I removed 10 enchants from the code I think

Its line 345 for me.

Did you remove enchantments from your Enchantments.yml?

Yes I did

Also from the code

Thats the problem I think. All you have to do is disable them in the Enchantments.yml and they wont work. That a better way of doing it then removing them from the code. I have the enchantments and stuff coded in so thats why when it does somthing and an enchantment isnt there it causes errors.

But it still displays them in /ce info though...

Well thats because there made to show in there even when disabled.

hmm any way to not let it show? Would be nice, because people might be confused as to which ones are enabled.

Lol well you could in the ENchantments.yml make the lore say "DISABLED"

ok then haha

I'll recompile and upload

can I completely delete the entry in the enchantment.yml though? Got to go lunch now, if I get any more errors I'll report them haha

That probly your problem. U cant remove it from the Enchantments.yml because thats what the error looks like its from. Dont remove it from that.

ok then :D thanks


CQL fromJson(null) throws NullPointerException

JIRA 13891 - CQL fromJson(null) throws NullPointerException

This will likely never get merged as we are not supporting 2.2 anymore.


Session caching cannot work with locmem backend

I am just curious. Is this the limitation with django or only with saleor?
From django doc, I didn't find any hints which imply that locmem can not work with cached_db in sessions.
THANKS.

It cannot work when you have multiple workers (which is a typical production setup). As worker processes cannot share memory you end up with one cache per worker and no way to ensure cache is properly propagated and invalidated across the entire application. A typical symptom is that users only appear to be logged in on every n-th request.

@patrys Thanks a lot for your quick and clear explanation :+1:
So we should use non-cached session or cached session with non-local cache backend.


Question about app-router-get-server-session example.

Hi, I have a question about app-router-get-server-session example.
Based on the next-auth docs, it is required to pass the options to getServerSession. In the example we are not passing anything and still get the session. I'm a bit confused why it works.
In addition, we cannot really pass options since we need to wrap options with handler(req, ctx). Can you please direct me to some sources I can read to understand it or explain it? 🙏

Ok, I think I started to understand.
So in context of RSC, I should use it like this, right?
getServerSession(getAuthOptions())

I was worried that we need to pass request to forward it to SteamProvider.
But getServerSession doesn't care about providers, it cares about the callbacks.

Hi, I have a question about app-router-get-server-session example.
Based on the next-auth docs, it is required to pass the options to getServerSession. In the example we are not passing anything and still get the session. I'm a bit confused why it works. In addition, we cannot really pass options since we need to wrap options with handler(req, ctx). Can you please direct me to some sources I can read to understand it or explain it? 🙏

getServerSession(getAuthOptions())


stdlib :: assert_private

https://github.com/danzilio/puppet-letsencrypt fails on this error:
Unknown function: assert_private

Can you implement this method easily ?
ruby code:
https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/parser/functions/assert_private.rb

This is horrible :(
I suppose this could be done. I am unfortunately quite busy for the next two weeks so I won't be able to work on it quickly ...
If you want to try your hand, all data should be in the "scope" field of the state.

I just pushed a tentative implementation. Does it work for you?

It doesn't complain anymore about the unknown function.
I tested with a class (using include) which contain the assert_private outside the module and language-puppet and it complains.
Thank you !


Materialize Dropdown Rendering issue / mousevent

Issue
Materialize dropdown component not select on mousevent.
Steps to reproduce:

Hit http://angular2-materialize.surge.sh/#/Dropdown directly on the browser or from the left menu.
Try to change dropdown value and you will not see update value in dropdown 'DROP ME' area.

Expected: The select drop down value should be updated immediately.
Any help is highly appreciated.
Same behavior is happening with select on my local app.

Can't reproduce


[RFC] Removing the Propel Singleton

Hi guys,
As we are moving to version 2, I think we should remove the Propel singleton and probably rename it to PropelRegistry like for the Doctrine ORM. That's way we can use an instance of PropelRegistry (or Propel\Registry) to store DatabaseConnection objects, configuration and so on.
If we have such a Registry class without any static methods, we will be able to inject it in any dependency injection containers (Pimple, Symfony DIC, ZF2 DIC...)
Are you in favor of that?

Ping @fzaninotto

What happens if you don't use a dependency injection system ?
A lot of Propel users don't use this kind of stuff, and we have to build Propel2 for them as well.
To remove the singleton is a good idea anyway.
Le 22 oct. 2011 à 13:05, Hugo<EMAIL_ADDRESS>a écrit :

Hi guys,
As we are moving to version 2, I think we should remove the Propel singleton and probably rename it to PropelRegistry like for the Doctrine ORM. That's way we can use an instance of PropelRegistry (or Propel\Registry) to store DatabaseConnection objects, configuration and so on.
If we have such a Registry class without any static methods, we will be able to inject it in any dependency injection containers (Pimple, Symfony DIC, ZF2 DIC...)
Are you in favor of that?
--
Reply to this email directly or view it on GitHub:
https://github.com/propelorm/Propel2/issues/22

What happens if you don't use a dependency injection system ?

That does not change anything for them, they will have to instance this class by themselves and initialize the object. But we should really remove these global static accesses to the Propel object.

I'm ok with that.
Le 22 oct. 2011 à 16:16, Hugo<EMAIL_ADDRESS>a écrit :

What happens if you don't use a dependency injection system ?

That does not change anything for them, they will have to instance this class by themselves and initialize the object. But we should really remove these global static accesses to the Propel object.
--
Reply to this email directly or view it on GitHub:
https://github.com/propelorm/Propel2/issues/22#issuecomment-2490217

Big -1 for me. Most generated Propel methods look that way:
<?php
public function doStuff(PropelPDO $con = null)
{
  if (null === $con) {
    $con = Propel::getConnection(FooPeer::DATABASE_NAME);
  }
  // rest of the stuff
}

This offers two benefits:

If the user wants to use a custom connection class, she can pass it as an argument (no need for Dependency injection container there)
Otherwise, and that's the default behavior, Propel will guess the default connection based on configuration.

So the current solution is both easy to use and customizable. Your proposal is just customizable, it's NOT easy to use.  It's a bad idea to transpose that to Propel.

I agree with you François that the actual implementation makes the code easy to use and it's a pragmatic solution. But it makes the code more coupled to the Propel class and less easier to test. I can't see a real difference (in terms of simplicity) between both two solutions below:

The actual one
public function doStuff(PropelPDO $con = null)
{
if (null === $con) {
$con = Propel::getConnection(FooPeer::DATABASE_NAME);
}
// rest of the stuff
}

A new one, cleaner, that forces you to get the connection from outside the object:
// My controller for example
$con = Propel::getConnection(FooPeer::DATABASE_NAME);
$obj = new Foo();
$obj->setBar('baz');
$obj->doStuff($con);
// My business object method
public function doStuff(PropelPDO $con = null)
{
// do only the stuff
}

The impact on the final user code is not relevant. And it will also force people to write cleaner code. We don't need the complexity of Doctrine due to the Data Mapper implementation. The Active Record implementation is simple enough but it can be improved to provide a better code.
That's just my point of view :)

I can't hear anymore all these ideas about the Propel code being less testable. Just look at how many tests we have and how we develop, it's just plain wrong. As for the coupling, once again it's not true, since the user can pass a custom connection object.
The key difference between the current implementation and the one you suggest is a shift between "can pass the dependencies" to "must pass the dependencies".
As for better code quality, look again at all the derivatives you have to put in place to avoid a single registry (DIC, event listeners, services, etc). I am pretty sure that the supplementary code implied by that is also a supplementary cost, and a risk for errors.
Lastly, Propel aims for RAD. "convention over configuration" is one of the consequences of this fundamental choice.
Le 22 oct. 2011 à 23:38, Hugo<EMAIL_ADDRESS>a écrit :

I agree with you François that the actual implementation makes the code easy to use and it's a pragmatic solution. But it makes the code more coupled to the Propel class and less easier to test. I can't see a real difference (in terms of simplicity) between both two solutions below:

The actual one
public function doStuff(PropelPDO $con = null)
{
if (null === $con) {
$con = Propel::getConnection(FooPeer::DATABASE_NAME);
}
// rest of the stuff
}

A new one, cleaner, that forces you to get the connection from outside the object:
// My controller for example
$con = Propel::getConnection(FooPeer::DATABASE_NAME);
$obj = new Foo();
$obj->setBar('baz');
$obj->doStuff($con);
// My business object method
public function doStuff(PropelPDO $con = null)
{
// do only the stuff
}

The impact on the final user code is not relevant. And it will also force people to write cleaner code. We don't need the complexity of Doctrine due to the Data Mapper implementation. The Active Record implementation is simple enough but it can be improved to provide a better code.
That's just my point of view :)
--
Reply to this email directly or view it on GitHub:
https://github.com/propelorm/Propel2/issues/22#issuecomment-2492865

I have the same opinion as @fzaninotto, we should stay simple.
DIC is great in Symfony2, that's why propel should have solution for that but we shouldn't drop the "Magic" or "automatic" part.
this is useless code if you don't want to set a "special" connection not already setup in Propel configuration
<?php
// My controller for example
$con = Propel::getConnection(Foo::DATABASE_NAME);
// or
$con = $propel->getConnection(Foo::DATABASE_NAME);

@hhamon help people writting  cleaner code is a good thing, but force them to write 10 lines of code instead of one, will not help them to have cleaner code.
your exemple  with your point of view:
<?php
// My controller for example
$propel = $this->container->get('propel_registry_service');

$con = $propel->getConnection(Foo::DATABASE_NAME);

$obj = new Foo();
$obj->setBar('baz');
$obj->doStuff($con);

// My business object method
// Generated
public function doStuff(PropelPDO $con)
{
    // do only the stuff
}

your exemple  with actual code:
<?php
// My controller for example
$obj = new Foo();
$obj->setBar('baz');
$obj->doStuff();

// My business object method
// Generated
public function doStuff(PropelPDO $con)
{
    if (null === $con) {
        $con = Propel::getConnection(FooPeer::DATABASE_NAME);
    }
    // rest of the stuff
}

and the best part is that your exemple is also compatible with actual code.

DI is a trend but current implementation is not just as good as it is said.
Retrieving object from container means that you know absolutely nothing about it, neither does your IDE.
Also in 90% of usages 1 connection is enough.

Just to clarify: that's not 100% true, @DavertMik. For example, the compiled Symfony2 DI Container generates docblock comments with @return annotations, so every IDE would be able to know what is returned (as long as you use ->getConnection() instead of ->get('connection')) and so would you. Propel2 could simply recommend this kind of usage as a best practice, nobody will be confused.

@DavertMik this is not a trend and I don't say we need a DIC for Propel. I was just saying we should pass the connection object explicitly to the object and avoid the Propel::getConnection() magic...

@pminnieur   Thanks, for update on DIC. I didn't know how it's made in Sf2
@hhamon Propel::getConnection magic is good to be refactored, but good point for any software is to be a smart as possible. If we can guess the connection, we better try to do this.

I think there's no smart way to solve this. If you take a look at Doctrine2, any approach of ActiveRecord (let it be Francios experiment, or Doctrator/Mondongo - you will need some kind of static registry to retrieve the connection. But I would like to see that this registry is the only singleton/static getter in Propel2.

@willdurand, can we conclude?

Not on the roadmap, so consider rejected. We have a lot of work on ever discussed ideas.