[Feature Request] Pass in both original value and proprocessed value (by coerce) to ErrorMapCtx when defining error map

Consider the following scenario:
I'm using React Native, where the component is <TextInput>, which means it can only input string, and pass string to zod
Imagine I have a price field in the form, so I have something like
const schema = z.object({
  // `coerce` is a must-have here, since `<TextInput>` always gives a `Numeric string`. Otherwise the parse will fail
  price: z.coerce.number().min(1),max(10000)
})

Hence it leads to some problem in the error map

What I want:

Display Price is required when there's nothing in the input box. i.e. the result is ''
Display Price must be greater than or equal to 1 if user inputs 0

The actual behaviour:

No matter whether user inputs nothing or a 0, it will be converted to 0 by coerce, but I just can't remove it since it's needed for the parse
I have no way to determine which is the original value before the coerce preprocessing

My error map:
setErrorMap((issue, ctx) => {
  const fieldName = capitalize(issue.path.at(-1) ?? 'This field')

  let message = ctx.defaultError

  // this is what I wanted when it's an empty string before the preprocessing by `coerce`
  ctx.data === '' && (message = `${fieldName} is required`)

  switch (issue.code) {
    case ZodIssueCode.too_small:
      switch (issue.type) {
        case 'number':
          // It always goes to here for `z.coerce.number()`, no matter whether it's empty string or a `0`
          message = `${fieldName} must be greater than or equal to ${issue.minimum}`
          break
      }
      break

    case ZodIssueCode.too_big:
      switch (issue.type) {
        case 'number':
          message = `${fieldName} must be less than or equal to ${issue.maximum}`
          break
      }
      break
  }

  return { message }
})

Furthermore, what should I do if I receive something like abc which will be parsed to NaN?
i.e. I would like to see
Expected number, received string
instead of
Expected number, received nan
Is there any way I can achieve it without writing my own preprocess?

@scotttrinh Thanks, but unfortunately this seems not working for my use case.
What I want is to handle error map globally, at least for those common case, e.g.

if there's nothing (i.e. '' empty string), then I would like leave as is so I can get Price is required as error message
if it's an invalid string (which will be converted to NaN, e.g. 1wf2), then I prefer to leave as is, as I want expected number, received string instead of expected number, received nan (the error message by your implementation or coerce)

Below is my implementation which satisfies my use case, but is there any better alternative? (errorMap is the same as above https://github.com/colinhacks/zod/issues/2499#issue-1751353808)
const stringToNumber = (val: unknown): unknown => {
  if (typeof val !== 'string' || val === '') {
    return val
  }

  const float = +val // intend to use `+` instead of `parseFloat`

  return Number.isNaN(float) ? val : float
}

const schema = z.object({
  price: z.preprocess(
    stringToNumber,
    z.number().min(1).max(10000)
  )
})

Also, sorry to raise something unrelated there, is there any way to change some default behaviour? e.g. I want to always apply .trim() to .string(), since it's redundant to write z.string().trim() everytime. This is just an example, willing to know whether there's a global configuration way to achieve that.


[Fix #565] Add cop Rails/WhereNotWithMultipleArguments

Rails 6.1 changed how where.not works with multiple hash arguments.
This cop identifies places where where.not is used with multiple hash
arguments. It doesn't suggest corrections because depending on the rails
version, different behaviours may be correct.
# bad
User.where.not(trashed: true, role: 'admin')

# good
User.where.not('trashed = ? OR role = ?', true, 'admin')

Before submitting the PR make sure the following are checked:

[X] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[X] Wrote good commit messages.
[X] Commit message starts with [Fix #issue-number] (if the related issue exists).
[X] Feature branch is up-to-date with master (if not - rebase it).
[X] Squashed related commits together.
[X] Added tests.
[X] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[X] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.
[X] The PR relates to only one subject with a clear title
and description in grammatically correct, complete sentences.
[ ] If this is a new cop, consider making a corresponding update to the Rails Style Guide. (corresponding PR: rubocop/rails-style-guide/pull/296)

Just one small suggestion. The rest of the code LGTM and you can target the official Rubocop Rails repository with this PR. I assume the contributors will review this code a second time.


BulkInsertOrUpdateAsync inserts duplicates

Hello,
I have a destination column with an Id PK:
CREATE TABLE [purchase].[VendorAddress]
(
    [Id] INT NOT NULL PRIMARY KEY IDENTITY,
    [vendor_nr] NVARCHAR(20) NOT NULL,
    [name] NVARCHAR(255) NULL,
    [is_primary_address] BIT NULL,
    [purpose] NVARCHAR(255) NULL,
    [street] NVARCHAR(255) NULL,
    [postal_code] NVARCHAR(255) NULL,
    [city] NVARCHAR(255) NULL,
    [country_code] NVARCHAR(10) NULL,
    [country_name] NVARCHAR(100) NULL,
    [creator] NVARCHAR(100) NULL,
    [created] DATETIME2(7) NULL,
    [modifier] NVARCHAR(100) NULL,
    [modified] DATETIME2(7) NOT NULL,
    CONSTRAINT [FK_VendorAddress_Vendor] FOREIGN KEY ([vendor_nr]) REFERENCES [purchase].[Vendor]([vendor_nr]),
)

I use the following config:
var propertiesToExcludeOnUpdate = new List<string> { "Id", "Created", "Creator" };
var propertiesToExcludeOnCompare = new List<string> { "Id", "Creator", "Created", "Modifier", "Modified" };

await DestinationDbContext.BulkInsertOrUpdateAsync(destinationEntities, new BulkConfig
{
    UseTempDB = true,
    CustomDestinationTableName = destinationTable,
    PropertiesToExcludeOnUpdate = propertiesToExcludeOnUpdate,
    PropertiesToExcludeOnCompare = propertiesToExcludeOnCompare,
}, cancellationToken: cancellationToken);

But when I run this twice with the same source data set, it adds duplicates to my destination db.
I'd expect the propertiesToExcludeOnCompare  to not take the Id into account, but it does (I think?).
I found using SqlBulkCopyOptions = Microsoft.Data.SqlClient.SqlBulkCopyOptions.KeepIdentity does not create duplicates, but the Id's are generated as negative values.
What am I doing wrong here? Thanks!

You should then also set UpdateByProps, and add all others in that list if you want to ones that have same values in those columns skipped.

You're right, thanks!
var propertiesToExcludeOnCompare = new List<string> { "Modifier", "Modified" };

var updatedByProperties = typeof(U).GetProperties()
    .Select(x => x.Name)
    .Except(propertiesToExcludeOnCompare)
    .ToList();

updatedByProperties.Remove(idPropertyName);

await DestinationDbContext.BulkInsertOrUpdateAsync(destinationEntities, new BulkConfig
{
    UseTempDB = true,
    CustomDestinationTableName = destinationTable,
    UpdateByProperties = updatedByProperties,
}, cancellationToken: cancellationToken);

I then set idPropertyName by the name of the primary key if its other than 'Id'. Entities with Id named Id don't need to be added.

I halted my current implementation and choose to fetch the Id from the source and sync it using SqlBulkOptions.KeepIdentity. Now all is good.
Thanks for replying!

Glad you solved it.


5553088C - Far Cry 3

Marketplace
Tested on https://github.com/xenia-canary/xenia-canary/commit/c3656f2
Issues:
Crash host after ~20 seconds at main menu or during load screen
Cannot sign in to a profile
Log:
canary
Screenshots:

Tested on: https://github.com/xenia-project/xenia/commit/7003e54e510fa2169a9434cdb8d608bff7f7be1e
xenia.zip

requires readback_resolve to render most of the graphics.
sun flare is not occluded, query_occlusion_fake_sample_count set to 0 or -1 gets rid of it.
press F5 or enable clear_memory_page_state to clear artifacts/vertex explosions.
highlighted objects have weird patterns on them.

Scribble_heap can be used as an alternative to readback_resolve. It is much faster, but shadows and lighting are not accurate, and it causes flickering on some objects.

More screenshots

gpu-readback | state-gameplay

i am have a problem with it and i dont what i am doing wrong with it. when i try to play far cry 3 all the graphics in game all black and dark and i am unable to see anything in and only see a little bit of it because i am able to move in it and see some objects but there all black and dark. but when i tried to put the same settings as the person who was able have the graphics actually being there and not black and dark every where and able to see where he is going in the game it was still black and dark and unable to see anything but only a little bit of it like the gun, the phone, the sky and the phone at the beginning which could see clearly of it .

why did you delect my comment


Update cost-based-optimizer.md

The addition of "hash" here is helpful since in practice you only see merge  joins when you insert a single row, but you would see hash joins with many inserted rows.

This change is

Thanks for the PR! I approved, but it'd be best if you could make the same change to the v21.2 and v20.2 topic as well.

@RaduBerinde how many more rows need to be added before hash join turns to a lookup join? @mgoddard I'd add more color here that merge join is for a single row whereas hash join is with many rows.

v21.1/cost-based-optimizer.md, line 176 at r2 (raw file):

{{site.data.alerts.callout_info}}
To make the optimizer prefer lookup joins over merge or hash joins when performing foreign key checks, set the `prefer_lookup_joins_for_fks` [session variable](set-vars.html) to `on` (merge joins are the default for single row inserts, and hash joins are the default for multi row inserts).

I'd remove the second part, I'm not sure it's always accurate.


Does not build with gcc >=4.6

There are two minor changes that will allow building eltopo with gcc >=4.6. Do you want a patch or should I do the pull request thing?

A pull request would be great. Thanks!

Never done that before, but it turned out to be easy. Thanks!


Provide Document for Monitoring widget

Hello,
Request you to provide me the document regarding setting up the Hygieia service monitoring dashboard. Am not getting any option of adding any service to this monitoring view.

You have to click the gear option and add a url to be monitored.


test: Integration Tests on static GKE clusters

This PR

migrates the integration test pipeline to use static GKE clusters
There are 2 static clusters on GKE

keptn-integration-test-1 (GKE 1.19)
keptn-integration-test-2 (GKE 1.21)

Test runs are separated using k8s namespaces
A new GCP token was created to restrict access to GCP and the GKE cluster
The kubeconfig to the GKE clusters is now in the GH secrets and not fetched from GCP
Istio is now statically installed on GKE clusters and doesn't need to be installed with every test run (the same could be done with Gitea in the future but cleanup could be a challenge)
The http server to serve helm chart files is removed in favor of just getting the files locally

Integration test run with static clusters: https://github.com/keptn/keptn/actions/runs/1755712394
(a test is failing but this has nothing to do with the changes from this PR)

This fixes #5322


Fix Expression's parsing of positive exponent literals

Currently Expression parses only negative exponent literals (eg. 3e-2) as floats, and positive exponent literals (eg. 3e2 and 3e+2) as integers.
This results in negative exponent literals being parsed by String as expected (3e-2 -> 0.03), but positive exponent literals parsed by String's to_int() method which simply disacards non numerical characters (3e+2 -> 32) giving an unexpected result
This PR makes Expression parse all exponent literals as floats so they are correctly parsed by String

Apparently this fails the expression unit tests.

It looks like unit test tests for the behaviour that this PR is specifically trying to remove. Should this unit test also be changed, or do we want to instead keep the exisiting behaviour and just close this PR?

I think the test should be changed, this does seem like a bug and not expected behavior.

Thanks!

Cherry-picked for 3.5.

Cherry-picked for 3.4.3.


Unable to generate new projects

I'm unable to generate new projects using Wrangler – this is using a WSL terminal inside of VS Code, on Windows 10:
src $ wrangler generate my-app https://github.com/cloudflare/worker-template-router
⬇ Installing cargo-generate...
 Generating a new webpack worker project with name 'my-app'...
 Creating project called `my-app`...
 Git Error: failed to clone into: /mnt/c/Users/Kristian Freeman/src/my-app4INQSi
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }

Moving this from #316 because the error seems to be different.
In our convo this morning, it was suggested that I test cargo-generate and see if the issue happens there as well. Will add those details when I'm at home at that machine later today 👍

This is an error with cargo-generate! Opened an issue here https://github.com/ashleygwilliams/cargo-generate/issues/168


Add changelog attribute to pkg_deb

Allow passing changelog file to pkg_deb rule.
This addresses #696 issue.

It should not automatically propagate to the .changes file.  That choice should be up to each target. Personally, I would never put the raw changelog into a binary distribution anyway.


feat(home): add fun facts section

Description
Add fun facts section on the home page.
Preview

To-Do

[x] Add all fun facts
[x] Add section on the home page
[ ] Add animation after shuffle

merging for now, don't have time to work on animations


jenkinsfile updated

React Boilerplate
Thank you for contributing! Please take a moment to review our contributing guidelines
to make the process easy and effective for everyone involved.
Please open an issue before embarking on any significant pull request, especially those that
add a new library or change existing tests, otherwise you risk spending a lot of time working
on something that might not end up being merged into the project.
Before opening a pull request, please ensure:

[ ] You have followed our contributing guidelines
[ ] Double-check your branch is based on dev and targets dev
[ ] Pull request has tests (we are going for 100% coverage!)
[ ] Code is well-commented, linted and follows project conventions
[ ] Documentation is updated (if necessary)
[ ] Internal code generators and templates are updated (if necessary)
[ ] Description explains the issue/use-case resolved and auto-closes related issues

Be kind to code reviewers, please try to keep pull requests as small and focused as possible :)
IMPORTANT: By submitting a patch, you agree to allow the project
owners to license your work under the terms of the MIT License.

pull request closed


Fix GHCR push

According to git show-ref this repo doesn't have a master branch - it's called main. Thus the push value was always false.

Merged  #206 into main, thanks for the speedy review!


Fix date-to-string inconsistencies

Closes #127
Related:

https://github.com/enketo/openrosa-xpath-evaluator/issues/128
https://github.com/enketo/openrosa-xpath-evaluator/pull/125

Update: removed yarn.lock

Oops, did I merge this too soon? I think you may not have requested a review. Sorry, if it was too soon.

Don't worry - it was ready!


Clarification on Pre-training: BertForMaskedLM vs BertModelForMaskedLM

In the Pre-training step, there is no BertModelForMaskedLM from https://huggingface.co/zhihan1996/DNABERT-2-117M/blob/main/bert_layers.py.
However, there is a BertForMaskedLM in the file. Is this a typographical error or are you referring to something else?

Thanks for asking. It was a typo. I referred to BertForMaskedLM .


Issues when using the slider in a RecyclerView

I've got two issues by using the slider nested in a recycler view:

There are a lot of IllegalStateExceptions when I scroll vertically through the RecyclerView, coming from the unRegisterSetObserver() method in PageIndicatorView, complaining that the app tries to remove an observer that has not been added before. (Seems to be a problem caused by the RecyclerView that removes and recreates the slider views while scrolling).
In some (not all) of the slider views in my recycler view I got a strange bug: When I swipe to the second image in the slider the first time, it automatically snaps back to the first one. (This "back-swipe" is then not connected to an onTouch event.)

Has anyone an idea how to fix this (esp. the second problem)?

I fixed the second problem myself by adding the following code to the setSliderAdapter() method in the SliderView:
`        if (mSliderPager!=null && mCircularSliderHandle!=null){
mSliderPager.removeOnPageChangeListener(mCircularSliderHandle);
}
    mCircularSliderHandle = new CircularSliderHandle(mSliderPager);
    mSliderPager.addOnPageChangeListener(mCircularSliderHandle);`

The reason for the bug is that the RecyclerView doesn't create a new Slider for every entry but reuses the existing onces while scrolling to new elements and just updates their views. So the mCircularSliderHandle object isn't recreated and used for multiple entries which makes the onPageScrollStateChanged() method in the CircularSliderHandle class executing
mSliderPager.setCurrentItem(0);
sometimes, which produces the behavior mentioned above.
Maybe you could add the lines above to the next release to fix it for other people that also use multiple Sliders in a RecyclerView.

@gnuyork could you please commit your fix? This is still an open bug

It seems that Version 1.3.5 fixed this issues. At least for me it did, but updating from 1.3.2 it was a breaking change to me as adapter handling seems to be changed


How are accents handled?

pylexique version: 1.5.0
Python version: 3.10
Operating System: ubuntu 22.04

Description
Should handle accents when using the library, because it seems they were removed during pre-processing?
But this seems not documented.
What I Did
$ pylexique frère
[...]
KeyError: 'frère'
$ python
>>> [w for w in self.LEXIQUE.lexique if 'è' in w]
[]
>>> [w for w in self.LEXIQUE.lexique if w[:2] == 'fr' and w[-2:] == 're']
[...,
14: 'frre'  # I assume this is frère processed.
]

Hi @NicolasMICAUX!
Thank you very much for opening the issue and letting me know about this odd behavior. I am in the process of investigating the issue and will keep you informed when I release the updated version of PyLexique very soon.
Cheers.


Configure python utitlies for LibLamp

Figure out which of these utilities will be used in the production environment. For example, the script that harvests open data portals will need to run periodically.
Dependencies should be managed with venv

https://github.com/UWM-Libraries/GeoDiscovery/pull/185

https://github.com/UWM-Libraries/GeoDiscovery/pull/185


java.lang.ClassCastException on Android app after building with Proguard

We are trying to integrate the Java SDK into our Android app. It works well in debug mode, unfortunately, it doesn't when building the app for a releasable version and using Proguard to minify it.
We keep getting java.lang.ClassCastException after making a fetch or observeAndTransform method call.
We have been debugging and taking a look at the logs and we can see that the debug version makes a few extra calls that never happen on the minified app. They go like this:

/environments/xxxx/locales
/environments/xxxx/content_types
/environments/xxxx/entries?content_type=xxxx&fields.xxxx=xxxx

However, when we minimize the app with Proguard it only runs the 1st call to /environments/master/locales and then it automatically crashes with java.lang.ClassCastException.
Any clue what could be going wrong? Our guess is that Proguard is removing something that should not be removed. In our case, we had to add @Keep to the data model class to prevent the annotations ContentfulEntryModel and ContentfulField from being removed.
We have tried calling the endpoint using the next two methods and they both end up with the same result:
client
    .fetch(CDAEntry::class.java)
    .withContentType("appPromotionalCode")
    .where("fields.code", code)
    .all()
    .items()
    .firstOrNull()

//// or

client
    .observeAndTransform(PromotionalCode::class.java)
    .where("fields.code", code)
    .all()
    .doOnError { Logger.e(it) }
    .blockingFirst()
    .firstOrNull()

This is the stacktrace that we are getting:
Fatal Exception: java.lang.ClassCastException:
       at com.contentful.java.cda.ResourceFactory.fromResponse(ResourceFactory.java:19)
       at com.contentful.java.cda.CDAClient$6.apply(CDAClient.java:19)
       at com.contentful.java.cda.CDAClient$6.apply(CDAClient.java:19)
       at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap$MapSubscriber.d(FlowableMap.java:9)
       at io.reactivex.rxjava3.internal.operators.flowable.AbstractBackpressureThrottlingSubscriber.drain(AbstractBackpressureThrottlingSubscriber.java:49)
       at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnBackpressureLatest$BackpressureLatestSubscriber.onNext(FlowableOnBackpressureLatest.java:5)
       at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromObservable$SubscriberObserver.onNext(FlowableFromObservable.java:2)
       at retrofit2.adapter.rxjava3.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:29)
       at io.reactivex.rxjava3.core.Observable.subscribe(Observable.java:5)
       at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromObservable.subscribeActual(FlowableFromObservable.java:9)
       at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:5)
       at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnBackpressureLatest.subscribeActual(FlowableOnBackpressureLatest.java:22)
       at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:5)
       at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:31)
       at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:5)
       at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap.subscribeActual(FlowableFlatMap.java:94)
       at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:5)
       at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:31)
       at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:5)
       at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap.subscribeActual(FlowableFlatMap.java:94)
       at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:5)
       at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:31)
       at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:5)
       at io.reactivex.rxjava3.core.Flowable.blockingFirst(Flowable.java:75)
       at com.contentful.java.cda.FetchQuery.all(FetchQuery.java:75)
       at com.reveri.reverihealth.core.contentful.ContentfulService$getPromotionalCode$2.invokeSuspend(ContentfulService.java:75)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:13)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:107)
       at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.java:16)
       at kotlinx.coroutines.scheduling.TaskImpl.run(TaskImpl.java:2)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:93)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.java:93)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.java:93)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:93)

Thanks

Closing. We solved it by applying all the rules from this file to our project.
I would suggest updating the README of the repo, because when we read the current message of The ProGuard configuration file is used to minify Android Apps using this library. it made us believe the rules would be applied by default when integrating the library in our project.


Support input URLs without a scheme

This should "just work":
lychee google.com

Question is if the default scheme should be http or https.
curl still uses http.

let's use http then.


Added CartoDB data visualization & mapping tool

Disclaimer: I work at CartoDB.
That said, a lot of students use us and the "student specials" are a nice addon you usually have to pay for.

Thanks @Kartones


Your account must have a Cloud Pak entitlement in IBM Passport Advantage

When deploying an Openshift Infra on IBM Cloud with with module.cluster.ibm_container_vpc_cluster module, it throws the below:
│ Error: Request failed with status code: 400, ServerErrorResponse: {"incidentID":"60b05a2b-bfb1-4891-9b65-830f150ee7d3","code":"E3595","description":"To set the 'entitlement' field, your account must have a Cloud Pak entitlement in IBM Passport Advantage. Confirm that you have an entitlement and try again.","type":"BadRequest"}
│
│   with module.cluster.ibm_container_vpc_cluster.cluster[0],
│   on .terraform/modules/cluster/main.tf line 165, in resource "ibm_container_vpc_cluster" "cluster":
│  165: resource ibm_container_vpc_cluster cluster {
│

Initial workaround was to comment out ocp_entitlement variable in both the root module and the child module. Also setting the default vaule of cluster_ocp_entitlement to "" in variables.tf resolves the issue.

This default variable comes from the terraform ibmcloud container_vpc_cluster resource. The description of it is,
entitlement - (Optional, String) Entitlement reduces additional OCP Licence cost in OpenShift clusters. Use Cloud Pak with OCP Licence entitlement to create the OpenShift cluster. Note

    It is set only when the first time creation of the cluster, further modifications are not impacted.

    Set this argument to cloud_pak only if you use the cluster with a Cloud Pak that has an OpenShift entitlement.

Following actions required for quickstart and standard:

Update documentation in this repo
Change default to null
Add choice to interactive menu


Feature Request: Allow user to create Journal Entries in the Journal instead of Compendium

While a character might have knowledge of their continent, they may not have knowledge of smaller bergs.
In order to facilitate this in game, the permissions system could be used, effectively hiding a berg until your players stumble on it and get to know the place a bit. This is not possible when all entries are in the compendium.
Which version of import a DM wants to use should be configurable.

You can change the default permissions when importing the map and then manually change the permissions when your players have found a new burg. The primary reason that the journals exist in the compendium is due to the fact that Foundry doesn't load content from Compendiums until called upon. This saves a significant amount of resources when loading since Foundry won't have to load hundreds, possibly thousand+, journals every time you load into the world for the first time.


Unable to build.

Git clone submodules recursive fails, but I was able to manually fix that.
╰─(base) ⠠⠵ git submodule update --init --recursive                                                                                on main|✚1
fatal: remote error: upload-pack: not our ref e50cd96d28c89f6c1343c291042b14bab6f3b83b
fatal: Fetched in submodule path 'encodec.cpp', but it did not contain e50cd96d28c89f6c1343c291042b14bab6f3b83b. Direct fetching of that commit failed.

But then when I do cmake --build . --config Release I get:
╰─(base) ⠠⠵ cmake --build . --config Release                                                                                on main|✚1
[  4%] Building C object encodec.cpp/ggml/src/CMakeFiles/ggml.dir/ggml.c.o
[  8%] Building C object encodec.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-alloc.c.o
[ 12%] Building C object encodec.cpp/ggml/src/CMakeFiles/ggml.dir/ggml-backend.c.o
[ 16%] Linking C shared library libggml.so
[ 16%] Built target ggml
[ 20%] Building CXX object encodec.cpp/CMakeFiles/encodec.dir/encodec.cpp.o
/home/arthur/dev/ai/bark.cpp/encodec.cpp/encodec.cpp:319:22: warning: multi-character character constant [-Wmultichar]
  319 |         if (magic != ENCODEC_FILE_MAGIC) {
      |                      ^~~~~~~~~~~~~~~~~~
/home/arthur/dev/ai/bark.cpp/encodec.cpp/encodec.cpp: In function ‘void print_tensor(ggml_tensor*)’:
/home/arthur/dev/ai/bark.cpp/encodec.cpp/encodec.cpp:79:27: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
   79 |         printf("shape=[%lld, %lld, %lld, %lld]\n", a->ne[0], a->ne[1], a->ne[2], a->ne[3]);
      |                        ~~~^                        ~~~~~~~~
      |                           |                               |
      |                           long long int                   int64_t {aka long int}
      |                        %ld
/home/arthur/dev/ai/bark.cpp/encodec.cpp/encodec.cpp:79:33: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
   79 |         printf("shape=[%lld, %lld, %lld, %lld]\n", a->ne[0], a->ne[1], a->ne[2], a->ne[3]);
      |                              ~~~^                            ~~~~~~~~
      |                                 |                                   |
      |                                 long long int                       int64_t {aka long int}
      |                              %ld
/home/arthur/dev/ai/bark.cpp/encodec.cpp/encodec.cpp:79:39: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
   79 |         printf("shape=[%lld, %lld, %lld, %lld]\n", a->ne[0], a->ne[1], a->ne[2], a->ne[3]);
      |                                    ~~~^                                ~~~~~~~~
      |                                       |                                       |
      |                                       long long int                           int64_t {aka long int}
      |                                    %ld
/home/arthur/dev/ai/bark.cpp/encodec.cpp/encodec.cpp:79:45: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
   79 |         printf("shape=[%lld, %lld, %lld, %lld]\n", a->ne[0], a->ne[1], a->ne[2], a->ne[3]);
      |                                          ~~~^                                    ~~~~~~~~
      |                                             |                                           |
      |                                             long long int                               int64_t {aka long int}
      |                                          %ld
/home/arthur/dev/ai/bark.cpp/encodec.cpp/encodec.cpp: In function ‘bool encodec_load_model_weights(const std::string&, encodec_model&, int)’:
/home/arthur/dev/ai/bark.cpp/encodec.cpp/encodec.cpp:714:89: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
  714 |                 fprintf(stderr, "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld, %lld], expected [%d, %d, %d]\n",
      |                                                                                ~~~^
      |                                                                                |
      |                                                                                long long int
      |                                                                                %ld
  715 |                         __func__, name.data(), tensor->ne[0], tensor->ne[1], tensor->ne[2], ne[0], ne[1], ne[2]);
      |                                                ~~~~~~~~~~~~~
      |                                                            |
      |                                                            int64_t {aka long int}
/home/arthur/dev/ai/bark.cpp/encodec.cpp/encodec.cpp:714:95: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 6 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
  714 |                 fprintf(stderr, "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld, %lld], expected [%d, %d, %d]\n",
      |                                                                                ~~~^
      |                                                                                |
      |                                                                                long long int
      |                                                                                %ld
  715 |                         __func__, name.data(), tensor->ne[0], tensor->ne[1], tensor->ne[2], ne[0], ne[1], ne[2]);
      |                                                               ~~~~~~~~~~~~~
      |                                                                           |
      |                                                                           int64_t {aka long int}
/home/arthur/dev/ai/bark.cpp/encodec.cpp/encodec.cpp:714:101: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 7 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
  714 |                 fprintf(stderr, "%s: tensor '%s' has wrong shape in model file: got [%lld, %lld, %lld], expected [%d, %d, %d]\n",
      |                                                                                ~~~^
      |                                                                                |
      |                                                                                long long int
      |                                                                                %ld
  715 |                         __func__, name.data(), tensor->ne[0], tensor->ne[1], tensor->ne[2], ne[0], ne[1], ne[2]);
      |                                                                              ~~~~~~~~~~~~~
      |                                                                                |
      |                                                                                int64_t {aka long int}
[ 25%] Linking CXX static library libencodec.a
[ 25%] Built target encodec
[ 29%] Building CXX object CMakeFiles/bark.dir/bark.cpp.o
/home/arthur/dev/ai/bark.cpp/bark/bark.cpp: In function ‘void print_tensor(ggml_tensor*)’:
/home/arthur/dev/ai/bark.cpp/bark/bark.cpp:74:27: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
   74 |         printf("shape=[%lld, %lld, %lld, %lld]\n", a->ne[0], a->ne[1], a->ne[2], a->ne[3]);
      |                        ~~~^                        ~~~~~~~~
      |                           |                               |
      |                           long long int                   int64_t {aka long int}
      |                        %ld
/home/arthur/dev/ai/bark.cpp/bark/bark.cpp:74:33: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
   74 |         printf("shape=[%lld, %lld, %lld, %lld]\n", a->ne[0], a->ne[1], a->ne[2], a->ne[3]);
      |                              ~~~^                            ~~~~~~~~
      |                                 |                                   |
      |                                 long long int                       int64_t {aka long int}
      |                              %ld
/home/arthur/dev/ai/bark.cpp/bark/bark.cpp:74:39: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
   74 |         printf("shape=[%lld, %lld, %lld, %lld]\n", a->ne[0], a->ne[1], a->ne[2], a->ne[3]);
      |                                    ~~~^                                ~~~~~~~~
      |                                       |                                       |
      |                                       long long int                           int64_t {aka long int}
      |                                    %ld
/home/arthur/dev/ai/bark.cpp/bark/bark.cpp:74:45: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 5 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
   74 |         printf("shape=[%lld, %lld, %lld, %lld]\n", a->ne[0], a->ne[1], a->ne[2], a->ne[3]);
      |                                          ~~~^                                    ~~~~~~~~
      |                                             |                                           |
      |                                             long long int                               int64_t {aka long int}
      |                                          %ld
/home/arthur/dev/ai/bark.cpp/bark/bark.cpp: In function ‘void bark_print_statistics(gpt_model*)’:
/home/arthur/dev/ai/bark.cpp/bark/bark.cpp:123:47: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
  123 |     printf("%s:   sample time = %8.2f ms / %lld tokens\n", __func__, model->t_sample_us/1000.0f, model->n_sample);
      |                                            ~~~^                                                  ~~~~~~~~~~~~~~~
      |                                               |                                                         |
      |                                               long long int                                             int64_t {aka long int}
      |                                            %ld
/home/arthur/dev/ai/bark.cpp/bark/bark.cpp: In function ‘bool bark_generate_audio(bark_context*, std::string&, std::string&, int, bark_verbosity_level)’:
/home/arthur/dev/ai/bark.cpp/bark/bark.cpp:2048:43: error: ‘encodec_verbosity_level’ has not been declared
 2048 |         encodec_model_path, n_gpu_layers, encodec_verbosity_level::LOW);
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~
/home/arthur/dev/ai/bark.cpp/bark/bark.cpp:2060:5: error: ‘encodec_set_sample_rate’ was not declared in this scope
 2060 |     encodec_set_sample_rate(ectx, sample_rate);
      |     ^~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/bark.dir/build.make:76: CMakeFiles/bark.dir/bark.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:256: CMakeFiles/bark.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
╭─arthur at aquarelle in ~/dev/ai/bark.cpp/bark/build on main✘✘✘ 24-03-06 - 5:17:37
╰─(base) ⠠⠵ cmake --build . --config Release

any ideas?
thanks!

Running into the same error. @PABannier any thoughts?

This commit doesn't exist indeed, probably it just wasn't pushed to upstream?
https://github.com/PABannier/encodec.cpp/tree/e50cd96d28c89f6c1343c291042b14bab6f3b83b
There is a branch debug_bark_and_encodec, i've tried to use latest commit from it instead and got somehow runnable bark.cpp, yet it generates barely recognisable speech.
@PABannier , once you have some time for it, please check if some commit should be pushed to encodec.cpp or, probably the reference within bark.cpp. should be updated to point to existing commit

@PABannier thanks!
Going through the process now. First (minor) issue:
At the step:
python3 -m pip install -r bark/requirements.txt

At that point I'm inside of build/, there's no bark/.
I'm guessing you meant the requiremenents.txt in / of the project, so I did that:
cd ..
python3 -m pip install -r requirements.txt

@PABannier
Thank you, missing encodec.cpp commit issue is fixed indeed.
Very impressive!
@arthurwolf
Regarding steps to make it work:
git clone --recursive https://github.com/PABannier/bark.cpp.git
cd bark.cpp
mkdir build
cd build
cmake ..
cmake --build . --config Release
cd ..
python3 -m pip install -r requirements.txt
python3 download_weights.py --download-dir ./models
wget https://huggingface.co/suno/bark/raw/main/vocab.txt
mv ./vocab.txt ./models/
python3 convert.py --dir-model ./models --vocab-path ./models --out-dir ./ggml_weights/
cd ./encodec.cpp/
python3 convert.py --dir-model ./../models --out-dir ./../ggml_weights/ --use-f16
cd ../
mv ./ggml_weights/ggml-model.bin ./encodec_weights.bin
./build/examples/main/main -m ./ggml_weights/ -p "this is an audio"
play ./output.wav

@CoruNethron I'll add these in the instructions!
Congratulations for your newborn!

@CoruNethron Congratulations!

Regarding steps to make it work:

Thank you so much, I really wish more people would post their working-steps like this in these situations, that's very very nice of you. I'll try them soon.
(also, congratulations !! good luck not sleeping for a while)

Closing this as the instructions have been updated.


add Eric as an author

@roedoejet There is no dev.author branch on the main repo. It would be useful to fix the instructions in "Become an author" to specify where the edit should be PR'd to these days. I'm guess review is an OK place to PR this to, but I'm assuming you'll fix the destination of this PR if needed.


How to disable analytics app

Hello, is there a proper way to disable analytics app? I have no need in analytic tables. Disconnecting receivers (implemented at oscar/app/analytics/receivers.py) in my project seems to be monkey pathcing to me.
Thank you

Have you tried removing the app from your project's INSTALLED_APPS setting?

Removed from INSTALLED_APPS. Also removed oscar.apps.dashboard.reports which uses analytics. Still having error
`KeyError: 'analytics'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 27, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 350, in execute
self.check()
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 379, in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 60, in _run_checks
issues.extend(super()._run_checks(**kwargs))
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 366, in _run_checks
return checks.run_checks(**kwargs)
File "/usr/local/lib/python3.6/site-packages/django/core/checks/registry.py", line 71, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python3.6/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/usr/local/lib/python3.6/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/usr/local/lib/python3.6/site-packages/django/utils/functional.py", line 37, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 533, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python3.6/site-packages/django/utils/functional.py", line 37, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 526, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/local/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/app/src/billing/urls.py", line 5, in
from oscar.app import application
File "/usr/local/lib/python3.6/site-packages/oscar/app.py", line 13, in
class Shop(Application):
File "/usr/local/lib/python3.6/site-packages/oscar/app.py", line 22, in Shop
dashboard_app = get_class('dashboard.app', 'application')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 59, in get_class
return get_classes(module_label, [classname], module_prefix)[0]
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/app.py", line 10, in
class DashboardApplication(BaseDashboardApplication):
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/app.py", line 17, in DashboardApplication
reports_app = get_class('dashboard.reports.app', 'application')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 59, in get_class
return get_classes(module_label, [classname], module_prefix)[0]
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/reports/app.py", line 7, in
class ReportsApplication(DashboardApplication):
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/reports/app.py", line 11, in ReportsApplication
index_view = get_class('dashboard.reports.views', 'IndexView')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 59, in get_class
return get_classes(module_label, [classname], module_prefix)[0]
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/reports/views.py", line 9, in
ReportForm = get_class('dashboard.reports.forms', 'ReportForm')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 59, in get_class
return get_classes(module_label, [classname], module_prefix)[0]
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/reports/forms.py", line 8, in
'GeneratorRepository')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 59, in get_class
return get_classes(module_label, [classname], module_prefix)[0]
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/reports/utils.py", line 6, in
'UserReportGenerator'])
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/analytics/reports.py", line 10, in
ProductRecord = get_model('analytics', 'ProductRecord')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 296, in get_model
return apps.get_model(app_label, model_name)
File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 202, in get_model
app_config = self.get_app_config(app_label)
File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 159, in get_app_config
raise LookupError(message)
LookupError: No installed app with label 'analytics'.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 152, in get_app_config
return self.app_configs[app_label]
KeyError: 'analytics'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 27, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 350, in execute
self.check()
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 379, in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 366, in _run_checks
return checks.run_checks(**kwargs)
File "/usr/local/lib/python3.6/site-packages/django/core/checks/registry.py", line 71, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python3.6/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/usr/local/lib/python3.6/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/usr/local/lib/python3.6/site-packages/django/utils/functional.py", line 37, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 533, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python3.6/site-packages/django/utils/functional.py", line 37, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/lib/python3.6/site-packages/django/urls/resolvers.py", line 526, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/local/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/app/src/billing/urls.py", line 5, in
from oscar.app import application
File "/usr/local/lib/python3.6/site-packages/oscar/app.py", line 13, in
class Shop(Application):
File "/usr/local/lib/python3.6/site-packages/oscar/app.py", line 22, in Shop
dashboard_app = get_class('dashboard.app', 'application')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 59, in get_class
return get_classes(module_label, [classname], module_prefix)[0]
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/app.py", line 10, in
class DashboardApplication(BaseDashboardApplication):
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/app.py", line 17, in DashboardApplication
reports_app = get_class('dashboard.reports.app', 'application')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 59, in get_class
return get_classes(module_label, [classname], module_prefix)[0]
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/reports/app.py", line 7, in
class ReportsApplication(DashboardApplication):
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/reports/app.py", line 11, in ReportsApplication
index_view = get_class('dashboard.reports.views', 'IndexView')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 59, in get_class
return get_classes(module_label, [classname], module_prefix)[0]
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/reports/views.py", line 9, in
ReportForm = get_class('dashboard.reports.forms', 'ReportForm')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 59, in get_class
return get_classes(module_label, [classname], module_prefix)[0]
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/reports/forms.py", line 8, in
'GeneratorRepository')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 59, in get_class
return get_classes(module_label, [classname], module_prefix)[0]
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/dashboard/reports/utils.py", line 6, in
'UserReportGenerator'])
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 69, in get_classes
return class_loader(module_label, classnames, module_prefix)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 127, in default_class_loader
oscar_module = _import_module(oscar_module_label, classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 182, in _import_module
return import(module_label, fromlist=classnames)
File "/usr/local/lib/python3.6/site-packages/oscar/apps/analytics/reports.py", line 10, in
ProductRecord = get_model('analytics', 'ProductRecord')
File "/usr/local/lib/python3.6/site-packages/oscar/core/loading.py", line 296, in get_model
return apps.get_model(app_label, model_name)
File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 202, in get_model
app_config = self.get_app_config(app_label)
File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 159, in get_app_config
raise LookupError(message)
LookupError: No installed app with label 'analytics'.`

solved it overriding the ready and get_urls methods of DashboardConfig
Just comment the self.reports_app = apps.get_app_config('reports_dashboard') and path('reports/', include(self.reports_app.urls[0])) lines
from oscar.core.loading import get_class
from django.urls import include, path
from django.apps import apps
class DashboardConfig(dash_apps.DashboardConfig):
    name = 'apps.dashboard'
    def ready(self):
        self.index_view = get_class('dashboard.views', 'IndexView')
        self.login_view = get_class('dashboard.views', 'LoginView')

        self.catalogue_app = apps.get_app_config('catalogue_dashboard')
        # self.reports_app = apps.get_app_config('reports_dashboard')
        self.orders_app = apps.get_app_config('orders_dashboard')
        self.users_app = apps.get_app_config('users_dashboard')
        self.pages_app = apps.get_app_config('pages_dashboard')
        self.partners_app = apps.get_app_config('partners_dashboard')
        self.offers_app = apps.get_app_config('offers_dashboard')
        self.ranges_app = apps.get_app_config('ranges_dashboard')
        self.reviews_app = apps.get_app_config('reviews_dashboard')
        self.vouchers_app = apps.get_app_config('vouchers_dashboard')
        self.comms_app = apps.get_app_config('communications_dashboard')
        self.shipping_app = apps.get_app_config('shipping_dashboard')

    def get_urls(self):
        from django.contrib.auth import views as auth_views

        urls = [
            path('', self.index_view.as_view(), name='index'),
            path('catalogue/', include(self.catalogue_app.urls[0])),
            # path('reports/', include(self.reports_app.urls[0])),
            path('orders/', include(self.orders_app.urls[0])),
            path('users/', include(self.users_app.urls[0])),
            path('pages/', include(self.pages_app.urls[0])),
            path('partners/', include(self.partners_app.urls[0])),
            path('offers/', include(self.offers_app.urls[0])),
            path('ranges/', include(self.ranges_app.urls[0])),
            path('reviews/', include(self.reviews_app.urls[0])),
            path('vouchers/', include(self.vouchers_app.urls[0])),
            path('comms/', include(self.comms_app.urls[0])),
            path('shipping/', include(self.shipping_app.urls[0])),
            path('login/', self.login_view.as_view(), name='login'),
            path('logout/', auth_views.LogoutView.as_view(next_page='/'), name='logout'),
        ]
        return self.post_process_urls(urls)

Can be solved as said by the latest reply.


Long lines horizontal scrolling broken

open a file with very long lines (in my case it is workbench.desktop.main.js after running yarn gulp vscode-darwin-arm64)
find a line with a long define call
scroll to the right so that the start of the lines in the view port aren't visible
scroll left, do it so that only horizonal scrolling happens
the line starts are very slowly, sometimes never w/o a vertical scroll

Sharing video and file
https://user-images.githubusercontent.com/1794099/215524867-05858466-dc0e-487a-84ca-81152dd376a7.mov
workbench.desktop.main.js.zip

Synced offline and there are additional settings that being used in the setup:

Font family: "editor.fontFamily": "'Fira Code', Menlo, Monaco"
Font Ligature turned on
Render whitespace turned on

With the second setting, ViewLine will not use the fast FastRenderedViewLine so https://github.com/microsoft/vscode/commit/3ebfaadb9b856e58eef7d84d177a98dc6c149146 or https://github.com/microsoft/vscode/commit/b229eb5fa2ecadb8a5238ccb9f6f49f7ccba9d2b have no impact on this issue. However it's possibly related to the new whitespace rendering https://github.com/microsoft/vscode/pull/
I didn't reproduce this issue, @hediet it would be great if you can also give it a try. @jrieken if you can reproduce again, it would be help if you can try to turn off following settings to help narrow down the root cause

Turn off the new render while space technique editor.experimentalWhitespaceRendering: off
Turn off rendering while space editor.renderWhitespace: none

@rebornix Thanks for investigating. btw - I am fine to remove this from the candidate milestone. This seems harder to reproduce that I initially thought

@jrieken @rebornix I'm experiencing horizontal scrolling bug starting from current release (1.75.1) or maybe one release earlier.
Wasn't sure how to reproduce it exactly, but looks like I have found it. In the video I'm pressing Home/End buttons. The issue appears when the vertical scroller is not at zero position. It takes more than one Home/End presses to make horizontal scroller reach its destination. The longer the line, the more presses are needed. Have checked these settings with no effect:
editor.fontFamily editor.fontLigatures editor.experimentalWhitespaceRendering editor.renderWhitespace

As of 1.76 the issue (my previous comment) still there, have spent some time finding the source of it by filtering my settings file, found that the setting causing the issue is editor.smoothScrolling set to true

@n-gist Same issue for me, when the vertical scroller is on top, it works fine - its smooth. When it's not on top, it's laggy when I horizontal scroll, it's driving me crazy when you work with long lines.
Yes, disabling editor.smoothScrolling will fix this, but I want smooth scroll :D
Interesting thing is, I use VSCode on 2 machines with the same settings, same extensions, same vscode version (using GitHub Sync) and I can reproduce this bug only on one of them.

Upgraded to v1.80.0 and it's fixed for me, no more laggy scrolling 👍 thx


Microsoft.WingetCreate version <IP_ADDRESS>

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?

[x] Does your manifest conform to the 1.0 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Didn't see the other PR. My bad.


remove fn & named-readtables dependencies

There are 50 uses of my λ syntax in cepl. Turn them to regular lambdas or local functions and remove this dependency. It wont be of much value until I do the same it varjo but its still worth dropping a dependency.
This is for the goal of compatibility with more implementations at the cost of things being a bit uglier

Done for CEPL. Still used by varjo so it's a pyrrhic victory but it's a necessary step.
https://github.com/cbaggers/varjo/issues/142

Incidentally, I learned a new expression today :P

A Pyrrhic victory (/ˈpɪrɪk/ (About this sound listen) PIRR-ik) is a victory that inflicts such a devastating toll on the victor that it is tantamount to defeat.

Hehe, it's a nice one


React-refresh throws error when use .js extension for page component

Leaving an open issue for bug fixing.

@wellyshen , Hi, May I ask you to add reproduction of issue?


Using react-dnd as part of a component for a UI library

Describe the bug
Trying to use the react-dnd library as part of a UI library and I get the error Expected drag and drop context when attempting to consume that component in a host application.
Reproduction
A little tough to reproduce this publicly as this very well might be an issue with our UI library but I created a component that more or less functions like so:
export function DraggableTable() {
  const [{ canDrop, isOver }, drop] = useDrop(() => ({}));
  const [collected, drag, dragPreview] = useDrag(() => ({}));
  return (<table>// all the appropriate code</table>);
}

It is then consumed like so:
// index.js
<DndProvider backend={HTML5Backend}>
   <App />
</DndProvider>
// app.js
import {DraggableTable} from "my-react-ui-library"
<DraggableTable />

Expected behavior
Since my host app is wrapping itself with the DndProvider the context should be considered as provided.
Additional context
If I move the DraggableTable to my host app everything works fine. It's only when trying to consume it as a UI component from my company library that it fails with the Expected drag and drop context. If it helps I'm using rollup to build the UI library.

You need to have react-dnd as a peer dependency of your library instead of a dependency

you should install react-dnd and react-dnd-html5-backend in your my-react-ui-library, and then hava react-dnd and react-dnd-html5-backend as peerDependencies in your library's package.json.

Jeez, sorry should have closed this a long time ago. I ended up doing exactly what zzg-forward suggested and it worked out. Thanks all for the help!

Sorry to open this again but I have similar problem with next app + 2 ui lib packages. Moving react-dnd between dependencies and peerDependencies does not seem to fix the issue.


Alternative Dockerfile for alpine:3.5 based image

I already use such image and think of it as an alternative to current image based on python:3.4-wheezy (very outdated) or maybe, newer python:3.5-slim. I left original Dockerfile untouched and added Dockerfile-alpine3.5. I do not use requirements.txt. The  fixed versions of docker-py, tornado and pytz are installed with pip by RUN in  Dockerfile-alpine3.5. It is on Jupyter developers to decide what to do further.
Image misolietavec/tmpnb is available on hub.docker.com, its size is 71.67 MB. It has 26 apk-installed packages and 10 pip-installed, so is certainly not bloated. Issues with busybox - it is included in many well known distributions (Red Hat/Centos, Debian, Arch,...). And musl libc instead of glibc - can someone think of concrete problems in context of tmpnb (or jupyter/configurable-http-proxy) docker images?

Hi @misolietavec, This looks good to me. Thanks for leaving the original file too. Happy to merge :cake: cc/ @rgbkrk.

Thanks for merging @willingc and @misolietavec for sending a PR over.
tmpnb is just a service, nothing is intended to extend from the base image for it (as far as I know). The only reason to keep the other images with Debian etc. is to use common layers amongst an overall deployment (the numpy/scipy stack make the discussion here about sizing fairly moot).


Palindrome number

Title of article
Write a C++ program to check palindrome number.
Additional information
Input  : 123
Output : Not palindrome number

Input  : 121
Output : Palindrome number

Code of Conduct

[X] I have read and agree to the Codinasion project's Code of Conduct

it should solve Your Issues !
#include<iostream>
using namespace std;
int main()
{
    int num, rev=0, rem, temp;
    cout<<"Enter the Number: ";
    cin>>num;
    temp = num;
    while(temp>0)
    {
        rem = temp%10;
        rev = (rev*10)+rem;
        temp = temp/10;
    }
    if(rev==num)
        cout<<"\nIt is a Palindrome Number";
    else
        cout<<"\nIt is not a Palindrome Number";
    cout<<endl;
    return 0;

Hii @ishre-yash
Thanks for contributing to this open source project 😃
Could you please open a pull request for this.


Introducing Lotus::Utils::String#rsub

It replaces rightmost occurence of given pattern and replaces with given replacement.
require 'lotus/utils/string'

string = Lotus::Utils::String.new('authors/books/index')
string.rsub("/", "#") # => "authors/books#index"

This feature supports https://github.com/lotus/router/pull/76
/cc @lotus/core-team

you rocks ;) nice :+1: but check CI please


.update() for the new AsyncNotifier only work for first time, the previous state from the callback never change

How to reproduce
I just basically copied the code from the pull request for the new syntax #1565
class CounterNotifier extends AsyncNotifier<int> {
  @override
  FutureOr<int> build() async {
    return 0;
  }

  Future<int> increment() {
    return update((state) => state + 1);
  }
}

final counterProvider = AsyncNotifierProvider<CounterNotifier, int>(CounterNotifier.new);

And I call the increment method like usual
ref.read(counterProvider.notifer).increment();

After I first call the method, the state successfully turned in to 1. But then I call it again the state will never change, it always stays in 1.
The previous state from the callback parameter is always 0, which is not the state I updated from the first increment call.
Am I using it wrong? For the synchronous version Notifier it's working fine.

The Notifier API isn't released yet as it's still WIP.
There are still some bugs to fix.
Le ven. 16 sept. 2022 à 04:00, Wolf_G @.***> a écrit :

How to reproduce
I just basically copied the code from the pull request for the new syntax
#1565 https://github.com/rrousselGit/riverpod/pull/1565
class CounterNotifier extends AsyncNotifier {
@override
FutureOr build() async {
return 0;
}
Future increment() {
return update((state) => state + 1);
}
}
final counterProvider = AsyncNotifierProvider<CounterNotifier, int>(CounterNotifier.new);
And I call the increment method like usual
ref.read(counterProvider.notifer).increment();
After I first call the method, the state successfully turned in to 1. But
then I call it again the state will never change, it always stays in 1.
The previous state from the callback parameter is always 0, which is not
the state I updated from the first increment call.
Am I using it wrong? For the synchronous version Notifier it's working
fine.
—
Reply to this email directly, view it on GitHub
https://github.com/rrousselGit/riverpod/issues/1643, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEZ3I3PCW54RMQBSHRAD2TTV6PIB7ANCNFSM6AAAAAAQN5DYXM
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Support Gzip compression by default

It turns out Jersey HTTP client doesn't support compression out of the box. Configuring it is dirt simple:
client.register(GZipEncoder.class)

but still I feel like it would be beneficial to just make it a default and allow turning it off via YAML (kind of similar to Jetty server feature).

On by default, can be controlled via jerseyclient.compression


🐞 Keyboard Shortcut Conflict while Closing Tab

Description
The keyboard command Command + w should close the current tab per configuration, but it closes the window (even when there are more than 1 tab).
I believe it may be a keyboard shortcut conflict or a configuration error.
To Reproduce

Open a window with more than 1 tab.
Hit Command + w.

Expected behavior
It should close the tab rather than the window.
Version information
CodeEdit: 1.0 (1)
Commit: c8c969d92d5877b9251d59f54331dbb20d41fea6
MacOS: 12.3 (21E230)
Xcode: 13.3 (13E113)
Additional context
No response

Because, Command + w is attached to close, but when I do it, it closes the tab and not the window!

@nanashili : Yeah I just checked it again and it worked! I am not sure why it happened before. And glad to see your fix!


support more memory ext

您好, 我的英语不是很好, 我用谷歌翻译并且将意思尽量简短.
我完整的看完了有关你写代码, 准备嵌入到我有关数据存储方面里面去，但是发现如果存在多个子树并不是很友好, 所以我对有关memory部分做了如下扩展

抽象有关文件操作的部分 BaseMemory
删除有关wal锁的部分，跟回滚有关的代码可能 需要完善
对文件操作方式未做更改, 您更多的为了文件分页做了足量的优化
将配置全局化，这样子可以有效的生成多个b+树的时候配置的统一

b+树仅仅只是数据存储中很小的一部分，为了真正的使用它，而不是作为学习的玩具. 这部分扩展希望您可以参阅我的代码，更新这部分代码，或者merge...

Hello, my English is not very good, I use Google Translate and keep the meaning as short as possible.
I completely read about the code you wrote, ready to embed into my data storage, but found that if there are multiple subtrees, it is not very friendly, so I made the following extensions to the memory part.

Abstract part of the file operation BaseMemory.
Remove the part about the wal lock, the code related to the rollback may be ** need to be improved**.
There are no changes to the way the file is operated. You have done more optimization for file paging.
Globalize the configuration so that the configuration can be efficiently generated when multiple b+ trees are generated.

The b+ tree is just a small part of the data store, in order to actually use it, not as a learning toy. This part of the extension hopes you can refer to my code, update this part of the code, or merge it...

@NicolasLM unit test file is tests/test_extmemory.py..


fix: check for phone identity on Phone Change

What kind of change does this PR introduce?
Allows user to change phone number to that of another unconfirmed phone number in they system
What is the current behavior?
Currently, it is not possible to use a phone number which exists in the system but is unconfirmed. Consider the following scenario:

User A signs up with phone number PN but doesn't confirm the number.
User B signs up with phone number PN2 and confirms it.
User B tries to update their phone number to PN -> this fails because User A has signed up with it already.

What is the new behavior?
Check is done via phone identity, it is possible to change phone number to one that is tagged to another user but uncofirmed.
Additional context

[ ]  Need to see if we can use this method in the admin route and remove IsDuplciatedPhone
[ ]  Think and check if it's worthwhile to write a new model method and condense the FindUser and FindIdentity into a single function

Pull Request Test Coverage Report for Build<PHONE_NUMBER>2
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

12 of 14 (85.71%)  changed or added relevant lines in 2 files are covered.
71 unchanged lines in 5 files lost coverage.
Overall coverage increased (+0.01%) to 57.175%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

internal/models/user.go
11
13
84.62%

Files with Coverage Reduction
New Missed Lines
%

internal/models/user.go
1
75.67%

internal/api/helpers.go
5
80.49%

internal/security/captcha.go
11
68.52%

internal/api/admin.go
23
65.81%

internal/api/middleware.go
31
80.52%

Totals

Change from base Build<PHONE_NUMBER>7:
0.01%

Covered Lines:
9574

Relevant Lines:
16745

💛  - Coveralls


Let extension be able to get current search options

Let extension be able to get current search options, such as query string, include/exclude info, ...

What do you want this for?

To build extension, such as:
First stage:

expand/hide "search detail" by situation

always expand, always hide
expand if default option is changed
...

show current search option in state bar

Second stage:

pre-defined search or search option in setting

run pre-defined search, then restore last search after
set to pre-defined search option

remember search history with options

search in the history, and restore selected search (with option)
assign key shortcut to some selected search (with option)

Future (may be not):

use search panel as input/output, search engine

auto rewrite user input
auto set option base on user input
...

I can see the use, but we have a bunch of other search API that has been on the backlog for a long time, and I don't see us getting to this in the near future.

@roblourens I'm building an extension that will let the user create search presets. So you could search in specific directories / file extensions etc. The use case for the extension is described in the following issue: https://github.com/microsoft/vscode/issues/101481
While I can build the extension with the existing APIs, I want to create the following features:

Save current search parameters into a preset (this should be a better UX than configuration)
Preserve the current query when replacing the search preset (include/exclude etc...)

For that, I need to be able to read the current search parameters. I want vscode API to expose a function to get these search parameters
I'll appreciate it if you'll reconsider the decision, and I'm willing to contribute if it helps.


v-if condition ruins the json editor visualization

Before you start, please make sure to:

[X] Read the document
[X] Have tried the latest version
[X] Search to see if your issue already exists
[X] Look for / ask questions through appropriate channels like Stack Overflow

Link to minimal (but complete) reproduction
https://github.com/giuliohome-org/repro-jsoneditor-issue/blob/main/src/components/HelloWorld.vue
Steps to reproduce
Main code

 read only

          <JsonEditorVue v-else v-model="myJSON" />

npm i
npm run dev

You see

If you click switchCondition

and then back to the previous json editor if you click again.
But now, if you edit a value
for example "a": 2
and you click 2 times again

the content visualization is ruined (and formatting does not work either)
What is expected?
Setting the v-if condition to false and back to true should not change the editor content visualization
What is actually happening?
A wrongly formatted text is displayed instead

System Info
Latest Vue 3 and latest json-editor-vue  on any Linux (e.g. Ubuntu) OS.

Package Manager
npm
Any additional comments?
No response

Thank you :heavy_heart_exclamation: Yes, the :label:  latest v0.13.2 release fixes this issue! :tada:

You can support this repository by giving it a Star, thanks.

Certainly, I had already put my star on the repository, I will spread the word on social media.

@cloydlau
Still a question:
After the json is edited, its type changes from object to string: can this be fixed too?

Refer to the branch typeissue
https://github.com/giuliohome-org/repro-jsoneditor-issue/blob/typeissue/src/components/HelloWorld.vue#L38

 read only

          <JsonEditorVue v-else v-model="myJSON" />
          {{ typeof(myJSON) }}

Notice that at the beginining it shows

but after a change

See https://github.com/cloydlau/json-editor-vue/issues/71

Uhm, so I've translated via google translator but then I landed to this https://github.com/josdejong/svelte-jsoneditor/pull/166#issuecomment-1287619966 which is in English and better for me.
So my fix in Vue 3 would be this one
const updatedContent = (myupdate: any) => {
  console.log("my update", myupdate);
  myupdate.json = JSON.parse(myupdate.text);
  myupdate.text = undefined
}

and  <JsonEditorVue v-else v-model="myJSON" :onChange="updatedContent" />
see my commit https://github.com/giuliohome-org/repro-jsoneditor-issue/commit/2dbd3f6ba7a264333206eb9b779168779835a856
Makes sense?

I'm afraid there might be bugs in your code, as you have not considered other modes or edge cases. I recommend that you thoroughly read this: https://github.com/josdejong/svelte-jsoneditor/pull/166 to get a better understanding.

I mean... that it is restricted to my scenario, where I only use the text mode. Do you see possible bugs if the mode is always text and the menu is hidden?
Thanks

Trust me, that's still buggy. I've mentioned that there are edge cases. I suggest reading https://github.com/josdejong/svelte-jsoneditor/pull/166 thoroughly. You will understand what I'm talking about.

Thanks, I understand, but the default behaviour is not usable for me in my code context. I have to call an API and I can't use a string as it is returned for sure.
More or less this snippet should suffice for my use case.
const updatedContent = (myupdate: any) => {
  console.debug("textual update", myupdate);
  if (myupdate.text !== "") {
    try {
      myupdate.json = JSON.parse(myupdate.text);
    } catch {
      console.debug("json is not valid: do nothing");
      return;
    }
  } else {
    myupdate.json = {};
  }
  myupdate.text = undefined;
  console.debug("parsed update", myupdate.json);
}

Thank you @cloydlau for your reply ❣
Will commit and try your suggestion asap on my project.
Best regards
Giulio

Cool 🆒 as I like to define it at the main app level, because it allows me to reduce the proliferation of onChange functions for multiple JSON editor tags. However, I'm afraid I can't access the jsonEditorVueRef at that level.
app.use(JsonEditorVue, {
  mode: "text",
  mainMenuBar: false,
  onChange: (updatedContent: any) => {
    if (updatedContent.text) {
      try {
        updatedContent.json = JSON.parse(updatedContent.text)
      }
      catch { }
      updatedContent.text = undefined
    }
  }
});

@giuliohome Hello, in version 0.14.0 you can accomplish this in a more elegant way:

[!Caution]

Not performant for large JSON documents.
Adjust the debounce value based on the size of your JSON.
Will output empty value when the input value is invalid.

<JsonEditorVue
  mode="text"
  :main-menu-bar="false"
  :stringified="false"
  :debounce="1000"
/>

Thank you very much in advance!
I'll upgrade today or tomorrow at the latest.
It looks very good!

Will try soon. Meanwhile, a quick question in principle: While I don't think I have any performance issues, hence I will possibly reduce the debounce to 500 or even less, I'm wondering what it implies for a "save" button handler. Should it:

Put the JSON editor in read-only mode
Wait for the debounce time before reading the JSON value and starting its action? (this is the question)
Do what it is supposed to do and give feedback...
Put the editor in read-write mode

Correct? Thanks again!

debounce refers to the interval time between your last input and the update of the binding value, which defaults to 100 milliseconds. You haven't encountered performance issues because the performance of json-editor-vue itself is not bad, and your JSON document is not large enough.

I know that. So, as a double check that my understanding is right, I'm saying that it implies that a click event handler should wait that debounce interval time as well before starting its action with the json value, do you agree?

Certainly.  That's why I made it configurable.

Excellent! Thank you for your help and support!


[Wave 6: Drafts] Add the autoreporting and submitted state as const to the App.

Part of https://github.com/Expensify/Expensify/issues/308213
Coming from the doc here, we have couple of constants which will need to be added to the App to support the drafts and its functionality.

Hi, I’m Michael (Mykhailo) from Callstack and I would like to work in this issue.

@mountiny, I assume that we need to extend:

Policy.ts with AUTO_REPORTING_FREQUENCIES. So, how the backend call this key in a policy object?
OriginalMessage.ts with a new type -OriginalMessageSubmitted. Am I right? What properties does OriginalMessageSubmitted have?

Those sounds correct yeah, catching up with other things now, will tyr to get back to this asap

actionName of the report action is SUBMITTED needs to be added to report.action.type here https://github.com/Expensify/App/blob/cbb069c994f321a7a0ff77f84464e74cbbc8f773/src/CONST.ts#L476-L493
As far as the originalMessage type goes, I would keep it as unknown for now. I think there can be lots of different shapes depending on the particular policy set up

For the AUTO_REPORTING_FREQUENCIES, not sure if I understand your question.
We will have to add these two keys to the Policy type:
   'autoReporting' => $policyData['autoReporting'] ?? false,
   'autoReportingFrequency' => $policyData['autoReportingFrequency'] ??

And possibly create a new autoReportingFrequency enum using the options you see in the doc

I'm not due any compensation here, so I'll un-assigning myself ✋

Can be closed


remove initial attempt at squat detection

This table is now well over 3.2M rows, is unused as far as I am aware, and causes unpleasant performance in the admin site.

Well, the CI doesn't like this change, but I certainly do! 🙃


[libctl] add port

I am trying to build MEEP in Windows, but before reaching that project I have to satisfy its dependencies, the first one being libctl. Since this one depends heavily on a POSIX subsystem (and some GNU libraries too, like Guile), I thought that the easiest way would have been using msys2. This would also let me use the common ./configure; make; make install procedure which is otherwise unsupported by MS toolchain.
While working on it, I found that the vcpkg's msys2 installation was not working, at least on my machine. So I already proposed another small PR #4990, which is a prerequisite for this one.
Now, in this one, I am stuck with a problem: at the end of the (apparently successful) build I reach this point:
-- Performing post-build validation
Could not find proper second linker member

But I don't know how to solve it. I tried to write a portfile.cmake as clean as possible in order to understand what's going on. The libraries are built using x86_64-w64-mingw32-g++ (the only installed toolchain), so I think that the library (a plain rename of the .a in .lib) should already be in the correct format. Using lib.exe creates an identical lib file, so I don't think that is the problem.
Any help would be really appreciated. I read #919 and #3902 but I don't know how to apply some hints to my case (I think that I can only hope for a static lib dynamically linked to CRT, am I right?).
Of course, if I can fix this, it will help me creating some other ports, on my way to MEEP, which will be (hopefully) published also here.

I am seeing this on x86-windows:
Starting package 1/1: libctl:x86-windows
Building package libctl[core]:x86-windows...
Could not locate cached archive: C:\vsts\_work\2\s\archives\a1\a16bbab14491ddc3fb217f3af71b01050177b0f7.zip
-- Note: libctl only supports static library linkage. Building static library.
-- Using cached C:/vsts/_work/2/s/downloads/libctl-4.1.4.tar.gz
-- Extracting source C:/vsts/_work/2/s/downloads/libctl-4.1.4.tar.gz
-- Installing gcc on msys2
-- Acquiring MSYS Packages...
-- Acquiring MSYS Packages... OK
-- Installing libtool, guile, gmp, diffutils and make on msys2
-- Acquiring MSYS Packages...
-- Acquiring MSYS Packages... OK
-- Configuring x86-windows-dbg
-- Configuring x86-windows-dbg done
-- Configuring x86-windows-rel
-- Configuring x86-windows-rel done
-- Package x86-windows-dbg
-- Package x86-windows-dbg done
-- Package x86-windows-rel
-- Package x86-windows-rel done
-- Performing post-build validation
Could not find proper second linker member

@rastaban yes exactly like me. I was asking for help to understand what’s wrong...?

ping... please let me know the meaning of that message and what I am doing wrong @ras0219-msft

@grdowns thanks for taking this PR. Do you know what’s wrong? Is there anything I can try to debug current stuck situation?

Maybe I was able to finally fix it!
(Still have to check with downstream projects, if the lib really works!)
vcpkg_execute_required_process(
    COMMAND lib /def:libctlgeom.a /OUT:ctlgeom.lib
    WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/ctlgeom/
    LOGNAME lib-${TARGET_TRIPLET}-dbg
)
vcpkg_execute_required_process(
    COMMAND lib /def:libctlgeomd.a /OUT:ctlgeomd.lib
    WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/ctlgeom/
    LOGNAME lib-${TARGET_TRIPLET}-dbg
)

just a second pass of the archive library inside the windows librarian made the library ok, it seems...

If this PR is ready to review, please let me know.
Thanks.

@cenit Is this PR being worked on? This is a routine cleanup of PRs, so we don't lose track of PRs. If so, it might make sense to open a new PR since it has been open for a long time.

Why close this PR? I'd like this.

Due to a wrong force push, I destroyed the PR.
I will reopen it sooner or later with a working version


Tpie upgrade

Coverage remained the same at 84.742% when pulling 0e71565b32bab14045ed6cd86446b18caefae2c8 on narek-cliqz:tpie_upgrade into c50100e5f2d7a6f8a921633ab32909f2fc240c95 on cliqz-oss:master.


feat(consent): added consent flow

Added:

consent data into sessionpayload
consent check on initial login
consent modal popup with markdown template

Future:
Maybe it makes more sense to add consent checking into the router for all endpoint. Also then it checks if consent has changed while active sessions are running.

Made consent into a modal component so it shows up on all pages. Feel free to merge this PR @cheburan .


fix: make directories recursively to generate deps.js

If we run duck build:deps first, it will fail.

Thanks! 👍


Why can't select record what inserting by node-sqlite3 in SQLiteStudio?

but can select by node-sqlite3.
code:
const sqlite3 = require('sqlite3').verbose();
const dbPath = "../snh48group.db";

let db = new sqlite3.Database(dbPath, (err) => {
    if (err) {
        return console.error(err.message);
    }
    console.log(`Connected to the ${dbPath} SQlite database.`);
})

db.serialize(() => {
    db.each("insert into star (sid, sname) values (99999, 'xys')", (err, row) => {
        if (err) {
            console.error(err.message);
        }
        console.log(row.sid + "\t" + row.sname);
    });
});

db.close((err) => {
    if (err) {
        return console.error(err.message);
    }
    console.log('Close the database connection.');
});

I thought whether commit is needed, but It seems that there is no material what I gathered. I'm so confused.
Apologize my poor English.

oh my god!  I opened wrong db file, because they had same name.


New release - 1.2.1

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 73.006%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1282

Relevant Lines:
1654

💛  - Coveralls