Brownie Config throws on missing solc key

brownie Version: 1.4.0
solc Version: N/A
Python Version: 3.7.5
OS: linux

What was wrong?
Brownie assumes solc will be specified in a projects configuration file, and throws when it is not there:
$ brownie compile
Brownie v1.4.0 - Python development framework for Ethereum

  File "brownie/_cli/__main__.py", line 57, in main
    importlib.import_module(f"brownie._cli.{args['<command>']}").main()
  File "brownie/_cli/compile.py", line 28, in main
    project.load(project_path)
  File "brownie/project/main.py", line 443, in load
    return Project(name, project_path)
  File "brownie/project/main.py", line 139, in __init__
    self.load()
  File "brownie/project/main.py", line 147, in load
    self._compiler_config = _load_project_compiler_config(self._path, "solc")
  File "brownie/_config.py", line 113, in _load_project_compiler_config
    return config_data["compiler"][compiler]
KeyError: 'solc'

How to fix it
I think it would probably be best if brownie's config files didn't assume any of the keys are there (using some reasonable defaults unless overriden). Also, it would be great if it didn't assume solc was a requirement unless it detected it was necessary (for Vyper-only projects), but perhaps that is a different issue.

I had to add the following to my brownie-config.yml file in order to compile my Vyper contracts:
  solc:
    version: 0.6.0
    optimize: false
    runs: 100
    evm_version: istanbul
    minify_source: false

shivers violently

Ahh that is a very good find.  Sorry about the forced install :grimacing:


Building Custom Comparator for SQLAlchemy for the password property

Extending from the pattern that allows developers to simply set the password property and a setter hashes it on the way in. The User model class has substantial documentation on this. The general approach is to declare the property as:
_password = Column("password",
    String,
    nullable=True)

followed by exposing the password property as:
@property
def password(self):
    return self._password

and finally overriding the setter to hash the password on the way in:
@password.setter
def password(self, password):
    self._password = hash_password(password)

The Building Custom Comparator guide outlines how we can override the comparator of hybrid_property in SQLAlchemy, if we adopt this paradigm then we can achieve comparing password as:
user.password == password

as opposed using check_password method

The effort seem to be having diminishing returns:

SQLAlchemy has custom comparators for hybrid methods but they are for in use with the ORM queries
from prestans days it's a lot more work if you wish to implement a __eq__ override on the object level and would seem to be an overkill given this will be called in very few spots
SQLAlchemy events on the attribute allow us to hash the password when it's set so we are sort of half way there

Found this blog post which is going down the same route as what we want to.
Turns out that we have to look at TypeDecorator, study this and implement a solution


1.0.x branch has an empty publish-1.0-nightly workflow

Seems to have been introduced in #631 /cc @mdedetrich

We should just delete the empty file. We run the job from the main branch - the yml has a ref: 1.0.x in its checkout.

Yeah that appears to be an accident

Fix merged


Feature/html css emails

@pepoospina you should be able to run yarn run build-email-renderer and then it will bundle a render-email.js in the build directory. you should be able to import it like in https://github.com/Common-SenseMakers/sensemakers/pull/122/commits/491930d489b8d329e4bf99b4fb98bc10b7fea064
It's not the AppLabel but it does contain some styled components.


Add a system closure example

How can Bevy's documentation be improved?
Systems can be created through closures. This will be a surprising fact to many, and should be demonstrated in an example.
Steps:

Create a "closure_system" example.
Demonstrate the use of a simple closure system.
Demonstrate configuring Local variables with closure systems, as shown in the corresponding docs.

Previously attempted in https://github.com/bevyengine/bevy/pull/2231, but author did not respond to relicense request. Do not build off that example, as it is not appropriately licensed.

Sorry for missing your other comments, and for leaving that PR hanging!
And thank you for picking it up! In case you need anything from that original PR or if it makes anything easier, I've commented on the licensing thread.

Awesome; I'll port that over quick.

With #4327 having been merged, can this issue be closed?


[Feature request] Metadata for posts?

Thank you for developing this!
I was wondering if you might consider adding the option to download the metadata (i.e., author name, date created, etc.) for the posts.
Thanks again!

Hi there,
Yep it was a feature I was looking at! Not sure what the best way is to integrate this into the markdown files is... would you have any suggestions? I'll have a proper look this weekend.
Thanks
Tim

I see your concern about the metadata messing up the format of the md file. Maybe having the metadata in a separate csv file would work!

@gllg4009 check out my new release, v2.0.0!
It now downloads metadata such as the like count and the date published. I also built a html interface which lets you browse through and sort the downloaded files. Install the markdown viewer extension and you can view everything from your browser.
Give this project a star if you found it useful!

Fantastic @timf34 !!! I starred the project:)


Remove empty rows

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: a510 sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/console-functions.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Wonderful, thank you for your contribution!


Firefox extenion prompts for 16th word when restoring 15 word Shelly phrase which disables restore functionality

I just have installed the Firefox extension for Yoroi, and when trying to restore my Yoroi wallet (from iOS), I am unable to due to what looks like a bug.
When entering my 15 word Shelley era phrase, an extra red box appears acting like it is prompting for a 16th word. It also will not take any input.
This causes the restore wallet button to be disabled, thus preventing restoring my wallet.
I am on version 4.0.3 of Yoroi, and version 86.0 of Firefox.
Thanks!

I'm sorry, I thought I was still on the browser extension source.


Parse AUTH incorrectly

Per https://github.com/nullobsi/ftpdeno/blob/a69e9bf661e55e82015b46f01ab3f2330a04d5c1/classes/FTPClient.ts#L125, this client parses the AUTH feature by removing "AUTH " and splitting by spaces.
However, the server I'm testing returns "AUTH TLS;TLS-C;SSL;TLS-P;", which yields "TLS;TLS-C;SSL;TLS-P;" as the single AUTH, failing the rest of AUTH method.

thank you, it's been fixed


Added basketId to sExport shipping

1. Why is this change necessary?
We have used the basket id in custom shipping calculation and now the product feed exports to google broken, because the id is not defined
2. What does this change do, exactly?
Adds id as null
3. Describe each step to reproduce the issue or behaviour.
4. Please link to the relevant issues (if any).
5. Which documentation changes (if any) need to be made because of this PR?
6. Checklist

[ ] I have written tests and verified that they fail without my change
[ ] I have squashed any insignificant commits
[ ] This change has comments for package types, values, functions, and non-obvious lines of code
[X] I have read the contribution requirements and fulfil them.

Thanks @shyim, this is not a problem by Shopware as you are in control of what you are selecting for this query. This behavior hasn't changed for many years and is not necessary for the functionality of this method.

So i don't allowed to use basket attributes in custom shipping calculation? 😭 ?


[Proposal] Add kube-aws version to cluster.yaml

Add kube-aws version to the cluster yaml.
When you've many cluster with a lot of different versions is hard to identify with which version of kube-aws you launch the cluster.
What do you think?

Hi @jorge07 I like the idea of exposing the version of kube-aws that provisioned a cluster, but I'm not sure that the cluster.yaml is the right place for this.  If we embed it in the cluster.yaml what action should we take when that cluster.yaml is read by another kube-aws binary built to a different version?
I do collect the kube-aws version in the latest master branch and expose it when you login to a server. e.g: -
dave@mbp ~$ ssh<EMAIL_ADDRESS>Last login: Tue Jul 10 15:46:27 UTC 2018 from <IP_ADDRESS> on pts/1
Container Linux by CoreOS stable (1745.7.0)
Kubernetes v1.10.5
kube-aws add-kubernetes-manifests-from-customfiles/8caae2d4
Update Strategy: No Reboots
Failed Units: 1
<EMAIL_ADDRESS>master|davem-lab-secure core@ip-10-29-26-8 ~ $

In this example the host was provisioned by a feature branch version of kube-aws.  I think I we could also tag aws resources with the version too - would you find that useful?
I think that cluster.yaml needs to express the desired state of the cluster and kube-aws version isn't desired state, it's more like status metadata.  I'm also unclear what action we should/can take based on the customer supplying this as an input value.


[6.x] Remove unused stub which was only used via HandlerEventCommand (removed in 5.2)

https://github.com/laravel/framework/commit/db55426317f2c65ab0385bcca2e672884ceec164#diff-42e8ceded803f3e307f038f5d311c1da
Signed-off-by: Mior Muhammad Zaki<EMAIL_ADDRESS>

@GrahamCampbell StyleCI is failing here because of the return types that were added. Can you remove them? We don't use these anywhere else in the framework atm.

If you rebase the PR, StyleCI will stop complaining. It's actually a bug that StyleCI analyzed the whole framework instead of the new files in this PR, which is no files. Anyway, not to worry.


Do not use deprecated Firefox media functions

Change to current media functions
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getUserMedia

This isn't backwards compatible with old versions of firefox.  What Licode really needs to do is start using adapter.js instead of providing its own shims for getUserMedia().

yeah maybe you are right. But who i using webRTC with an old browser ? adapter.js would be nice.

+1 to use AdapterJs.
2016-04-18 13:15 GMT-03:00 Cracker<EMAIL_ADDRESS>
yeah maybe you are right. But who i using webRTC with an old browser ?
adapter.js would be nice.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/ging/licode/pull/437#issuecomment-211451354

--
Alvaro

I have lots of users who unfortunately use WebRTC with old browsers. :(

Why did you close it? It seems to work well

because you are not backwards compatible and so this will probably not get merged. It is also better to implement adapter.js than merge this :)

It sound reasonable. Have you already tried to implement adapter.js?

no not yet.  If I get problems with the current solution maybe I will.
PS: You also dont know if they will merge this because there are many other updates like node, socket.io or ssl witch dont get merged (for most undefined reasons). So if you change your code to adapter.js you will probably get trouble every time you pull an update from this code base. #NotWorthATM


re-flex 5.0.0 build failure

👋 trying to build the latest release, but run into some build issues on intel runners. The error log is as below:

macos intel runners error build log
  Making install in tests
  clang++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I..  -I../include   -Wall -Wextra -Wunused -O2 -c -o rtest-rtest.o `test -f 'rtest.cpp' || echo './'`rtest.cpp
  clang++ -std=gnu++11  -Wall -Wextra -Wunused -O2   -o rtest rtest-rtest.o ../lib/libreflex.a
  ld: Undefined symbols:
    reflex::Matcher::simd_advance_string_pma_avx512bw(unsigned long), referenced from:
        reflex::Matcher::simd_init_advance_avx512bw() in libreflex.a[8](libreflex_a-matcher_avx512bw.o)
    reflex::Matcher::simd_advance_string_pmh_avx512bw(unsigned long), referenced from:
        reflex::Matcher::simd_init_advance_avx512bw() in libreflex.a[8](libreflex_a-matcher_avx512bw.o)
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make[1]: *** [rtest] Error 1
  make: *** [install-recursive] Error 1

x86 linux runner error build log
make[1]: Entering directory '/tmp/re-flex-20241029-3377-rd2eum/RE-flex-5.0.0/tests'
  g++-11 -DHAVE_CONFIG_H -I. -I..  -I../include   -Wall -Wextra -Wunused -O2 -c -o rtest-rtest.o `test -f 'rtest.cpp' || echo './'`rtest.cpp
  g++-11  -Wall -Wextra -Wunused -O2   -o rtest rtest-rtest.o ../lib/libreflex.a
  /usr/bin/ld: ../lib/libreflex.a(libreflex_a-matcher_avx512bw.o): in function `reflex::Matcher::simd_init_advance_avx512bw()':
  matcher_avx512bw.cpp:(.text+0x993): undefined reference to `reflex::Matcher::simd_advance_string_pma_avx512bw(unsigned long)'
  /usr/bin/ld: matcher_avx512bw.cpp:(.text+0xa53): undefined reference to `reflex::Matcher::simd_advance_string_pmh_avx512bw(unsigned long)'
  collect2: error: ld returned 1 exit status
  make[1]: *** [Makefile:321: rtest] Error 1
  make[1]: Leaving directory '/tmp/re-flex-[202](https://github.com/Homebrew/homebrew-core/actions/runs/11580558805/job/32244392063?pr=195973#step:4:203)41029-3377-rd2eum/RE-flex-5.0.0/tests'
  make: *** [Makefile:488: install-recursive] Error 1

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/11580558805/job/32244392063?pr=195973
relates to Homebrew/homebrew-core#195973

Thanks for reporting. There is a #if defined(WITH_STRING_PM) that is astray and a leftover of the previous release. The repo is updated. I will update the release as well.

Sounds great, thank you!

works for me via https://github.com/Homebrew/homebrew-core/pull/196041


Support for remote_state backend 'remote'

Since HashiCorp has offered a free tier for Terraform Enteprise it would be nice to have a support for
remote_state {
  backend = "remote"
  ....
}

Or I've missed something and it's already there?
I have the following config:
remote_state {
  backend = "remote"
  config = {
    hostname = "app.terraform.io"
    organization = "my-company"

    workspaces = {
      name = "da-dev-${path_relative_to_include()}"
    }
  }
}

but it gives an error:
[terragrunt] [/home/denis/work/git/da/terraform/dev/ntv] 2019/07/09 17:44:11 Running command: /usr/local/bin/terraform-12 init -backend-config=hostname=app.terraform.io -backend-config=organization=my-company -backend-config=workspaces=map[name:da-dev-ntv]

Initializing the backend...

Error: Invalid backend configuration argument

The backend configuration argument "workspaces" given on the command line is
not expected for the selected backend type.

[terragrunt] 2019/07/09 17:44:11 Hit multiple errors:
exit status 1

-backend-config=workspaces=map[name:da-dev-ntv]

Ah, Terragrunt is not converted nested values (e.g., nested maps, such as workspaces = { ... }) to proper HCL syntax when passing them as args on the command line. Would you be up for a quick PR to fix this? I'm pretty sure we have a function that does the conversion properly (for passing variables in inputs = { ... }) and just need to use it in one more place!

Facing the same issue, wish i could help but my go fu is not strong.

👍 me too

I'm trying to write a patch for this, do you have any pointers @brikis98 as to in what file this is done?
I'm looking at the config.go file and the remote_state.go file, but it feels like I might be complicating things more than needed.
I'm a novice Go developer at best which isn't really to my advantage :)

@lsc https://github.com/gruntwork-io/terragrunt/blob/master/remote/remote_state.go#L151

Even if parsing is fixed, hashicorp/terraform#21830 still needs to be resolved for this to work with tf 0.12.

This would be awesome currently need this.

How does Terragrunt actually run the shell commands?
Bash can do process substitution in order to bypass the need to create a temporary file, this works correctly when using terraform init on the command line using the following command
terraform init -backend-config=hostname=app.terraform.io -backend-config=organization=org -backend-config=<(echo 'workspaces { name = "manual" }')

However, it seems like terraform is being run in such a way that doesn't allow this as the following does not seem to work. In what shell are terraform commands run in?
remote_state {
  backend = "remote"

  config = {
    hostname = "app.terraform.io"

    organization = "org"

  }
}

terraform {
  extra_arguments "init_workspace" {
    commands = ["init"]

    arguments = [
      "-backend-config=<(echo \"workspaces { name = ${path_relative_to_include()} }\" )"
    ]

  }
}

Terragrunt says that it is running the command terraform init -backend-config=hostname=app.terraform.io -backend-config=organization=sachde -backend-config=<(echo "workspaces { name = manual }" ) but results in the warning
Error: Invalid backend configuration argument

The backend configuration argument "<(echo \"workspaces { name " given on the
command line is not expected for the selected backend type.

This is not the most elegant way to do this, but it seems like one of the few possible workarounds that could be used until this and hashicorp/terraform#21830 get fixed, other than adding a backend.hcl file that contains the desired workspace, and using "-backend-config=backend.hcl"

Actually, a better workaround is having a before_hook which runs a python script that writes the relative path to a file called backend.hcl
terraform {
    before_hook "init" {
    commands     = ["init"]
    execute      = ["${get_parent_terragrunt_dir()}/../scripts/terragrunt-env.py", "${path_relative_to_include()}"]
    run_on_error = false
  }

  extra_arguments "init_workspace" {
    commands = ["init"]

    arguments = [
      "-backend-config=backend.hcl"
    ]

  }
}

#!/usr/bin/python3

import sys

workspace = "workspaces { name = \""+' '.join(sys.argv[1:])+"\" }\n"
f = open("backend.hcl","w+")
f.write(workspace)
f.close

We just released a new feature, generate blocks which allows you to generate tf code directly into the working directory. Check out the updated docs to learn more.
Since this is generating the raw TF file instead of using the CLI args, it won't run into all the parsing issues where you couldn't set blocks or complex maps on the CLI with --backend-config.
With this, you can generate a backend.tf file with the remote backend configuration:
generate "backend" {
  path = "backend.tf"
  if_exists = "overwrite_terragrunt"
  contents = <<EOF
terraform {
  backend "remote" {
    hostname = "app.terraform.io"
    organization = "my-company"
    workspaces {
      name = "da-dev-${path_relative_to_include()}"
    }
  }
}
EOF
}

This issue still exists.
Yet to try the generate block solution. But hoping that this issue will be resolved and we can use remote backend without generate block

I tried the example, however the / in the path are considered invalid in workspace names. I was able to fix it using the replace function to change them to -:
generate "backend" {
  path = "backend.tf"
  if_exists = "overwrite_terragrunt"
  contents = <<EOF
terraform {
  backend "remote" {
    hostname = "app.terraform.io"
    organization = "my-company"
    workspaces {
      name = "da-dev-${replace(path_relative_to_include()}, "/\\W/", "-")"
    }
  }
}
EOF
}

The generate block looks promising, however it doesn't like name = "da-dev-${path_relative_to_include()}". Getting the following error atm:
`$ terragrunt plan
[INFO] Getting version from tgenv-version-name
[INFO] TGENV_VERSION is 0.32.4
Initializing the backend...
Successfully configured the backend "remote"! Terraform will automatically
use this backend unless the backend configuration changes.
Error loading state: Error creating workspace my-worspace-prefix-here.: invalid attribute
Name must only contain letters, numbers, dashes, and underscores
ERRO[0004] 1 error occurred:
* exit status 1`

Generate block works fine, but this incompatibility should be pointed out in the documentation.


Improve readability of models as strings

Problem statement
Models can be used as errors, when used for an non-200 status code. This is done by formatting the model value directly with %+v, which will simply format the models using their Go Syntax. This works pretty great, except when the properties of the model are of a pointer type, in which case the address of the property instead of its value get printed.
This makes that the resulted error messages aren't too great. Take for example a model which simply defines a `string message property. With the code as it is right now, it will simply print the address of that message string, rather than the actual message. Thus making the resulting error messages not as effective as they could be.

At it's simplest, I think we could define a String() function just for structs, using their already defined json tags, Eg.:
func (m *{{name}}) String() string {
	b, _ := json.Marshal(m)
	return string(b)
}

But perhaps that is too simple. You have any thoughts on this issue @casualjim ?

I wonder if the issue here is not the attempted coercion of the complex response into an Error string (although this could probably be handled better) but that the generated API discards the response in this situation.
Given that we know the format of the response and actually deserialise it, should we not just return it to the caller alongside the error and allow the caller to use that response as they see fit.
I think small changes in client.gotmpl and response.gotmpl might achieve this. Of course this would also lead to an increase in the number of return values from (a *Client) SomeAPI to include the failure types along with the success types from any given API.
I would be happy to draft up a PR if this approach seems reasonable?

You already get the response as a type it just comes out as the error interface, but you can type switch on the and get the actual type.  There isn't much point to a contract if it doesn't describe your interface.
Secondly a breaking change like this is not something we want to introduce without a really good reason for it.

If we think a minute about Glen's original idea, i.e. having models a stringers, the idea not so bad...

I have no issue with Glens addition, we kind of already have all the code for it with the BinaryMarshaller interface implementations

Hi there! is it still actual?


pull request for e2e test at 01/26/2017 13:56:12

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Typo in Develocity buildScan terms code

Issue type
Typo (please open a PR instead)
Problem description
Cannot open a PR, code not found in repo.
Groovy code block at scan setup is wrong:
develocity {
    buildScan {
        termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
-       termsOfUseUrl = "yes"
+       termsOfUseAgree = "yes"
    }
}

While you're around you probably want to change the Kotlin block's .set() syntax to just =, because that's the "preferred way". Applies to most code blocks on that page.
Context (optional)
No response
Page with the problem
https://docs.gradle.com/enterprise/gradle-plugin/current/#connecting_to_scans_gradle_com

While the typo is fixed already, the note about .set is still valid.


BboxOverlaps2D is already registered in IoU calculator

What's wrong with this?

Did you make any modifcations in your code?


Ape init should come with a starter template by default

Overview
Provide a simple overview of what you wish to see added. Please include:

Getting started with ape is more difficult than with the other smart contract development frameworks, based on my experience of trying Populus, Truffle, Brownie, Hardhat and Forge
This is because the default ape init does not by default generate a useable project
ape init can be configured to use a Github template, but this is not the default behaviour

Specification
ape init should come with a hello world or Counter example, like Forge does.

User can choose (interactively) between Solidity and Vyper
User would need to explicitly choose not to use a project template
Solidity example should include OpenZeppelin contract dependencies by default, as everyone uses them
There should be an example unit test
There should be an example README.md with example commands generated
Github CI can be configured to ensure the default generated project compile and and tests run

So, we have ape-template which is a 2nd party plugin we used to work with cookiecutter, which is a much more advanced templating system using Jinja2. Several of the features you proposed exist in that plugin already
We have an issue (not sure where) about merging that into ape as a 1st class plugin, and merging with the ape init featureset so that it works the way you expect
We could then have a "demo project" like you suggest, or just by default ask the user if they want to use one of the pre-configured templates we have under this org, or just a blank project using what ape init currently has, which is just folders and an ape-config.yaml. This would be alongside the normal use of ape template which allows using any repo (cookiecutter-enabled or not) as a template to copy from

related: https://github.com/ApeWorX/ape/issues/1556

I think it's better to have a completely empty project because it removes the step of removing everything that you are not going to use. The only time that a starter project may be useful is:

You are a complete beginner and don't know what you are doing.
You want to start working based on existing work.

In both cases a plugin is available. A solution could be to add a flag like --template or --scaffold to add starter files,

I think it's better to have a completely empty project because it removes the step of removing everything that you are not going to use. The only time that a starter project may be useful is:

You are a complete beginner and don't know what you are doing.
You want to start working based on existing work.

In both cases a plugin is available. A solution could be to add a flag like --template or --scaffold to add starter files,

yes, this is what I am thinking too
The basic flow would be something like this:
$ ape init  # with no flags
What type of project would you like to start:
1. Template project
2. Empty project
3. Simple example

Choose one or hit enter [3]:

And then if you hit enter you get the basic template project as a simple example
If you hit 1, it'll walk through the current ape template flow after you give it a string for the template
and you can also do ape init --template <template uri> to get the template, or ape init --example to get the basic example, or ape init --empty to get the empty project

I think it's better to have a completely empty project because it removes the step of removing everything that you are not going to use. The only time that a starter project may be useful is:

After my few days of experimenting with Ape I see that it is still very early for external developers to try this tool.

Basic user stories (install, add dependencies, add compiler, compile dependencies, compile your own project, deploy, verify) cannot be completed because they are broken or documentation does not cover basics.
Completing the full flow of the basic user stories is a requirement for this project to succeed. Developers will be turned off and just go to use other tools when they hit the first roadblock, which seems to be obvious for a third party developer, but a tool supports it very poorly.
Creating a completely empty project may work for an internal Ape user, but it surely does not work for a third-party developer
For the project to be successful, it needs to work for third-party developers easily, so that they do not need to go to documentation and Discord at all

I see that one (only?) way to address this is that

There needs to be an example project
Documentation needs to refer to this stable example project, because that's what the users see on their hard drive folder
The example project needs to be covered by basic integration or manual testing so that it does not get broken

Saying "just use a plugin" is a turn off for third-party developers, and when they hear those words they will just walk away.

I think the Ape experience may end up looking a little different than Foundry, because we don't bundle compilers by default. Compilers can be installed, but the extra step might be a turn off.
What's the best user story (or stories) we can optimize for? I think the average beginner dev has a Python background and wants to do something simple like a Uniswap trade from Python. We can optimize our examples for this (Ape does come bundled with ways of using dependency projects), and show off a script that implements a trade (on Sepolia testnet?) after walking through how to create an account and get testnet tokens
We have tried Vyper devs as a user story to optimize for in the past, I think that is another user story we can optimize for, but the more I think about it the more I think Python chain ops is a user story worth optimizing for as well


There might be non-PUBLISH packets in the send buffer

Specifically I saw this problem with a Subscribe packet, due to #17, but nothing prevents this case from happening for other reasons.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>3
Details

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 82.816%

Totals

Change from base Build<PHONE_NUMBER>4:
0.0%

Covered Lines:
6699

Relevant Lines:
8089

💛  - Coveralls

I'm not sure that any non-publish packets should be resent. I need to understand why there are such packets in the buffer (I thought there wouldn't be, hence the assert).

Consider what happens when the client tries to (un)subscribe to some topic, but the server dies and disconnects before it can send the reply.

Consider what happens when the client tries to (un)subscribe to some topic, but the server dies and disconnects before it can send the reply.

The client will then reset the client state machine, which either leaves the outbound buffer empty (with clean session enabled, or only the publish packets in it otherwise). I see, however, that self._pending_packets is not cleared in reset() which could lead to a problem.

Thus my thinking right now is that my original code in _handle_packet() was correct, but the code in the reset() method is not.

At any rate, this needs a new test.


[BUG]: Memory leak

Describe the bug
Activating the iCal sensor node leaks memory until eventually it crashes HA.
To Reproduce
Steps to reproduce the behavior:

Setup an ical sensor to a gmail account
set it on a manual trigger that repeats (quickly for fastest results. The screenshot below was taken with a 1 sec interval with two iCal sensor nodes)
watch the NodeRed memory usage climb rapidly

Expected behavior
Ideally no memory leak, but a small increase in memory followed by a periodic cleanup would be fine too.
Screenshots

Additional context
Add any other context about the problem here.

Putting bug on the NR node repo, not the base repo


Incorrect URL in GitHub social image

There appears to be a typo in the social image for this repository. The image demonstrates the following PUT request:
http PUT httbin.org/put hello=world

The domain appears to be incorrect, and should most likely be httpbin.org instead.
As a side note, httbin.org appears to potentially be a malicious domain.

Thanks for the report, we'll be loking into it.

For reference, here's a link to the image in question: https://repository-images.githubusercontent.com/3544424/74c34800-8341-11eb-93d0-8b01bccfd334

.github/workflows/code-style.yml

Thanks for the report, we'll be loking into it.

@isidentical yo there's the same "GH social image" just hotfixed with a correct url: (and pngoptimized to ~50% size along the way…)

https://user-images.githubusercontent.com/1784648/167337061-8df20a5b-43d2-4e79-abb3-03fef44a8dc0.png
(just ready to copypaste to repo settings…) /cc @jakubroztocil @claudiatd


info command needs to ignore directory

--  doesn't check for file type??
loki# rvn info -F /build/ravenports/tilde/packages/files/ | grep Arch

Unhandled Exception raised
raised ADA.IO_EXCEPTIONS.STATUS_ERROR : System.File_IO.Check_File_Open: file not open

rvn info -F /var/ravenports/tilde/packages/files

response:
--file is a directory entry.

fix confirmed.


!!/approve in chat is broken

Based on a single incident, I speculate that there is a problem with Metasmoke, possibly related to the one which causes AIM to currently malfunction.
https://chat.stackexchange.com/transcript/message/38420604#38420604
Transcript:

tripleee> !!/approve https://github.com/Charcoal-SE/SmokeDetector/pull/884

SmokeDetector>
@tripleee Forwarding request to metasmoke returned HTTP 404. Check status manually.

Angus tells me this never worked in chat but I'll leave this open as a reminder.

Angus is correct, I never fixed it

Also, the format is !!/approve <number>,rather than with a URL

Closing as duplicate of #819


Reading .mff file - keyerror: 'EEG'

Python noob. Please help me with this error whilst reading in an .mff file!!! Why am I getting a KeyError for 'EEG' and how do I fix? Thank you
INPUT:
raw_path = r'/~/Desktop/file.mff'
raw_data = mne.io.read_raw_egi(raw_path)

OUTPUT:
Reading EGI MFF Header from /~/Desktop/file.mff...
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-14-6153fc6ec773> in <module>
      1 raw_path = r'/Users/rahulkakaiya/Desktop/neuro-analysis/Rahul-1-Danielle.mff'
----> 2 raw_data = mne.io.read_raw_egi(raw_path)

<decorator-gen-167> in read_raw_egi(input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mne/io/egi/egi.py in read_raw_egi(input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)
    151     if input_fname.endswith('.mff'):
    152         return _read_raw_egi_mff(input_fname, eog, misc, include,
--> 153                                  exclude, preload, channel_naming, verbose)
    154     return RawEGI(input_fname, eog, misc, include, exclude, preload,
    155                   channel_naming, verbose)

<decorator-gen-165> in _read_raw_egi_mff(input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mne/io/egi/egimff.py in _read_raw_egi_mff(input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)
    275     """
    276     return RawMff(input_fname, eog, misc, include, exclude,
--> 277                   preload, channel_naming, verbose)
    278
    279

<decorator-gen-166> in __init__(self, input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mne/io/egi/egimff.py in __init__(self, input_fname, eog, misc, include, exclude, preload, channel_naming, verbose)
    287         """Init the RawMff class."""
    288         logger.info('Reading EGI MFF Header from %s...' % input_fname)
--> 289         egi_info = _read_header(input_fname)
    290         if eog is None:
    291             eog = []

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mne/io/egi/egimff.py in _read_header(input_fname)
    152         Main headers set.
    153     """
--> 154     mff_hdr = _read_mff_header(input_fname)
    155     with open(input_fname + '/signal1.bin', 'rb') as fid:
    156         version = np.fromfile(fid, np.int32, 1)[0]

/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mne/io/egi/egimff.py in _read_mff_header(filepath)
     28     """
     29     all_files = _get_signalfname(filepath)
---> 30     eeg_file = all_files['EEG']['signal']
     31     eeg_info_file = all_files['EEG']['info']
     32

KeyError: 'EEG'

I don't know the EGI format, but can you confirm that you are trying to load a valid EGI file? That is, have you tried opening it with other programs (e.g. Biosig)?

@rahulkakaiya can you try the branch from #7548 and see if it gives you a more informative error message?


When will next release come out?

Sorry if this is not the place to ask this question.
I noticed a recent commit 83fec5a which makes it tech agnostic. That's the cure our project needs. It would really help when next release with this fix is ready.
May I ask when next release will come out? Thanks in advance.

This is a fine place to ask the question :) I just cut 0.8.0 which should be available now and includes everything on master.


Search icon is missing

Describe the bug
The search icon is broken, at least in the flatpak of Spot from Flathub running on GNOME (Adwaita). I'm not sure if this is a bug in Spot or the way it was packaged.
Screenshots

Here's a crop with 3× zoom to show the problem spot:

General information:

Distribution: Fedora 34 beta, Silverblue
Desktop: GNOME 40 with default Adwaita theme
Installation method: Flatpak from Flathub
Version: 0.1.10
Device used: Desktop

Thanks for the report! That's weird, I thought it was supposed to be a standard, system provided icon :/ but I was wrong, and I forgot I had a non default theme. I'll fix that ASAP!

Fixed in 0.1.11


feat(ulp): Generate compile_commands.json for ULP targets (IDFGH-12974)

It will be more convenient to some IDE/VS Code users. All subprojects' compile_commands.json can be further merged into single large one.

Thank you for the contribution @andylinpersonal. We shall incorporate the changes in to the repository. Thanks!

Closed for merged 700f9b7e9043801375fd673396f4d4634ae2fb15


Could we get the prompt that is used for the plugin?

I still don't have access to the plugin and don't know when I will. Would love to be able to replicate the results locally, but there's clearly some nice prompting going on with the official chatgpt website. Could we get the prompt along with all the ways it injects the descriptions, api calls and context.
Thank you and thanks for the plugin repo... it is fantastic.

what he said, please and thank you c:

+1

There is a special plugins model that knows when and how to use plugins.
Maybe this helps:
`Assistant is a large language model trained by OpenAI.
Knowledge Cutoff: 2021-09
Current date: 2023-04-19
Tools
retrieval
// Plugin for searching through the user's documents (such as files, emails, and more) to find answers to questions and retrieve relevant information. Use it whenever a user asks something that might be found in their personal information.
namespace retrieval {
// Accepts search query objects array each with query and optional filter. Break down complex questions into sub-questions. Refine results by criteria, e.g. time / source, don't do this often. Split queries if ResponseTooLargeError occurs.
type query_query_post = (_: {
queries: any[],
}) => any;
} // namespace retrieval`

There is a special plugins model that knows when and how to use plugins. Maybe this helps:
Assistant is a large language model trained by OpenAI.
Knowledge Cutoff: 2021-09
Current date: 2023-04-19

# Tools
## retrieval
// Plugin for searching through the user's documents (such as files, emails, and more) to find answers to questions and retrieve relevant information. Use it whenever a user asks something that might be found in their personal information.
namespace retrieval {

// Accepts search query objects array each with query and optional filter. Break down complex questions into sub-questions. Refine results by criteria, e.g. time / source, don't do this often. Split queries if ResponseTooLargeError occurs.
type query_query_post = (_: {
queries: any[],
}) => any;

} // namespace retrieval

Sorry, what are you referring to? Do you have a link? I wasn't aware of a plugin model.

My apologies for the confusion. The image below shows the plugin model. I don't think there are more information available about the model.

The openapi.yaml file is transformed into TypeScript, which is then utilized in the prompt.


New Feature: More buoys

Description
I would like to see more SeaMarks and choices for other types of buoys in Id Editor
Currently I have 2 choices:
Red Buoy and Green Buoy.  This is not enough because, for example: I want to add a white buoy.
If I knew how to add this myself I would do it myself but I dont.
In additon to white I would like to see the following:
Yellow Buoy
Black Buoy
Blue Buoy
and then, for navigation, the following SeaMarks listed here:

https://wiki.openstreetmap.org/wiki/Tag:seamark:type%3Dbuoy_lateral

Screenshots

The previous developers foresaw some difficulties in adding presets for seamark tagging. They decided to add these basic presets as they're easy for users to recognize. Adding more buoy types can be discussed though.
cc: @tyrasd This issue should be moved to openstreetmap/id-tagging-schema.

Ok, have edited the issue to simplify the ask.  For informal use, mapping what we see should be good enough.  Will follow this up in  openstreetmap/id-tagging-schema as suggested.


A failed timestamp parse will leave a non LogStash::Timestamp in @timestamp

After a json document is serialized, a check is performed on event.timestamp and if it's a String it's converted into a LogStash::Timestamp. However if the conversion fails the event be tagged as jsonparsefailure but still carry a string in @timestamp.Example:
% echo '{"@timestamp": "07/sep/2015:07:50:54 UTC" }}' | bin/logstash -e 'input { stdin { } } filter { json { source => "message"} } output { stdout { codec => rubydebug } }'
Logstash startup completed
Trouble parsing json {:source=>"message", :raw=>"{\"@timestamp\": \"07/sep/2015:07:50:54 UTC\" }}", :exception=>#<LogStash::TimestampParserError: invalid timestamp string "07/sep/2015:07:50:54 UTC", error=java.lang.IllegalArgumentException: Invalid format: "07/sep/2015:07:50:54 UTC" is malformed at "/sep/2015:07:50:54 UTC">, :level=>:warn}
{
       "message" => "{\"@timestamp\": \"07/sep/2015:07:50:54 UTC\" }}",
      "@version" => "1",
    "@timestamp" => "07/sep/2015:07:50:54 UTC",
          "host" => "Joaos-MBP.lan",
          "tags" => [
        [0] "_jsonparsefailure"
    ]
}
Logstash shutdown completed

Some plugins will no longer work when handling this event since they expect @timestamp to always be an instance of LogStash::Timestamp

this no longer happens since 1.0.1, please upgrade to the most recent version of logstash-filter-json to avoid the issue


Add Get method to the keyvalue.DB interface [phab:D675]

Created by schroederc at 2016-01-15 21:16:37:
Certain DB implementations may provide a faster implementation of Get
than the equivalent usage of ScanPrefix.  These speedups will be
translated to speedups in table.KVProto and Kythe's serving
implementations.

zarko accepted this revision at 2016-01-15 21:20:44

shahms accepted this revision at 2016-01-15 21:21:39

schroederc closed via commit c61616d6702401937f23ab6b40937db6ae016ad8 at 2016-01-15 21:23:10


Errors parsing CSS

Errors parsing CSS:
error on line 939, column 14: problem parsing function expected ),
  color: rgb($color-accent);
             ^
error on line 939, column 14: expected }, but found $
  color: rgb($color-accent);
             ^
error on line 939, column 27: expected {, but found )
  color: rgb($color-accent);
                          ^
error on line 3073, column 25: problem parsing function expected ),
  background-color: rgb($color-primary) !important; }
                        ^
error on line 3073, column 25: expected }, but found $
  background-color: rgb($color-primary) !important; }
                        ^
error on line 3073, column 39: expected {, but found )
  background-color: rgb($color-primary) !important; }
                                      ^
error on line 3073, column 41: parsing error expected }
  background-color: rgb($color-primary) !important; }
                                        ^^^^^^^^^^
error on line 3073, column 51: premature end of file unknown CSS
  background-color: rgb($color-primary) !important; }
                                                  ^
[DirectiveMetadataLinker on fhir_designer|lib/model/command/undo_service.ng_summary.json]:
Errors parsing CSS:
error on line 939, column 14: problem parsing function expected ),
  color: rgb($color-accent);
             ^
error on line 939, column 14: expected }, but found $
  color: rgb($color-accent);
             ^
error on line 939, column 27: expected {, but found )
  color: rgb($color-accent);
                          ^
error on line 3073, column 25: problem parsing function expected ),
  background-color: rgb($color-primary) !important; }
                        ^
error on line 3073, column 25: expected }, but found $
  background-color: rgb($color-primary) !important; }
                        ^
error on line 3073, column 39: expected {, but found )
  background-color: rgb($color-primary) !important; }
                                      ^
error on line 3073, column 41: parsing error expected }
  background-color: rgb($color-primary) !important; }
                                        ^^^^^^^^^^
error on line 3073, column 51: premature end of file unknown CSS
  background-color: rgb($color-primary) !important; }
                                                  ^
[StylesheetCompiler on bwu_ng_mdl|lib/src/template.css]:
Errors parsing CSS:
error on line 939, column 14: problem parsing function expected ),
  color: rgb($color-accent);
             ^
error on line 939, column 14: expected }, but found $
  color: rgb($color-accent);
             ^
error on line 939, column 27: expected {, but found )
  color: rgb($color-accent);
                          ^
error on line 3073, column 25: problem parsing function expected ),
  background-color: rgb($color-primary) !important; }
                        ^
error on line 3073, column 25: expected }, but found $
  background-color: rgb($color-primary) !important; }
                        ^
error on line 3073, column 39: expected {, but found )
  background-color: rgb($color-primary) !important; }
                                      ^
error on line 3073, column 41: parsing error expected }
  background-color: rgb($color-primary) !important; }
                                        ^^^^^^^^^^
error on line 3073, column 51: premature end of file unknown CSS
  background-color: rgb($color-primary) !important; }

Angular2: version: "3.0.0-beta+1"

That's because $color-accent isn't valid CSS as far as I know. Are you using SASS/SCSS to generate your CSS? That looks like a SASS/SCSS variable that wasn't resolved.
Could you provide the source file(s) causing this error for reference please?

Ping @zoechi - I don't want to miss for 3.0.0 if an actual bug.

It's a bit hard to tell what source causes this error. It's the MDL CSS.
The error message would be more helpful if it contained the selector.
There is CSS like
.mdl-color--accent {
  background-color: unquote("rgb(#{$color-accent})") !important;
}

When I check the content of the file in the browser, there is no rgb($

It won't show in the browser because the CSS shim won't output it. Are you using the latest version of MDL? I ran it through the shim recently while fixing the last issue you posted and I didn't see this error, but I'll look again.

I just checked the latest version of MDL and found this segment.
.mdl-color--accent {
  background-color: rgb(255, 64, 129) !important;
}

This corresponds to the original SCSS it was compiled from, which is exactly the snippet you provided. Are you perhaps using the SCSS directly in your project?

If I load http://localhost:63342/myproj/web/designer.css
I also get
.mdl-color--accent {
  background-color: rgb(255,64,129) !important; }

but I still get the error in the transformer

It seems like somehow the SCSS is being fed into the transformer. Is your project hosted somewhere so I could take a look? That link is to localhost so I can't see your CSS.

Sorry, the localhost link wasn't supposed to work, I just wanted to show how I got the content (so that the browser or shims won't modify it)
It's a big project. I have to break it down to create a smaller repo.
I won't be able to do that before Thursday.

Alright thanks. Sorry you're running into this issue. Like I said, I suspect SCSS is being fed into the transformer in place of CSS somewhere. Are you using SCSS in your project and compiling it to CSS?

Yes, using https://pub.dartlang.org/packages/sass/versions/0.4.2%2B7

Is there a chance it's outputting SCSS that is being fed into Angular? Do you have copy-sources set to true? Can you run that transformer in isolation and check if the output contains this above snippet still?

@leonsenft Where does copy-sources come from (where can it be set/removed)?

See Configuration: https://github.com/dart-league/dart-sass#configuration

I see :D. No, I'm not using it. I don't apply any options at all to the sass transformer.

Sorry, without the actual project to look at I'm not sure how I can help you any further. As I said before this issue isn't a bug with the CSS parser, but rather a bug or misconfiguration with tooling that SCSS is ending up in the style compiler directly.

@leonsenft I still plan to provide more information. Just wanted to get clarification on other question raised during the discussion.

I was able to investigate more.
The code complained about
  color: rgb($color-accent);
             ^

seems to come back from the SASS transformer as shown in the error message, when the variables (like $color-accent) are not defined.
What's weird is, that template.scss isn't referenced anywhere, it just exists in a project that is a pub dependency of the application project.

So because the variable isn't defined, it's never replaced and remains in the CSS?
The second issue you've described is because the transformer processes all CSS files in the project (and dependencies) #352. It's possible to exclude files from being processed in your pubspec.yaml, but this has to be done in the project containing the file itself, not from a dependent project.
I'm going to close this issue because it's correctly reporting invalid CSS. There's discussion though about revising the approach taken with new CSS shimming to be less restrictive.

Perhaps it shouldn't break the build on invalid CSS for files that don't concern it (not referenced in @Component(...).
Also if I exclude the file in the containing project, how am I supposed to use this file when I actually want to?
To me this still seems broken.

You're right, that's a valid concern which is covered by issue #352.

@Ok, great. Somehow missed the link.

After being able to get rid of this error, I was able (or the new Angular version did - not sure) to fix some other problem that caused serious troubles since months (see for example #351).
I didn't expect that above error really breaks the Angular build, but now it looks like it did.
Because after excluding the SASS file that caused above error output,
seems to also have fully fixed #352 that haunted me since about 10/2016
Now I have the suspicion that the broken CSS caused the problems all along and the updated CssLib just made it visible.
When I remove the exclude: lib/src/template.scss line, I for example get
[web] GET packages/fhir_webui/src/webui_generated/form/edit_mode_service.template.dart => Could not find asset fhir_webui|lib/src/webui_generated/form/edit_mode_service.template.dart.

and errors like this happened all the time. Here it complains about the template of a service!!!
and it complained about a different service every time, sometimes also other stuff.
This was about to drive me cracy.
Some random changes in the code and reloading the page (without restarting pub serve) made the application work fine (most of the time).
To me this now looks like changing the code and reloading made parts of the Angular transformer re-run which wasn't run previously because of the CSS problem (maybe because it threw an exception),
while the part that processes the CSS wasn't run again, because no CSS did change (only some code file) and therefore this time didn't cause an exception.
It's one side to print error messages about stuff that is not correct, but another to break the build, and I think invalid CSS should not break the build.
It's fine of course that it reports issues, but I think it should otherwise allow the transformer to continue normally.
I think there is still some ugly issue hidden that can lead to really bad user experience,
like the error message about edit_mode_service above because of broken CSS.
If this explanation is too confusing, please let me know and I try to improve.
I'm not sure if this problem driving me cracy succeeded (to some degree),
and I am no longer able to express myself properly ;-)

The broken CSS shouldn't have been responsible before we introduced the parser from csslib. Before everything was regex based, so it wouldn't even know if there was invalid CSS. What happens now, is we parse the CSS, then shim it by transforming the CSS AST.
The issue is if csslib itself runs into an error parsing. It doesn't have very good error recovery, so rather than failing to shim a single selector, it has rather unpredictable results, but generally gives up on the rest of the file. We thought this should be a build error since it's unlikely if you had a CSS error that your component would look anything like you intended. But having CSS errors in files you're not using break the build is not very desirable behavior, so maybe we should revert the CSS errors to warnings.
The issues are further exacerbated by csslib only accepting known at-rules with specific grammars, rather than performing more generalized parsing.
Overall I'm not very happy with the amount of disruption this change has caused, as it was just intended to fix some bugs with the shim. I'm going to work on making the parser much more lenient in what it accepts which should eliminate this problem and the others like it.

The broken CSS shouldn't have been responsible before we introduced the parser from csslib.

but when I remove the exclusion or template.scss I get the same error that I got repeatedly the last months (at the beginning it was a different error but otherwise similar erratic behavior)

We thought this should be a build error

Build errors are usually very annoying. I don't want to be forced to have every character in the whole application perfect to be able to look at the result.
Usually during refactoring or otherwise in the middle of some development I want to be able to check a single component or part of the application and don't care at all about whether in some other parts styling is broken (because of a recent change or similar).
This is one of the strengths of Dart that an application runs fine as long as broken code is not executed.
I understand that this can't fully work with Angulars code generation, but I don't see a need to drop this feature entirely because of CSS, where also the browsers play along and are as forgiving as it gets.
I think this is extremely important for a quick edit/reload cycle.
(Just wondering how this will work with DDC :-/)
I assume that this also will be quite surprising behavior for most web developers.

Overall I'm not very happy with the amount of disruption

In the end it seems to have fixed (or at least revealed some insight about) an issue that was extremely frustrating.


[Bug]: "Hide 'See new Tweets'" option does not work

Description
I may be mistaken on what this feature actually is meant to do. On the timeline (home or "for you"), there is a ribbon that shows up above the Tweets saying "Show N Tweets", where N is meant to be the amount of queued Tweets. I thought the option in the title may be referring to this, but it doesn't hide that ribbon (and if this is the one that is meant, it's labeled incorrectly in the options).

This is what it hides:


Create Nist College Banepa

Add Nist College Banepa in JetBrains Options

@Sajeena-Chaulagai Nist I am sorry, I have to close the request without merging, because you made a mistake in a request and did not specify any filepath. Please ensure that you are familiar with this repository rules located at the bottom of this page and make a new correct request. Thank you for your understanding!


Logout user when app is minimized

Run the app.
Click on minimize window button.
Open app again.

Result: app opens at same screen and user has access to wallet.
Expected: app to logout user when it is minimized and prompts the user to unlock his wallet when it is unminimized.

@avive it's not a bug but change in requirements, app was not logging out before when in background to display tx and rewards notifications

hmm... I thought this was what we planned for security reasons. Let's revisit this in later app iterations.

Ilya - when user minimizes the app window - can't you just execute the same code as you do when the user clicks on the log-out button?

Tested on
Build: v0.0.6RC4.
OS: Windows 10 Pro.
Machine: Spacemesh Lab 1
This issue is not fixed. App still logs out of wallet when minimized.

Reopening was caused by not reading the description

Clarified desc and desired behavior.

Per @IlyaVi recommendation - let's not implement this enhancement right now as it got ux issues.


[New Feature] Background Iframe for Flow Youtube Chat

https://greasyfork.org/scripts/428651-tabview-youtube/discussions/196131
To be reviewed.

High Possibility for "not do it"

In original design, the original chat room is kept without changes. danmaku are just additional on top on it.
It loses the commendation feature which discourage users to add chat messages.
It is not the usual practice (including but not limited to most sites in Japan)
It takes a lot of time to change the coding
It might create bugs in the core mechanism.


Added #define XXX X format

I wanted to have this format, and I might not be the only one, so here it is :)
Anyway thanks for this awesome plugin! I've been thinking of doing the exact same thing a week ago!

Thank you very much for your feedback, and for your helpful contribution!


ClientIDEnforcementCustom

Currently the DSL only allows for BasicAuth as an option for the client ID enforcement policy. There is an api/model class for the custom headers option, however, DSL fails to recognize it, so in muleDeploy.groovy, you have to specify it as a generic policy
Current:
`    policies {
    mulesoftPolicy {
        assetId 'client-id-enforcement'
        version '1.2.3'
        config([
            credentialsOriginHasHttpBasicAuthenticationHeader: 'customExpression',
            clientIdExpression: '#[attributes.headers["client_id"]]',
            clientSecretExpression: '#[attributes.headers["client_secret"]]'
        ])
    }

}`

Expected:
    policies {         clientEnforcementPolicyCustom {             version '1.2.3'         }     }

Also, some tips to figure out the policy json, (or more exmples) would be nice in the readme.
Tim G recommended looking chrome browser network traffic for the json sent when applying the policy manually... it was a great tip, although the naming is slightly different...


Is it possible to filter array of paths using glob patterns?

I need to filter paths using glob patterns, just like glob() function works, but getting list of files as parameter insteaf of from filesystem?
Is it possible to do this somehow?

I found minimatch.


Dev/v0.0.1

Version 0.0.1
What news?

Support backends: native huggingface, VLLMs
Support model's checkpoint from huggingface
Support lora model

LGTM!


feat: make Textfield, Textarea, Search, Combobox Express-ready

Description
Make the following components Express ready:

Textfield
Textarea
Search
Combobox

Add a migration guide for ClearButton
Make yarn dev skip bakeVars task, taking start up time from 72 seconds to 24 seconds. bakeVars sill runs on full build and whenever any files are changed, so we'll still be able to catch undefined variables.
To-do list

[ ] Release new tokens packages from DSS, update in CSS
[x] Fix mouse-focus of combobox turning invalid PickerButton blue
[x] Implement design decisions for invalid mouse-focused PickerButton
[x] Fix DatePicker examples
[x] Position validation icon correctly in Combobox (currently hardcoded pixel values)
[x] Write migration guide for Search
[x] Write migration guide for SearchWithin
[x] Write migration guide for Combobox
[x] Write migration guide for DatePicker
[x] Write migration guide for ClearButton
[x] Write docs for PickerButton
[ ] Design verification

This PR is ready, pending DSS release of https://git.corp.adobe.com/Spectrum/dss/pull/364

This PR is waiting on design verification for Textfield and Textarea from @badimon

VRT running at https://spectrum-visual-regression.ci.corp.adobe.com/view/Spectrum CSS/job/spectrum-css-vr-essential-test/37/

Just did a quick check, this will result in the following major version bumps:
 - @spectrum-css/inputgroup: 3.0.8 => 4.0.0
 - @spectrum-css/search: 3.1.2 => 4.0.0
 - @spectrum-css/searchwithin: 3.1.2 => 4.0.0

As expected.


[Feature][Java Agent] apm-customize-enhance-plugin add support for returnedObj

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description
Currently apm-customize-enhance-plugin doesn't support returnedObj expression, see doc.
Since it's similar with @Trace toolkit, I think returnedObj should be supported.
Use case
<enhanced>
    <class class_name="SomeClass">
        <method method="someMethod(java.lang.String)" static="false">
            <tag key="tag_1">returnedObj</tag>
            <log key="log_1">returnedObj</tag>
        </method>
    </class>
    <class class_name="SomeClass2">
        <method method="someMethod(java.lang.String)" static="false">
            <tag key="tag_1">returnedObj.foo</tag>
            <log key="log_1">returnedObj.bar</tag>
        </method>
    </class>
</enhanced>

Related issues
No response
Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Welcome to add if this is useful for you.


Please explain how to run redun server

Hi,
First of all, thanks for this promising project !
I'm trying to use the redun server command and face this issue:
[redun] Attempting to start the redun server application, with the assumption that the `redun server` command was run from the root of the redun repository
ERROR: .FileNotFoundError: [Errno 2] No such file or directory: './redun_server/docker-compose.yml'

I couldn't find a procedure to set-up this folder and the associated YAML.
Could you please help ?
Thanks !

Hi @Melkaz,
Thanks for the question. This subcommand is for running a server to visualize the redun call graphs. However, we haven't open source this code at this time so this subcommand won't work for external users right now.


console.err:"You cannot render into anything but a top root"

   When I add ReactRootView to my ViewGroup then ReloadJS, and I got this.

I got this too.Any idea?

This can be help you. Issue 14717

I have the same error. It  happens when it's reloading after a change and I click in button. I am sure but It may be the root is not fully rendered.


google-cloud-pubsub - Support for "messageId"

Hey guys!
I was wondering if there is a way to publish a message via Pub/Sub wrapper with custom messageId? According to API documentation here this should be possible. However google-cloud-pubsub gem does not support it.
Thanks for any kind of hint.
P.s.: If this is a missing functionality please point me in the right direction and I'll try to implement this myself.

Oto

This should not be possible. messageId is assigned by the server. Ignore me.


Searching with coordinates gets blocked - Error 403

Searching with coordinates seems to get blocked at some point. Probably an IP address blocking or something since this calls the backend API. Throws an Error 403 and stops working. Any way this can be remedied?

Figured it out.
Zillow aside having an anti-bot scraper, implemented rate limiting on their end. Too much requests per second gets flagged as bot and the IP get's temporarilly blocked. Adding a random generator for sleep time between each requests solved this.

Hi, yes it seems to the IP, thats why you should use proxies

Hi John, Thank you for publishing this code. I started using this functionality last week to pull for-sale data in my area. It was working fine for few days but then started giving below error. I tried with proxies but no dice. Trying to understand if it's just me or zillow did something on their end to prevent these calls. Any insights into are greatly appreciated.
Traceback (most recent call last):
File "C:\Zillow\TestPyZill.py", line 13, in
results_sold = pyzill.sold(pagination, ne_lat,ne_long,sw_lat,sw_long,zoom_value, "")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyzill\search.py", line 120, in sold
return search(pagination,ne_lat,ne_long,sw_lat,sw_long,zoom_value,rent,proxy_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyzill\search.py", line 194, in search
data = response.json()
^^^^^^^^^^^^^^^
File "C:\Users\xxxxxx\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 978, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


Feature request - set gas price

having a 1 wei gasPrice is nice, but would also like to use a realistic gasPrice

testrpc --gasPrice 0x1234

This is in yo. Check the readme. Closing!


Mute and autoplay not working

Hello so i'am trying to mute this script below with URL : https://www.twides.com/advertisment.html i tried every method to mute the video player but it does not work any idea what is wrong why i can't mute this embed.
///////////////////////////////////////////////

404 not found, closing

Hi, (late answer but hope it helps anyway), this question has already been asked and solution was given here:
https://github.com/mediaelement/mediaelement/issues/2211


Can't cross-compile "calc" example to i686-pc-windows-gnu

   Compiling druid-win-shell v0.1.1
error[E0308]: mismatched types
   --> /home/vi/.cargo/registry/src/github.com-1ecc6299db9ec823/druid-win-shell-0.1.1/src/window.rs:809:48
    |
809 |         SetWindowLongPtrW(hwnd, GWLP_USERDATA, wndproc_ptr as LONG_PTR);
    |                                                ^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found isize

This particular error does not occur for --target x86_64-pc-windows-gnu.
Adding as i32 resolves the error and produces an exe (not runnable with Wine although due to d2d1 not having been implemented enough).

This is still a problem. I ran into this while trying to cross-compile for i686-pc-windows-gnu.
Changing it to style as _ makes it work.
If I submit a pull request with that change, would it be acceptable?

This is still a problem. I ran into this while trying to cross-compile for i686-pc-windows-gnu.
Changing it to style as _ makes it work.
If I submit a pull request with that change, would it be acceptable?

@crumblingstatue I would accept that PR.

I believe this issue can be closed now, unless we want to keep it open for tracking the winapi-rs pull request.

I think our solution is acceptable long-term.


Chemstation .reg Format

I believe the Core of the Chemstation .reg format is a CArchive https://learn.microsoft.com/en-us/cpp/mfc/reference/carchive-class?view=msvc-170 here is a reader/writer implemented in
cpp: https://github.com/pixelspark/corespark/blob/e2aa78fe13e273fcc9bb2665ab4c700e89895741/Libraries/atlmfc/src/mfc/arcobj.cpp
The "data type numbers" are random / depend on the order in which the different data objects are written to the archive. It get´s a number once it´s written to the file the first time.
See this code: https://github.com/pixelspark/corespark/blob/e2aa78fe13e273fcc9bb2665ab4c700e89895741/Libraries/atlmfc/src/mfc/arcobj.cpp#L259

Thanks for all these references!
The existing code is just a rough translation of Aston's REG implementation into Rust so it's really helpful to have more references. The main issue (as far as I remember it) is that the different data objects can reference each other and entab normally processes data in a linear stream so all the sections will need to be read into memory first (and different sections can have different data types so there's so type coercion that may need to happen).

I've stumbled upon this package. Entab only seems to be able to open a very specific, old reg file format from Agilent. Newer ChemStation versions (with the same magic byte sequence at the beginning) are more verbose.
I've attached some example files from the same Method with a pressure export.
sample_2.zip
sample_1.zip

To follow up on this: Since I really needed that extraction for pressure survaillance, I've spend quite some time trying to understand this file format. I cannot make you a PR as I lack Rust knowledge, but this script extracts some of the data (xy-traces as well as the current state of the modules):
import struct
import numpy as np

DEBUG = False

def PascalStringInt8Ascii(stream):
    size, *_ = struct.unpack("<B", stream.read(1))
    pascal_string, *_ = struct.unpack(f">{size}s", stream.read(size*1))
    pascal_string = pascal_string.decode("ascii")

    return size, pascal_string

def PascalStringInt16Ascii(stream):
    size, *_ = struct.unpack("<H", stream.read(2))
    pascal_string, *_ = struct.unpack(f">{size}s", stream.read(size))
    pascal_string = pascal_string.decode("ascii")

    return size, pascal_string

def PascalStringInt16Utf16(stream):
    if type(stream) == bytes:
        size = struct.unpack("<H", stream[:2])[0]
        pascal_string = stream[2:2+size*2].decode("utf-16")
    else:
        size, *_ = struct.unpack("<H", stream.read(2))
        pascal_string, *_ = struct.unpack(f">{size*2}s", stream.read(size*2))
        pascal_string = pascal_string.decode("utf-16")

    return size, pascal_string

def UInt8(stream):
    integer, *_ = struct.unpack("<B", stream.read(1))
    return integer

def UInt16(stream):
    integer, *_ = struct.unpack("<H", stream.read(2))
    return integer

class FileClass:
    header = {}
    parts = []

def parse_ndr_string(string):
    title = PascalStringInt16Utf16(string)[1]
    values = {}

    while True:
        pair_separator = string.read(2)

        match pair_separator:
            case b"\t\x80":
                field_name = PascalStringInt16Utf16(string)[1]
                field_value_separator = string.read(6) # Must be 0xFFFF 0000 00
                field_value = struct.unpack("<d", string.read(8))[0]
            case b"\x0b\x80":
                # In some parts, 0x0b80 indicates string / string (in presence of \t\x80), in others, 0x0b80 indicated string / double (in presence if \r\x80)
                field_name = PascalStringInt16Utf16(string)[1]
                field_value_separator = string.read(6) # Must be 0xFFFF 0000 00

                rollback = string.tell()
                lookahead = string.read(4)
                string.seek(rollback)

                size, field_value = PascalStringInt16Utf16(string)
                #print("Size", size, field_name, field_value)

                #print("lookahead", lookahead[:2].hex(), lookahead[2:])
                if size == 0:
                    if len(lookahead) == 3:
                        pass
                    elif lookahead[:2] == b"\x00\x00" and lookahead[2:] in [b"\x00", b"\t\x80", b"\x0b\x80", b"\r\x80"]:
                        pass
                    else:
                        string.seek(rollback)
                        field_value = struct.unpack("<d", string.read(8))[0]

            case b"\r\x80":
                field_name = PascalStringInt16Utf16(string)[1]
                field_value_separator = string.read(6) # Must be 0xFFFF 0000 00
                field_value = PascalStringInt16Utf16(string)[1]
            case b"":
                # Reached EOF
                break
            case b"\x01":
                break
            case b"\x00":
                break
            case _:
                print("Unknown pair_separator", pair_separator) if DEBUG else None

        values[field_name] = field_value
        #print(field_name, field_value)

    return (title, values)

float64 = np.dtype(np.float64)
float64 = float64.newbyteorder("<")

part_separator = "040000000700010000003e00FFFF1101"
part_separator = "040000000700010000003e00"

with open(r"E:\LCMS\BASILIUS 2023-10-05 14-26-41\002-P2-A1-BS513 F6.D\lcdiag.reg", "rb") as fb:
    buffer = fb.read()
    reg_parts = buffer.split(bytes.fromhex(part_separator))
    File = FileClass()

    for i_part, part in enumerate(reg_parts):
        part_buf = io.BytesIO(part)

        if i_part == 0:
            #print(part.hex())
            File.header["magic"] = part_buf.read(4)
            _, File.header["format"] = PascalStringInt8Ascii(part_buf)

            part_buf.seek(0x18)
            _, File.header["version"] = PascalStringInt8Ascii(part_buf)

            part_buf.seek(0x26)
            File.header["n_parts"] = UInt16(part_buf)
        else:
            print("Part", i_part) if DEBUG else None
            File.parts.append({
                "data": None,
                "???": [],
                "trace": None,
            })

            match part_buf.read(4):
                case b'\xff\xff\x11\x01':
                    sections = re.split(b"\xff\xff\x11\x00|\xff\xff\x11\x01|\xff\xff\x11\x02|\xff\xff\x11\x11|\xff\xff\x21\x00", part)[1:]

                    for section in sections:
                        section_buf = io.BytesIO(section)
                        #print(section[:16])
                        size, section_name = PascalStringInt16Ascii(section_buf)
                        section = section[2+size:]

                        print("\t", section_name) if DEBUG else None

                        match section_name:
                            case "CHPUserObject":
                                pass
                            case "CHPList":
                                pass
                            case "CHPNdrDouble":
                                unpacked = struct.unpack("<iid", section[-16:])
                                # d is always 1.0; No clue what they mean
                            case "CHPNdrString":
                                header = section_buf.read(10)
                                unpacked = parse_ndr_string(section_buf)

                                File.parts[i_part-1]["data"] = unpacked
                                print("\t", unpacked) if DEBUG else None
                            case "CHPNdrObject":
                                field_name = PascalStringInt16Utf16(section_buf)
                                field_separator = section_buf.read(6)
                                field_value = section_buf.read().hex()

                                File.parts[i_part-1]["???"].append((field_name, field_value))
                            case "CHPTable":
                                # Very unsure about this
                                # Not what I'm interested in right now
                                # There seem to be grouping (C001, C002, C003, C004, C005) which are in some files used, in some files not completely
                                # Some of the records are separated by 16, 1C or 1D and don't use Pascal string formatting, but is plain utf16

                                File.parts[i_part-1]["???"].append(("CHPTable", [
                                    section_buf.read().hex()
                                ]))
                            case "CHPAnnText":
                                blocks = section.split(bytes.fromhex("FFFFFF80"))
                                text = PascalStringInt16Utf16(blocks[1])[1]
                                File.parts[i_part-1]["title"] = text
                            case "CHPDatDoubleSliced":
                                # Not sure what this means
                                # Comes in my files always before CHPDatDoubleRow, might be related to that?
                                File.parts[i_part-1]["???"].append(("CHPDatDoubleSliced", [
                                    section_buf.read().hex()
                                ]))
                            case "CHPDatDoubleRow":
                                # Contains y, x data in two blocks with units
                                blocks = section.split(bytes.fromhex("00"*7 + "FF" * 7))

                                y_unit = PascalStringInt16Utf16(blocks[1])[1]
                                y_data_offset = 2 + len(y_unit)*2 + 4
                                y_size = struct.unpack("<I", blocks[1][y_data_offset:y_data_offset+4])[0]

                                y_block = {
                                    "unit": y_unit,
                                    "size": y_size,
                                    "data": np.frombuffer(blocks[1][y_data_offset+4+1:y_data_offset+4+y_size*8+1], dtype=float64)
                                }

                                x_unit = PascalStringInt16Utf16(blocks[2])[1]
                                x_data_offset = 2 + len(x_unit)*2 + 4
                                x_size = struct.unpack("<I", blocks[2][x_data_offset:x_data_offset+4])[0]

                                x_block = {
                                    "unit": x_unit,
                                    "size": x_size,
                                    "data": np.frombuffer(blocks[2][x_data_offset+4+1:x_data_offset+4+x_size*8+1], dtype=float64)
                                }

                                File.parts[i_part-1]["trace"] = (x_block, y_block)
                            case _:
                                print("unsupported type", section_name) if DEBUG else None

                case _:
                    raise Exception("Not supported")
            print("---------\n\n") if DEBUG else None

I'm heavily struggling with the information of the CHPTable though.

Thank you so much for the sample files! The files I have (from 10-ish years ago) start with ".32..REGISTER FILE.......A.00.01" and it looks like the new ones start with ".32..REGISTER FILE.......notused". At a first glance, the new format looks kind of like Thermo CF/DXFs (also CArchives, I think) so I can potentially re-use/re-factor some of that code; I'm not sure about section ordering (also an issue for the old files) requiring the parser to buffer all the information first before it can be reassembled, but maybe that's changed with the new format(s).
The CHPTable part is interesting. Not sure what's going on, but it appears to be some kind of 242-byte data header, the number 1 in u32, 414 bytes of 1C/1D/16 delimited text, a 38-byte "Description" block, 190 bytes of Pascal-like strings, and then the C002, C003, C004 pattern you mentioned. I think there's some record pattern starting with 07 in the header? In both of the files you sent, there appears to be a 27-byte block (starts with 0107 right after CHPTable) and then there's a repeating 18-byte pattern that starts with 07 and sometimes ends with a f64 (only in your sample1 file; 426.5, 456.5, 461.5, 444.0). This stops ~90-ish bytes before the delimited text appears and I'd guess it's either encoding data or references to the data elsewhere?


Test and tag commits pushed to master.

This is done through a new method in the nifty script: test_and_tag. A travis
tested master branch push will be tagged with travis-tested. Our sites
repository will always pull from this latest and tested master branch.

 (3) Eliminate need for version bumping in sites triggered by a feature change to an app [2]

We've decided against using a travis-tested tag for public repos. There are a
couple of reasons for this undo. We currently don't have a way to push tags to
github through a public repo through travis and we also want to preserve
semantic versioning for public facing apps.


Extract Fingerprint::new

For constructors with no arguments, default() would be more customary than new().

I disagree with that lint because it doesn't take visibility into account.  Adding new, as I've done here, isn't public while implementing Default is.

@bors: r+

:pushpin: Commit 37956e8c39a965059f6ca19477724f60200433e6 has been approved by alexcrichton

:hourglass: Testing commit 37956e8c39a965059f6ca19477724f60200433e6 with merge adf047d6271116c8d04ecbbf32828c4a1b5f1696...

:sunny: Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing adf047d6271116c8d04ecbbf32828c4a1b5f1696 to master...


Beavers searching for trees, crashing world instead

Describe the bug
World crashing to launcher, seemingly at random
To Reproduce
Have game running
Expected behavior
Game to run smoothly (er, I suppose this IS modded MC);
Game to NOT crash due to beavers
Screenshots
n/a
System (please complete the following information):

Occultism Version: occultism-1.18.1-1.26.0
OS: Win10
Minecraft Version: 1.18.1
Modpack Link and Version, or list of mods: WiP pack modlist.txt

Additional context
Crash reports -
crash-2022-02-01_09.32.50-server.txt
crash-2022-02-01_07.31.59-server.txt
crash-2022-02-01_09.18.38-server.txt

I believe these crashes are happening when trees try to grow. I've also noticed that bonemeal does not grow trees with this update.

Hmm....  Except there are no saplings in loaded/render range where I was at in the world.
This is a test world for my current WiP pack. I've not planted a single sapling, and there are no Lost Cities within 1000 blocks (only place planted saplings would generate).

Have the same issue here. And it does appear that the crash is happening somewhere in
com.github.klikli_dev.occultism.handlers.FamiliarEventHandler.beaverFindTree(FamiliarEventHandler.java:65)

and/or
ASMEventHandler_630_FamiliarEventHandler_beaverFindTree_SaplingGrowTreeEvent.invoke(.dynamic)


[Vue] [Checkbox]: Element with id "checkbox:1:input" not found.

Description
Having an issue with the checkbox component where it can't seem to find the element in the dom or some such case. You should be able to see the error upon loading the repoduction.
Link to Reproduction
https://stackblitz.com/edit/nuxt-starter-yyjnfg?file=package.json,package-lock.json,components%2FCustomCheckbox.vue,pages%2Findex.vue,pages%2Fpage-2.vue,app.vue,nuxt.config.ts,tsconfig.json
Steps to reproduce
Open reproduction
Ark UI Version
0.0.0-rc-20230520173736
Framework

[ ] React
[ ] Solid
[X] Vue

Browser
No response
Additional Information
No response

Hey @jiblett1000
Thanks for reporting this. This might be an SSR issue.
I will look into it, in the meantime, you can add a custom id as a workaround.

We've applied a lot of changes. Please re-test and open a new issue if the problem persist.


Disable first click handling in inactive window

instead only bring the window to front.
Example of problem to be solved: only a piece of a browser window is visible. Clicking onto a link (by accident) to bring it into the foreground will also change the page shown within that browser window.
As long this isn't going to be a official Windows mouse settings option it would be nice to have an option via PowerToys..
But its more tricky to implement then it sounds: the first click should be handled if that Window is completely visible...

Make it optional/sticky on a per window/program basis. For example, many programs gain focus with a single click, and having some programs requiring a second click, and others to use single click is very disruptive to workflow. eg.  Notepad(++) a single click, andExcel two clicks, and a google spreadsheet one click focus. Let the user choose. Don't force ribbons on people who just want standard old menu.


[bug] tauri resource directory is hard-coded

Describe the bug
Tauri resource directory location is hard-coded making Tauri fail when it can't read or write from it, this is especially a problem in immutable distros like NixOS.
Reproduction
https://github.com/NixOS/nixpkgs/pull/265771 - build this without the tauri patch in it.
Expected behavior
For it to succeed in building.
Full tauri info output
N/A

Stack trace
No response
Additional context
There is a fix in the Github pr I linked in the files it's called tauri-env-resource-dir.patch

To be honest i am super confused, probably because i have no nix(os) experience.
Are you saying that rust's target/ folder is read-only in nixos? How can the app itself be compiled then?
Do you have any error logs from before the patch was applied?

Hi there! I actually wrote that patch. Basically the issue is that /usr does not exist and packages are built into and later run from an immutable directory like /nix/store/[hash]-name with exe installed to /nix/store/[hash]-name/bin/exe and resources installed to /nix/store/[hash]-name/lib/cargo_name
The assumptions in this code snippet do not hold for that layout because it assumes either /usr exists, $APPDIR is set in the environment, or that the path ends in /data/usr/bin: https://github.com/tauri-apps/tauri/blob/d70470f868511adb551afcd17acade6dd08b14da/core/tauri-utils/src/platform.rs#L253-L275
The patch linked above basically adds an escape hatch so that any downstream which conforms to a filesystem hierarchy that is not one of those 3 options can use to override the resource directory (which that need is not Nix-specific and would occur elsewhere as well, like with AppImages which already had to be hardcoded)
Alternatively, if the code path could try to use exe_dir.join(format!("../lib/{}", package_info.package_name())) regardless of the path ending in /data/usr/bin or the existence of /usr (either as a fallback or as an initial check), that would also work for our and I imagine most any other downstreams
Thank you for the prompt response!

Are you saying that rust's target/ folder is read-only in nixos? How can the app itself be compiled then?

Also just to be clear, this doesn't have to do with it. The target directory gets written to just fine, but when it does cargo install it gets put not in /usr and that is the part that Tauri trips up on

To be honest i am super confused, probably because i have no nix(os) experience. Are you saying that rust's target/ folder is read-only in nixos? How can the app itself be compiled then?
Do you have any error logs from before the patch was applied?

This should be an easy fix right?

Bump :P


add compatibility for subfolders

Right now, the app can only inspect top-level folders; need to add ability to browse subfolders as well...not clear what the best strategy for this is. Could allow user to directly input synapse id of folder, or could simply pull all Folder objects for a the selected project from the main fileview. Latter probably easier.

This was fixed by #6


How to use yield call() from an external API callback?

Hello!
I'm using an external API (Firebase), which uses callbacks. I'm not 100% sure what's the best approach to converting the callbacks to something usable by redux-saga because of its use of generators.
Code:
    const database = firebase.database();
    const connectionRef = database.ref('.info/connected');
    connectionRef.on('value', (snapshot) => {
      if (snapshot.val() === true) {
        yield call(actions.connected);
      }
    });

Action:
    export const connected = () => {
      return {
        type: types.FIREBASE_CONNECT,
      };
    };

Reducer:
    const connectionStatus = (state: boolean = initialState, action: Object) => {
      switch (action.type) {
      case types.FIREBASE_CONNECT:
        return true;
      default:
        return state;
      }
    };

I can't use yield because the callback isn't a * generator function.
What's the correct approach to converting it in a manner that's good for redux-saga to handle?
BTW, I've really been enjoying redux-saga- it's been fantastic to use, thanks!

You can wrap your code to a function that returns promise, something like
function connect() {
  return new Promise(resolve => {
    const database = firebase.database();
    const connectionRef = database.ref('.info/connected');
    connectionRef.on('value', resolve);
  });
}

Then use it in saga:
const snapshot = yield call(connect);
if (snapshot.val() === true)
  yield put(actions.connected());

@aikoven this Promise will resolve just once, if he wants to get multiple values over time from the firebase callback it is not a suitable solution unfortunately
what i came up to in my project is that - https://github.com/yelouafi/redux-saga/issues/475#issuecomment-239129811

@Andarist You're right, in this case using channels is a way to go.

@aikoven - Yeah, I tried the promise route already, I should have mentioned that it needs to fire more than once.
@Andarist - thanks, I'll try what you came up with and see if that works for me as well.

@Andarist - works perfectly, thanks!
@yelouafi - do you recommend @Andarist's suggestion as the preferred way? If so, is it worth it if (I or someone else) adds some documentation around handling callbacks like this?
Cheers!

Hi !
I would appreciate to see part of your code on this topic in order to help me to ease the learning curve :)

@thieu75
sagas:
function *rootSaga() {
  yield [
    appSagas.watchConnectionStatus(),
  ];
}

sagas/applications
import { channel } from 'redux-saga';
import { call, put, take } from 'redux-saga/effects';

import firebase from 'firebase';
import { firebaseCallbacks } from 'modules';

export function *connectionStatusChange(): Generator<void, void, void> {
  const connectionStatusChannel = channel();
  const connectionStatus = firebaseCallbacks.connectionStatusWrapper(connectionStatusChannel);
  const connectionRef = firebase.database().ref('.info/connected');
  connectionRef.on('value', connectionStatus);

  while (true) {
    const action = yield take(connectionStatusChannel);
    yield put(action);
  }
}

// @no-test-needed
export function *watchConnectionStatus(): Generator<void, void, void> {
  yield call(connectionStatusChange);
}

firebase
import actions from 'modules/actions';

function connectionStatusWrapper(channel) {
  function connectionStatus(snapshot) {
    if (snapshot.val() === true) {
      channel.put(actions.connected());
    }
    else {
      channel.put(actions.disconnected());
    }
  }

  return connectionStatus;
}

export default connectionStatusWrapper;

actions
// firebase actions
export const connected = () => {
  return {
    type: types.FIREBASE_CONNECTED,
  };
};

export const disconnected = () => {
  return {
    type: types.FIREBASE_DISCONNECTED,
  };
};

reducer connectionStatus:
// @flow
import { ActionTypes as types } from 'modules/constants';

const initialState = false;

const connectionStatus = (state: boolean = initialState, action: Object) => {
  switch (action.type) {
  case types.FIREBASE_CONNECTED:
    return true;
  case types.FIREBASE_DISCONNECTED:
    return false;
  default:
    return state;
  }
};

export default connectionStatus;

@davidwparker I kinda not understand why Andarist said that this Promise will resolve just once, and what 's the difference between your final solution and aikoven's?
It looks that connectionStatusChange is executed 1 time, so that connectionRef.on('value', connectionStatus); is executed 1 time, then there would be either channel.put(actions.connected()); or channel.put(actions.disconnected()); executed 1 time, so finally yield put(action); in the while loop dispatches one of em?
I think I am wrong, but I dont understand why. Hope that you could explain it!

It really is about how do u want to structure your code. Problem with Promises as I've mentioned is that they provide a SINGLE value and that's all.
You can ofc wrap this one in a Promise and just listen to that promise with an infinite while loop fashion, but you would have to remember to clear up the subscription in the callback, like this:
function connect() {
  return new Promise(resolve => {
    const database = firebase.database();
    const connectionRef = database.ref('.info/connected');
    connectionRef.on('value', val => {
      connectionRef.off('value', resolve)
      resolve(val)
    });
  });
}

By wrapping the thing not in a Promise but in a channel you allow the underlying source (firebase here) to emit MULTIPLE values over time to the channel and you will be able to take from that channel and act appropriately on the received items.

Hi, I got some question about yield ..
*queryAppid({ payload },{ put, call }){
     wx.ready(function(){
        wx.getLocation({
          type: 'wgs84',
          success: function (res) {
            let latitude = res.latitude;
            let longitude = res.longitude;
            let speed = res.speed;
            let accuracy = res.accuracy;

           //when get latitude and  longitude  then getLocation.
            var map = new BMap.Map("l-map");
            map.centerAndZoom(new BMap.Point(longitude, latitude));
            var myGeo = new BMap.Geocoder();
            myGeo.getLocation(new BMap.Point(longitude, latitude), function(result){
              if (result){
                //when I get result ,I want to dispatch an Action
                yield put({ type: 'someAction' , payload: { location: result.address} })
              }
            });
          }
        });
}

When wx is ready then getLocation if success then callback ,I want use yield put in it, but I dont know how to do with it, can someone help me ~ appreciate !!

Its basically the same situation. You need to wrap your data source in the eventChannel, emit items from it and just take those items from the saga. Something like this:
function queryAppid({ payload },{ put, call }){
     return new eventChannel(emit => {
      wx.ready(function(){
        wx.getLocation({
          type: 'wgs84',
          success: function (res) {
            let latitude = res.latitude;
            let longitude = res.longitude;
            let speed = res.speed;
            let accuracy = res.accuracy;

           //when get latitude and  longitude  then getLocation.

            var myGeo = new BMap.Geocoder();
            myGeo.getLocation(new BMap.Point(longitude, latitude), function(result){
              if (result){
                emit(result)
              }
            });
          }
        });

        return () => {
          // return some unscubscribe function here
        }
     })
}

function* someSaga() {
  const payload = ...
  const chan = queryAppid({ payload })
  while (true) {
    const result = yield take(chan)
    yield put({ type: 'someAction' , payload: { location: result.address} })
  }
}