coerce_numbers_to_str can cause unicode decode errors

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
Hi! I just upgraded pydantic version and was testing passing a string like 'hi there!\ud835' which contains an unpaired unicode character to a model with coerce_numbers_to_str=True and saw a unicode error. When I changed it to False it went away.
I'm not sure whether this should/shouldn't throw an error, but I think the behavior should be more consistent.
Example Code
from pydantic import BaseModel, ConfigDict

class ModelWithCoercion(BaseModel):
     x: str
     model_config = ConfigDict(coerce_numbers_to_str=True)

class ModelWithoutCoercion(BaseModel):
     x: str

# Ok
ModelWithoutCoercion(x='hi there!\ud835')

# Also Ok
ModelWithoutCoercion(x=b'hi there!\ud835')

# Also Ok
ModelWithCoercion(x=b'hi there!\ud835')

# Error
ModelWithCoercion(x='hi there!\ud835')

Python, Pydantic & OS Version
pydantic version: 2.9.2
        pydantic-core version: 2.23.4
          pydantic-core build: profile=release pgo=false
                 install path: /Users/aagam.dalal/Library/Caches/pypoetry/virtualenvs/egp-api-backend-YxsoG3qx-py3.11/lib/python3.11/site-packages/pydantic
               python version: 3.11.5 (main, Sep 11 2023, 08:31:25) [Clang 14.0.6 ]
                     platform: macOS-14.3.1-arm64-arm-64bit
             related packages: fastapi-0.115.2 mypy-1.12.0 typing_extensions-4.12.2
                       commit: unknown

Looks like a bug, though not high priority. PRs welcome with a fix!

Hi there
is it ok if I take this issue?

The error was because when coerce_numbers_to_str enabled then StrConstrainedValidator was used
StrConstrainedValidator - converts Python string to Rust string which return error if Python string has invalid unicode character.
My PR will fix if only coerce_numbers_to_str enabled - instead of using StrConstrainedValidator it is better to use StrValidator
But if something else is used: min/max length, to_lower, to_upper, strip_whitespace or pattern then we will see the same error, but I hope it is expected

pydantic 2.10 released
So I think it is better to close this issue
fyi: @sydney-runkle

pydantic 2.10 released
So I think it is better to close this issue
fyi: @sydney-runkle


Submit occurrence form if needed when saving enrolment form data

Description :sparkles:

Submit also occurrence form when using save button for enrolment info form

Also submit occurrence form when navigating to publish page if occurrence form is valid and filled

Disable submit button on main event form when clicked and requests are pending

Issues :bug:
Closes :no_good_woman:
PT-1047:
Related :handshake:
Testing :alembic:
Automated tests :gear:
Manual testing :construction_worker_man:
Screenshots :camera_flash:
Additional notes :spiral_notepad:

Codecov Report

Merging #199 (c3428ca) into master (3b55d22) will increase coverage by 0.16%.
The diff coverage is 96.22%.

@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
+ Coverage   82.59%   82.76%   +0.16%
==========================================
  Files         207      208       +1
  Lines        3671     3701      +30
  Branches     1131     1136       +5
==========================================
+ Hits         3032     3063      +31
+ Misses        612      611       -1
  Partials       27       27

Impacted Files
Coverage Δ

src/domain/event/eventForm/EventForm.tsx
97.61% <ø> (ø)

src/test/CreateOccurrencePageTestUtils.ts
96.20% <ø> (ø)

...rrence/occurrencesFormPart/OccurrencesFormPart.tsx
93.15% <66.66%> (-1.30%)
:arrow_down:

...domain/occurrence/OccurrencesFormHandleContext.tsx
90.90% <90.90%> (ø)

src/domain/event/CreateEventPage.tsx
82.97% <100.00%> (+0.37%)
:arrow_up:

src/domain/event/EditEventPage.tsx
83.82% <100.00%> (+0.24%)
:arrow_up:

src/domain/event/EventSummaryPage.tsx
83.58% <100.00%> (ø)

...ain/event/eventForm/useEventFormSubmitRequests.tsx
92.30% <100.00%> (+0.64%)
:arrow_up:

src/domain/occurrence/CreateOccurrencePage.tsx
82.26% <100.00%> (+1.95%)
:arrow_up:

src/domain/occurrence/utils.ts
86.11% <100.00%> (+0.39%)
:arrow_up:

... and 2 more

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 3b55d22...c3428ca. Read the comment docs.


tmuxp crashs on first start with Tmux 2.1

Hello
i have problem tmuxp on start with tmux 2.1
λ VIDIA ~ → pdb
(I) [04:10:33] tmuxp.cli cli.load_workspace():270 Loading /home/byaruhaf/.tmuxp/pdb.yaml.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tmuxp/cli.py", line 271, in load_workspace
    builder.build()
  File "/usr/local/lib/python2.7/dist-packages/tmuxp/workspacebuilder.py", line 114, in build
    'session_name': self.sconf['session_name']
  File "/usr/local/lib/python2.7/dist-packages/tmuxp/util.py", line 191, in findWhere
    return self.where(attrs)[0]
  File "/usr/local/lib/python2.7/dist-packages/tmuxp/util.py", line 222, in where
    return list(filter(by, self.children))
  File "/usr/local/lib/python2.7/dist-packages/tmuxp/server.py", line 166, in sessions
    return self.list_sessions()
  File "/usr/local/lib/python2.7/dist-packages/tmuxp/server.py", line 160, in list_sessions
    Session(server=self, **s) for s in self._sessions
  File "/usr/local/lib/python2.7/dist-packages/tmuxp/server.py", line 151, in _sessions
    return self._list_sessions()
  File "/usr/local/lib/python2.7/dist-packages/tmuxp/server.py", line 124, in _list_sessions
    raise exc.TmuxpException(proc.stderr)
TmuxpException: [u'error connecting to /tmp/tmux-1000/default (No such file or directory)']

when i start tmux with the tmux command directtly
then start tmuxp all works okay.

Error fixed after upgrade of tmuxp, closing issue.


feat: add dynamodb table and provider for tag and path revalidation

This diff adds the DynamoDB table and supporting data provider function to support Next.js path and tag revalition. This feature is supported by open-next (read more about it here: https://open-next.js.org/inner_workings/isr#tags) and is inspired by https://github.com/sst/sst/compare/v2.27.0...v2.28.0
The changes include

Adding a new DynamoDB table which stores time stamps, tags, and paths for revalidation consideration
Adds a function (dynamodb-provider) which populates the DynamoDB table on deployment with the initial set of tags / paths / timestamps generated in the Next.js build phase
Bumps aws-cdk-lib to 2.95.1, matching the SST version for access to DynamoDB.TableV2
Adds a simple description to the "primary" server handler

A bit more info:
Bump of aws-cdk-lib 2.95.1
I did this because SST uses the DynamoDB TableV2 construct and I thought it would be best to match.
Description of ServerFunction
I added a description because at least for me the function names end up mangled (I actually think it’d be great to clean these up, but I frankly don’t know the best practice here from IaC / AWS perspective) and it’s nice to be able to easily identify different functions, in particular the server handler, in the AWS console for debugging.
Non breaking change, but…
From what I can tell this is a non-breaking change, however this brings me back to a general question about how we should be managing versions and default open-next build commands… SST uses 2.2.1 as the default version of open-next in the build command.
#143

I'm marking this as a draft as I need to figure out if it's actually fully working (e.g. the expected functionality is working), and also importantly make sure it's safe to land this if somebody is using an older version of open-next (e.g. whatever the current default open-next build command is).
It is at least "working" in that the table is created on deployment, and data is making it's way into the table (see screenshot)

I'm also not sure if there are issues / concerns with me bumping the aws cdk version. From what I can tell it's not creating any issues, but that's based on my fairly unscientific testing.
FYI @bestickley :)

So this is working in the following ways:

The initial "dynamodb-provider" is writing to the DynamoDB table on deployment - to me this is a sign that the basic wiring of the table is correct and that communication with the table is possible
Making a GET request to /api/revalidate from the https://github.com/vercel/app-playground/blob/main/app/api/revalidate/route.ts Vercel App Playground will trigger writes to the DynamoDB table, a good indication I believe that the wiring between the server handler and the DynamoDB table is good / working

THAT SAID, I'm not actually sure that the revalidation feature is working, but I'm not sure it's not user error on my part.
I added a simple page in /app/isr/cdkstandalone/600sec that looks like this:
export const revalidate = 600;

export default function Page() {
  return (

600 second ISR config

      Rendered at {new Date().toISOString()}

  );
}

Then I deployed the app, and then made an API request to
/api/revalidate?path=/isr/cdkstandalone/600sec - I can see this is hitting the server in the logs, but as far as I can tell it's not actually triggering the route to be revalidated. This could be user error on my part.
To put this another way, this looks like it's working from the perspective of the DynamoDB table that I added, but I'm not sure it's actually working, or very possibly I'm misunderstanding something.
Regardless I think this is officially ready to review, but I would appreciate any input on the above or I'll spend more time looking into the actual open-next implementation to see what I might be missing or what I should be expecting. I need to check the actual DynamoDB query to see if something is wrong there, I noticed in the DDB table there is a prefix (a deployment hash or something?), perhaps something is going wrong there.

@kevin-mitchell, to answer your question I think you should see the DDB table update if the revalidateAt value is greater than the LastModified from S3.
From docs:

When revalidateTag is called, we update the revalidatedAt value for each path and subpath associated with this tag.

When we check if a page is stale, we check the revalidatedAt value for each record and the LastModified of this S3 cache objects . If revalidatedAt is greater than LastModified, we consider the page is stale.

Based on your test page above, I don't think that will work. Don't you need to use fetch with the special next.tags prop? See docs here. How I would test this is call fetch("...", { next: { tags: ["my-tag"] } }) with some API that returns a date, and then keep refreshing page until the export const revalidate = 600; time has been reached and monitor DDB table throughout. I will try to get to it this week.

@bestickley I believe the "tag" in this case would be the URL - I don't think fetch needs to be used. And by this I mean I'm 100% sure there are entries in the dynamodb table, the tag is just derived from the path.

That said... I'm still not at all confident that I understand what the expected behavior is here. Even with this change, according to https://open-next.js.org/common_issues/isr#on-demand-revalidation (and this is semi-obvious I guess), the CloudFront cache needs to be cleared before you'd be able to see the results of calling revalidateTag or revalidatePath on the frontend.
If I manually invalidate the CloudFront cache, I'm seeing the static version of the page (in S3) regenerated regardless of whether or not the revalidatePath/Tag has been called or not. Leaving me to wonder what a good way of evaluating whether or not this is actually working is.
Also, I'll rebase this branch on top of your changes. I'm actually out this week so am a bit slow to respond, but hopefully with fresh eyes on Monday (or with any wisdom you might have!) this should be easy to clear up.

Regardless of what "tag" is in DDB table, have you read the Next.js docs on revalidateTag? Look in the parameters section and see how it says:

tag: A string representing the cache tag associated with the data you want to revalidate. Must be less than or equal to 256 characters.

And demo usage is using fetch. So in order to test, we need to use that function. If you haven't, please read the Next.js Caching Docs. The caching we're working on is specifically the Data Cache.
In your test page (/app/isr/cdkstandalone/600sec), that is only showcasing Time-based revalidation I think. This feature is about On-demand Revalidation.
With that said, I'm confused that there aren't any tags in your DDB table. However, you're not creating any since you're not using fetch with a tag parameters. There is also the revalidatePath function so maybe in that case open-next's ddb revalidate function just uses the tag partition key to add the path. (If I were them I would have used generic pk for partition key and sk for sort key so it's less confusing.)
So could you try testing with that context? Please let me know if anything doesn't make sense. TBH, I don't have much experience with revalidateTag or revalidatePath but this is based off my research.

@bestickley

With that said, I'm confused that there aren't any tags in your DDB table. However, you're not creating any since you're not using fetch with a tag parameters...

Sorry I might have been unclear here specifically - there are many tags and paths in DDB:

These seem to be generated both by page views as well as actually directly using fetch. I had (wrongly?) assumed that the  open-next cache handler (specifically around this area of the code) would work the same for either pages or fetch data, in the end I figure the logic was "check in S3 for object, if DDB revalidatedAt tag / path matches condition then refetch the page, else server the version from S3". I'm still not sure that's not the case frankly, BUT I went ahead and used fetch as it is certainly most clear given the tag is directly supplied.
From what I can tell this is working well.
I recorded a short "sanity check" for myself talking through the steps I took to actually test / confirm things are working, video is here if you care to listen to me ramble :).
I will (Monday) play around with this a bit more and with fresh eyes actually step through the open-next code to see how the execution path is different for fetch vs page cache (because to reiterate, without using fetch, normal page views still generated tags, e.g. <deploymentkey>/whatever/page/path... as a tag in DDB.
Still overall I think this is probably ready to go from a functionality perspective.

OK I spent a bit more time today looking at this. One thing I'm fairly certain of is that the revalidate functionality works perfectly fine for ISR page cache, not just fetch. I tested this and confirmed it works with the app router. I can make a simple page, without using fetch, export revalidation = 600, confirm that the page is cached and step through the debug logs to confirm that the version of the page in _cache is being served when I invalidate the CloudFront cache, and then confirm I can change this behavior by manually calling the revalidatePath function with the matching path.

One thing I'm less certain of and am questioning (though to be clear I don't think the scope of this PR should get expanded here, just something I noticed), is using the App router specifically how static site generation is intended to work, or if it's frankly even a feature of Next.js (see this post on reddit.
When we deploy with cdk-nextjs, the build cache files end up in <s3 bucket>/cache (controlled by NEXTJS_CACHE_DIR). But I'm not seeing those files ever being served. So if for example I have this page:
// <nextjs root>/app/1norevalidatekam/page.tsx
export default function Page() {
  return (

NO REVALIDATE

      Rendered at {new Date().toISOString()}

  );
}

I would expect (correct?) that the page generated at build time would be served. At least that's what I'd think would happen.
Instead, it seems like the cache handler checks for the page in _cache (note the underscore), defined in our constant CACHE_BUCKET_KEY_PREFIX.
I've read (and re-read) https://open-next.js.org/advanced/options#reusing-same-bucket-for-asset-and-cache and to me it seems like the _cache and cache directory should be the same thing? That way the original cache files are build time are used by the cache system, vs (as far as I can tell) not used at all?
(it's possible I'm missing something with a CloudFront original or something that is making a distinction between these in a way that would require they be separate folders in S3)

Thanks for creating a separate issue and PR for caching issue. Wonderful video. Clearly demonstrates this feature working. I'll merge once you resolve last comment.


Specify the correct secret to use in config

The current VSTS application settings page is very confusing and now has an "App Secret" and a "Client Secret".  This demo only works if you use the Client Secret.  If you use the "App Secret" you will get a 400 Bad Request when requesting the access token.
Probably the best thing to do would be rename the web config setting to Client Secret to make this abundantly clearer.

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


Use AdvancedMH

This PR removes Turing's original Metropolis-Hastings algorithm and replaces it with the StaticMH variant from AdvancedMH.jl. There's still a couple things left to do, but for the most part it's functioning if you don't use it as part of Gibbs sampling.
Tests are not going to pass until I push some stuff upstream to AdvancedMH.
I have also added in a couple of things to keep up with AbstractMCMC's recent developments, namely, the ability to select the type of chain you want to receive at the end of sampling. You can now request chain_type = NamedTuple to get a vector of NamedTuples, or chain_type=Vector which returns the raw Transition objects, especially if you are annoyed by the slowness of MCMCChains.
Todo

[x] Make it work
[x] Fix Gibbs sampling
[x] Allow custom proposals in the same way that the original implementation did
[x] Test expansion
[x] Rebase
[x] Remove old MH code

Speed
Currently, the performance of the AdvancedMH implementation is slightly improved over the vanilla version for small sample sizes. Using the classic Turing toy model:
using Turing
using BenchmarkTools
using Random

Random.seed!(1234)

@model gdemo(xs) = begin
    s ~ InverseGamma(2,3)
    m ~ Normal(0, s)

    for i in 1:length(xs)
        xs[i] ~ Normal(m, s)
    end
end

data = rand(Normal(0,1), 30)
model = gdemo(data)

N = 10_000

sampler_new = MH()
b_new = @benchmark chain_new = sample(model, sampler_new, N)

sampler_old = Turing.Inference.MHOld()
b_old = @benchmark chain_old = sample(model, sampler_old, N)

AdvancedMH:
  memory estimate:  88.65 MiB
  allocs estimate:  1981221
  --------------
  minimum time:     82.960 ms (14.52% GC)
  median time:      98.216 ms (23.36% GC)
  mean time:        99.338 ms (20.38% GC)
  maximum time:     115.144 ms (25.57% GC)
  --------------
  samples:          51
  evals/sample:     1

Vanilla MH:
  memory estimate:  106.01 MiB
  allocs estimate:  3572170
  --------------
  minimum time:     121.415 ms (15.52% GC)
  median time:      131.936 ms (16.37% GC)
  mean time:        133.293 ms (15.98% GC)
  maximum time:     149.723 ms (16.84% GC)
  --------------
  samples:          38
  evals/sample:     1

If you increase the sampled data size from 30 to 300, the gains are a lot more significant:
AdvancedMH:
  memory estimate:  88.71 MiB
  allocs estimate:  1984461
  --------------
  minimum time:     104.611 ms (11.88% GC)
  median time:      119.269 ms (19.72% GC)
  mean time:        119.940 ms (16.65% GC)
  maximum time:     137.361 ms (20.06% GC)
  --------------
  samples:          42
  evals/sample:     1

Vanilla MH:
  memory estimate:  395.08 MiB
  allocs estimate:  19788228
  --------------
  minimum time:     455.833 ms (12.88% GC)
  median time:      480.949 ms (14.12% GC)
  mean time:        483.483 ms (14.21% GC)
  maximum time:     533.009 ms (14.52% GC)
  --------------
  samples:          11
  evals/sample:     1

Test failures are due to bounds on DynamicPPL, which doesn't allow AbstractMCMC 0.3.
The PR here needs to go through with a release for this to clear. I'll fix the test failures in DynamicPPL where I can tomorrow.

This is ready for a formal review by everyone. The only thing that has not made it over is support checking for custom proposals -- I haven't found a good procedure yet to handle this automatically. My preferred method would be to have transforms between R and R+ or whatever when generating proposals for constrained distributions. I'm open to suggests on this, but for the moment I've changed the tests so that they use static proposals for constrained distributions.

Ready to merge from my side once the tests pass.

I'll have to comb through all these test failures. None of then were occurring on my local build, so this'll be fun.

Looks like tests are passing! Should be good to merge for now.

Great work, thanks @cpfiffer!


Reid

(Squash and Merge in this case, to not include the commit with added binary)

No idea how to add this bin as LFS instead - so removed the branch.


Allow to use FetchContent to get CPM

it would be easier to recover if download fails etc..

Maybe worth making an install() and find_package as well?

You do not use FetchContens?

@flagarde please use cmake-format -i CMakeLists.txt

About the cmake-format. How about adding it via pre-commit: https://github.com/Takishima/cmake-pre-commit-hooks

@ClausKlein done

About the install() andfind_package suggestion. This will make it possible to include this as a repository package, e.g. in FedoraProject.
About the pre-commit, these can also add commits directly in the PR.

@LecrisUT find_package could be nice for the install maybe the consumer just want to use it and not install it but it should be possible to have option to include to ALL or not

Sorry to bother you, but this does not work in each use cases of FetchContent:
FetchContent_Declare(_cpm URL https://github.com/cpm-cmake/CPM.cmake/archive/refs/tags/v0.37.0.zip)
FetchContent_MakeAvailable(_CPM)
add_subdirectory(${_cpm_SOURCE_DIR} CPM)

I have applied your patch to this source dir:
bash-3.2$ pwd
/Users/clausklein/Workspace/cpp/ModernCmakeStarter/build/user/_deps/_cpm-src
bash-3.2$ cat CMakeLists.txt
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)

find_package(Git REQUIRED QUIET)

project(CPM LANGUAGES NONE)

if(GIT_EXECUTABLE)
  # Generate a git-describe version string from Git repository tags
  execute_process(
    COMMAND ${GIT_EXECUTABLE} tag --points-at HEAD
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    OUTPUT_VARIABLE CURRENT_CPM_VERSION
    RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
    OUTPUT_STRIP_TRAILING_WHITESPACE
  )
  if(NOT GIT_DESCRIBE_ERROR_CODE AND NOT CURRENT_CPM_VERSION STREQUAL "")
    string(SUBSTRING ${CURRENT_CPM_VERSION} 1 -1 CURRENT_CPM_VERSION)
  else()
    set(CURRENT_CPM_VERSION 1.0.0-development-version)
  endif()
endif()

include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/CPM.cmake")
bash-3.2$ git tag --points-at HEAD
v0.1.0
bash-3.2$ git remote -v
origin  git@github.com:ClausKlein/ModernCmakeStarter.git (fetch)
origin  git@github.com:ClausKlein/ModernCmakeStarter.git (push)
bash-3.2$

NOTE: this is the tag of my repo!

I see. I guess it is because there is no .git on the downloaded repo' so the git program try to find one and goes up in the folder hierarchy and then found the .git in your repo that I imagine is v0.1.0.
I think I can fix this checking of there is a .git on the source directory. If not i could parse the url and extract the version
What do you think of this fix?
I was thinking for git repo people would us the GIT_TAG command not the URL. But yes I should consider this option too

I think it will be safer to provide the CPMConfigVersion.cmake and CPMConfig.cmake and use native cmake logic

@LecrisUT I agree

Ak no sorry, that will not help with ExternalProject, just find_package. It might help with downloading cpm from cpm ironically.
For ExternalProject it would be better for now to have a copy of the version hard-coded into project(). For the long run I think we should convert CPM.cmake to a .in file, provide the generated version on github release, and point get_cpm to those (last part should already be the case).

@LecrisUT @ClausKlein Based on our conversations I created a better solution (I think ...). Please have a look on #446. It should work with GIT_TAG and URL and have and install option for people who want to install it on there system and use 'find_package(CPM)'

@LecrisUT @ClausKlein Based on our conversations I created a better solution (I think ...). Please have a look on #446. It should work with GIT_TAG and URL and have and install option for people who want to install it on there system and use 'find_package(CPM)'

@flagarde Is this PR good to close now considering the new approach exists?


Gobblin Metrics race condition results in metric reporter failing to start

@ibuenros There is a race condition in the Gobblin Metrics initialization of ScheduledReporter.  The problem is the order of the following lines:
public ScheduledReporter(String name, Config config) {
    super(name, config);
    this.executor = Executors.newSingleThreadScheduledExecutor(
        ExecutorsUtils.newDaemonThreadFactory(Optional.of(log), Optional.of("metrics-" + name + "-scheduler")));
    ...

The following stack show the problem:

ScheduledReporter.init<>()
ContextAwareReporter.init<>()
RootMetricContext.addNewReporter()
ContextAwareReporter.start()
ScheduledReporter.startImpl()

At this point, ScheduledReporter.startImpl() attempts to use this.executor and finds that it has not been initialized.
this.scheduledTask = Optional.<ScheduledFuture>of(this.executor.scheduleAtFixedRate(new Runnable() {
  @Override public void run() {
    report();
  }
}, 0, this.reportingPeriodSeconds, TimeUnit.SECONDS));

Good catch. Looks like this will only come up if RootMetricContext.addNewReporter is invoked after startReporting is invoked (because of the flag RootMetricContext.reportingStarted), which is probably why we have never seen this before. Should definitely be fixed because we should be able to add reporters even after reporting has started.

Fixed in https://github.com/linkedin/gobblin/pull/747

@kadaan re-opening this because #747 is causing a FindBugs warning to be triggered:
File: ScheduledReporter.java, Line: 109, Type: DC_DOUBLECHECK, Priority: Normal, Category: CORRECTNESS
Possible doublecheck on gobblin.metrics.reporter.ScheduledReporter.metricFilter in gobblin.metrics.reporter.ScheduledReporter.ensureMetricFilterIsInitialized(Config)

This method may contain an instance of double-checked locking.  This idiom is not correct according to the semantics of the Java memory model.  For more information, see the web page http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html.

I think the solution is to add synchronized to the method ensureMetricFilterIsInitialized

Fixed in https://github.com/linkedin/gobblin/pull/771


restic to minio:sia backend panic runtime error: slice bounds out of range

Copy of the issue logged here -> https://github.com/restic/restic/issues/1204

Bug in restic, that should now be resolved.

Some bugs removed and final issue is a server side failure, log here -> http://safe.dsh.re/download/eb30a7be-2142-4271-a6ce-4d96bfd4a901


make save_pretrained do the right thing with added tokens

right now it's dumping the decoder when it should be dumping the encoder. and then (for obvious reasons) you get an error when you try to load "from_pretrained" using that dump.
this PR fixes that.

Codecov Report

Merging #893 into master will not change coverage.
The diff coverage is 0%.

@@           Coverage Diff           @@
##           master     #893   +/-   ##
=======================================
  Coverage   79.03%   79.03%
=======================================
  Files          34       34
  Lines        6234     6234
=======================================
  Hits         4927     4927
  Misses       1307     1307

Impacted Files
Coverage Δ

pytorch_transformers/tokenization_utils.py
86.53% <0%> (ø)
:arrow_up:

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 067923d...ae152ce. Read the comment docs.

Indeed, thanks Joel!


Ensure configured taps are tapped before packages are installed.

Before this commit, any formulas in the homebrew_installed_packages list that were from taps would fail to install on a fresh system (or where the taps have yet to be tapped).  For example, using the playbook from https://github.com/geerlingguy/mac-dev-playbook would result in an error as the formula 'brew-cask' cannot be found.

Thanks for finding this! I haven't tested mac-dev-playbook on a fresh OS X VM in a while, so that explains why I haven't seen the error yet!

This is in the 1.2.2 release.

Thanks for these playbooks and writing your book!  One followup comment since I just did a fresh install.  The task 'Ensure homebrew is installed.' on the fresh system would always fail.  I did not know how to resolve this, other than manually (i.e., running git clone for homebrew in /usr/local).  After manually pulling homebrew (and reordering the taps task) the rest proceeded cleanly.

@cthachuk - Ah, you've run into the Ansible 1.8.x issue of the git module's default update behavior changing.
See: https://github.com/ansible/ansible-modules-core/issues/426 and https://github.com/ansible/ansible/issues/8630
If you change update: no to update: yes in that task, the installation will complete correctly. I am counting the days until an Ansible 1.8.3 or 1.9.0 release, which will fix this rather annoying issue :(

@geerlingguy - Thanks!  This makes sense now.


Port to Google cloud

Conditional Execution in Ansible
Is there a variable and value that we can use as a condition which code to execute when running the playbooks?
Is there a module that abstracts out the different cloud vendors?
Built-in facts
(making use of Ansible and jq )
Oracle
[ce16990@mgmt ~]$ ansible -m setup localhost |sed '1c {'| jq '.ansible_facts.ansible_system_vendor'
"QEMU"

Google
[ce16990@ce16990-ansible-test ~]$  ansible -m setup localhost |sed '1c {'| jq '.ansible_facts.ansible_system_vendor'
"Google"

Azure
[ce16990@ce16990-bristol-test ~]$ ansible -m setup localhost |sed '1c {'| jq '.ansible_facts.ansible_system_vendor'
"Microsoft Corporation"

IBM
[root@virtualserver01 ~]# ansible -m setup localhost |sed '1c {'| jq '.ansible_facts.ansible_system_vendor'
"Xen"

AWS
[ec2-user@ip-172-31-36-201 ~]$ ansible -m setup localhost |sed '1c {'| jq '.ansible_facts.ansible_system_vendor'
"Xen"

Looking at the rest of the facts there doesn't appear to be a consistent single parameter that we can use. We could come up with a heuristic to detect the vendor but that feels a bit fragile.
Custom facts
In a whiteboard session with the team from Appsbroker (@geoffnewell, @davidyo, @ab-philburke) David pointed out  that we can define our own local facts
For passing the information in from the terraform we settled on a name csp for Cloud Service Provider and values

Cloud Service Provider
csp value

Oracle
oci

Google
google-cloud

e.g. in the file /etc/ansible/facts.d/citc.fact  adding
{"csp":"google-cloud"}

Results in
[ce16990@ce16990-ansible-test ~]$ ansible -m setup localhost  |sed '1c {'| jq '.ansible_facts.ansible_local.citc.csp'
"google-cloud"


feat(connectivity): Check rds cfg domains for pod-to-url

Depends on functionality implemented in #64.
Signed-off-by: Johnson Shi<EMAIL_ADDRESS>

Depends on #64.

Happy to take a different approach - perhaps let's make this work, then dedupe and reorganize the code base.


Fix the Jasmine tests for the Select All checkbox

Ticket Link
Ticket 1613
List of squashed commits

Change Number to String type

Test Checklist

[x] Exhibits Clear Code Structure:
[x] Project Unit Tests Passed:
[x] Project Jasmine Tests Passed:
[x] Executes Expected Functionality:
[x] Tested For Incorrect/Unexpected Inputs:

It was fixed within the devrc-2-5-0 branch during the backport but must be re-opened as the Jasmine tests needed to be fixed on the main branch as well.


fix(curriculum): Remove unnecessary assert message argument from English Coding Interview Prep challenges - Project Euler - 04

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
[x] My changes do not use shortened URLs or affiliate links.

Related to issue #36400
This PR removes assert message arguments from testString for another 75 Project Euler challenges in the Coding Interview Prep curriculum section.

@moT01 Just realized after removing the double quotes around that testString that the colons were going to cause a problem with the yaml, so I put them back.  This needs to be merged as is.


Closing xml tag not being generated.

My config is
  eleventyConfig.addPlugin(sitemap, {
    sitemap: {
      hostname: hostname,
    },
  });

And my sitemap file is
---
permalink: /sitemap.xml
layout: null
eleventyExcludeFromCollections: true
---
{% sitemap collections.all %}

The result looks great except for it's missing the closing XML tag.  Like this
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
	xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
	xmlns:xhtml="http://www.w3.org/1999/xhtml"
	xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
	xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
	<url>
		...
	</url>
        ...
</urlset>

Any ideas what would cause the missing xml close tag?

Hi @jaunt .
I don't see anything wrong in your example. What do you mean, missing xml close tag?
The <?xml ?> doesn't need closing, if that's what you mean.

Wow, how embarrassing! Sorry about that.  Google was complaining about an error in my site map but now I think it's because there is a blank line at the top of it for some reason.  I naively assumed it was to do with the format.

No worries! Glad you figured it out.


Add empty() to PySet and PyFrozenSet

I needed to initialize an empty set and found out it is currently missing.
This PR adds the empty() helper method for PySet and PyFrozenSet.

I'm not sure why the type annotation is needed.
Any ideas?

Hmm, does we really need this method?
I think we can do it by, say,
let set = PySet::new<&PyAny>(py, &[]).unwrap();

We do if we want to be consistent with PyList.
I'd rather have it than not have it if possible.

Anyway you can fix the compile error by
let set = PySet::empty::<&crate::types::PyAny>(py).unwrap();

Yes but why do we need to specify the type in this case?
It isn't consistent with what we're doing with PyList::empty().

Ah, I see.
Then let's rewrite the method definition to
    pub fn empty<'p>(py: Python<'p>) -> PyResult<&'p PySet> {
        unsafe { py.from_owned_ptr_or_err(ffi::PyFrozenSet_New(ptr::null_mut())) }
    }

I completely missed that I copied the type argument as well.
Thanks.
When we don't set the iterable argument to NULL we don't skip this check:
https://github.com/python/cpython/blob/1f11cf9521114447b3e32e2ac88f075ffaa37555/Objects/setobject.c#L1041-L1046

Thanks for the pull request. IMO we should add empty() mostly because it makes the code more readable. The performance gain for not creating a list first and running through the cpython code linked above is also useful.

@konstin That's even a better point :)

Thanks!


Added option to test reading the glTF sample models

This PR is (probably) not supposed to be merged so soon.
It contains some infrastructure for doing a batch-run and try to read the glTF sample models from the glTF-Sample-Models repo using the CesiumGltfReader.
It reads the model-index.json file from the sample models repo, which contains information about the available sample models and their variants (plain, embedded, binary, draco), and stores that info as some
vector{ name, vector{ variantName, variantFileName } }

structure. These SampleModel objects can then be processed further. (E.g they could be filtered based on the variant or name - right now, the variantsToTest includes all variants)
The current process is that the test simply tries to load the models, and reports when there is any error while doing so.
This is wrapped into a test, as of https://github.com/CesiumGS/cesium-native/compare/gltf-sample-models-read-test#diff-326bf15b729481bb3ceb378fd5463b179c0d85b400a26512257be82e4566f980R6 , but this is not a sensible "unit test", of course: It takes quite a while to read all models, and the question of where the models should be read from remains open.
(Right now, they are read from a local file, with the path essentially being hard-wired in the test case. The option to extend this to read the models from the repo exists, but would require adding some libcurl or so, and that would be really slow...)
This test originally was only intended as a basic litmus test/validation for the reader. Whether or not this (or parts of this) will become "real" tests can be decided later.

Thanks again for your contribution @javagl!
No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?
I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

Thanks again for your contribution @javagl!
No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?
I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

Thank you, cesium-concierge 👍
I appreciate the bumps, but obviously, the work that has been done in this PR is not aligned with the overall priorities. The code in this PR is largely part of a standalone project called cesium-cpp, which uses cesium-native and contains various "integration-level tests" and utilities. Right now, this is a private project, but I'll consider to clean it up and make it public after your next notification.

Yeah, it's not forgotton. Maybe after the next bump 🙄

Thanks again for your contribution @javagl!
No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?
I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

So here we go: https://github.com/javagl/cesium-cpp - nothing important to see there, but now made public in order to finally wrap this up....


[Automation] 1. Issue Reminders

Send reminders about internally mirrored client library repo bugs to improve our ability to meet SLAs.

Fixed.


ERROR:  relation "shares" does not exist

ERROR:  relation "shares" does not exist
To Reproduce
psql (15.1 (Debian 15.1-1.pgdg110+1), server 13.8 (Debian 13.8-0+deb11u1))
sudo -u postgres psql
CREATE TABLE shares_mypool PARTITION OF shares FOR VALUES IN ('radiant_mypool');
ERROR:  relation "shares" does not exist
--When running--
processed: 0 items - remaining: 1 items
[2022-12-03 11:56:37.8203] [W] [ShareRecorder] Retry 1 in 00:00:02 due to Npgsql: PostgresException (23514: no partition of relation "shares" found for row
DETAIL: Detail redacted as it may contain sensitive data. Specify 'Include Error Detail' in the connection string to include this information.)
Expected behavior
No error should occur

This is not a bug. Read the instructions.

I've read the instructions and applied them step by step (2 different times actually) but the error still occurred. Did I miss something? Thank you,


What to do when there's problem with winget?

What to do when there's problem with winget?  Is winget officially supported by Microsoft since the doc page in microsoft.com?  That means we have to contact Microsoft support in case of issue?
It's very unclear on this point.

Hi @cheesecracker - WinGet is the command line interface (CLI) for Windows Package Manager, so it's a part of Windows. What sort of support are you looking for? There isn't dedicated IT support that I'm aware of. We have a troubleshooting page, here: https://learn.microsoft.com/windows/package-manager/winget/troubleshooting and we have a training here: https://learn.microsoft.com/en-us/training/modules/explore-windows-package-manager-tool/?WT.mc_id=AZ-MVP-5004737
Issues with WinGet are typically posted and discussed on the WinGet CLI repo here: https://github.com/microsoft/winget-cli/issues


Find the recorderd file and remove the recorded audio file

I have implemented this module to record microphone, it works fine. But I have got some problems.

Please let me know how to find the recorded file on devices.
The recorded filepath is returned as like this - /data/user/0/com.Example/files/test.aac and I couldn't find this path on my device(Android exactly).
Please let me know if there is any functionality to remove the recorded audio file.
I am trying to make recording audio files and need to delete these owing to lack of disk size.

I was also wondering how to find the files. Can someone give us a hint, please?

+1

On android you cannot access /data without being root. If your device is not rooted you can use adb to make a backup of the app and then you can extract the backup something along these lines:
adb backup -f app.ab com.app.id.whatever
dd if=app.ab bs=24 skip=1 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" > app.tar

There is an option to use openssl instead of python on other systems, but this one worked for me on macOS Sierra. Then you can untar the app.tar file. You can also pipe to tar -xf - instead of piping to a file.

You can provide the path to which you want to write your audio file and then retrieve it via react-native-fs or play it with react-native-sound.
Please check the example here.
If you could also provide a link to a repo that reproduces the issue it would be very helpful to help us help you debug the issue.
Cheers

Thanks. I used adb shell to get the file, it works!


Update electerm to be portable

Update electerm to be portable, add persist directory and rename program name.

Closes #XXXX

Relates to #XXXX

[x] I have read the Contributing Guide.

/verify

Settings and other data is currently stored in AppData\Roaming\electerm so if we switch to the portable version, this will be lost. Could you add a pre_install function similar to bitwarden.json's that copies the relevant data to the electerm folder that gets persisted?

Settings and other data is currently stored in AppData\Roaming\electerm so if we switch to the portable version, this will be lost. Could you add a pre_install function similar to bitwarden.json's that copies the relevant data to the electerm folder that gets persisted?

Added "pre_install".

/verify

/verify

@muxinxy Merge conflict and checkver failure. Please review. Thx!


T5 enable generation optimisation

enable cross kv caching
add on device generation support
enable encoder output buffer

What does this PR do?

Fixes # (issue)
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you make sure to update the documentation with your changes?
[ ] Did you write any new necessary tests?

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


Azure Databases are not listed on the left side

Azure Data Studio Version: 1.31.0
OS Version: Windows_NT x64 10.0.19042

Azure connections It's not listed on the left side, but it's listed on the tab.

Does this issue occur when all extensions are disabled? Yes

LOGS
console.log
LOG.zip

@Alzemand the error is saying the server didn't respond with schema metadata within 45 seconds.  Typically simple DMV queries should respond much quicker than this, and these timeouts are typically an indication of a issue on the server (perhaps heavy-load, slow network, etc.).  We could look at adding a setting to increase this timeout to an arbitrary duration.  The suggested workaround would be to disconnect & reconnect the connection node.

Closing as duplicate of https://github.com/microsoft/azuredatastudio/issues/5173.  Thanks for reporting this issue.


⚠ Bofrost.fr has degraded performance

In ef00c1a, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1213 ms

Resolved: Bofrost.fr performance has improved in 9d92d68.


after spending few days trying to claim my Bitcoin cash

I have a zero balance of my Bitcoin cash in the electron cash
Here is my electrum wallet (I reinstalled it from seed and disabled the 2fa - however I still see the [2fa])

Electron cash

I am having the exact same issue.. observing the same blank electron cash wallet.


Added color contrast checker

Staging: https://164-78596482-gh.circle-artifacts.com/0/tmp/circle-artifacts.Tk0wsdw/packages/core/tests/site/index.html


Nothing is working...

I'm terribly sorry to say this, but everything in this port doesn't work as it should. I'm not sure if it somehow has to do with other mods I have installed, but nothing from the port is craftable, cookable, or even obtainable in survival. The wild crops do spawn, they just don't drop anything. I saw the other report on how they couldn't get cotton to work. I'm terribly sorry if this comes across as very negative, but I wish you the best if you wish to fix these!

game version

it's 1.21.1, sorry

it will be fixed on next version


Feature/hide console

Implemented file sink with process ID in filename, limiting to previous 5 files in another commit.  Disabled release mode console using a generator expression in preparation for multi-config.


Using this Repo for Core i5

Hi @rsdev69
I noticed that you did changes to CPU frequency in the last commits and I want to ask if this will effect me as my laptop have Core i5 CPU?
here is the specs of my CPU:

Notice how Max Turbo Frequency and TPD have differences from you Core i3 CPU specs:

Do I have to change anything to use your Repo for my laptop?
also I asked this question in another issue and I will be glade if you answer me:

I remember that you said you will create a new Repo for your OpenCore configuration, can you please tell me when you will do that?
also does the Trackpad gestures work for you? (like two fingure scroll and four fingers to show all apps)
the Trackpad gestures doesn't work for me :(

Do I have to change anything to use your Repo for my laptop?
Hi @rajolm, you cpu have Turbo Boost and I do not know if it works correctly.
My CPU simple, has only base frequency and work correct SpeedStep.
Try this repo. In that repo laptop with Core i5/i7
OpenCore i don't want to do. For me, no sense to do it, since everything works correctly.
Trackpad in laptop ELAN, right kext for Mojave and Catalina i do not know. Other kext work not correct. To emulate swipe, can be used SmartScroll app.


Support flake8-class-attributes-order

Hello,
Is there a plan to support this flake8 extension?
https://pypi.org/project/flake8-class-attributes-order/
Originally posted by @WorkHardes in https://github.com/charliermarsh/ruff/issues/106#issuecomment-1347928865

[ ] CCE001: Wrong class attributes order (XXX should be after YYY)
[ ] CCE002: Class level expression detected

Any decisions on this? It would be an awesome addition

This one's hard to implement and can generally be unsafe. We don't have plans to implement it soon. Now that we unsafe fix support it might be more reasonable.
cc @AlexWaygood this kind of thing may be worth considering in categorization.
Related https://github.com/astral-sh/ruff/issues/3946

I think auto-fixing isn't even the feature request here - although certainly a nice bonus.
Just having the detection capability would be great.
Does your argument only apply to the fixing part or do you also consider the detection hard to implement?

+1 to this, would be awesome to have it! I think almost any Python project defines many classes, hence having a consistent order of attributes is critical.

+1, even having the capability to detect inconsistencies without having an auto-fix as such would be great!


Escape characters so regex creation doesn't fail

Fixes #3642
When we attempted to create a RegExp, if the sprite had been generated with an ID that contained reserved regex symbols, this would fail. This fix aims at escaping all these special characters.
It was tested using https://github.com/eanders-MS/palette-sprite project.

(for reference / making sure there's a backref to this pr the issue is microsoft/pxt-arcade#3642 vs the one in this repo)

Nice! I didn't know we already had that helper, good to know for the future~

Neither did I but when I went to implement it the util.ts place looked to be the most sensible place to do it. Turns out it's been there for over 5 yrs

(for reference / making sure there's a backref to this pr the issue is microsoft/pxt-arcade#3642 vs the one in this repo)

Ah yes, still need to get used with working on multiple repos. Fixed it in the description


Obvious question?

Hi,
Thanks for sharing your contribution. Now, tons of instructions as to how to install, configure, contribute... but where the hell is the USAGE part? Isn't that missing?

I'm not totally sure what you mean.  Are you referring to the setup of the .htmlhintrc file?

I think i'm being very clear. How one goes about using htmlhint within Sublime Text? What are the commands? What's the workflow?

There are no commands.  This is a plugin that works within SublimeLinter 3.  I suggest you consult the documentation there if you are confused: http://www.sublimelinter.com/en/latest/about.html


Incompatible content types of plugins

Since the filters, what a micro front-end expects are now stricter, some data isn't accepted by plugins it is intended for.
For example:

output of costume-loader plugin entities.json has the content type raw
input Entities of wu-palmer plugin expects content type entities

If data/content types are changed please directly use the new types (see #42 if not merged already).


Cannot use heredocs to pipe into python script

Example in 09a52f9.
In run, the AFTER doesn't get printed out.
#!/bin/dash

. ../setup-env
cd src

python3 focus.py ../../videos/02.mp4 --destination ../outputs << EOF
5 10
q
EOF

echo 'AFTER!'

Just use a temporary file

Problem:
there was a spacebar after the EOF


Slider

Does anyone have an example of a custom input with a range input? I can't quite get the value to update.
<input
  type="range"
  min={min}
  max={max}
  step={step}
  value={value}
  onChange={e => {
    setValue(e.target.value);
    if (onChange) {
      onChange(e.target.value, e);
    }
    setTouched();
  }}
  className="slds-slider__range"
  {...rest}
/>

I would recommend creating your own custom input https://react-form.js.org/#/custom-input

Closing as this is not an issue but for help here is a code sandbox that does what you need https://codesandbox.io/s/vvql3wjon0


✨ Update to input team_access

👀 Purpose

Update the terraform managed repositories to use latest version of the terraform-github-repository module.

♻ What's changed

✨ Update terraform-github-repository module to version 0.0.7
🚀 Add team_access input for each repository to match existing teams and access

📝 Notes

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

Comparison is base (84edd31) 98.47% compared to head (823bbae) 98.47%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4167   +/-   ##
=======================================
  Coverage   98.47%   98.47%
=======================================
  Files          43       43
  Lines        4068     4068
=======================================
  Hits         4006     4006
  Misses         62       62

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


Tests failing, most returning AttributeError: 'NoneType' object has no attribute 'CreateCodec'

I've successfully built and tested this package previously on my local environment consisting of WSL2 Ubuntu. I'm trying to deploy it to an Ubuntu VM in the cloud. I have followed the instructions again but am now unable to run the tests successfully on this VM. Most of the errors returned are AttributeError: 'NoneType' object has no attribute 'CreateCodec' which leads me to think that there's something in my VM's environment that's missing and pybraw isn't able to properly use libBlackmagicRawAPI.so.
Do you have any suggestions?
Also, thanks for putting this package together!

I just set up everything from scratch on Ubuntu 21.10 and the tests pass just fine. I did have some library compatibility issues between the Conda environment and the host, but I solved those by setting up the build tools inside the Conda environment rather than on the host (see https://github.com/anibali/pybraw/commit/a87e9bd9dcc5f45572e32e456d3380b214240825). I don't think that this is your issue though.
Based on your observations it sounds like the call to CreateBlackmagicRawFactoryInstance() is failing, which probably means that libBlackmagicRawAPI.so can't be found at runtime. I can't really help much beyond this I'm afraid.

I did try copying the libBlackmagicRawAPI.so file into the environment lib rather than /usr/lib/ before posting the issue. Removing the file altogether fails the testing on the first test and does not continue the testing suite.
I'll try Ubuntu 21.10 to see if I can get it to work that way. Thanks for taking the time to respond.

I just wanted to update and let you know I got it working on my server. I had the CPU virtualization configured incorrectly in my VM and also needed to install libgl1 to get things operable. I'm up and running. Thanks again for putting this package together!


Plugin Hooks for "compile to SQL" languages

There's a ton of tools/languages that compile to SQL, which may be nice in Datasette. Some examples:

Logica https://logica.dev
PRQL https://prql-lang.org
Malloy, but not sure if it works with SQLite? https://github.com/malloydata/malloy

It would be cool if plugins could extend Datasette to use these languages, in both the code editor and API usage.
A few things I'd imagine a datasette-prql or datasette-logica plugin would do:

prql= instead of sql=
Code editor support (syntax highlighting, autocomplete)
Hide/show SQL

I'm not interested in these in Datasette core itself, but I think they have a ton of potential for plugins.
I wonder what the best way to handle that would be?
Right now it's possible to write a plugin that adds extra routes, so someone could build a /dbname/-/prql?query=xxx endpoint.
If this could return JSON, they could add JavaScript to the /dbname page that provided a UI for kicking off one of those queries.
Something that could make that more ergonomic might be the plugin hook that allows plugins to add extra HTML to different core database pages - e.g. adding a "Query this database using PRQL" button or link or even a full form at the top of that database page. That's this issue here:

#1191

Thinking about this more, here a list of things I imagine a "compile-to-sql" plugin would want to do:

Attach itself to the SQL code editor (switch from SQL -> PRQL/Logica, additional syntax highlighting)
Add "Query using PRQL" buttons in various parts of Datasette's UI, like /dbname page
Use $LANGUAGE= instead of sql= in the JSON API and the SQL results pages
Have their own dedicated code editor page

and 2) would be difficult to do with current plugin hooks, unless we add the concept of "slots" and get the JS plugin support in. 3) could maybe be done with the asgi_wrapper(datasette) hook? And 4) ca n be done easily with the register_routes() hooks.

So it really only sounds like extending the SQL editor will be the hard part. In #2094 I want to add JavaScript plugin hooks for extending the SQL editor, which may work here.
 It'd be really cool if I can get the asgi_wrapper() hook to work right there...


fix introduction titles so they can be linked from collated titles

Cookbook adds an element with id="{uuid}_titlecreatedbycookbook" to most pages, but not Introduction ones. When cookbook creates an end-of-chapter section with a link back to the section it came from, the link points to href="#{uuid}_titlecreatedbycookbook
refs #40
Screenshots
Here is the broken link (the "Introduction"):

Here is the target of a working link:

And here is where the broken link should link to:

Slack Context

I moved the code into bake_title which is much nicer. Thanks for the feedback @ajluk !


DB Table index include/exclude flag: clear if no DBs specified

There is one typical diff I experience during deployments between different releases. DD12V-DBINCLEXCL. I have a suspicion that it is a bug in older abap releases. Although it does not cause direct issues but in AG it causes diffs. I'm not a big expert in how abap objects are stored so before fixing this would be great to collect some opinions for more experienced.
So the evidences are:

a table has in an index. Not limited to any DB

Just in case, if I click "For selected" then, inside there is a radio button with "Exclude" option by default. Yet, the activated setting is "Index on ALL"

And in DD12V the field DBINCLEXCL = 'E' (although it does not do anything). Problem is that in newer releases this field is force cleared on activation (which is more consistent)

Solution idea: on serialization, if DBSTATE is empty, clear DBINCLEXCL

If DBSTATE is empty or 'O', clear DBINCLEXCL, DBSYSSEL1, DBSYSSEL2, DBSYSSEL3, and DBSYSSEL4.


[deviantart] login issues

Ripme version: 1.7.74
Java version: 10.0.2 64 bit
Operating system: Windows 10
Exact URL you were trying to rip when the problem occurred: https://www.deviantart.com/justgenitals/gallery/64358240/SPECIAL-MinamiShots [NSFW]
Please include any additional information about how to reproduce the problem:

I tried logging into deviantart with my browser and copied the cookies into rip.properties at local appdata like this:
"auth=cookie;auth_secure=cookie;userinfo=cookie"
I also tried adding password and username like "deviantart.username=username", unpacking the ripme.jar & editing the rip.properties from there and packing it again.
Expected Behavior
Logging into deviantart to download mature pictures.
Actual Behavior
Not downloading pictures marked as mature.

Can you please explain in details about how to use my Deviantart user id and password in rip me?


feat: add members to access lists

Description

Related Issue(s)

#{issue number}

Verification

[ ] Your code builds clean without any errors or warnings
[ ] Manual testing done (required)
[ ] Relevant automated test added (if you find this hard, leave it and we'll help out)
[ ] All tests run green

Documentation

[ ] User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Blocked by https://github.com/Altinn/altinn-register/pull/196 being merged, deployed and updated in apim


After 11.x update I've lost the ability to hide categories

I am current running 11.2 (happened on 11.1 as well) and I have lost the ability to hide categories - the triangle is no longer present.

Hi,
thank you for your issue.
This will come back in the next version:
https://github.com/ajnart/homarr/issues/636


Release Google.Cloud.Dlp.V2 version 4.13.0

Changes in this release:
New features

Inspect template modified cadence discovery config for Cloud SQL (commit 23f8df4)
File store data profiles can now be filtered by type and storage location (commit 23f8df4)

Documentation improvements

Small improvements (commit 23f8df4)

Created release for Google.Cloud.Dlp.V2-4.13.0


Update run-command.md

updating rest api link to action run command

Docs Build status updates of commit 07e3605:
:warning: Validation status: warnings

File
Status
Preview URL
Details

articles/virtual-machines/windows/run-command.md
:warning:Warning

Details

articles/virtual-machines/windows/run-command.md

Line 23, Column 187: [Warning: file-not-found - See documentation] Invalid file link: 'rest/api/compute/virtual-machines/run-command'.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit ae1456f:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/virtual-machines/windows/run-command.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Hi Courtney, I am out sick today. I will review it tomorrow when I am back.
Get Outlook for iOShttps://aka.ms/o0ukef

From: Courtney Wales @.>
Sent: Tuesday, September 27, 2022 10:03:16 AM
To: MicrosoftDocs/azure-docs @.>
Cc: Nikhil Patel @.>; Mention @.>
Subject: Re: [MicrosoftDocs/azure-docs] Update run-command.md (PR #99077)
@nikhilpatel909https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnikhilpatel909&data=05|01|nikhilpatel%40microsoft.com|dca6b7f5eaa64f61c4f008daa0996899|72f988bf86f141af91ab2d7cd011db47|1|0|637998877995686937|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=9%2BbVuB8%2FigEvnKmcFqFNK63Qv5q0o%2F2qwwphFlv22qI%3D&reserved=0
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-teamhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Forgs%2FMicrosoftDocs%2Fteams%2Fpublic-repo-pr-review-team&data=05|01|nikhilpatel%40microsoft.com|dca6b7f5eaa64f61c4f008daa0996899|72f988bf86f141af91ab2d7cd011db47|1|0|637998877995686937|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=wmpf7%2FvgISxiHHEfGUPJqxRDXcrk7QEMhFTUJvlEvqU%3D&reserved=0
—
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Fazure-docs%2Fpull%2F99077%23issuecomment-1259640515&data=05|01|nikhilpatel%40microsoft.com|dca6b7f5eaa64f61c4f008daa0996899|72f988bf86f141af91ab2d7cd011db47|1|0|637998877995686937|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=L%2FuMOyGc%2BnkHEeiALba%2Fud%2BUNR%2B2k%2FfoOEOd5Nxy6f4%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAYMV6BMC57KUSUBGFJVOGQLWAMEDJANCNFSM6AAAAAAQW25OV4&data=05|01|nikhilpatel%40microsoft.com|dca6b7f5eaa64f61c4f008daa0996899|72f988bf86f141af91ab2d7cd011db47|1|0|637998877995686937|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=TPRcxnNJVizHdTYSln%2FQmInpvqxNIYmXu64vSehYC8Y%3D&reserved=0.
You are receiving this because you were mentioned.Message ID: @.***>

Due to accidental sign-off, I'm adding #hold-off until this is approved...

approved

Hi all, Since Nikhil has approved I will go ahead and #sign-off


Added greet.yml

Related Issue

Closes: #155
Description of Changes
Added greet bot

Checklist:

[x] My code adheres to the established style guidelines of this project.
[x] I have conducted a self-review of my code.
[x] I have included comments in areas that may be difficult to understand.
[x] I have made corresponding updates to the project documentation.
[x] My changes have not introduced any new warnings.

H kya @anmode thike me change karta hu fir

H...ismai n roles cases lga do.... I mean collaborator ko alag wish and 2nd-time contributor( I mean not a new contributor) differently

@Abhinavcode13


qemu: Support creating multiple QMP sockets

The QMP socket implementation does not support multiple clients sending
and receiving QMP commands. As a consequence we need to be able to
create multiple QMP sockets from the qemu package, so that at least we
can support a fixed number of QMP clients.
Signed-off-by: Samuel Ortiz<EMAIL_ADDRESS>

Coverage decreased (-0.004%) to 66.591% when pulling de08837299d74afcf12e42f9a8244692208fe1c1 on sameo/topic/qemu into c9661cf1a099faaf7521c3d1e1e8ad188d937aaa on master.


ci: use $HOME variable rather than /home/travis

Running ci/run.sh locally works flawlessly, except for this hardcoded reference to the travis environment.
This PR makes the ci scripts work locally on Linux too - useful for someone just picking up the repo for the first time.

I did not even try to run this script locally, but thanks!


Support RLOO

Will OpenRLHF support RLOO trainer in the future?
https://huggingface.co/docs/trl/main/en/rloo_trainer

Welcome to contribute~


Add example docs

Hello there, I am a comment test!

Hello there, I am a comment test!

Hello there, I am a comment test!

undefined

Is there something that you wish you knew before starting this PR that you now know?
Is there something that would make working on this type of work simpler in the future?
Did you learn something new working on this PR? (about the code, the business, about the dev environment, or anything else…)

Please use Quote reply and answer like an e-mail by giving the answer just below the question.
If a question doesn't apply then please remove it.
Please leave the robot emoji as we use it to understand that you replied to us.
If you don't have anything to say please give a reaction how working on this PR felt:

👍: It was okay, nothing special
👎: Not great, I had some issues while working on it (please explain!)
🚀: It was fantastic (please share why!)

🤖📓

Was there something that surprised you when working on this PR? (good or bad)
Is there something that would make working on this type of work simpler in the future?
Did you learn something new working on this PR? (about the code, the business, about the dev environment, or anything else…)

Please use Quote reply and answer like an e-mail by giving the answer just below the question.
If a question doesn't apply then please remove it.
Please leave the robot emoji as we use it to understand that you replied to us.
If you don't have anything to say please give a reaction how working on this PR felt:

👍: It was okay, nothing special
👎: Not great, I had some issues while working on it (please explain!)
🚀: It was fantastic (please share why!)

🤖📓

Is there something that you wish you knew before starting this PR that you now know?
Is there something that would make working on this type of work simpler in the future?
Did you learn something new working on this PR? (about the code, the business, about the dev environment, or anything else…)

Please use Quote reply and answer like an e-mail by giving the answer just below the question.
If a question doesn't apply then please remove it.
Please leave the robot emoji as we use it to understand that you replied to us.
If you don't have anything to say please give a reaction how working on this PR felt:

👍: It was okay, nothing special
👎: Not great, I had some issues while working on it (please explain!)
🚀: It was fantastic (please share why!)

🤖📓

Was there something that surprised you when working on this PR? (good or bad)
Is there something that would make working on this type of work simpler in the future?
Did you learn something new working on this PR? (about the code, the business, about the dev environment, or anything else…)

Please use Quote reply and answer like an e-mail by giving the answer just below the question.
If a question doesn't apply then please remove it.
Please leave the robot emoji as we use it to understand that you replied to us.
🗳 Give anonymous feedback here.
If you don't have anything to say please give a reaction how working on this PR felt:

👍: It was okay, nothing special
👎: Not great, I had some issues while working on it (please explain!)
🚀: It was fantastic (please share why!)

Meta comments/feedback on this bot? Reach out to @Björn Andersson and @Curtis in #pd-project-pr-change-micro-survey


Translated slugs between locales - linked translations via a reference property. Website with localized URL.

Hello, I like sveltia cms a lot, in my opinion, sveltia cms is currently the best open source cms in the market.
I'm trying to find a solution for how to make localized markdown filenames work in sveltia cms. The post becomes quite long so I will structure it as readable as possible.
Description
I am currently working on localizing a website, I have done localization with the Astrolicious i18n tool, now I'm trying to work with Sveltia/Decap CMS. Despite extensive searches, I have not found a way to utilize translated filenames for the CMS content. I'm hoping to determine if it's feasible to make it work, I'm looking for any hacky solution as injecting a custom JavaScript into the CMS widget that allows searching for localized posts using translated filenames.
Current Implementation
For testing, I utilized the demo repository from the Astrolicious i18n tool and adapted it to my needs. Here are the relevant links:
GitHub Repository: astrolicious-i18n-demo
Live Demo: astrolicious-18n-demo.netlify.app
Currently, the testing CMS setup is as follows:
config.yaml

collections:
  - name: 'posts'
    label: 'Posts'
    folder: 'src/content/posts'
    create: true
    delete: true
    i18n: true
    format: yml
    extension: yaml
    editor:
      preview: false
    fields:
      - label: 'Default Locale Version'
        name: 'defaultLocaleVersion'
        widget: compute
        value: en/{{fields.title}}
      - label: 'Title'
        name: 'title'
        widget: 'string'
        i18n: true

Objective
My final goal is to create localized URLs based on slugs taken from Markdown filenames. For instance:
English URL: website/blog/english-post/
French URL: website/fr/le-blog/poste-francaise/
The i18n tool locates the localized YAML file by reading the defaultLocaleVersion, which points to the corresponding default locale file (en/english-post). That way i18n is able to generate localized routes.
Question
Is it possible to use some custom widget to enable sveltia cms locating for posts with localized filenames based on this reference?
I've managed to create a post with a default locale reference, but I'm still unable to create localized filenames directly in the CMS and "match" localized posts
Any insights or suggestions on how to implement this feature, or just tell that localized filenames are not possible, would be greatly appreciated.

Hello, I like sveltia cms a lot, in my opinion, sveltia cms is currently the best open source cms in the market.

Glad to hear that! There are many things to do before general availability, but I love to see people enjoying the product 💯
I’m aware of the i18n issue that corresponds to these Netlify/Decap CMS issues:

https://github.com/decaporg/decap-cms/issues/5493
https://github.com/decaporg/decap-cms/issues/6600

Well, first-class i18n support is a selling point of Sveltia CMS. I’ll try to find a solution for this!

Awesome, wow, thank you for your quick response.
Yes, I read these issues while I was researching the solution. I understand that the solution is not so easy as it sounds. I find out that while solving the localized references at frontend :)
firstly there is a task to generate defaultLocaleVersion. Right now the nw compute widget generates only the first locale item, the rest locales leave with the empty string.
then there is a task for cms to read all files with defaultLocaleVersion and match localized md files with default locale md file

I think the solution is not complicated, actually.
In Hugo, it’s possible to link localized files using the translationKey property. And yes, there is an issue for Netlify/Decap CMS for supporting:

https://github.com/decaporg/decap-cms/issues/4645

I’m going to implement it:

Allow developers to use the localize flag in the configuration file’s slug template, like {{title | localize}}, in the same way as summary string transformations.
When the flag is set, the CMS will use the localized value for the file names, while adding the extra translationKey property to the files that will hold the default locale’s slug.
When the CMS loads the files, use the translationKey property to link all the localized files.

I've encountered an issue with the way filenames are generated from titles, which seems to lack proper sanitization for URL use. For instance, the title "La Cédille En Français" results in the filename la-cédille-en-français.yaml. This filename includes special characters that are undesirable in URLs.
config.yaml
- name: test
  label: test
  folder: src/content/test
  create: true
  i18n: true
  format: yml
  extension: yaml
  slug: '{{title}}'
  slug_length: 30
  editor:
    preview: false
  fields:
    - label: Default Locale Version
      name: defaultLocaleVersion
      widget: compute
      value: fr/{{fields.title}}
      i18n: duplicate
    - label: Title
      name: title
      widget: string
      i18n: true

Feature Request:
It would be beneficial to include a slugify option in the compute widget like so:
config.yaml
value: fr/{{fields.title | slugify}}
This would allow the key value to be generated as a slugified and sanitized URL segment.
Going further:
Additionally, it might be valuable to allow developers to implement custom JavaScript functions to define their own widget logic. For example:
javascript
function stringify(title) {
  return title.toLowerCase()
              .normalize('NFD').replace(/[\u0300-\u036f]/g, '')
              .replace(/[^a-z0-9 -]/g, '')
              .replace(/\s+/g, '-')
              .replace(/-+/g, '-')
              .replace(/^-+|-+$/g, '');
}

This function could be utilized in the configuration like this:
config.yaml
fields:
  - label: Default Locale Version
    name: defaultLocaleVersion
    widget: javascript
    value: fr/{**{stringify(fields.title)**}}
    i18n: duplicate
  - label: Title
    name: title
    widget: string
    i18n: true

Implementing such a feature would enhance flexibility without posing a security risk, as I understand the script execution would be confined to authenticated user contexts. If I'm wrong, please excuse me.

You can use the slug-type option 🙂

Yes! it works and filenames are sanitized now. Somehow it slipped through my eyes :)
thank you!!!
but I still have hard time with
  fields:
    - label: Default Locale Version
      name: defaultLocaleVersion
      widget: compute
      value: fr/{{fields.title}}
      i18n: duplicate

I get this:
/fr/bibliotheque-publique.yaml
defaultLocaleVersion: fr/Bibliothèque publique
category: Bibliothèque publique
order: 1
but for my i18n setup I need to get this:
/fr/bibliotheque-publique.yaml
defaultLocaleVersion: fr/bibliotheque-publique
category: Bibliothèque publique
order: 1
Is there some option to pass the slug to the defaultLocaleVersion field with added suffix? to be  fr/bibliotheque-publique?

I think my translationKey implementation is ready, so you don’t need the custom defaultLocaleVersion stuff. I haven’t added any automated tests, but the change is minimum; it shouldn’t break existing features. 😆

When you customize the slug like this:
slug: '{{title | localize}}'

Then file names will be localized, and translationKey will be automatically added:

en/government-of-canada.yamltitle: Government of Canada
translationKey: government-of-canada

fr/gouvernement-du-canada.yamltitle: Gouvernement du Canada
translationKey: government-of-canada

omg! Thank you very much!
can't wait to try it

Just shipped v0.25.0 with the localized slug support 🎉

super cool! thank you, kyoshino!
I'm trying it out

I tried and it is awesome!
I'm trying to work with astrolicious i18n which use translationKey with locale/+slug
by example:
translationKey: fr/my-trip-to-new-york
is there some way to add to my custom key the translationKey with custom string?
by example:
translationKey: my-trip-to-new-york
+
defaultLocaleVersion: fr/my-trip-to-new-york
collections:

name: posts
label: Blog posts
create: true
folder: data/posts/
slug: '{{title | localize}}'
format: yaml
i18n: true
fields:

name: title
label: Title
widget: string
i18n: true
name: defaultLocaleVersion
label: DefaultLocaleVersion
widget: compute
value: fr/{{translationKey}}

I’m playing with your demo project. I think defaultLocaleVersion can be replaced translationKey, but it seems the locale prefix like fr/ or en/ has to be added to frontmatter anyway. Okay, I’ll add a new option to make the key and value customizable.

astrolicious i18n plugin behind the scenes changes the schema and the frontmatter expects locale/slug, so it's not possible without forking repo.
I don't know what is easier to modify - to add translationKey into the compute widget or give the option in the i18n parameter
but either way it works perfectly:
i18n:
  structure: multiple_folders
  locales: [en, fr]
  canonical_slug:
    key: defaultLocaleVersion
    value: 'en/{{slug}}'

I understand that is quite a niche issue. :/

No worries! translationKey is specific to Hugo. Other frameworks may have different configurations, so I think it has to be customizable anyway.

That is very nice of you. I will be able to add sveltia cms to my i18n blog template.
it will be Astro+i18n+SveltiaCMS+Cloudflare stack for ultimate SSG i18n workflow

Just shipped v0.26.0 with README updated!

That's super awesome! Can't believe that you just solved my biggest issue and now astro full localization works with sveltia cms out of the box! I'm going to check if it's working fine with astrolicious i18n.

Hey, Kyoshino, uh, it's me again,
sorry for this, but I found a bug when the user duplicated the markdown file via sveltiaCMS user interface, the canonical_slug doesn't change. It happens only when using the new canonical_slug. :/
also about UX, when user click on the dublicate button everything stays the same, so at first it's not clear if the button worked, the suggestion is to add suffix to the title field "-COPY" to inform that this is clearly copy and not the original.
by example:

https://github.com/sveltia/sveltia-cms/assets/145860771/19146be3-5864-4c09-905b-5a7b175eecf3

Thanks for finding bugs! Will fix them shortly. There is supposed to be a toast notification after duplicating an entry. Not sure why it’s gone 😅

Just shipped v0.26.3 to solve the issues!

now canonical_slug is working at duplication.
And now I see the first time toaster, nice! 👍


why thanos compactor do compacting before apply retention policy

I found that thanos compactor do compacting and meta syncing (many times) before applying retention policy. This may cause old blocks never be removed if something wrong during compacting ,and then, old blocks become more and more, and lead to compacting or meta syncing error again.
I think old blocks will never be used for compacting and can be removed before compacting.   🤔

I think this is done on pupose in case retention times are different across resolution.
If the compaction is running late, and the raw resolution is expired before having the 5m block, then it would remove the raw block and data will be lost before having the 5m downsampled data.

This makes sense as old blocks might be still able for compaction ( < level 4). The retention check is based on block max time. So once an old block is compacted with other new blocks and a new block is generated, it might still be within the retention period and the data from the old block is kept.
For some cases, even if olds blocks are compacted, the time range is still beyond the retention time, this is something we can optimize in the compactor, maybe in the planner side specifically. Ideally, this is not hard to do. But as @ahurtaud mentioned, downsampling will affect it as well because level 4 blocks might be able for downsampling so we cannot simply delete the blocks.
For most of cases, if there are not too much data in object storage, the current logic is fine as the retention will be applied after the compacting and downsampling phase is done.
If you have too much data in obj store, try scaling your compactor more or use tools bucket retention tool to clean up old data first.

Move this issue to discussion.


Theme/Token API

Hi! I've been using Kobweb on a project of mine, and have run into some annoyances while creating styles that I think could be solved by a token API similar to the one that exists in Panda CSS (and many other CSS-in-JS libraries).
Draft API
The first (and could be only in a minimal implementation) step would be to include the current breakpoint inside a ComponentStyle block much like the current colorMode. With that, a theme object could be constructed in each style, and the tokens could be used in the styles:
val DemoStyle by CustomStyle {
    val theme = MyTheme(colorMode, breakpoint)
    base {
        Modifier
            .background(theme.palette.background)
            .padding(theme.sizes.sm)
            .borderRadius(theme.radii.sm)
    }
}

class MyTheme(val colorMode: ColorMode, val breakpoint: Breakpoint) {
    val palette = when(colorMode) {
        ColorMode.Light -> Palette(background = rgb(0xFFFFFF), content = rgb(0x000000), /*...*/)
        ColorMode.Dark -> Palette(/*...*/)
    }
    val sizes = when(breakpoint) {
        Breakpoint.Zero -> Sizes(sm = 8.px, md = 12.px, /*...*/),
        else -> Sizes(/*...*/)
    }
    val radii = Radii(/*...*/),
    /*...*/
}

(This wouldn't replace the traditional method of using breakpoints in styles, but would be an alternative.)
The next step would be to create a wrapper around CustomStyle so that the user doesn't have to create the theme object each time. This could be done by default for a SilkTheme, which the user could then copy if they wanted to make their own version:
class SilkThemeStyle(init: SilkThemeStyleModifier.() -> Unit) {
    // haven't fully figured out how this will work,
    // but would essentially be a property delegate equivalent to
    // by ComponentStyle {
    //     val theme = SilkTheme(colorMode, breakpoints)
    //     init.invoke(SilkThemeStyleModifier(theme))
    // }
}

val DemoStyle by SilkThemeStyle.base { // this: SilkThemeStyleModifier { theme: SilkTheme }
    Modifier
        .background(theme.palette.background)
        .padding(theme.sizes.sm)
}

The base SilkTheme could include sensible defaults for spacing, font sizes, etc. (and those should be customizable in @InitSilk just like the palette), but it should be clear that a custom theme object could include colors, spacing, radii, sizes, font sizes, shadows, and anything else the user wants.
What it solves
Currently, if the user wants to have a defined set of breakpoint-reliant sizes (or font sizes, radii, etc.), they have two options. One is to use rememberBreakpoint() and only ever include their sizes in inline styles, and the other is to manually deal with the breakpoints on every style:
@Composable
fun Demo() {
    Column(Modifier.size(Sizes.SM)) {
        /*...*/
    }
}

object Sizes {
	val SM @Composable get() = when(rememberBreakpoint()) {
   		Breakpoint.ZERO -> 8.px
   		Breakpoint.SM -> 12.px
    	else -> 16.px
    }
    val MD @Composable get() = /*...*/
}

val DemoStyle by ComponentStyle {
    base {
        Modifier.size(Sizes.SM.BreakpointZero)
    }
    Breakpoint.SM {
        Modifier.size(Sizes.SM.BreakpointSm)
    }
    Breakpoint.MD {
        Modifier.size(Sizes.SM.BreakpointMd)
    }
}

Neither of these are super convenient, and they create an entirely separate method for thinking about theming since the methods for using the SilkPalette are quite different. So, putting all of that data into one central theme definition would help streamline the entire theming process. Finally, this is a first draft of the API, so I'd love to hear any thoughts/changes people would like to see.

Hey Andy, thanks for using Kobweb and taking the time to think about and draft this!
I'll send back a quick response now but just to let you know I'll keep thinking about this. Apologies if I miss some nuance in my fast reply.
By the way, your timing is great -- we are actively thinking about the "inline styles required to support sizes" problem. One thing we are thinking about is integrating KSP into Kobweb's compile time pipeline (this wasn't available when I started Kobweb, see also this old ass bug). This could give us more power that will enable us to do more clever things that the current Gradle plugins approach alone cannot.
Here are a few of my high level thoughts (given the current state of Kobweb):

For every new parameter we add to component style, we are potentially creating an exponential number of styles. If you support breakpoint (which has 5 values) and color mode (which has 2), you can unintentionally create 10 style entries with a lot of redundancy between them.

In most cases, you probably want your color mode changes and your breakpoint changes to be orthogonal.

When Kobweb began, it didn't have StyleVariables solved yet. Now it does, and it's possible that if we had that working from the beginning, we might have done things differently.

For example, you can define a ComponentStyle purely with StyleVariables, and then you can create additional styles that set those variables which you apply separately.
This approach makes it easier to get that orthogonal separation of color mode and breakpoint features I mentioned above, but it's a bit more manual work.

The current Kobweb Gradle plugin uses simple string matching to find interesting references for which it need to know how to generate  code for (e.g. registering your component styles for you). Due to the fairly brute force approach, we can't really support arbitrary subclasses at this point (potentially an issue for the by SilkThemeStyle.base idea you are proposing here)
Note that widget sizes are not always tied to breakpoint sizes. For example, for switches, you might want a small switch even on a desktop screen, or a large switch even on a mobilescreen. It might be worth discussing more concrete cases, but we may not want to unintentionally encourage people to tie sizes to breakpoints. (Probably I need more concrete examples to chew on here).

All that said, I can see if you're just working on your own site that having access to breakpoints and color modes from within the same component style can be great for quick prototyping.
Supporting custom tokens is, as far as I can tell, not supportable yet. I think the first pass would be to figure out and integrate KSP, which is something that I'm actively thinking about right now. Maybe it will enable something like this, but even if not, it should still help the project compile faster, in theory, while giving us the power to resolve types at compile time.
P.S. I'll also read through the Panda CSS docs to get a better feel of the full feature-set that they support.

(Apologies for the close / reopen, that was a misclick)

To add to what @bitspittle said about StyleVariables, there is currently a 3rd option for a defined set of breakpoint-reliant sizes:
val SizeVar by StyleVariable<CSSLengthValue>()
val ThemeStyle by ComponentStyle {
    base {
        Modifier.setVariable(SizeVar, 8.px)
    }
    Breakpoint.SM {
        Modifier.setVariable(SizeVar, 10.px)
    }
    Breakpoint.MD {
        Modifier.setVariable(SizeVar, 12.px)
    }
}

val DemoStyle by ComponentStyle.base {
    Modifier.size(SizeVar.value())
}

// in @App (or any other composable)
Surface(
    ThemeStyle.toModifier()//...
)

That said, this approach still has its limits:

It doesn't support using logic with these values like you can with colorMode:

val DemoStyle by ComponentStyle.base {
    Modifier.color(if (colorMode.isDark) Colors.Black else Colors.White)
}

It requires declaring individual variables for every value, instead of using a more streamlined approach such like Sizes(sm = 8.px, md = 12.px, /*...*/).
It isn't centralized and could potentially be difficult to manage and track.

Speaking more broadly however, I do like the idea of some sort of token system, for the reasons you mentioned as well as potentially easier customization of Silk-provided components/styles/sizes. As mentioned, this would likely require some internal changes (KSP), but I think something similar to what CSS-in-JS libraries offer is possible and worth pursuing.

Thank you for the responses! I'm going to try to bullet point my thoughts in approximately the order they appear:

I haven't really dug into how the styles are generated (so this could be completely off-base), but I was under the impression that a new style was generated for each Modifier, so that if a token based off of colorMode was used in one Modifier, and a token based off breakpoint was used in another Modifier that they'd be generated as separate styles.

And then the only styles that would go exponential would be ones where the user (for some reason, maybe shadows?) wanted to use both in a single style, which would be the intended behavior.
Though I'm realizing as I write this that if the entire token object was generated off of both, then that could cause all tokens in the object to be counted as based off both (even if each token was only based off one parameter). And then I definitely see where the problem comes into play. Maybe having two objects--something like palette and tokens corresponding to colorMode and breakpoint--would force that orthogonality? Though then that would break the shadows example where the user really does want both parameters in one token.

I hadn't really considered the StyleVariable option, which seems interesting, though as y'all explained there are definitely some negative considerations also.

On the one hand, if having the theme object be made up of StyleVariables would solve the color mode/breakpoint orthogonality problem then that's very appealing. I especially wonder if in a KSP world there'd be a more elegant way to define a full object's worth of tokens as StyleVariables than fully top-level. (Also down the road, the fact that variables can be changed inline could allow for a CompositionLocalProvider pattern that could be really interesting.)
On the other hand, having to declare a single variable for each is definitely unwieldy and breaks the pattern of having a theme object. I think it's also a question how many CSS variables are the right amount; there's something to be said for having hardcoded generated CSS rather than potentially having every single token as a variable.
I'm definitely going to try StyleVariables out for breakpoints and hopefully will have more concrete thoughts on it soon.

I totally agree that some widgets should have different size variants that aren't based on breakpoints--I think maybe choosing "size" as a demonstrative token wasn't a great call since that's ambiguous.

In the switch example, I could imagine that the small variant might have a Modifier.padding(theme.padding.sm), and the large variant might have a Modifier.padding(theme.padding.md). Then both would be able for use on both platforms, with responsive styles. On the other hand, if a user wanted two static switch sizes (and to generally use the large variant on desktop and the small one on mobile but not always), that would be a task for rememberBreakpoint() + hardcoded variants (without tokens).

In terms of "custom tokens", I'm really only imagining a mapping of the breakpoint and color mode information into an object with hardcoded values, which I think (though again don't super understand the implementation) would already be supported for just colorMode.

I'm going to keep playing around with these options to see if I come up with any new ideas, and will be interested to see how the KSP exploration turns out. Thank you guys for your thoughts on this!

As a quick aside, it may be useful to look at the generated code to demystify what Kobweb is doing.
In your project, where I'm assuming your Kobweb stuff lives under a site folder:

../gradlew :site:kobwebGen
Open build/generated/kobweb/src/jsMain/kotlin/main.kt
Search for "registerComponentStyle"
Have an epiphany, or maybe flinch in horror :stuck_out_tongue:

In order to generate that code, Kobweb needs to scan your codebase and find the right lines to put in there, which it currently does by searching your code using fairly limited parsed information.
With KSP, we should have a lot more power to identify the appropriate lines of code to collect and register in your final generated main file.
Really glad to have you thinking about this. We'll definitely be in touch about the KSP stuff. I'm pretty sure it's something we'll be tackling in the near future.

We just got a huge KSP refactoring in, so we plan to revisit this issue. We set it to 1.0 because if we get it working before then, we'll also be able to apply it to our own widget code in a bunch of places. But this might be a soft 1.0, that could potentially slip if it had to.


Could not find tag link on CurseForge.

When running a forced check for the same release as #16, I'm now receiving this error:
Could not find tag link on CurseForge.

I'm using the latest commit on the dev branch, 622a47a9a51c0fa4459dda370af99a7987ff375f.
You can find the release on CurseForge here.
You can find the AddOn list JSON file here.
You can view the full log here.
I haven't changed anything since reporting #16, I'm not sure why the error has changed.

Update to latest master then force restart your dynos.
Report back if you're still getting this error.

Fixed in the latest master.

https://github.com/p3lim/addon-packager-proxy/commit/73f37a218aa4253bee08878beaa7107405d65025 to be precise.


LocalExecutor trait and minimal executors cleanup

I would like to do the following restructuring:

Define a LocalExecutor trait in futures_core::task. It has a spawn_local_obj method which takes a LocalFutureObj as input.
Add impl<T: LocalExecutor> Executor for T
I want to remove SpawnLocalObjError from libcore and define it infutures_core instead. We don't need it in libcore, defining it in futures_core is enough.

Next, I'd like to modify our executors like this:

LocalPool:

should implement LocalExecutor and thus Executor. It currently doesn't implement Executor and that's awkward
I want to discuss the usefulness of the executor method which returns a !Send, !Sync "clonable handle to the pool as an executor". Why do we have that?
We can add:

impl<T: LocalExectutor> LocalExectutor for Rc<T>
impl<T: LocalExectutor> LocalExectutor for Weak<T> which returns an error with SpawnErrorKind::shutdown() if it can't upgrade
and the same for Arc/Weak and Executor (=> 4 combinations in total or 3 if we leave out Arc + LocalExecutor). I hope that there are no orphan rule conflicts
alternatively if orphan rules prevent that or that's deemed too radical we can also just add these impls for for Rc<LocalPool>/Weak<LocalPool> or not at all. Let's discuss this (the benefit is the shutdown error for Weak)

Is LocalExecutor stable enough for futures-core, or should it spend some time baking in futures-executor first?

I think it's stable enough to be put into futures-core:

The trait mirrors the Executor trait with the only difference that it's for non-Send futures.
SpawnLocalObjError has even made it into libcore. I just want to move it out again because the LocalExecutor stuff really isn't needed in libcore for any technical reasons.


Tutorial for connecting redux-form to redux

Any tutorial about this. I have tried for documentation, but there is nothing there

Did you look here : http://redux-form.com/6.0.0-rc.3/docs/GettingStarted.md/ ?
You have to follow it carefully. You cannot rename the root key used by formReducer (I wanted to use _forms instead). If the reducer is properly configured, you have nothing special to do.

No. I do not mean that.
I mean, having a simple form (eg. adding a client) and how do I connect the data from form to the redux state, update the form and reset when everyting is fine. Then if I have an error, to show it

check this http://redux-form.com/6.0.0-rc.1/examples/initializeFromState/

@cristian-sima, does @stunaz's link suffice?

Yep. Thanks


Mobile version does not load color selection in box for icon and text

Version
3.5.1
Development Environment
mobile
Current Behavior
Missing color in box
https://prnt.sc/mznvfu
// Write example code

## Expected Behavior
It should be fill like this
https://prnt.sc/mznw8w

I've noticed the fill colour appears on resizing ... any ideas how to force it programmatically.