Root-validator reuse fails w/ dynamic functions

Checks

[x] I added a descriptive title to this issue
[x] I have searched (google, github) for similar issues and couldn't find anything
[x] I have read and followed the docs and still think this is a bug

Bug
In the following code snippet, a configuration value is either set or derived from another configuration value through a dynamically defined root-validator function.  When multiple of these functions are used, even with the reuse flag being set to True, this fails to construct the value with version 1.9.0.  At version 1.8.2, this had no issue.   A single use of the function does not trigger failure; this can be demonstrated by deleted BUILT and the following _built = ... line in the code snippet below.
from pydantic import (
    BaseSettings,
    root_validator,
)
from typing import Any, Dict

def get_or_build(base: str, field: str, suffix: str):
    def _get_or_build(cls, values: Dict[str, Any]) -> Any:
        if field in values:
            return values
        if base in values:
            values[field] = f"{values[base]}-{suffix}"
            return values
        raise ValueError(f"Must include BASE or {field}")

    return _get_or_build

class Settings(BaseSettings):
    BASE: str
    CONSTRUCTED: str
    _constructed = root_validator(allow_reuse=True, pre=True)(
        get_or_build(base="BASE", field="CONSTRUCTED", suffix="appended")
    )
    BUILT: str
    _built = root_validator(allow_reuse=True, pre=True)(
        get_or_build(base="BASE", field="BUILT", suffix="appended")
    )

settings = Settings()

1.8.2
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
             pydantic version: 1.8.2
            pydantic compiled: True
                 install path: /Users/trevor.currie/.pyenv/versions/3.9.6/envs/pydantic-1.8.2/lib/python3.9/site-packages/pydantic
               python version: 3.9.6 (default, Oct 18 2021, 10:31:44)  [Clang 12.0.0 (clang-1<IP_ADDRESS>)]
                     platform: macOS-10.15.7-x86_64-i386-64bit
     optional deps. installed: ['typing-extensions']

Result of execution of BASE=a-string python -c "from pydantic_bug import settings; print(settings.BASE); print(settings.CONSTRUCTED); print(settings.BUILT)":
a-string
a-string-appended
a-string-appended

1.9.0
Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())":
             pydantic version: 1.9.0
            pydantic compiled: True
                 install path: /Users/trevor.currie/.pyenv/versions/3.9.6/envs/pydantic-1.9.0/lib/python3.9/site-packages/pydantic
               python version: 3.9.6 (default, Oct 18 2021, 10:31:44)  [Clang 12.0.0 (clang-1<IP_ADDRESS>)]
                     platform: macOS-10.15.7-x86_64-i386-64bit
     optional deps. installed: ['typing-extensions']

Result of execution of BASE=a-string python -c "from pydantic_bug import settings; print(settings.BASE); print(settings.CONSTRUCTED); print(settings.BUILT)":
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/trevor.currie/Code/pydantic_bug/pydantic_bug.py", line 32, in <module>
    settings = Settings()
  File "pydantic/env_settings.py", line 38, in pydantic.env_settings.BaseSettings.__init__
  File "pydantic/main.py", line 331, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Settings
CONSTRUCTED
  field required (type=value_error.missing)

I believe this to be related to the changes implemented in PR #2670, but that's currently only a speculation based on the contents of the release changes.

Is there a workaround for this in the meantime? Just looking for a way to have a parameterized root_validator shared between a couple different BaseModels

@pstjohn Thank you for the feedback!
Could you please test this with Pydantic 1.10.9?
It would be great if you will be able to test this with Pydantic 2.0b2 and pydantic-settings 2.0b1 as well.
Also, a minimal reproducible example would help understanding the issue better.

Sure! Apologies, I was assuming I was running into the same problem as the first issue.
My issue is specifically the re-use of multiple root validators in the same BaseModel, where only the last root validator is applied.
Here's a repro:
import pydantic
import pytest

def check_present_in_values(item: str):

    @pydantic.root_validator(allow_reuse=True)
    def _wrapped(cls, values):
        if item not in values.values():
            raise ValueError
        else:
            return values

    return _wrapped

class MyClass(pydantic.BaseModel):
    field1: str
    field2: str

    _cat_validator = check_present_in_values('cat')
    _dog_validator = check_present_in_values('dog')

def test_myclass_valid_class_passes():
    MyClass(field1='cat', field2='dog')

def test_myclass_invalid_class_last_validator_raises():
    with pytest.raises(ValueError):
        MyClass(field1='cat', field2='parrot')

def test_myclass_invalid_class_first_validator_raises():
    with pytest.raises(ValueError):
        MyClass(field1='snake', field2='dog')

With pydantic==1.8.2, pytest test_3878.py works here; but with pydantic >= 1.9.0, the last test will fail:
FAILED test_3878.py::test_myclass_invalid_class_first_validator_raises - Failed: DID NOT RAISE <class 'ValueError'>

We’re no longer actively developing Pydantic V1 (although it will continue to receive security fixes for the next year or so), so we’re closing issues solely related to V1. If you really think this shouldn’t be closed, please comment or create a new issue 🚀.

@sydney-runkle we are seeing this in our production code and it is a scary bug. We are skipping validations unbeknownst to us. We cannot upgrade to v2 due to the longstanding performance issues: https://github.com/pydantic/pydantic/discussions/6748
This is a minimum reproducible example. If you run it, everything validates (which it should NOT). If you switch the order of _val1 and _val2 then the validation fails (which it should). Even if it cannot be fixed, can you please offer a workaround for users limited to v1?
from typing import List, Callable
from pydantic import root_validator, BaseModel

def exactly_one_of(keys: List[str]) -> Callable:
    def _validator(cls, v):
        vv = [1 if v.get(k) else 0 for k in keys]
        if sum(vv) != 1:
            raise Exception(f"Exactly one of {', '.join(keys)} is required for {cls}")
        return v

    return root_validator(_validator, allow_reuse=True)

def exactly_zero_or_one_of(keys: List[str]) -> Callable:
    def _validator(cls, v):
        vv = [1 if v.get(k) else 0 for k in keys]
        if sum(vv) > 1:
            raise Exception(f"exactly zero or one of: {keys} is required")
        return v

    return root_validator(_validator, allow_reuse=True)

class ExampleModel(BaseModel):
    field1: str
    field2: str
    _val1 = exactly_one_of(["field1", "field2"])
    _val2 = exactly_zero_or_one_of(["field1"])

ExampleModel(
    field1="hi",
    field2="there",
)

@michaelgmiller1,
Sorry to hear that. Understood - we'll be working on import time improvements + schema build improvements as to reduce the performance problems in V2.
At the moment, I'd say the best workaround would be to avoid using the dynamic functions. I know this isn't the best solution, but given that we're no longer actively working on V1, this is probably the best approach. You could also combine the logic of your dynamic functions into one, then only use one root validator, which should also work.


General help thread

The only dependency of pyqrack, being the underlying https://github.com/vm6502q/qrack library, is stable, validated, and relatively quiescent, for now, in my estimation as lead developer. A few months ago, it would have been more difficult to package shared library builds for it, for a project like pyqrack. However, I think it's likely that my upcoming development time on vm6502q will tend be in "superstructure" plugins, at least a good while, like Unity3D, respective "Big 5" framework plugins, and now pyqrack.
So, I want to add this library to the pypi registry, bundled with respective qrack shared library builds appropriate to each wheel. Maybe I can solicit advice from those with more Python experience: what's the best way to do this?
Over in my OpenRelativity fork, for Unity3D, I build an excessive number of OS/CPU combination shared library versions of qrack. These include the following:

x86_64 Linux
ARMv7 Linux
ARM64 Liinux
x86_64 Mac
ARMv7 iOS ("Any iOS device," in XCode)
x86_64 Windows
x86 Windows
ARMv7 Android
ARM64 Android
x86 Android
WASM

... I think that's it, so far. In fact, I don't plan to update qrack code, right now, so I think I'm about to build all of the above again, right now, just as part of my development cycle. For the python package, for those platforms that actually support GPU, I'd probably also like to build separate CPU/GPU binary packages, potentially. The GPU binaries actually will automatically detect if 0 OpenCL devices are available, and fall back to CPU-only defaults, (without needing to link any more OpenCL in qrack user code, by the way, if we're at C++ level). However, initializing the qrack OpenCL environment, to perform this check, or just in general, adds a significant one-time delay to scripts, every time the shared library is loaded, and I'd like people to be able to bypass this.
Who can suggest the best way to package these, for pypi? (I'll do it all myself, if necessary, and track progress in this issue.)

ฉันต้องการความช่วยเหลือและแนะแนวทางที่ถูกต้องเพราะฉันยังไม่เข้าใจเกี่ยวกับบัญชีและความเป็นมาของงานที่ไดรับหมอบหมายหรือสร้างขึ้น ช่วยด้วยครับฉันไม่เข้าใจและไม่ได้ต้องการให้เกิดเรื่องวุ่นขึ้นเลย

(For anyone unfamiliar with Thai or Hmong, like me, here's the Google translate, sorry:)

I need help and proper guidance because I still don't understand the account and the background of the assignments or creations. Help, I don't understand and I don't want to mess things up at all.

Thank you! This project, PyQrack, is just a pure ctypes wrapper on https://github.com/vm6502q/qrack, my quantum computer simulator library, at the core of my "vm6502q" quantum computing framework.
The "shared library" (.so or .dll) is here:
https://github.com/vm6502q/qrack/blob/main/include/pinvoke_api.hpp
https://github.com/vm6502q/qrack/blob/main/src/pinvoke_api.cpp
If one follows the instructions in the README of vm6502q/qrack, you currently have to build and install vm6502q/qrack, to use PyQrack.
In the qrack repository directory:
$ mkdir _build && cd _build && cmake .. && make all install

When you make all install, you can now also use PyQrack, by checking out the PyQrack repository and pip install ., for local install.
The point of this issue, #2, is that I want to package PyQrack with the Qrack binary already in it, on the pypi registry, but there are many potential build vairants. :smile:

ผมต้องเริ่มจากตรงไหนครับรบกวนขอคำแนะนำด้วยครับ

This is what I read:

Where do I have to start? Please give me some advice.

The first step is to build and install the vm6502q/qrack shared library and static library, with CMake. The second step is pip install . in the vm6502q/pyqrack directory. Those are the only steps.
The more detailed explanation follows:
Start at the vm6502q/qrack. You only need, in vm6502q/qrack, make a ./_build directory:
$ mkdir _build && cd _build && cmake .. && make all install

This builds the vm6502/qrack shared library libqrack_pinvoke.so or qrack_pinvoke.so. The shared library accesses the static library, libqrack.a. The command above makes those files and puts them in /usr/local/include/qrack /usr/local/lib/qrack'. On Windows, the files are installed in C:\Program Files\qrack`. (I don't remember if that's the exact Microsoft Windows directory.)
Just run the build and install command written above, to do all that. It's the first step.
Then, clone vm6502q/pyqrack, and type:
pip install .

otherwise
python3 -m pip install .

or otherwise.

Sorry for the typos. I'm trying to speak simply and plainly for translation, but it's hard for me to understand.

I hope that worked. :smile:
Anyone, tell me if you need help, and I'll try my best. :+1:

By the way, run
user@domain:qrack/_build$ qrack_cl_precompile

or, after installation, run $ qrack_cl_precompile from anywhere.
This compiles the OpenCL kernels and saves the result in the ~/.qrack directory. Then, you don't have to compile the kernels again every time you run a program.
The compilation might fail. If the compilation doesn't work or breaks anything, just delete the ~/.qrack directory. But, it's better if you can compile the OpenCL kernels beforehand.

Here's an example of usage:
from pyqrack import QrackSimulator

test = QrackSimulator(qubitCount=4)
test.x(0)
test.x(1)
test.mcx([1], 2)
test.h(3)
print(test.measure_shots([0,1,2,3], 10))

The qubitCount=4 parameter creates 4 "qubits".  You can allocate more qubits with allocate_qubit().
By design, you just call quantum gate instruction methods, without thinking about it too hard. vm6502q/qrack is basically an optimizing quantum compiler (simulator). Qrack will optimize your sequence of quantum gate instructions on-the-fly, as best it can.
For example, if you write a pure Clifford group or "stabilizer" quantum circuit, per Gottesman-Knill theorem, Qrack should just execute it efficiently, without having to be told that the circuit is Clifford group.

Much easier, now:
$ pip install pyqrack

It is an alpha release version. However, it will probably work. :smile: :+1:


Rich push example

SDK version: 2.0.0-alpha.1
Describe the issue
Hi! I am trying to assimilate the Rich Push support in my react-native app, but when sending a test rich push, I receive it as a regular push (with no image).
I followed the documentation while trying to assimilate it, but unfortunately couldn't make it work. I wish there were an example of how to assimilate it properly. Actually, having an example with all of CIO features could be great.
Thanks in advance!

Hi @matanrokach
Thanks for flagging this.
To help you fix the issue, I would need some details as following:

Platform(iOS/Android) you are sending push notification to
Push notification payload
If on iOS, can you send NotificationServiceExtension code snippet, specifically didReceive method?

You may also send the snippet here or to<EMAIL_ADDRESS>and mention this ticket so that we can track it internally and help you investigate the issue.

Closing due to inactivity. Please feel free to reopen the issue and we will be happy to help you !

Hi @matanrokach. Our team ran into a similar issue. Were you able to resolve this?
We've been able to setup rich push successfully following the documentation . However while the push notification is received, we notice that deep linking seems not to work. Also the push metrics seems not to be captured by the SDK, as well as images.
CC: @ami-aman.

To answer your question @ami-aman:
Platform(iOS/Android) you are sending push notification to
IOS
Push notification payload
We are using rich push, but here is the custom payload :
{
"message": {
"apns": {
"payload": {
"CIO": {
"push": {
"image": "https://meomind-assets-staging.s3.amazonaws.com/media/upload/avatar/clients/1e5ef939-c9e2-4267-b835-7ca1fe9efc24.png"
}
},
"aps": {
"alert": {
"title": "Test Push",
"body": "Test push"
},
"mutable-content": 1
}
}
}
}
}
If on iOS, can you send NotificationServiceExtension code snippet, specifically didReceive method?

(void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
self.contentHandler = contentHandler;
self.bestAttemptContent = [request.content mutableCopy];
// Modify the notification content here...
self.bestAttemptContent.title = [NSString stringWithFormat:@"%@ [modified]", self.bestAttemptContent.title];
self.contentHandler(self.bestAttemptContent);
NSLog(@"@notification push received");
}


Replace nose with something else

As nose likely to fall out of maintenance, test suites must be ported to something else, like nose2, py.test or plain unittest/unittest2.

py.test seems like best candidate :)


Is audio book supported in V1.0？

Hi,
Is audio book supported in V1.0？
Thank you.

This might sound stupid, but why are the services like audio books and spotify not yet usable?


Ar and ranlib additions for CMake

…AKE_ARGS.

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@conda-forge-admin, please rerender

@isuruf not sure about the build number bump, hope I did it correctly.
I think there was a bug in the original script, it seems like CMAKE_ARGS was being rewritten from scratch the second time it is defined?


ambitus

"Literally the ‘course’ of a melodic line, but in the Middle Ages and later usually the range of scale degrees attributed to a given Mode, particularly in Gregorian chant, or the range of a voice, instrument or piece." (Grove Music Online)
While this information can be calculated from a complete encoding, it should be possible to record this data at the staff, staff group, and score levels, and perhaps even at the layer level when the info is already available.  Providing a new element, perhaps called <ambitus>, would also guide the encoder away from using <incipit> to record this data.  The new element should specify the two pitches that delineate the range.  For early music, where the range is specified using a mode label such as 'dorian', 'hypodorian', etc., the @mode attribute should be employed instead of (or perhaps in addition to) <ambitus>.  To accommodate the entire range of possible church mode names, the data.MODE macroSpec should be expanded and perhaps made semi-open.

Possible model for <staff>:
ambitus?, (appLike | divLike | milestoneLike.music | annotLike |
graphicprimitiveLike | editLike | transcriptionLike | staffPart)*

and <score> or <part>:
ambitus?, (appLike | divLike | milestoneLike.music | annotLike |
graphicprimitiveLike | editLike | transcriptionLike | scorePart)*

Model for <ambitus>:
(ambNote, ambNote)
<ambNote> can use a subset of the attributes found on <note>.


SP doesn't check UDC token balance on mainnet branch before deposits

Problem Definition
I have tried running the BF4 scenario twice on mainnet, and both times it fails with:
2020-05-15 13:33:10.944916 [error    ] Exception while running scenario [scenario_player.main]
Traceback (most recent call last):
  File "/home/jacob/dev/scenario-player/scenario_player/main.py", line 335, in run_
    environment=environment,
  File "/home/jacob/dev/scenario-player/scenario_player/main.py", line 410, in orchestrate
    scenario_runner.run_scenario()
  File "/home/jacob/dev/scenario-player/scenario_player/runner.py", line 351, in run_scenario
    gevent.joinall(greenlets, raise_error=True, count=1)
  File "src/gevent/greenlet.py", line 1002, in gevent._greenlet.joinall
  File "src/gevent/greenlet.py", line 1018, in gevent._greenlet.joinall
  File "src/gevent/greenlet.py", line 364, in gevent._greenlet.Greenlet._raise_exception
  File "/home/jacob/dev/scenario-player/.env/lib/python3.7/site-packages/gevent/_compat.py", line 62, in reraise
    raise value.with_traceback(tb)
  File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
  File "/home/jacob/dev/scenario-player/scenario_player/runner.py", line 431, in setup_environment_and_run_main_task
    pool.join(raise_error=True)
  File "/home/jacob/dev/scenario-player/.env/lib/python3.7/site-packages/gevent/pool.py", line 435, in join
    greenlet._raise_exception()
  File "src/gevent/greenlet.py", line 364, in gevent._greenlet.Greenlet._raise_exception
  File "/home/jacob/dev/scenario-player/.env/lib/python3.7/site-packages/gevent/_compat.py", line 62, in reraise
    raise value.with_traceback(tb)
  File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
  File "/home/jacob/dev/scenario-player/scenario_player/utils/token.py", line 136, in userdeposit_maybe_deposit
    target_address, new_total_deposit, userdeposit_proxy.client.get_confirmed_blockhash()
  File "/home/jacob/dev/raiden/raiden/network/proxies/user_deposit.py", line 335, in deposit
    self._deposit_check_result(transaction_hash, token, total_deposit, amount_to_deposit)
  File "/home/jacob/dev/raiden/raiden/network/proxies/user_deposit.py", line 622, in _deposit_check_result
    raise RaidenRecoverableError(msg)
raiden.exceptions.RaidenRecoverableError: Deposit amount already increased after another transaction

Scenario log: scenario-player-run_bf4_multi_payments_same_node_2020-05-15T15:28:18.log
I don't think the node logs are relevant for this issue since it happens during deposit from the "scenario node", but please let me know if they are needed.

Tracked in https://github.com/raiden-network/scenario-player/issues/572


Index S6 data in Elasticsearch

Re-enable elasticsearch and index S6 (then S4) data to leverage in the search endpoints for new frontend.

@robkooper if you can start up Elasticsearch on Terra Clowder and restart, I can start the indexing process.
Or I can do it, is there anything more to it than enabling the plugin and restarting Clowder?

This is now underway and should finish in the next day or so.


ECS characterinfo

About the PR
Refactor CharacterInfo to ECS.
Next step is to XAMLify the UIs then rework more of it to ECS.

Conflicts


it is slow when adding more stacked views

I move my project from another stack view controller to PSStackedView recently.. but it is quit slow when pushing about 10 stacked views (UIScrollView)...I think the CAGradientLayer cost too much cpu/memory...... maybe you can provide a simplify container view, or add some flag to turn on/off the shadow effect... thanks.....
any one encounter this similar issue?

flypigz,
While I haven't had an issue with speed, I would like a way to disable the shadows.
I've forked the repo and I will be adding that feature in myself in the next few days. Feel free to watch my branch for the update: https://github.com/mstrchrstphr/PSStackedView
I've also added a few more features that can hopefully be pulled back into this main branch when I'm finished.

Thanks, I merged the shadowProperty. Disabling this should give a nice performance boost.


Github webhooks integration for automated import

If there are changed translation files in push - reimport.

This issue stands here for quite long without response. Probably because it is definitely related to infrastructure. Might be helpful to have some helper in source code, but still, I don't think  that TrasnlationBundle should parse Github requests..


Rate limited

Hi,
we wrote a client application, that polls the notion api every second. Sometimes we get
Client warn: request fail {
  code: 'rate_limited',
  message: 'You have been rate limited. Please try again in a few minutes.'
}

I can't find anything about read rate limits. Can somebody tell me what those are?

https://developers.notion.com/reference/request-limits

The rate limit for incoming requests is an average of 3 requests per second. Some bursts beyond the average rate are allowed.

Thanks @mattcasey for providing the link to the rating limiting documentation 🙏 Closing this issue for now since it seems like that was all @Achder was looking for.


Include validation of output against json schema at runtime

must find or create json schema first see #7


feat: add teamgantt extension

Description
First version of interacting with tasks on TeamGantt project management. There are two commands, My Tasks and Search Tasks.
Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

This is ready for review 😄

@pernielsentikaer thanks for the feedback. Learned a few things along the way. Should be ready for re-review.


benchmark: add more Go test cases

For how I am thinking about these tests in general, and how I am coming up with ideas for user intents, see this comment
Tests added in this PR

[ ] Wrap error
[ ] Implement an interface
[ ] Use context
[ ] Parallel spawn of goroutines
[ ] Merge two maps
[ ] Merge two structs
[ ] HTTP write json
[ ] HTTP read SON
[ ] HTTP check status code
[ ] HTTP write error
[ ] HTTP server
[ ] HTTP post request
[ ] HTTP get request
[ ] HTTP get request write file
[ ] Exec command and get output
[ ] Exec command error get stdout
[ ] template.New().ParseFiles()
[ ] template.New().Funcs().ParseFiles()

[ ] https://www.digitalocean.com/community/tutorials/how-to-use-templates-in-go

[x] Write test function
[x] Cast number to float
[x] Initialize a map
[x] Generate JSON
[x] Clear map
[x] Get map keys
[x] Iterate map
[x] Struct to JSON
[x] Struct to map
[x] Check if struct is empty
[x] Date string
[x] Measure time
[x] Make channel
[x] Make buffered channel
[x] Channel read
[x] Channel read switch
[x] Channel read select
[x] Channel read closed
[x] Channel send
[x] Channel send non-blocking
[x] Unwrap error

Test plan
Adding tests to benchmark test suite

@taras-yemets I'm also keen to get your feedback on mine, I still have quite a few more I want to add this week but keen to hear your feedback.
Currently this dataset is eerily close to our CAR%:
sourcegraph.cody-ai:
Pass: 4
Fail: 12
No Completion: 1
Average Time to Completion*: 1514ms
Median Time to Completion*: 1500ms
Pass Rate: 23.53%
Adjusted Pass Rate**: 25.00%

@slimsag, my initial thought was to play around with the completion request context (make it more complex):

more imports to see if Cody uses them for the current task (example)
importing 2+ functions with similar names but returning different interfaces to check if Cody uses the correct one (example)
import a third-party package and check if Cody uses it instead of implementing a similar functionality on its own, etc.

But, as Cody sometimes fails to complete code not requiring extensive context (except for the imported file, of course), it makes sense to continue testing one-step scenarios (for example, like you do for channels).
I agree with your suggestion https://github.com/sourcegraph/cody/pull/1446#issuecomment-1778049340 and think that we should probably start with fewer steps test cases and then consider complicating them. Moreover, the "more complex" examples in the very end just import some functions and use them. And from what I experienced, whether the completion passes the test often depends on the file exporting this function being open, but not on the number of imports, number of the code paths in each function and other "complexity" indicators.

Moving to new repo https://github.com/sourcegraph/coder-eval


Click event bubbles through overlay

If there is a button or component with onClick under the overlay, tapping on it with the drawer open will both close the drawer & fire the click event. This causes unexpected behavior, especially if the click event involves link or a window.location change.

I'm not able to replicate in the example project. I need to do more testing in my RL project.

No longer able to replicate in my work project. I'll close it for now.

Unexpected behavior occurs in the "device emulator" view of the chrome dev tools. Probably doesn't exist elsewhere. I need to do testing on an actual mobile device to make sure it doesn't happen in the wild.

I can confirm this happens on mobile Chrome as well.

This does not happen on mobile safari.

Any pointers on how to fix this please?
Mobile Safari works fine. Issue is seen in Chrome and Android browsers.

if i directly remove thous styles then it works

Tentatively fixed by #51, but that PR introduces some hard coded styling to the body, which might interfere with the users' styling. I'm not satisfied by that approach. I'm not sure if a better alternative exists, though, so I may merge it regardless. Interested in hearing peoples thoughts on this.

I think adding blocking on body scroll when the drawer is open is a good solution - in my implementation I had to manually add this as I had a list of dynamic content in both the drawer and the body in the background, so had cases where both would respond to scroll events depending on the length of lists etc.


How do I save a model and not have to create it every time?

Hi,
is there a way to make this persistent?
CREATE MODEL('gpt-4', 'gpt-4o', 'openai',
    {"context_window": 128000, "max_output_tokens": 4096});

Thank you

@aborruso you can specify a database name and this would create .db file that would save all your prompts and models.
> duckdb my_db.db

Then if I use a memory db, I will have to recreate them each time.
And if I today I need to create a new working db, I will have to create them again.
Correct?

yeah your right!

you can say that the prompt and the models are database information so for each db you need to define your prompts and models

you can say that the prompt and the models are database information so for each db you need to define your prompts and models

However, as you know, so many models will be useful to me for so many projects. There are some typical operations in each context. It would be useful to have a way to have some of them available permanently. Do I add a feature request?

@aborruso It seems that you find that a set of models and prompts might be used across databases and projects and therefore FlockMTL should have a database of those. Separately, certain models and prompts would be used specifically for a particular database. Is that correct?
For now, we treat them as resources as part of a single database but you bring up an interesting point.

@aborruso let's add it as a feature request and we will think for a way to adopt this!

@aborruso let's add it as a feature request and we will think for a way to adopt this!

Thank you https://github.com/dsg-polymtl/flockmtl/issues/96


Fixed can't "open" Properties folder

Double-clicking the Properties folder/right-click -> Open no longer opened the AppDesigner.
CPS made a contract break for the IAsyncCommandGroupHandler's metadata where Group changed from a string to a GUID. This caused CPS to no longer see OpenProjectDesignerOnDefaultActionCommand or OpenProjectDesignerCommand.

tag @dotnet/roslyn-analysis

👍


handle formats from app logs and Xcode logs for Loop, Trio, iAPS

The parser embedded in the OmniBLE module can parse information found in the log files from several apps that use it as well as from the Xcode logs when those apps are connected to a Mac.
Successful test with:

Loop: Loop Report
Trio: log.txt and log_prev.txt
older iAPS / FAX from 2022: log_prev.txt
Loop: Xcode debug file
Trio: Xcode debug file

In order to test the parser, follow these steps:
Start Xcode in the workspace folder:

Click on Scheme in Xcode:
Select OmniBLE Parser
Select Edit Scheme (see graphics below - Trio example, same method used for LoopWorkspace)

If an argument exists, edit it
If not, add an argument to the "Arguments Passed on Launch" section
Insert the full path name to the file to process

Click on Run and the output in the debug log is the parsed file.

For example, I added an argument and inserted /Users/marion/Downloads/log_prev.txt on the line.

Thank you for testing.
The instructions in my comment did include a bullet “(embed the path in quotes if there are spaces in the path name)”.
I thought arguments might need to allow spaces as delimiters if the arguments used flags. If that is true, then the quotes are required. But I’m not confident on this. Perhaps @itsmojo has a comment. It would be more convenient if the user didn’t need to check for spaces.

Ok, sorry, I must confess I did not read the instructions that thoroughly since I had recently used the parser and was familiar with the steps.
I tested with quotes around the path of the filename with spaces, and that did indeed work.

OmniBLEParser (and its cousin OmniKitPacketParser) have always parsed its arguments using the built-in CommandLine which treats a space as an argument delimiter unless it's quoted or escaped as one would expect (just like invoking a Unix C command line program). A possible future enhancement might be to add shell-like special character file handling (e.g., globbing,  tilda support etc.) for OmniBLEParser's arguments when it is run within Xcode, but since this is an extremely specialized command line tool for developers looking at Omnipod logs, it's probably not worth thinking about this at this time and you'd probably still have the same issues with space handling in file names.

Thanks! Yes, this is all good, and certainly not a blocker for merging this PR, as it’s both unrelated to the PR and manageable for the target audience as you say.


Stuck on 'Plug-In Carplay Dongle and Press'

I followed the guide in the README on a fresh Raspberry Pi 5 Pi OS Bookworm install (64-bit), using a Pi Touch Display:
I ran:
git clone https://github.com/rhysmorgan134/react-carplay.git
cd react-carplay
./setup-pi.sh

And there were no errors. I rebooted the Pi, and it automatically launched ~/Desktop/Carplay.AppImage, and the full screen app was running. (For my own reference, the autostart file is placed in /etc/xdg/autostart/carplay.desktop).
But when it launched, there's just a button in the middle of the screen, 'Plug-In Carplay Dongle and Press', and the phone, options, info, and exit buttons across the top.
I have a Carlinkit CPC200-CCPA plugged into the top USB 3.0 port on the Pi 5, and I can see it with lsusb:
pi@pi5-display:~/react-carplay $ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 1314:1521 Magic Communication Tec. Auto Box
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

However, tapping on the Plug-In Carplay Dongle and Press button doesn't seem to do anything, and exiting the App and re-launching it doesn't make a difference either.

Here are the logs if I manually run the AppImage:
pi@pi5-display:~/Desktop $ DISPLAY=:0 /home/pi/Desktop/Carplay.AppImage
/home/pi/.config/react-carplay/config.json
true
config read
creating pi most in main
creating client in PiMost
A JavaScript error occurred in the main process
Uncaught Exception:
Error: ENOENT, No such file or directory
    at new OS8104A (/tmp/.mount_CarplaBAsSPA/resources/app.asar/node_modules/socketmost/dist/driver/OS8104A.js:47:41)
    at new SocketMost (/tmp/.mount_CarplaBAsSPA/resources/app.asar/node_modules/socketmost/dist/server/SocketMost.js:107:23)
    at new PiMost (/tmp/.mount_CarplaBAsSPA/resources/app.asar/out/main/index.js:231:23)
    at /tmp/.mount_CarplaBAsSPA/resources/app.asar/out/main/index.js:341:5
    at suppressedCallback (node:fs:275:5)
    at FSReqCallback.oncomplete (node:fs:200:23)
(node:2369) UnhandledPromiseRejectionWarning: TypeError: electron.systemPreferences.askForMediaAccess is not a function
    at createWindow (/tmp/.mount_CarplaBAsSPA/resources/app.asar/out/main/index.js:408:30)
    at /tmp/.mount_CarplaBAsSPA/resources/app.asar/out/main/index.js:434:3
(Use `react-carplay --trace-warnings ...` to show where the warning was created)
(node:2369) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[2414:1102/221845.056959:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.057138:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.057241:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.057331:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.057404:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.057477:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.057554:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.058877:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.058964:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.059040:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.059116:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.059186:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.059258:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221845.059333:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: No such file or directory (2)
[2414:1102/221847.604734:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!

Separate question—are there any logs available for the autostart'ed instance? I didn't see anything in journalctl or in /var/log but I may have missed it.
Also, potentially the same issue: https://github.com/rhysmorgan134/react-carplay/issues/72 (though that issue didn't contain as many details/steps to reproduce, so I'm not 100% sure it's the same thing).

I noticed the upstream node project requires sudo apt install -y libudev-dev, so I tried that and rebooted, but no difference so far. Going to install that separately and run it and see what it says.

Interesting... if I install node-CarPlay and run the examples/carplay-web-app, it also shows that 'Press here' button, but when I press it, it pops a Chrome permissions dialog that requests access to the connected dongle.
That popup didn't appear when running the AppImage, so I wonder if it's a kiosk mode quirk in Chromium maybe?

With my debug environment going:

The node app just sits with the spinner.
I also manually went into chrome://flags and enabled "Experimental Web Platform features", but that doesn't seem to have made a difference.

Hello @geerlingguy ! Great to see you in the debugging spirit. Would you mind giving the node version a quick try instead of the electron/WebUSB version?
Here’s an example: https://github.com/rhysmorgan134/node-CarPlay/tree/master/examples/carplay-node-without-audio
It should have less points of failure

@steelbrain - That's what I'm doing now ;) (see two latest comments).
I'm also Updating the firmware on the Carlinkit as I realized I can connect to it's WiFi and manage it separately. It wasn't connecting to my iPhone when I tapped on it in the CarPlay list.

Based on what I see in the screenshots, you’re trying the webapp example instead of the node example. I’d love to see some logs coming out of the node one.
Good call re firmware upgrade. Also if you have multiple phones on hand, it’s helpful to try some. I remember getting into weird ios states where the only thing that would fix it is restarts or just using a different phone

@steelbrain - Yeah, been restarting phone, Pi, etc. multiple times. I also filled in the 'Car' details in the Carlinkit's settings in case that helps, and rebooted everything again.
If I try the node-without-audio example:
pi@pi5-display:~/node-CarPlay/examples/carplay-node-without-audio $ npm start

><EMAIL_ADDRESS>start
> node server/index.js

Server listening on http://localhost:3000/
No device found, retrying
Error initializing server {
  err: Error: reset error: Error: LIBUSB_ERROR_NOT_FOUND
      at WebUSBDevice.reset (/home/pi/node-CarPlay/node_modules/usb/dist/webusb/webusb-device.js:276:19)
      at async CarplayNode.start (/home/pi/node-CarPlay/examples/carplay-node-without-audio/server/index.js:922:5)
      at async main (/home/pi/node-CarPlay/examples/carplay-node-without-audio/server/index.js:1047:3)
}

This is very helpful! Maybe you have the new model and they changed the usb ids.
Anyway, this part needs to be updated to include the new usb ids. You can update that, and then see how it performs!

The USB IDs seem to match (1314:1521 from Bus 003 Device 003: ID 1314:1521 Magic Communication Tec. Auto Box), and YAY! Just had my phone sitting there for like 3 minutes, and somehow it finally connected to the Carlinkit.
Maybe the key is to just wait and wait and wait, even if you think it's not connecting. This is what I was seeing, leading me to believe after waiting 30-60 seconds that the connection was just not going to work:
https://github.com/user-attachments/assets/7449d6e2-1b3f-45dc-acb7-1b7c3efe783d

I can get things working with examples/carplay-web-app:

But I still get the LIBUSB_ERROR_NOT_FOUND using examples/carplay-node-without-audio, and it still just shows the button Plug-In Carplay Dongle and Press if I reboot and run this react-carplay AppImage...

That means Chrome has some nice fixes for libusb that are working for us here. Nice!

I'm happy enough running this for a demo — I can basically run my own kiosk mode with:
/usr/bin/chromium-browser --noerrdialogs --disable-infobars --kiosk --app=http://localhost:3000/

But I would like to get the full application going too. I don't have a USB audio dongle, but that'll be my next step, to test mic and sound into my aux input.

Thanks Both, after our conversation yesterday I did a fresh install and it all booted up just fine using the commands in the readme

Interesting... if I install node-CarPlay and run the examples/carplay-web-app, it also shows that 'Press here' button, but when I press it, it pops a Chrome permissions dialog that requests access to the connected dongle.
That popup didn't appear when running the AppImage, so I wonder if it's a kiosk mode quirk in Chromium maybe?
Now that I've allowed access, I just have a spinner sitting in the browser window. I also opened CarPlay settings on my iPhone and have tried connecting to 'AutoKit-XXXX' but it's also just spinning without showing a successful connection.

In electron it handles the permissions inside of JS rather than the popup, however you have led me to find what I hope is the issue
https://github.com/rhysmorgan134/react-carplay/blob/a1de23777f6f387133c47815b2d4dce1a9ba1805/src/main/index.ts#L136-L140
5408 (0x1520) is written twice rather than 5409 (0x1521), you can't beat a copy paste error! I'll get a fix done and the push it as a beta release, @geerlingguy would you mind testing once done? I don't have any 1521 dongles.

Separate question—are there any logs available for the autostart'ed instance? I didn't see anything in journalctl or in /var/log but I may have missed it.

Not currently, I have moved most of my other projects over to winston logging which allows far greater logging functionality, I should look to do the same on this. However I believe we can push the output to a file in the autostart script.

@geerlingguy it's up and should be good to go, will likely need a chmod +x but as you already have permissions, should be fine to just start right up Beta

@rhysmorgan134 - I hope to get to testing this in a day or two! Going to be wrapping up some other testing on Monday since... it's Monday and Mondays always go off the rails :)
But if you haven't heard back from me, feel free to ping back. I'm hoping to have a prototype Carplay setup in my ol' Toyota in the next week or two.

I completely wiped the Pi and reinstalled. After doing so, I installed react-carplay using the setup script, and VOILA! Everything is working great!
Thanks :)
Now on to the more challenging aspects of this build, like how to mount the thing in my car... I wonder if any other 2007 Toyota Camry owners have replaced their head unit with a Pi Touch Display :D

Awesome, good to hear and thanks for testing! I've just received my pi display 2, the extra pixels are going to be a great upgrade on mine


use string to represent mysql text type

use string instead of []byte to represent text ( blob... ) type

LGTM

Awesome!


License MIT / BSD?

@jamiesnape you added MIT licenses here, however I just noticed that Drake is BSD licensed, not MIT.
Should have them matching if we can.

The license is BSD-3-Clause with Copyright MIT, so it is correct.

Ah, indeed it is. I was perusing too quickly. Thanks.


[SPARK-20314][SQL] Inconsistent error handling in JSON parsing SQL functions

What changes were proposed in this pull request?
change to using Jackson's com.fasterxml.jackson.core.JsonFactory
public JsonParser createParser(String content)

How was this patch tested?
existing unit tests
Please review http://spark.apache.org/contributing.html before opening a pull request.

Can one of the admins verify this patch?

@ewasserman Could you fix the title to point out the JIRA SPARK-16548? It seems SPARK-20314 duplicates that.
In terms of behaviour, I see @marmbrus and @srowen in that JIRA. Please let me cc.

Could you add a test case in JsonExpressionsSuite?

Not suggesting doing it in this PR but maybe adding a SQL option to let the users choose the error handling strategy of all the JSON functions probably makes more sense here? The Spark JSON data source allows users to choose a parsing mode among:

PERMISSIVE: replacing malformed records with nulls,
DROPMALFORMED: drop malformed records, and
FAILFAST: report an error and abort once a malformed record is found.

@liancheng Good suggestion! Just like what we did for from_json/to_json.

I like the idea but I am not sure of DROPMALFORMED mode though. If we use an expression with the mode enabled, whole record (not only the column but all columns) will be dropped in some json expressions, probably not a generator expressions (did I understand correctly?).
I think we don't explicitly support parse modes in both from_json/to_json - https://github.com/apache/spark/blob/465818389aab1217c9de5c685cfaee3ffaec91bb/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala#L551
It sets FAILFAST but resembles PERMISSIVE mode up to my knowledge.

Reverted from use of  toString on the org.apache.spark.unsafe.types.UTF8String by running the byte array through a java.io.Reader. This still fixes the bug and is also more efficient on the JSON parser side so it is a net performance win as well.

LGTM

ok to test

Test build #76068 has started for PR 17693 at commit f706ce3.

Test build #76068 has finished for PR 17693 at commit f706ce3.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/76068/
Test PASSed.

Test build #76153 has started for PR 17693 at commit 91bb487.

Test build #76153 has finished for PR 17693 at commit 91bb487.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/76153/
Test PASSed.

thanks, merging to master/2.2


[backport] Remove LLVM_PATH note on document

Backport of #6093 by @takagi

Rendering confirmed: https://cupy--6101.org.readthedocs.build/en/6101/install.html#using-cupy-on-amd-gpu-experimental


Disappearing file

Issue Type: Bug
Using VSC under WIndows, to edit files in WSL Ubuntu account.
If I edit more than one file, the previous open file disappears from the tab at top of editor and is no longer selectable.
Only a single file is selectable in the file open tab at top of editor.
The previous file edit session disappears without a trace.
I cannot find a setting to correct this default behavior.
This makes the editor unusable for me.
VS Code version: Code 1.43.1 (fe22a9645b44368865c0ba92e2fb881ff1afce94, 2020-03-18T07:01:20.184Z)
OS version: Windows_NT x64 10.0.18362
Remote OS version: Linux x64 4.4.0-18362-Microsoft

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2208)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: enabledrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
7.85GB (4.25GB free)

Process Argv

Screen Reader
no

VM
0%

Item
Value

Remote
WSL: Ubuntu-18.04

OS
Linux x64 4.4.0-18362-Microsoft

CPUs
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2201)

Memory (System)
7.85GB (4.25GB free)

VM
0%

Extensions (3)

Extension
Author (truncated)
Version

remote-wsl
ms-
0.42.4

code-gnu-global
aus
0.2.2

cpptools
ms-
0.26.3

We have written the needed data into your clipboard because it was too large to send. Please paste.

Sounds like Preview Mode
https://code.visualstudio.com/docs/getstarted/userinterface#_preview-mode

Preview mode (double click on the editor tab) allows you to pin an editor so it is no longer replaced

Please reopen if this does not fix your problem

I apologize for my rude behavior.
The tool is not intuitive and I have priorities other than investing
large amounts of time figuring out its many nuances.
But I should not have been disrespectful.
John Powers
On 2020-03-23 12:35, Martin Aeschlimann wrote:

Please reopen if this does not fix your problem
--
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
Links:
[1]
https://github.com/microsoft/vscode/issues/93193#issuecomment-602714638
[2]
https://github.com/notifications/unsubscribe-auth/AH7PPVIKSXRAZDYE26ZFOJTRI6FV3ANCNFSM4LRNMAUA


ncurses: use a different mirror / archive

The ncurses version we use was taken down by upstream. Another mirror
that was added is now also unavailable.
This commit points to a new mirror on GitHub. The hash is however
different.
https://github.com/NixOS/nixpkgs/issues/35264
Things done

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

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Fits CONTRIBUTING.md.

Success on x86_64-linux (full log)
Attempted: ncurses
Partial log (click to expand)
rmdir: failed to remove '/nix/store/1ivjhxnw8ckgw73g7gjca89nqmyrcwj3-ncurses-6.0-20171125-dev/bin': Directory not empty
Moving /nix/store/1ivjhxnw8ckgw73g7gjca89nqmyrcwj3-ncurses-6.0-20171125-dev/bin/tabs to /nix/store/9zk8dychqrj9vkj6bdmr1qvf2cznwraf-ncurses-6.0-20171125/bin/tabs
rmdir: failed to remove '/nix/store/1ivjhxnw8ckgw73g7gjca89nqmyrcwj3-ncurses-6.0-20171125-dev/bin': Directory not empty
Moving /nix/store/1ivjhxnw8ckgw73g7gjca89nqmyrcwj3-ncurses-6.0-20171125-dev/bin/tic to /nix/store/9zk8dychqrj9vkj6bdmr1qvf2cznwraf-ncurses-6.0-20171125/bin/tic
rmdir: failed to remove '/nix/store/1ivjhxnw8ckgw73g7gjca89nqmyrcwj3-ncurses-6.0-20171125-dev/bin': Directory not empty
Moving /nix/store/1ivjhxnw8ckgw73g7gjca89nqmyrcwj3-ncurses-6.0-20171125-dev/bin/tput to /nix/store/9zk8dychqrj9vkj6bdmr1qvf2cznwraf-ncurses-6.0-20171125/bin/tput
rmdir: failed to remove '/nix/store/1ivjhxnw8ckgw73g7gjca89nqmyrcwj3-ncurses-6.0-20171125-dev/bin': Directory not empty
Moving /nix/store/1ivjhxnw8ckgw73g7gjca89nqmyrcwj3-ncurses-6.0-20171125-dev/bin/tset to /nix/store/9zk8dychqrj9vkj6bdmr1qvf2cznwraf-ncurses-6.0-20171125/bin/tset
rmdir: failed to remove '/nix/store/1ivjhxnw8ckgw73g7gjca89nqmyrcwj3-ncurses-6.0-20171125-dev/bin': Directory not empty
/nix/store/9zk8dychqrj9vkj6bdmr1qvf2cznwraf-ncurses-6.0-20171125

Success on aarch64-linux (full log)
Attempted: ncurses
Partial log (click to expand)
rmdir: failed to remove '/nix/store/3df893a5adhdna19wadi8qhwjncw4382-ncurses-6.0-20171125-dev/bin': Directory not empty
Moving /nix/store/3df893a5adhdna19wadi8qhwjncw4382-ncurses-6.0-20171125-dev/bin/tabs to /nix/store/fdza23lbya26i6cwahdvzh6vcm79xi9a-ncurses-6.0-20171125/bin/tabs
rmdir: failed to remove '/nix/store/3df893a5adhdna19wadi8qhwjncw4382-ncurses-6.0-20171125-dev/bin': Directory not empty
Moving /nix/store/3df893a5adhdna19wadi8qhwjncw4382-ncurses-6.0-20171125-dev/bin/tic to /nix/store/fdza23lbya26i6cwahdvzh6vcm79xi9a-ncurses-6.0-20171125/bin/tic
rmdir: failed to remove '/nix/store/3df893a5adhdna19wadi8qhwjncw4382-ncurses-6.0-20171125-dev/bin': Directory not empty
Moving /nix/store/3df893a5adhdna19wadi8qhwjncw4382-ncurses-6.0-20171125-dev/bin/tput to /nix/store/fdza23lbya26i6cwahdvzh6vcm79xi9a-ncurses-6.0-20171125/bin/tput
rmdir: failed to remove '/nix/store/3df893a5adhdna19wadi8qhwjncw4382-ncurses-6.0-20171125-dev/bin': Directory not empty
Moving /nix/store/3df893a5adhdna19wadi8qhwjncw4382-ncurses-6.0-20171125-dev/bin/tset to /nix/store/fdza23lbya26i6cwahdvzh6vcm79xi9a-ncurses-6.0-20171125/bin/tset
rmdir: failed to remove '/nix/store/3df893a5adhdna19wadi8qhwjncw4382-ncurses-6.0-20171125-dev/bin': Directory not empty
/nix/store/fdza23lbya26i6cwahdvzh6vcm79xi9a-ncurses-6.0-20171125

The version on master uses yet another mirror  (for v 6.1):
url = "mirror://gnu/ncurses/ncurses-${version}.tar.gz";

Failure on x86_64-darwin (full log)
Attempted: ncurses
Partial log (click to expand)
cannot build derivation '/nix/store/vvlswgr36zwx3yx084879gr26a7nmk54-cctools-port-895.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/n6rzk4lp9h9i0bp6l3zby2kby2frg2py-cctools-binutils-darwin.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/36zr78cqsfbm2zrjj2z5ivrkbb4fayrm-cctools-binutils-darwin-wrapper.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/yz5vcfjq9rqnlvj89czrn4nf7gy8sy6b-bash-4.4-p12.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/4v54ww618l109rliyn973zhbdgjdg952-binutils-wrapper-9.9.9.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/gb3li29praihhpmv5d999vpfr9vk0c63-clang-wrapper-9.9.9.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/ir66kvaxjml1xsvffijvm6wzxq6sjwwa-stdenv-darwin-boot-3.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/sfk93kva8xh7h31s7z0hn8mvvwmxragv-pkg-config-0.29.2.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/nvrl16ynmabq7lkqcpwq3zn79a12qjv0-ncurses-6.0-20171125.drv': 4 dependencies couldn't be built
error: build of '/nix/store/nvrl16ynmabq7lkqcpwq3zn79a12qjv0-ncurses-6.0-20171125.drv' failed

@xeji that's the original page and the preferred mirror, however, the version we have on 18.03 is not listed there.

Seems like the Alpine mirror is up again.


New package: TrajOpt v0.1.0

Registering package: TrajOpt
Repository: https://github.com/alexander-leong/TrajOpt.jl
Created by: @alexander-leong
Version: v0.1.0
Commit: 942429657eced7e15bb7e94a8d5e535b7af4bf25
Reviewed by: @alexander-leong
Reference: https://github.com/alexander-leong/TrajOpt.jl/commit/942429657eced7e15bb7e94a8d5e535b7af4bf25#commitcomment-143250816

Thank you for submitting your package! However, please make sure to add some documentation before registering. At the very least, that would be a description of the package's purpose and a small usage example in the README. All packages in General must have a README.
Since there currently is no way to tell what the package does, it's impossible to tell, but I suspect that the name TrajOpt (for "Trajectory Optimization"?) is likely too general. I would not that Julia package names do not have to short like in many other languages, so avoid abbreviations. Unless you have something nice and pithy, the usual recommendation is that choose a relatively long and very descriptive package name.

Closing in favor of https://github.com/JuliaRegistries/General/pull/109330
So much better! Thanks!


Strange bug only at Android 4.4.2 with drag

Hi!) Its me again :hand: :D
Strange bug only at Android 4.4.2. It does not appear on all devices, but sometimes bug happens. When I try to drag my item to the angle or end of the my RecyclerView - logic works fine, but piece of item hangs on the end. Immediately after position changing - everything works fine.
For more understanding, please, see video

Hmm... 🤔  It seems strange, clipToChild is not working properly only when dropping the items.
Try adding these properties to RecyclerView and its parent? If the issue still present, maybe we need to invalidate the parent view explicitly for workaround.
android:clipChildren="false"
android:clipToPadding="false"

Fixed after setted false here.
But I don't know how it will work on API 10 with false. But on Android 4.4+ work correct )
Thanks)


Error downloading https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json

Issue is the title, link does not resolve inside arduino.ide, but appears to work when linked in normal browsing.

Seems to be a proxy issue. Please check Arduino proxy config

Fails for me with auto and no proxy (both should work for me, as I can click the link and view it in my web browser and it doesn't use any proxies).

Ok. Unfortunately, I will not able to help. It is an issue with Arduino IDE.
You could submit an issue on Arduino GitHub.

Maybe the same issue to this one:
https://github.com/arduino/Arduino/issues/7982

Referring to the Title, @Phr3d13 use the right URL.
https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json

I had the same issue and I fixed it doing the following steps.

Open Arduino IDE
Go to preferences
Click on the link to edit preferences.txt ( This will take you to C:\Users\$Username\AppData\Local\Arduino15)
Delete the temp file and the json file from that directory
Delete the package in the packages folder
Delete staging files related to that in the staging folder
Restart the device and add the link again and try


remotehomedir - Mount Options

Compiled daemon version: <IP_ADDRESS>4
Packaged product version: 9.0.534.497
CentOS Linux release 7.6.1810
Using the remotehomedir option with AD user home drives. The homedirtemplate makes the remotehomedir the users root home directory. So far Google Chrome is the only app that won't open due to various errors, remounting (or doing so manually) the home share with the following options Chrome will open (with other errors but it at least opens) username=,mfsymlinks,uid=$(id -u),gid=$(id -g)
The real question, is there a way with PBIS-Open to specify what options are used when mounting a users remotehomedir?

Currently, there is not a method to prove your own mount options with remotehomedir.

Ok figured but wasn't 100 percent sure. Is there any plans to investigate feasibility of providing CIFS mount options?

Not at this time. Enterprise has some options for mounting via Group Policies.


Diagnostics / Tables - URL Table Aliases

Handle URL table aliases similar to bogons tables.  Suppress record remove buttons.
Update (download) only the selected URL table alias instead of all of them.
Retain full line comments in downloaded URL table files so we can view and use them.
When URL table file full line comments are present, provide view option in info box.
Increase ability to extract last update date from wider variety of URL table file comments.

There is a small glitch in that "Hide table comments." seems to get broken into two lines?

Hmmm.  I've never seen that.  What is your browser width there?

Very wide indeed. The issue shows up at any width.
Steve
Stephen Beaver | +1<PHONE_NUMBER>;239 |<EMAIL_ADDRESS>| www.netgate.com

On Feb 29, 2016, at 1:24 PM, NOYB<EMAIL_ADDRESS>wrote:
Hmmm. I've never seen that. What is your browser width there?
—
Reply to this email directly or view it on GitHub https://github.com/pfsense/pfsense/pull/2693#issuecomment-190320940.

Only way I seem to be able to reproduce that (Chrome & IE; Win 81.Pro) is to go very narrow.  Any idea's?  Do you have a system that it doesn't occur on?  Maybe the differences between them could provide a clue.

Sorry for delay. It seems it is only an issue with fief. We could move the  to the beginning of the line (in front of the second “i”) or just live with it.
Steve
Stephen Beaver | +1<PHONE_NUMBER>;239 |<EMAIL_ADDRESS>| www.netgate.com

On Feb 29, 2016, at 1:48 PM, NOYB<EMAIL_ADDRESS>wrote:
Only way I seem to be able to reproduce that (Chrome & IE; Win 81.Pro) is to go very narrow. Any idea's? Do you have a system that it doesn't occur on? Maybe the differences between them could provide a clue.
—
Reply to this email directly or view it on GitHub https://github.com/pfsense/pfsense/pull/2693#issuecomment-190329509.

Pull request submitted.
https://github.com/pfsense/pfsense/pull/2694


Release 0.7.0

doc(README): add example ./bin/nt-ns.js

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@cecf04c). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #10   +/-   ##
=========================================
  Coverage          ?   90.16%
=========================================
  Files             ?        6
  Lines             ?      366
  Branches          ?        0
=========================================
  Hits              ?      330
  Misses            ?       36
  Partials          ?        0

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 cecf04c...725cadb. Read the comment docs.


Support environment vars

Support environment variables
Build and deploy docker files

goreleaser release --snapshot --skip-publish --rm-dist
   • releasing...
   • loading config file       file=.goreleaser.yaml
   ⨯ release failed after 0.00s error=yaml: line 104: did not find expected '-' indicator


Change the content of our story

Change the content from loreum ipsum to meaningful content.

@Anu27n  assign it to me i will try to do asap

@abhayksahu369  done bro.

Hey @Anu27n Can u assign this to me? i will add more content in this and improve the styling


Feature Request: Show firmware version on Settings page

To make it easier to identify which firmware version you have, it would be nice to see it displayed on the settings page.
Would also be nice if this version could be exposed via an API so I could read it in e.g. Home Assistant, where I can match it against the latest release of this Github repo so I know an update is available.

Great suggestion. Will add it in the backlog

Done in this release https://twitter.com/jnthas/status/1667988156220620801?s=20

Saw the Twitter post 🎉


Keyboard shortcuts for OS X

At the moment Extraterm has the same keyboard shortcuts for every platform. For Windows (cygwin) and Linux these are fine, but on OS X they are some what different other existing OS X software. Extraterm needs OS X specific shortcuts when running on OS X.
I personally have limited access to an OS X machine and am not familiar with it anyway. This issue needs to be picked up by some ones who uses OS X.

Shortcuts and key bindings for OSX were added a while ago.


Rustify

Rewrite algorithm from python to rust, for Issue #1.

Closed this in favor of Pull Request #5, since a complex rebase was required.


Removed quoation marks from query.

Hello,
I tried to use it one one of my models unfortunately it doesn't use quoation mark inside the query. Here is the example code from error page I got:
SQLSTATE[42000]: Syntax error or access violation: 1055 'developer_dev.dilemmas.user_id' isn't in GROUP BY (SQL: select * from (select dilemmas.*, max(case when dilemmas.title= audi ordilemmas.title= bmw then 15 else 0 end + case whendilemmas.titlelike audi% ordilemmas.titlelike bmw% then 5 else 0 end + case whendilemmas.titlelike %audi% ordilemmas.titlelike %bmw% then 1 else 0 end) as relevance fromdilemmas where (dilemmas.titlelike %audi% ordilemmas.titlelike %bmw%) group bydilemmas.id) as dilemmaswhererelevance>= 0.25 order byrelevancedesc)
As you can see there are no " around the search terms  'audi'

@ckissi it's not about the ? (which is used ofc), but about your MySQL settings.
tldr; disable strict mode
Read https://mattstauffer.co/blog/strict-mode-and-other-mysql-customizations-in-laravel-5-2 and http://rpbouman.blogspot.sg/2014/09/mysql-575-group-by-respects-functional.html and http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html

THANK YOU MAN !!! super fast response. Works already :)

Just as a note, strict mode was causing me GROUP BY errors on relations.
Working fine since turning it off in the Laravel config.

Is there any way around this without turning off strict mode?

Nope
Jarek Tkaczyk
softonsofa :: development with pleasure
On Oct 20, 2016 21:24, "David Allen"<EMAIL_ADDRESS>wrote:

Is there any way around this without turning off strict mode?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/jarektkaczyk/eloquence/issues/119#issuecomment-255104495,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGm5smy_yZr5quFlewFvs8te83Lv5xCHks5q12t7gaJpZM4KDrNR
.

Do you know why it does this? If you know the source of the problem I could try a PR?


How to change nav title colour?And when you look at the long picture,how to show it like this beginning?

Concerning your first question - in our app we do it with:
[UINavigationBar appearance].titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor company_blue_1]};
If you want to change it for the photo browser only, you might want to edit MWPhotoBrowser.m. Look at the methods setNavBarAppearance, storePreviousNavBarAppearance and restorePreviousNavBarAppearance.
I had a similar issue; I wanted to remove the title color previously set with the line above in this comment. This is how I did it. Pay attention to set it back properly:
https://github.com/mwaterfall/MWPhotoBrowser/issues/290
https://github.com/carsten-wenderdel/MWPhotoBrowser/commit/aec112ec030abc464a1ba395a07899332e9f99b3

Thank you for helping me finish solving the first problem;

When i look at the long-photos

but,I want  stretch it and make pic on the top,
how to make it??


initialisation bug in SelectionSupport/Controller

Looks good to me.

I don't see test here. @timzam please don't accept the pull request without tests.

@solomatov Ok. Sorry, I forgot about tests here.

I wasn't able to reproduce the issue in test setup quickly. Looks like it
appears only in async mappers.
On Sat, Apr 23, 2016 at 8:47 PM, Timur Zambalayev<EMAIL_ADDRESS>wrote:

@solomatov https://github.com/solomatov Ok. Sorry, I forgot about tests
here.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/JetBrains/jetpad-projectional/pull/242#issuecomment-213795969

As we have agreed with @solomatov before, bugs specific for GWT mappers shouldn't be covered with tests.

To clear thing up: I don't think the issue is GWT-specific, but the test needs AsyncMapper/EventBus. They're located in another module, depend on JS event dispatch and have small amount of native JS code. It's refactorable, but I doubt the resulting test really worth the effort.

Ok, let's proceed without tests.


Add gulp-svg-sprite

gulp-svg-sprite/gulp-svg-sprite.d.ts
check list

[ ] is collect naming convention?

https://www.npmjs.com/package/gulp-svg-sprite
http://bower.io/search/?q=gulp-svg-sprite
others?

[X] has a test file? (gulp-svg-sprite/gulp-svg-sprite-tests.ts or others)
[ ] pass the Travis-CI test?

thanks mate!


how to start?

package main
import (
"fmt"
"cron"
)
func main(){
c := cron.New()
c.AddFunc("1 * * * * *", func() {
fmt.Println("success")
})
c.Start()
}
print nothing，and it stopped

Start is not blocking. Try adding select {} to last line of your program

think U


Trying to represent rose trees

Hiya!
I'm trying to represent Rose trees, using tutd for now.
data Rose a = Node a List (Rose a)
:showexpr relation{tuple{rose Node "a" Empty}}
┌────────────────────┐
│rose::Rose (a::Text)│
├────────────────────┤
│Node "a" Empty      │
└────────────────────┘

Nice!
But:
:showexpr relation{tuple{rose Node "a" (Cons (Node "a" Empty) Empty)}}
ERR: AtomTypeMismatchError TextAtomType (ConstructedAtomType "Rose" (fromList [("a",TextAtomType)]))

Hmm... double checking the list is of the right type:
:showexpr relation{tuple{list (Cons (Node "a" Empty) Empty)}}
┌──────────────────────────────┐
│list::List (a::Rose (a::Text))│
├──────────────────────────────┤
│Cons (Node "a" Empty) Empty   │
└──────────────────────────────┘

Looks like it. But wait:
:showexpr relation{tuple{node Node "a" (Cons "a" Empty)}}
┌─────────────────────────┐
│node::Rose (a::Text)     │
├─────────────────────────┤
│Node "a" (Cons "a" Empty)│
└─────────────────────────┘

Now that shouldn't type check, should it?
Ok I'll try another approach, since any way having a list as a value is a data modelling smell isn't it?
:showexpr relation{node Text, children relation{}}
┌─────────────────────┬──────────┐
│children::relation {}│node::Text│
└─────────────────────┴──────────┘

Too restrictive, but let's try:
:showexpr relation{node Text, children relation{}}{tuple{node "a", children relation{}}}
┌─────────────────────┬──────────┐
│children::relation {}│node::Text│
├─────────────────────┼──────────┤
│┌┐                   │"a"       │
│││                   │          │
│└┘                   │          │
└─────────────────────┴──────────┘

Nice, now we can't do rose := relation{node Text, children List (rose)} (or could we?) so let's try to recurse one level manually and see what's up:
:showexpr relation{node Text, children relation{node Text, children relation{}}}
┌─────────────────────────────────────────────────────┬──────────┐
│children::relation {node::Text,children::relation {}}│node::Text│
└─────────────────────────────────────────────────────┴──────────┘

So far, so good. So a tuple which should fit would be:
:type relation{tuple{node "a", children relation{tuple{node "b", children relation{}}}}}
┌─────────────────────────────────────────────────────┬──────────┐
│children::relation {children::relation {},node::Text}│node::Text│
└─────────────────────────────────────────────────────┴──────────┘

But tying these to together doesn't work! 😢
:showexpr relation{node Text, children relation{node Text, children relation{}}}{tuple{node "a", children relation{tuple{node "b", children relation{}}}}}
ERR: AtomTypeMismatchError (RelationAtomType [Attribute "node" TextAtomType,Attribute "children" (RelationAtomType [])]) (RelationAtomType [Attribute "children" (RelationAtomType []),Attribute "node" TextAtomType])

The data type construction is broken even if we eliminate the type variable:
TutorialD (master/main): data Rose = Node Text (List Rose)
TutorialD (master/main): :showexpr relation{rose Rose}{tuple{rose Node "a" Empty}}
ERR: ConstructedAtomArgumentCountMismatchError 1 2

I'll figure out what's going on.

Ugh, type constructors are parsed completely incorrectly right now- "Rose Text (List Text)" is parsed as "Rose (Text (List Text))" which is obviously wrong.

I fixed the parsing bug but there's still a naive bug involving type name variables. A quick workaround is to avoid the "a" type variable.

I found some other bugs surrounding phantom and unmentioned type variables which I'll fix for this issue as well. Thanks for the detailed report!

Hi there,
Thanks a lot for fixing this! Indeed with the proper parens, the data declaration works now. Although, interestingly, the wrong data declaration with the wrong kinds actually parses:
In ghci:
data Rose a = Rose a Maybe (Rose a)

<interactive>:6:22: error:
    • Expecting one more argument to ‘Maybe’
      Expected a type, but ‘Maybe’ has kind ‘* -> *’
    • In the type ‘Maybe’
      In the definition of data constructor ‘Rose’
      In the data declaration for ‘Rose’

But in tutd:
TutorialD (master/main): data Rose a = Node a (Maybe (Rose a))

Works fine. Maybe it shouldnt'?

Oops. Thanks for catching that.
That type was actually accepted but it was not possible to create values for it. This is fixed with new validation in d97145408be8c7c5286ab79f7ac5b3f350abb994.


Multiple instances of MMM-text-clock compete on the SET_LANGUAGE notification

This is a side effect of the new language alternation feature :/
My config is as follows to allow for different layouts depending on the page I display, the problem is that the node_helper.js is global to all instances of the module as documented in this page

Note: Since all instances of your module will receive the notifications, it's your task to make sure the right module responds to your messages.

As a result both instances compete on the language list and the alternationTimeInterval if they are different and when they are the same, double notifications are happening.
		{
			module: "MMM-text-clock",
			classes: "text-clock-homescreen",
			position: "middle_center",
			config: {
				compact: false,
				size: "large",
				language: ['ar','fr','en','es','jp'],
				languageAlternationInterval: 10
			}
		},
		{
			module: "MMM-text-clock",
			classes: "text-clock-small",
			position: "bottom_bar",
			config: {
				compact: true,
				size: "medium",
				language: ['fr','en'],
				languageAlternationInterval: 1
			}
		},
		{
			module: 'MMM-pages',
			config: {
				modules:
				[[ "text-clock-homescreen"],
				[ "clock", "currentweather", "newsfeed", "weatherforecast", "newsfeed",  "calendar", "text-clock-small"]],
				fixed: ['alert', 'updatenotification', "MMM-page-indicator"],
				homePage: 0,
				rotationHomePage: 180000,
				animationTime: 1000,
				rotationTime: 120000
				}
		},

Logging this issue to keep track of it for now, will look at how to best solve it when I have some time.

Ah, good catch! Maybe we can generate a random string that will be unique for each instance and then validate it in the notification receiver? Maybe we can even check if there are multiple instances of the same module and only do it in that scenario 🤔 I don't know if MagicMirror has any functionality for this.

the default calendar module was updated to behave correctly in this scenario , I will inspire from this implementation

		this.sendSocketNotification("ADD_CALENDAR", {
			id: this.identifier,   <===
			url: url,
			excludedEvents: calendarConfig.excludedEvents || this.config.excludedEvents,
			maximumEntries: calendarConfig.maximumEntries || this.config.maximumEntries,

// Override socket notification handler.
	socketNotificationReceived: function (notification, payload) {
		if (this.identifier !== payload.id) {.  <===
			return;
		}

👌


Disable rebootmgr

This prevents rebooting the system silently

slemicro-register login: root
Password:
slemicro-register:~ # systemctl |grep -i reboot
slemicro-register:~ # systemctl |grep -i transactional


Add examples how to import X as x when calling ImportRefAsync to import a  module

[add examples of calling function and function with parameters]https://github.com/sps014/BlazorBindGen/blob/66b4d5fba11bb5ae414e86769bcc0eb6a07e5024/SampleApp/Pages/Index.razor#L32

import {
    S as e, C as t, P as n, W as o
}
from "./moduleESFormat.js";

Is it possible to define and get => S as e, C as t, P as n, W as o from
var c=await ImportRefAsync("./moduleESFormat.js");

@sps014
I add this code to the index.razor  P5Task() function
               var d=await ImportRefAsync("https://cdn.skypack.dev/lodash");
		var S1=d.PropVal<string>("VERSION");
		Console.WriteLine("lodash: version: "+ S1);
		var S2=d.CallRef("now");
		Console.WriteLine("lodash: now(): "+ S2); //1655416787103

		int[] nums = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9};
		string nmmsJson = JsonConvert.SerializeObject(nums);

		var S3=await d.CallRefAsync("slice", "nmmsJson", 2, 6);

		Console.WriteLine("lodash: slice : "+ S3); //["m","s","J","s"] //[ 3, 4, 5, 6 ]

		var S4=await d.CallRefAsync("slice", "nmmsJson", 0, 8);
		Console.WriteLine("lodash: slice : "+ S4); //["n","m","m","s","J","s","o","n"] //[ 1, 2, 3, 4, 5, 6, 7, 8 ]

Question:
how to get [ 3, 4, 5, 6 ] from return string ["m","s","J","s"] ?

Are you trying to get [3-6] sub range, get result as string []
                var d=await ImportRefAsync("https://cdn.skypack.dev/lodash");
		var S1=d.PropVal<string>("VERSION");
		Console.WriteLine("lodash: version: "+ S1);
		var S2=d.CallRef("now");
		Console.WriteLine("lodash: now(): "+ S2); //1655416787103

		int[] nums = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9};
		string nmmsJson = JsonSerializer.Serialize(nums);

		var S3=await d.CallAsync<string[]>("slice", "nmmsJson", 2, 6);

		Console.WriteLine("lodash: slice : "+ string.Join("",S3)); //["m","s","J","s"] //[ 3, 4, 5, 6 ]

		var S4=await d.CallAsync<string[]>("slice", "nmmsJson", 0, 8);
		Console.WriteLine("lodash: slice : "+ string.Join("",S4)); //["n","m","m","s","J","s","o","n"] //[ 1, 2, 3, 4, 5, 6, 7, 8 ]

You do not need to need to convert array to json, interop does it internally, also you do not need to pass parameter quoted in string.
                var d=await ImportRefAsync("https://cdn.skypack.dev/lodash");
		var S1=d.PropVal<string>("VERSION");
		Console.WriteLine("lodash: version: "+ S1);
		var S2=d.CallRef("now");
		Console.WriteLine("lodash: now(): "+ S2); //1655416787103

		int[] nums = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9};

		var S3=await d.CallAsync<int[]>("slice", nums, 2, 6);

		Console.WriteLine("lodash: slice : "+ string.Join(",",S3)); //["m","s","J","s"] //[ 3, 4, 5, 6 ]

		var S4=await d.CallAsync<int[]>("slice", nums, 0, 8);
		Console.WriteLine("lodash: slice : "+ string.Join(",",S4));

it is not working!
it needs more TDD.
	string num2 = "123456789";
	var S3=await d.CallAsync<string[]>("slice", num2, 2, 6);  => S3 =[ 2, 3, 4, 5 ] instead of [ 3, 4, 5, 6 ] given int[] nums = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9};

var S3=await d.CallAsync<string[]>("slice", "nmmsJson", 2, 6);
this gives ["m","s","J","s"] from "nm msJs on.
If geven "1, 2, 3, 4, 5, 6, 7, 8, 9"
this gives ["2", ",", "3",","]

I don't think this is a library issue , can you please migrate it in discussion section.
Something must be wrong with lodash I suggest to reproduce with js, and send code so I could replicate, internally I am using this lib in my organization.
Thanks


Update to deploy NooBaa by default and configure a MigStorage leveraging NooBaa

@jwmatthews Can you please elaborate on this? I am just trying to understand how NooBaa could be deployed.

NooBaa deployment can be a part of agnosticd cluster deployment playbooks.
It can be a different workload.
It can be a part of mig-agnosticd in the form of an ansible playbook.

@jwmatthews  After digging into and trying out NooBaa operator, here are some of my observations :

We can launch NooBaa on one of the clusters using the operator.
We can get the connection details to the S3 endpoint exposed by NooBaa which we can use in migstorage.
We cannot add a storage resource in NooBaa using the operator. This is something user has to do from NooBaa web console.


Angular widget

Please help with enabling the widget for Angular project

@saifoo91 hey, do you have any testing project already with some issues, or is it a request to add an example for Angular in general?


Issues compiling with Dev Sdk

Currently on 2.0.0-dev.67.0 of the sdk.
A few type errors occur when trying to compile an RPC project.
Here are some of the common errors that seem to occur.
Error: A value of type '(dart.core::String, dynamic) → dart.core::Null' can't be assigned to a variable of type '(dynamic, dynamic) → void'.
Try changing the type of the left hand side, or casting the right hand side to '(dynamic, dynamic) → void'.
    (mapObject as Map).forEach((String key, object) {

Error: A value of type '(dart.core::String, dynamic) → dart.core::Null' can't be assigned to a variable of type '(dynamic, dynamic) → void'.
Try changing the type of the left hand side, or casting the right hand side to '(dynamic, dynamic) → void'.
    (encodedMap as Map).forEach((String key, encodedObject) {

Error: A value of type '(dart.core::String, dynamic) → dart.core::Null' can't be assigned to a variable of type '(dynamic, dynamic) → void'.
Try changing the type of the left hand side, or casting the right hand side to '(dynamic, dynamic) → void'.
    (result as Map).forEach((String key, value) {

The getter 'isRegularMethod' isn't defined for the class 'dart.mirrors::DeclarationMirror'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'isRegularMethod'.
      if (dm is! MethodMirror || !dm.isRegularMethod) {

Seems like most of these errors are a result of the dart strong mode changes for 2.0.

This package in general seems not to be Dart 2 clean -- many analysis warnings and test failures on latest dev SDKs.  I'm looking into it since dartpad needs this package to keep working for the latest 2.0 dev SDKs, but someone more familiar with the package might get to it faster.

Assigning to @jcollins-g, since you mentioned you're looking into it.

Is there any update on this? Just ran into this problem, and wanted to know whether I should look into writing a hotfix myself or if a fixed version will be released soon. Thanks!

I am looking at it, but the problem is complex and I have limited time to spend on it, so I can't guarantee an ETA.

@enyo I am at or near the same place, though I've been working at it from getting the tests running:
https://github.com/dart-lang/rpc/tree/dart2-rpc
On that branch all the tests now pass that don't depend on spawning the isolate.  A fix for https://github.com/dart-lang/sdk/issues/33741 just landed for the SDK so it should be possible shortly to try making those tests run.

Another issue is that the uri package is not dart 2 clean.  Filed as google/uri.dart#32

Ok, so basically, we need to wait for the next dart release?

Fortunately it was a short wait.  I think .69 has what we need to keep moving, will try to get going on that today.

Many of the things wrong in the tests post .69 have to do with integer math.
In order to continue to allow uint64 as a valid type and to not require BigInts everywhere an integer ApiProperty is declared, I think I can do one of three things:

Split uint64 out into a BigInt friendly ApiProperty and require all clients using uint64 to update their ApiProperty metadata.
Handle all integers bitwise, allowing things like 0x80000000 for int32 as that's a valid negative number, and similarly for int64.
Create inconsistent handling where int64 is handled bitwise, but int32 is not (that's closest to what I ducttaped together in the above mentioned branch just to power through to blockers).

My inclination is to do the first option, as that's the most consistent, only breaks clients who really could be impacted by the math changes, and is least likely to lead to subtle errors downstream.  I'm pretty much against #3 but I could be convinced if we really know downstream users rarely care about these distinctions.  #2 worries me that users might be depending on these edge cases but seems less dangerous than #3.
@mkustermann, @enyo  thoughts?

I’m not sure I understand your proposal nr. 1. Can you elaborate on that?
Other than that, did you get the compiler to run again?

I'm still fleshing out what I'm trying to do with #1 in a branch.  Basically, the end result of #1 is if users are doing something with a uint64 type, they have to use BigInts to specify the min/max and values returned, and something will throw if they don't.  Exactly how to implement this I'm prototyping as we speak.  I think it may be possible to use dynamic for min/max value in ApiProperty and automatically switch out between IntegerProperty and BigIntegerProperty objects, for example, and just do runtime type checking -- when I first wrote the above I thought I might have to fork ApiProperty itself.
Haven't looked at the compiler bit yet, the maze of integer problems in the tests is pretty large and I am motivated to try to address that first since we'll have to eventually anyway.  Though the isolate problem is indeed gone.

A lack of constant and literal BigInts is a problem.  I have a solution that at least runs and passes tests (require all 64 bit integer ApiProperty annotations to use string-representations), but is silly.
I'm hoping https://github.com/dart-lang/sdk/issues/33893 results in a better option.

Thank you for looking into this.  Glad it seems to be in much better shape then before.

@jcollins-g You accidentally checked in the uri depdency for ../uri

@enyo I actually did that intentionally since at the time of writing there was no uri package with the necessary changes.  There will definitely be a cleanup pass of this branch before checking it in -- I am already noticing even more little bits of cruft that snuck in.

#124 is now ready for some more detailed comments, and especially for some real-world testing.  I'm noticing that there are some problems with different versions of clients and servers talking to each other that still need to be worked out.

@jcollins-g Regarding the uint64 issue, I think I would favor the bigint solution, it will have optimized performance on the VM.

@mkustermann To be clear(er?), the underlying type of the integer properties as implemented is always either int or BigInt.  But the JSON representation has always been as Strings for these IIUC.  Now as well the min/max/default values in the @ApiProperty declarations are proposed to be Strings, because there are no BigInt literals or const BigInts (dart-lang/sdk#33893) and using Dart's ints can be ambiguous because of signing.
Take this example of using integer literals for min/max/default:
  @ApiProperty(
      format: 'uint64',
      minValue: 0,
      maxValue: -1, // In Dart 2, this tests as equal to 2^64-1
      defaultValue: -20) // And in Dart 2 this is 2^64-20
  BigInt aBoundedUInt64;

While this is perfectly "fine" if we convert everything to unsigned BigInts, it doesn't make any sense from a readability perspective.
In other news, I'm having a hard time finding things wrong with this PR from a functional perspective -- so far everything I've seen that looked like a problem with the RPC package turned out to be Dart 2 type exceptions being thrown in my application (dartpad backend, http://github.com/dart-lang/dart-services) and squashed into obfuscation by overzealous exception handlers.  If anyone on this thread has time to try this PR in more real-world packages (particularly packages that depend on int64/uint64 ApiProperty types), I'd love that.


Add ability to specify site_id for each call, overriding the global value

I work for a SaaS studio-membership company, and we use this gem to allow our members to book classes at any MindBody studio that we partner with.
This gem currently has a globally-set site_id that is used for each API call, which makes it difficult to use this gem to interface with multiple studios. I've monkey-patched my version of this gem to allow overriding the site_id on any request by passing in a site_id param as a local when making the request, eg:
MindBody::Services::SaleService.checkout_shopping_cart(site_id: "123456", ...)

I was wondering if this is functionality you'd be interested in including in this gem, and if so, would be happy to start a discussion in this thread and submit a PR once an approach is decided on. If not, no worries either.

You mean via #17 when we discussed this previously? 😄
I'm going to close this issue but I'm happy to discuss further in #17.

Hah, wow, completely forgot about that 😄