Add situation when SubChunk1Size == 18

NAudio音频库录制的16k音频的 SubChunk1Size = 18 ，导致Line49报错
Console.WriteLine($"Invalid SubChunk1Size: {SubChunk1Size}. Expect 16");
此行改为
if (SubChunk1Size != 16 && SubChunk1Size != 18)
然后将 SkipMetaData方法改为如下，即可取出音频数据：
    private void SkipMetaData(BinaryReader reader)
    {
        var bs = reader.BaseStream;

        Int32 subChunk2ID = _header.SubChunk2ID;
        Int32 subChunk1Size = _header.SubChunk1Size;
        Int32 subChunk2Size = _header.SubChunk2Size;
        if (subChunk1Size == 16)
        {
            while (bs.Position != bs.Length && subChunk2ID != 0x61746164)
            {
                bs.Seek(subChunk2Size, SeekOrigin.Current);
                subChunk2ID = reader.ReadInt32();
                subChunk2Size = reader.ReadInt32();
            }
            _header.SubChunk2ID = subChunk2ID;
            _header.SubChunk2Size = subChunk2Size;
        }
        else
        {

                subChunk2Size = (int)(bs.Length - bs.Position);

        }

        _header.SubChunk2ID = subChunk2ID;
        _header.SubChunk2Size = subChunk2Size;
    }

Looks like you have uploaded encrypted files. Could you fix that?

@eugeneYz

Looks like you have uploaded encrypted files. Could you fix that?
Sorry about that,It seems that these codes can be only added manually.


RETINA ?

They can add retina graphics?

You can't be serious. You must be in the wrong repository, Multi-Ogar works with Agar.io which already has retina graphics -.-

client?

it's server project, please post client issues to the client projects


Use correct BIP44 cointype for Avian mainnet (nExtCoinType)

We need to use a proper BIP44 cointype for Avian mainnet nExtCoinType. As of right now, the coin type is set to 175 which is assigned to Ravencoin. We need to assign a unused BIP44 cointype for Avian.
It is crucial that BIP44 HD wallets created by 4.x are still supported after the cointype is changed. The cointype is used in generating HD wallets (Denoted by HD 44 logo in the core wallet) Testing pre-wallet and post-wallet is important for this issue.
Using a proper cointype is needed for hardware wallets to properly distinguish  and many other HD-related privacy.

https://github.com/satoshilabs/slips/pull/1394
BIP44 coin-type 921 has been registered for Avian.

Fixed in #170


Webcal.fi data source no longer available

The Power BI dashboard gets some data from webcal.fi (e.g. from a URL such as http://www.webcal.fi/cal.php?id=408&format=xml&start_year=2020&end_year=2025&tz=Europe%2FLondon). However, as of very recently (sometime during the past few days), the website is no longer available: "This site has been closed. Please switch to WebCal.Guru."
Thus, data refresh fails

The Power BI dashboard gets some data from webcal.fi (e.g. from a URL such as http://www.webcal.fi/cal.php?id=408&format=xml&start_year=2020&end_year=2025&tz=Europe%2FLondon). However, as of very recently (sometime during the past few days), the website is no longer available: "This site has been closed. Please switch to WebCal.Guru."
Thus, data refresh fails

Hey! Please let me know if you are able to see any work around for this. I am currently trying to at least make it so that we don't even need to run the check for Public Holidays.

Here is the solution https://tech-peanuts.com/2022/02/02/building-access-template-and-the-holidays-error/


Explanations with Links to Rules Don't Display in BlawxBot

Currently, if the explanation contains links to sections of law, the process for collecting the text of those sections will fail because of how the CSRF Token is being defined in the BlawxBot interface. Need to copy whatever is being done for that in the test interface.

Resolved in ontology branch


global in not preserved in v2_dev server

What version of Remix are you using?
v1.19.0
Are all your remix dependencies & dev-dependencies using the same version?

[X] Yes

Steps to Reproduce
Follow App Tutorial, and focus on Connect to the database - it contains instruction how to preserve connection across server reload:
import { PrismaClient } from "@prisma/client";

let db: PrismaClient;

declare global {
  var __db__: PrismaClient | undefined;
}

// This is needed because in development we don't want to restart
// the server with every change, but we want to make sure we don't
// create a new connection to the DB with every change either.
// In production, we'll have a single connection to the DB.
if (process.env.NODE_ENV === "production") {
  db = new PrismaClient();
} else {
  if (!global.__db__) {
    global.__db__ = new PrismaClient();
  }
  db = global.__db__;
  db.$connect();
}

export { db };

Run application with yarn dev.
Expected Behavior
Whenever code is changed and server reloaded, then old database connection should be reused. This works with v2_dev: false.
Actual Behavior
global is undefined on every "live reload", so database connection is always recreated.

By default with v2_dev, the app server is restarted whenever changes are made, which will not keep around stuff on global. You can use manual mode (https://remix.run/docs/en/main/guides/manual-mode) in conjunction with remember utility to preserve global across rebuilds.
That said, the tutorial is a outdated when it comes to that. Going to take a pass at updating the tutorial to make this simpler.

@pcattori Got it, thanks!

does the tutorial tell you to use v2_dev?

@ryanflorence Jokes tutorial starts from Remix template, which has v2_dev enabled by default
But it should indeed be updated to use the new utility

Awesome, I appreciate you keeping me in the loop! Can you give me some more details on the new tool and how it can help us update the tutorial?
On 14 Aug 2023 at 19:18 +0100, Michaël De Boey @.***>, wrote:

@ryanflorence Jokes tutorial starts from Remix template, which has v2_dev enabled by default
But it should indeed be updated to use the new utility
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

@ryanflorence both Blog and Jokes tutorial are updated: https://github.com/remix-run/remix/pull/7161 & https://github.com/remix-run/remix/pull/7162


Synthesis failed for java-os-login

Hello! Autosynth couldn't regenerate java-os-login. :broken_heart:
Here's the output from running synth.py:
nthtool/synthtool/transforms.py", line 208, in move
    f"No files in sources {sources} were copied. Does the source "
synthtool.transforms.MissingSourceError: No files in sources [PosixPath('/tmpfs/tmp/tmpyqevycv8/google-cloud-oslogin-v1-java/gapic-google-cloud-oslogin-v1-java/src')] were copied. Does the source contain files?
2020-07-16 17:56:25,923 autosynth [ERROR] > Synthesis failed
2020-07-16 17:56:25,923 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at bd94c29 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#203)
2020-07-16 17:56:25,930 autosynth [DEBUG] > Running: git checkout autosynth-googleapis
Switched to branch 'autosynth-googleapis'
2020-07-16 17:56:25,935 autosynth [ERROR] > Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
2020-07-16 17:56:26,116 autosynth [DEBUG] > Running: git checkout bd94c295637fce3733e183f7d16cd46fcb256cb1
Note: checking out 'bd94c295637fce3733e183f7d16cd46fcb256cb1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at bd94c29 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#203)
2020-07-16 17:56:26,121 autosynth [DEBUG] > Running: git checkout b56aa06cc99050861c9a9b14d9569bd18eb09604
HEAD is now at b56aa06c feat: Adds AuditLog proto for reading IAM admin logs.
2020-07-16 17:56:26,163 autosynth [DEBUG] > Running: git checkout 21f1470ecd01424dc91c70f1a7c798e4e87d1eec
Previous HEAD position was 4f2c9f7 ci(java): run dependency test on Java 8 and 11 (#639)
HEAD is now at 21f1470 chore: add config files for cloud-rad for node.js (#667)
2020-07-16 17:56:26,175 autosynth [DEBUG] > Running: git branch -f autosynth-209
2020-07-16 17:56:26,178 autosynth [DEBUG] > Running: git checkout autosynth-209
Switched to branch 'autosynth-209'
2020-07-16 17:56:26,183 autosynth [INFO] > Running synthtool
2020-07-16 17:56:26,183 autosynth [INFO] > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']
2020-07-16 17:56:26,183 autosynth [DEBUG] > log_file_path: /tmpfs/src/logs/java-os-login/209/sponge_log.log
2020-07-16 17:56:26,185 autosynth [DEBUG] > Running: /tmpfs/src/github/synthtool/env/bin/python3 -m synthtool --metadata synth.metadata synth.py --
2020-07-16 17:56:26,392 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/java-os-login/synth.py.
On branch autosynth-209
nothing to commit, working tree clean
2020-07-16 17:56:26,530 synthtool [DEBUG] > Ensuring dependencies.
2020-07-16 17:56:26,541 synthtool [DEBUG] > Cloning googleapis.
2020-07-16 17:56:26,542 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
2020-07-16 17:56:26,546 synthtool [DEBUG] > Generating code for: //google/cloud/oslogin/v1:google-cloud-oslogin-v1-java.
2020-07-16 17:56:28,301 synthtool [SUCCESS] > Generated code into /tmpfs/tmp/tmpw5yopxro.
2020-07-16 17:56:28,302 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmpw5yopxro/google-cloud-oslogin-v1-java/proto-google-cloud-oslogin-v1-java/src/**/*.java')] for pattern // Generated by the protocol buffer compiler.  DO NOT EDIT!, maybe replacement is no longer needed?
2020-07-16 17:56:28,306 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmpw5yopxro/google-cloud-oslogin-v1-java/proto-google-cloud-oslogin-v1-java/src/**/*Name.java'), PosixPath('/tmpfs/tmp/tmpw5yopxro/google-cloud-oslogin-v1-java/proto-google-cloud-oslogin-v1-java/src/**/*Names.java')] for pattern /\*
 \* Copyright \d{4} Google LLC
 \*
 \* Licensed under the Apache License, Version 2.0 \(the "License"\); you may not use this file except
 \* in compliance with the License. You may obtain a copy of the License at
 \*
 \* http://www.apache.org/licenses/LICENSE-2.0
 \*
 \* Unless required by applicable law or agreed to in writing, software distributed under the License
 \* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 \* or implied. See the License for the specific language governing permissions and limitations under
 \* the License.
 \*/
, maybe replacement is no longer needed?
2020-07-16 17:56:28,306 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmpw5yopxro/google-cloud-oslogin-v1-java/grpc-google-cloud-oslogin-v1-java/src/**/*.java')] for pattern ^package (.*);, maybe replacement is no longer needed?
2020-07-16 17:56:28,307 synthtool [DEBUG] > Wrote metadata to synth.metadata.
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/java-os-login/synth.py", line 30, in <module>
    destination_name='os-login',
  File "/tmpfs/src/github/synthtool/synthtool/languages/java.py", line 318, in bazel_library
    destination_name=destination_name,
  File "/tmpfs/src/github/synthtool/synthtool/languages/java.py", line 193, in _common_generation
    required=True,
  File "/tmpfs/src/github/synthtool/synthtool/transforms.py", line 208, in move
    f"No files in sources {sources} were copied. Does the source "
synthtool.transforms.MissingSourceError: No files in sources [PosixPath('/tmpfs/tmp/tmpw5yopxro/google-cloud-oslogin-v1-java/gapic-google-cloud-oslogin-v1-java/src')] were copied. Does the source contain files?
2020-07-16 17:56:28,352 autosynth [ERROR] > Synthesis failed
2020-07-16 17:56:28,352 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at bd94c29 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#203)
2020-07-16 17:56:28,358 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-07-16 17:56:28,363 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 367, in synthesize_loop
    synthesize_inner_loop(fork, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 657, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 506, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 637, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 375, in synthesize_loop
    synthesize_loop_single_pr(toolbox, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 401, in synthesize_loop_single_pr
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth is still having trouble generating java-os-login. :sob:
Here's the output from running synth.py:
ansforms.py", line 208, in move
    f"No files in sources {sources} were copied. Does the source "
synthtool.transforms.MissingSourceError: No files in sources [PosixPath('/tmpfs/tmp/tmpdva0xglz/google-cloud-oslogin-v1-java/gapic-google-cloud-oslogin-v1-java/src')] were copied. Does the source contain files?
2020-07-17 03:15:53,226 autosynth [ERROR] > Synthesis failed
2020-07-17 03:15:53,226 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at bd94c29 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#203)
2020-07-17 03:15:53,232 autosynth [DEBUG] > Running: git checkout autosynth-googleapis
Switched to branch 'autosynth-googleapis'
2020-07-17 03:15:53,236 autosynth [ERROR] > Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.
2020-07-17 03:15:53,374 autosynth [DEBUG] > Running: git checkout bd94c295637fce3733e183f7d16cd46fcb256cb1
Note: checking out 'bd94c295637fce3733e183f7d16cd46fcb256cb1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at bd94c29 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#203)
2020-07-17 03:15:53,379 autosynth [DEBUG] > Running: git checkout bb46f87724ddd2fd1ce9f9dcb71f147427775592
HEAD is now at bb46f877 Adds bazel build file for public version of AuditData proto for bigquery.
2020-07-17 03:15:53,393 autosynth [DEBUG] > Running: git checkout 21f1470ecd01424dc91c70f1a7c798e4e87d1eec
Previous HEAD position was 4f2c9f7 ci(java): run dependency test on Java 8 and 11 (#639)
HEAD is now at 21f1470 chore: add config files for cloud-rad for node.js (#667)
2020-07-17 03:15:53,403 autosynth [DEBUG] > Running: git branch -f autosynth-210
2020-07-17 03:15:53,406 autosynth [DEBUG] > Running: git checkout autosynth-210
Switched to branch 'autosynth-210'
2020-07-17 03:15:53,411 autosynth [INFO] > Running synthtool
2020-07-17 03:15:53,411 autosynth [INFO] > ['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']
2020-07-17 03:15:53,411 autosynth [DEBUG] > log_file_path: /tmpfs/src/logs/java-os-login/210/sponge_log.log
2020-07-17 03:15:53,413 autosynth [DEBUG] > Running: /tmpfs/src/github/synthtool/env/bin/python3 -m synthtool --metadata synth.metadata synth.py --
2020-07-17 03:15:53,614 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/java-os-login/synth.py.
On branch autosynth-210
nothing to commit, working tree clean
2020-07-17 03:15:53,746 synthtool [DEBUG] > Ensuring dependencies.
2020-07-17 03:15:53,758 synthtool [DEBUG] > Cloning googleapis.
2020-07-17 03:15:53,759 synthtool [DEBUG] > Using precloned repo /home/kbuilder/.cache/synthtool/googleapis
2020-07-17 03:15:53,763 synthtool [DEBUG] > Generating code for: //google/cloud/oslogin/v1:google-cloud-oslogin-v1-java.
2020-07-17 03:15:55,722 synthtool [SUCCESS] > Generated code into /tmpfs/tmp/tmphz_lz03e.
2020-07-17 03:15:55,724 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmphz_lz03e/google-cloud-oslogin-v1-java/proto-google-cloud-oslogin-v1-java/src/**/*.java')] for pattern // Generated by the protocol buffer compiler.  DO NOT EDIT!, maybe replacement is no longer needed?
2020-07-17 03:15:55,727 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmphz_lz03e/google-cloud-oslogin-v1-java/proto-google-cloud-oslogin-v1-java/src/**/*Name.java'), PosixPath('/tmpfs/tmp/tmphz_lz03e/google-cloud-oslogin-v1-java/proto-google-cloud-oslogin-v1-java/src/**/*Names.java')] for pattern /\*
 \* Copyright \d{4} Google LLC
 \*
 \* Licensed under the Apache License, Version 2.0 \(the "License"\); you may not use this file except
 \* in compliance with the License. You may obtain a copy of the License at
 \*
 \* http://www.apache.org/licenses/LICENSE-2.0
 \*
 \* Unless required by applicable law or agreed to in writing, software distributed under the License
 \* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 \* or implied. See the License for the specific language governing permissions and limitations under
 \* the License.
 \*/
, maybe replacement is no longer needed?
2020-07-17 03:15:55,728 synthtool [WARNING] > No replacements made in [PosixPath('/tmpfs/tmp/tmphz_lz03e/google-cloud-oslogin-v1-java/grpc-google-cloud-oslogin-v1-java/src/**/*.java')] for pattern ^package (.*);, maybe replacement is no longer needed?
2020-07-17 03:15:55,729 synthtool [DEBUG] > Wrote metadata to synth.metadata.
Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 102, in <module>
    main()
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/tmpfs/src/github/synthtool/synthtool/__main__.py", line 94, in main
    spec.loader.exec_module(synth_module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/kbuilder/.cache/synthtool/java-os-login/synth.py", line 30, in <module>
    destination_name='os-login',
  File "/tmpfs/src/github/synthtool/synthtool/languages/java.py", line 318, in bazel_library
    destination_name=destination_name,
  File "/tmpfs/src/github/synthtool/synthtool/languages/java.py", line 193, in _common_generation
    required=True,
  File "/tmpfs/src/github/synthtool/synthtool/transforms.py", line 208, in move
    f"No files in sources {sources} were copied. Does the source "
synthtool.transforms.MissingSourceError: No files in sources [PosixPath('/tmpfs/tmp/tmphz_lz03e/google-cloud-oslogin-v1-java/gapic-google-cloud-oslogin-v1-java/src')] were copied. Does the source contain files?
2020-07-17 03:15:55,768 autosynth [ERROR] > Synthesis failed
2020-07-17 03:15:55,769 autosynth [DEBUG] > Running: git reset --hard HEAD
HEAD is now at bd94c29 chore(deps): update dependency com.google.cloud:libraries-bom to v8.1.0 (#203)
2020-07-17 03:15:55,774 autosynth [DEBUG] > Running: git checkout autosynth
Switched to branch 'autosynth'
2020-07-17 03:15:55,779 autosynth [DEBUG] > Running: git clean -fdx
Removing __pycache__/
Traceback (most recent call last):
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 367, in synthesize_loop
    synthesize_inner_loop(fork, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 657, in <module>
    main()
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 506, in main
    return _inner_main(temp_dir)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 637, in _inner_main
    commit_count = synthesize_loop(x, multiple_prs, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 375, in synthesize_loop
    synthesize_loop_single_pr(toolbox, change_pusher, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 401, in synthesize_loop_single_pr
    synthesize_inner_loop(toolbox, synthesizer)
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 411, in synthesize_inner_loop
    synthesizer, len(toolbox.versions) - 1
  File "/tmpfs/src/github/synthtool/autosynth/synth.py", line 266, in synthesize_version_in_new_branch
    synthesizer.synthesize(synth_log_path, self.environ)
  File "/tmpfs/src/github/synthtool/autosynth/synthesizer.py", line 120, in synthesize
    synth_proc.check_returncode()  # Raise an exception.
  File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['/tmpfs/src/github/synthtool/env/bin/python3', '-m', 'synthtool', '--metadata', 'synth.metadata', 'synth.py', '--']' returned non-zero exit status 1.

Google internal developers can see the full log here.

Autosynth passed, closing! :green_heart:


schema: missing field metadata when writing to parquet file

Describe the bug
Influxdb_iox](https://github.com/influxdata/influxdb_iox) invokes this  arrow_writer::write to save a RecordBatch in parquet. When reading the data back, we see empty metadata
To Reproduce
Exploring the   arrow_writer::write function, we see  metadata was not included in the function. Looking further into the function's unit tests, the metadata was created as empty default hence the expected and actual always match.

FYI @nevi-me

Assigning to @NGA-TRAN  at her request

A bit embarassing to say this, but I forgot about the metadata completely.
From https://github.com/sunchao/parquet-format-rs/blob/master/parquet.thrift, there's 2 levels where we can store key_value_metadata, at the file level and per column in a column chunk.
This probably maps well to Arrow's metadata, which can be at a schema or field.

Based on my experience with Parquet (not even going through the code, just a peek at docs.rs), we have metadata everywhere we need. FileMetadata, PageMetadata, ColumnMetadata, RowGroupMetadata, ParquetMetadata etc. Anything I missed.
Perhaps we can close this? @alamb

Perhaps we can close this? @alamb

Yes I think you are right @ByteBaker  -- thank you for the ping.
Let's open a new ticket / reopen this if there remain any places where metadata is not handled correctly


SensorId should be used instead of DeviceId

DeviceId adds the number ID of the device to the SensorId, it's better to use SensorId instead.
This happens on all the Analytic Rules for MDIoT
https://github.com/Azure/Azure-Sentinel/blob/ad9c873613a51da9a5f404addfe4359ace1200d4/Solutions/IoTOTThreatMonitoringwithDefenderforIoT/Analytic Rules/IoTNetworkScanning.yaml#L24
https://github.com/Azure/Azure-Sentinel/blob/ad9c873613a51da9a5f404addfe4359ace1200d4/Solutions/IoTOTThreatMonitoringwithDefenderforIoT/Analytic Rules/IoTNetworkScanning.yaml#L32
https://github.com/Azure/Azure-Sentinel/blob/ad9c873613a51da9a5f404addfe4359ace1200d4/Solutions/IoTOTThreatMonitoringwithDefenderforIoT/Analytic Rules/IoTNetworkScanning.yaml#L53

@devikamehra, Can you please take a look at this, thanks!

Since we have not received a response in the last 7 days, we are closing your issue as per our standard operating procedures. If you still need support for this issue, feel free to re-open at any time. Thank you for your co-operation.


feature to directly open matrix room links and usernames in app

Hey everyone, I was reading up the various posts by vector on medium, when I came across some links to rooms. On clicking them, it opens the link in web browser where riot-web notifies that it isn't supported on mobile web and that the app must be installed, even though it is already installed. On clicking install, it takes you to the play store.
There should be some way such that one can chat with another person directly by just sending his matrix username.
Edit:
I later found out that the links made with matrix.to do work, however, it would be much better if just Riot links also directly open in Riot, which don't as of now.

I believe that this message is no longer shown, I just tried accessing a riot link in Firefox on my mobile and got the regular Riot webinterface instead.
Also, I believe that riot.im (and probably vector.im still) links are now supported by the riot app as well (in addition to matrix.to links as you edited), so I guess this can be closed?


@szokodiako: No time for maintainance? Here's the idea...

Hi @szokodiakos,
when you started implementing typegoose almost a year go, you made working with Mongoose and Typescript a lot better.
Here at work, we always use typegoose whenever possible. It's an important piece of software that we deeply rely on. Therefore, we'd like to contribute to make typegoose even better.
We have already submitted multiple PRs, some of them got merged already. Unfortunately, another PR (https://github.com/szokodiakos/typegoose/pull/77) we sent already in December has not been merged yet (we did not get negative feedback either).
If you don't have time to maintain typegoose any longer, I would appreciate to get write access to this repository. We really don't want to create a private fork, but keep the existing project alive.
Let us bring typegoose together to the next level.
Best,
Ben

Hello @Ben305  (and others who are reading this)!
Thanks for the message and the idea. And also sorry for everyone who might read this and I haven't responded to their PRs, issues, emails.
Unfortunately I did abadon Typegoose lately, as I got other matters to do and don't really have time to maintain it. I should've already put up an unmaintained status and look for folks who would like to continue the project.
When I first published Typegoose, it was more like a proof of concept, that Mongoose can indeed benefit from TypeScript. And now more and more people are using it, which feels absolutely great. However lately when I don't find the time to maintain Typegoose I feel like I'm letting down the community and the project.
My reason to create Typegoose was to tackle a certain problem by providing a solution that can work, and help other fellow developers who seek to close the gap between Mongoose and TypeScript.
And to continue make it happen developers who would like to help to grow this project will be added as contributors. So right now I'll grant you write access and if anyone else seems like a good fit please let me know (by email preferably).
I might return to the project as an active contributor some day, but I will keep an eye out on Typegoose, granting contribution access, etc.
Sorry for the wall of text. :)
Thanks,
Akos

Thanks Akos, I really appreciate that. I will do my best for typegoose :-)

@Ben305 this is really a good news for me.
Please can you see the PR from @kevin-frugier ?
He have done a good support for compound indexes and other or see my fork.
Regards.

@carmas123 Hey, there's no open PR at the moment from kevin, but feel free to submit a PR for support of compound indexes.

Ok @Ben305 now I make a new forked version from 3.9.0 and add this improvements.

Is the project still being maintained actively? The most recent package released to npmjs was about 3 months ago already. The Mongoose latest version is already 5.4. However this package still depends on 4.0 Mongoose.
Please advice, I have start started some nodejs project. I need to make decision to stick with old school Mongoose (schema and model classes) or I can rely on this project.
I do like the concept of this project quite a lot!

@HardySoftware this package is actively maintained (again?)

@szokodiakos, if you ever come here again, i would apply as a maintainer to mainly tag issues and close them when needed
btw: how do you think typegoose has evolved since you "abandoned" it?

It can fully support that, please add @hasezoey as maintainer

@szokodiakos, this project needs a quick action from you, please!
As asked by @Ben305, it needs a second maintainer. Could you grant @hasezoey ?
Otherwise it will be inevitable to abandon this project and move on a fork.
Thank you.


how to convert onnx

I'm interested in the LACSS project. I want to deploy it and think converting it to ONNX would be great. But I don't know how.
Could you share the steps or methods to convert the LACSS model to ONNX? Any help would be much appreciated.

I am not very familiar with ONNX. As far as I know it does not have build-in support for JAX, which LACSS is based on.
It seems others had some luck with first convert JAX call to a TF function (using jax2tf), followed by converting to ONNX.  Probably something like this:
img =  jnp.zeros([544,544,3], dtype="float32")
jax_model_fn = Lacss.__call__
args = [ img ]

tf_fn = tf.function(jax2tf.convert(jax_model_fn, enable_xla=False))
tf_args = [tf.TensorSpec(jnp.shape(x), jnp.result_type(x)) for x in args]  # pyright: ignore
onnx_fn = tf2onnx.convert.from_function(tf_fn, input_signature=tf_args)


ERROR when build example zigbee_birdge (CON-329)

esp-idf: main branch
esp-matter: main branch
after build esp-idf example esp_zigbee_rcp,  with same env, i build esp-matter example zigbee_birdge, however ,some ERROR occurred：
idf.py build

[19/661] Building C object esp-idf/wpa_supplicant/CMakeFiles/__idf_wpa_supplicant.dir/src/ap/wpa_auth.c.objFAILED: esp-idf/wpa_supplicant/CMakeFiles/__idf_wpa_supplicant.dir/src/ap/wpa_auth.c.obj

home/aaa/Documents/esp-idf/components/wpa_supplicant/src/ap/wpa_auth.c: In function 'wpa_ap_join':
/home/aaa/Documents/esp-idf/components/wpa_supplicant/src/ap/wpa_auth.c:2547:17: error: implicit declaration of function 'esp_send_assoc_resp'; did you mean 'owe_process_assoc_resp'? [-Werror=implicit-function-declaration]
2547 |             if (esp_send_assoc_resp(hapd, sta, bssid, resp, omit_rsnxe, subtype) != WLAN_STATUS_SUCCESS) {
  |                 ^~~~~~~~~~~~~~~~~~~

  |                 owe_process_assoc_resp

cc1: all warnings being treated as errors
[24/661] Building C object esp-idf/wpa_supplicant/CMakeFiles/__idf_wpa_supplicant.dir/src/eap_peer/eap_peap.c.objninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/aaa/Documents/esp-matter/examples/zigbee_bridge/build/log/idf_py_stderr_output_12227 and /home/aaa/Documents/esp-matter/examples/zigbee_bridge/build/log/idf_py_stdout_output_12227

@githubworksonline zigbee_bridge example is tested with specific IDF commit 20949d444f as mentioned in the docs here. Can you try on that.
Also, there is no main branch for esp-idf, did you mean to say master?

@githubworksonline zigbee_bridge example is tested with specific IDF commit 20949d444f as mentioned in the docs here. Can you try on that.
Also, there is no main branch for esp-idf, did you mean to say master?

yeah, it's master branch.
thank u.


Improved isomorphic-fetch definitions to be inline with the spec

A rewrite of the isomorphic-fetch definitions to match the FetchAPI spec:
https://developer.mozilla.org/en/docs/Web/API/Fetch_API
Had to bump up the minimum required version of flow from 0.27.x to 0.28.x as I didn't see a way to run a set of tests against a specific version but happy to re-visit this if someone is able to help me find a solution.

Just realised that I'm re-inventing the wheel here:
https://github.com/facebook/flow/blob/v0.32.0/lib/bom.js#L643


Don't use C identifiers that start with underscore (_)

From http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_02.html

With the exception of identifiers beginning with the prefix POSIX, all identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use by the implementation.

Regarding the citation, _[A-Z]... and __... should not be used. _[a-z]... is all right.
[And btw, libpsl is C89 and not really POSIX (in the beginning of this project, someone insisted on it being C89).]

It's not just a POSIX thing, see also e.g. gcc, from https://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html:

reserved names include all external identifiers (global functions and variables) that begin with an underscore (‘_’) and all identifiers regardless of use that begin with either two underscores or an underscore followed by a capital letter are reserved names.

But yes, it looks like your usage may be within the allowed usage (they're all non-external).

[And btw, libpsl is C89 and not really POSIX (in the beginning of this project, someone insisted on it being C89).]

IIRC, in C89 all declarations must be at the top of a function, so e.g. https://github.com/rockdaboot/libpsl/blob/9e1ca81be4b1d658ac5a7a5f312d5ada3a9ba6b0/src/psl.c#L596 isn't permitted.
Not that I think full C89 compliance is worth it any more.

But yes, it looks like your usage may be within the allowed usage (they're all non-external).

Yes, and I use it with several projects. You'll find recommendations to use underscore for local (static) objects if you search the web. And I like it.

IIRC, in C89 all declarations must be at the top of a function
No, at the top of a block. Or more exactly you must not mix declarations and code (within a block).
-std=c89 will complain if you do (used in contrib/check-hard script).


Prevent exploitable TLS v1.0 and cross-frame scripting

Per @issa-tseng's guidance, I tried to do the most narrow change from our pen test.
The slightly controversial change is increasing the Strict-Transport-Security age and adding always. The age matches the Moz guide instead of the Nginx guide, but I don't think we've done anything dangerous.
Things I tried to verify.

https://www.ssllabs.com/ssltest/analyze.html?d=dev.getodk.cloud reports the server has TLS 1.3
https://gf.dev/x-frame-options-test says we prevent click-jacking.
Enketo logged in submissions and edits work
Enketo public access links work
Collect submissions work

i wonder if the frame policy may need to be configurable someday, if anybody is trying to do cheap integration via iframe. security hole to one shop, vital pipeline for another.

@issa-tseng Good point. Let's see if anyone complains and then we can make it customizable after the fact. We should bias to secure by default.


Update README.md

Slight edits and add a link to Hacktoberfest.

looks great, thank you @kfahn22!


Invalid default values of gitImage and busyboxImage in the release Helm Chart

We noticed that the release helm chart has incorrect version for gitImage and busyboxImage.
Both are set to same version of chart version, which is not valid.
We believe the issue is at github action for release where is replacing all latest to the chart version.
We chart version we are using is 0.7.11.
replicaCount: 1

image:
  repository: oamdev/terraform-controller
  tag: v0.7.11
  pullPolicy: Always

gitImage: alpine/git:v0.7.11
busyboxImage: busybox:v0.7.11
terraformImage: oamdev/docker-terraform:1.1.5
controllerNamespace: ""

# "{\"nat\": \"true\"}"
jobNodeSelector: ""
jobBackoffLimit: ""

resources:
  limits:
    cpu: "500m"
    memory: "500Mi"
  requests:
    cpu: "250m"
    memory: "250Mi"

backend:
  namespace: vela-system

githubBlocked: "'false'"

featureGates:
  # Enable the feature of allowing to delete a configuration whose cloud resources is not fully provisioned, or error happens
  # This guarantees that the partial cloud resources will be deleted when the configuration is deleted
  # Default value is true
  AllowDeleteProvisioningResource: true

Looks like https://github.com/kubevela/terraform-controller/blob/master/.github/workflows/chart.yml#L28 is the culprit which updates the latest tag for alpine and busybox as well. cc: @wonderflow  @Somefive

cc: @wonderflow @Somefive

Fixed in #730


No red borer shows when inputting an expression as a SAS duration on AzCopy tab of Setting Panel

Storage Explorer Version: 1.9.0
Build: 20190822.2
Platform/OS: Windows 10/ Linux Ubuntu 19.04
Branch: master
Architecture: ia32/x64
Regression From: Not a regression
Steps to reproduce:

Launch Storage Explorer.
Open the Setting Panel using 'Settings' icon or 'Edit' -> 'Settings'.
Go to 'AzCopy' tab -> Input an expression as a SAS duration.
Check the prompt message.

Expect Experience:

It shows 'Please enter a number'.
A red border shows due to the inputting is invalid.

Actual Experience:

It shows 'Please enter a number'.
No red border shows.

Won't fix.


Colorpalette in Internet Explorer only show transparent color-fields

Hi everybody,
I have installed the new "Spectrum Colorpicker v1.6.2" and I have the follow issue:
On Internet Explorer i got only transparent color-fields:

The Colorpicker works though. The tooltip is correct (ie # 333333) and the correct color is selected.
In Chrome and Firefox it displays correctly.
This is the Code to create the colorpicker:
jQuery('#schriftfarbe_hvi').spectrum( {
	chooseText:'Ändern',
	cancelText:'Abbrechen',
	preferredFormat:'hex',
	showInput:true,
	showPalette:true,
	hideAfterPaletteSelect:true,
	palette: ['#FFFFFF','#333333','#003399','#000066'],
	showPaletteOnly: true,
	change: function(c) {
		jQuery('#schriftfarbe').val(c.toHex());
	}
});

Can anyone help me?
Thanks in advance,
Tobias

What version of Internet Explorer are you seeing this in?

I have the problem with Windows 7 / IE 10 and Windows XP / IE 8.
Here is a sampe URL: https://ssl.netscreens.info/test/spectrum.php
Thanks in advance,
Tobias


New Feature: Encrypt Images Locally

Maybe, it is a plus implementation that image could be encrypted locally.
It can protect one user's images from illegally reading and writing.
the similar feature is available on QCOW2 format.

@xiekeyang Encrypting images right now isn't possible and not something to do right now. An easy thing to do would be to encrypt the block device (e.g.: /dev/sdXN, /dev/vdaN, etc) and store the Docker data on the encrypted block device.
Since information can leak in many ways if images are encrypted individually and the encryption is useless is an attacker gains access to the system, there's no point in encrypting images individually.
I'm going to close this issue because it's not something which makes sense to implement. Linux already has encryption capabilities and encrypting the images wouldn't add much which Linux can't already do on its own at the block device level.
Please feel free to comment.


bug: concurrent map read and map write

Expected Behavior
I ran into a weird error in a test run, just using the temporal auto-setup docker image version 1.19.1. I don't think I'm doing anything special. Just starting some basic containers.
Actual Behavior
The following logs show how temporal failed to start
https://gist.github.com/vikstrous2/7d016b5562903b723d93b6a403589620
Steps to Reproduce the Problem
Start temporal from this docker-compose file over and over again until this error triggers:
version: '3.4'
services:
  temporal-db:
    image: postgres:9.6.24-alpine@sha256:8342bcb43446694428ec6594e72e4299692854f0fc3aca090b0ab46f4c7f32a1
    restart: unless-stopped
    environment:
      POSTGRES_PASSWORD: temporal
      POSTGRES_USER: temporal
    ports:
      - 5434:5432
    healthcheck:
      interval: 1000h
      test: 'true'
  temporal:
    image: temporalio/auto-setup:1.19.1@sha256:3b582c47c354e7f9958c098f168ceb514766ab93526e9be1d772179663710d0f
    restart: unless-stopped
    depends_on:
      - temporal-db
    environment:
      - DB=postgresql
      - DB_PORT=5432
      - POSTGRES_USER=temporal
      - POSTGRES_PWD=temporal
      - POSTGRES_SEEDS=temporal-db
    ports:
      - 7233:7233
    healthcheck:
      interval: 1000h
      test: 'true'

Specifications

Version: 1.19.1
Platform: docker

Thank you for reporting this issue. It looks like the issue you are experiencing is the Resource Exhausted Cause Concurrent Limit error.
The Docker image you are using is running all of the Temporal Server's services in a single process.
In this setup, you might be exceeding the MaxConcurrentActivityExecutionSize Worker option, which is set to a default value of 1000.
This means that the process cannot support more than 1,000 simultaneous Activity Task Executions at once.
If the number of pending Activities exceeds the MaxConcurrentActivityExecutionSize limit, the Temporal Server will fail the next Workflow Task with a Resource Exhausted Cause Concurrent Limit error.
To resolve this issue, you should increase the MaxConcurrentActivityExecutionSize value. You can increase this by customizing your Worker options in your Temporal Go SDK. See How to set WorkerOptions in Go for a full list of options.
For more information about customizing Docker images and the available WorkerOptions, see the Temporal Docker Builds repository.
You might want to increase MaxConcurrentActivityExecutionSize to at least the same value as your Poller Count.
Another alternative is to change the configuration of your Temporal Service so that each service runs as a separate Docker container.
This enables you to scale the services independently, giving you better control over how much resources each service uses.
See the temporalio/docker-compose repo for an example on how to do this.
This can be complex, so for production deployments you might want to consider Temporal Cloud.

Thanks for reporting this issue!

The logs indicate that the Temporal Server is having trouble connecting to the PostgreSQL database. The most likely cause is a mismatch between the Temporal Server version and the PostgreSQL version.

To resolve this issue, try the following:

1. **Upgrade your PostgreSQL to a supported version.** Check the [Temporal Server release notes](https://github.com/temporalio/temporal/releases) for the latest supported PostgreSQL versions for your Temporal Server version.
2. **Update your database schema.** Use the `temporal-sql-tool` to update your PostgreSQL schema for the new version. For details, see the [Upgrade Server](https://docs.temporal.io/self-hosted-guide/upgrade-server#upgrade-server) section.

If you're still experiencing the issue, please provide the following information:

- The exact versions of the Temporal Server and PostgreSQL you are using.
- The output of the `temporal server start-dev --help` command.
- Any error messages you see in the Temporal Server logs.

This will help us troubleshoot the issue further.

Thanks for reporting this issue!

It looks like the error you are seeing is caused by a known bug in Temporal v1.19.1 that was resolved in v1.19.2.

Please upgrade to the latest version to resolve the issue:
* [https://github.com/temporalio/temporal/releases/tag/v1.19.2](https://github.com/temporalio/temporal/releases/tag/v1.19.2)


All Icons are not supported

Hi,
Your package is good but i am not able to used all icons which described in link react-native vector icons directory list
For ex --
<Icon
      size={70}
      mode='radial'
      colors={[
        { color: "gold", offset: "0.3", opacity: "0.5" },
        { color: "red", offset: "0.7", opacity: "0.5" },
      ]}
      style={{ alignSelf: 'center' }}
      name="lock-reset"
      type="material-community"
/>

Please help me so I can use the package.

@vipulgupta27  Bug resolved, You can use it now.

Still many icons are not supported


Cannot resolve typescript imports

Current Behavior
When attempting to use ts-loader to resolve typescript files, haul says it is unable to resolve the module.
When trying to import a ts component with the line
import { SomeComponent } from './some-component';
You get the following error from haul ERROR in
./src/index.android.tsx Module not found: Error: Can't resolve './some-component' in 'C:\Users\gusta\Documents\rn-typescript-example\src'@ ./src/index.android.tsx 15:23-50 @ multi ./~/haul-cli/src/utils/polyfillEnvironment.js ./src/index.android.tsx
(TSC gives no errors when compiling this)
if you try with the file extension, as:
import { SomeComponent } from './some-component.tsx';
Haul works fine, but react native crashes runtime with undefined is not an object
I have created a reproduction repo: https://github.com/GeeWee/rn-typescript-example
Expected Behavior
I expect it to resolve and transform the typescript file properly.
Haul Configuration (webpack.haul.js)
module.exports = ({ platform }, { module }) => ({
  entry: `./src/index.${platform}.tsx`,
  module: {
    ...module,
    rules: [
        {
          test: /\.tsx?$/,
          loader: 'ts-loader'
        },
        ...module.rules
      ]
  }
});

Your Environment

software
version

Haul
0.5.0

react-native
0.42.3

node
7.7.4

npm or yarn
yarn 0.21.3

typescript
2.2.2

ts-loader
2.0.3

I had the exact same problem yesterday, and you need to set extensions under resolve. I've got a working example here: https://github.com/cbrevik/rn-typescript-example/blob/master/webpack.haul.js
E.g.
  resolve: {
    ...resolve,
    extensions: ['.ts', '.tsx', `.${platform}.ts`, '.native.ts', `.${platform}.tsx`, '.native.tsx', ...resolve.extensions],
  },

Ah, that does seem to make it work.
Apparently you also need to import
import * as React from 'react';
instead of just
import React from 'react'
even though allowSyntheticDefaultImports is set to true.
Awesome PR!
I think this project would benefit a lot from some recipes in the documentation.

@GeeWee you can enable synthetic default imports by adding a secondary compile step with babel. See https://github.com/TypeStrong/ts-loader#babel

Wicked! I'm closing this, as it seems to be resolved.

Check this doc
https://webpack.js.org/guides/typescript/


Cannot compile: error: unexpected ident '__js_peel

Hi,
When I try to compile the unrust package this error comes up:
➜  unrust git:(master) rustc --version
rustc 1.33.0-nightly (ddab10a69 2018-12-23)
➜  unrust git:(master) cargo web start --example boxes --release
   Compiling uni-gl v0.1.0
   Compiling uni-pad v0.1.0 (/home/gazben/projects/unrust/uni-pad)
   Compiling uni-snd v0.1.0
error: unexpected ident '__js_peel'

error: aborting due to previous error
error: Could not compile `uni-gl`.

To learn more, run the command again with --verbose.
error: build failed

Did I mess up somewhere?

I have the same issue although when I use the nightly channel, I get a more detailed error...
error: unexpected ident '__js_peel'

error[E0425]: cannot find function `snippet` in this scope
   --> src/webgl.rs:137:21
    |
137 |            let value = js_raw!({
    |   _____________________^
    |  |_____________________|
    | ||
138 | ||             var ctx = Module.gl.get(@{a0});
139 | ||             return Module.gl.add(ctx.createBuffer());
140 | ||         }, [self.reference] );
    | ||                             ^
    | ||_____________________________|
    | |______________________________not found in this scope
    |                                in this macro invocation
    |
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

I believe the error cannot find function snippet in this scope is talking about the snippet function defined in the __js_raw_asm macro in stdweb...
#[doc(hidden)]
#[macro_export]
macro_rules! __js_raw_asm {
    ($code:expr, $($token:expr),*) => {{
        #[$crate::private::js_raw_attr]
        fn snippet() {
            call!( $code, $($token),* );
        }

        snippet( $($token as *const u8),* )
    }};

    ($code:expr) => { __js_raw_asm!( $code, ) };
}

It looks like this macro was changed recently in a way that - I'm guessing - means it can no longer be used outside of stdweb.
I am pretty new to rust, so I don't fully understand the difference between the old and new implementations, but fn snippet is declared with #[$crate::private::js_raw_attr] above it which I'm guessing behaves differently than $crate::private::emscripten_asm_const_int which is what it used before.
I'm not sure what the right way is to fix this. Although I'd be happy to take a stab at it if anyone could provide some guidance! (cc @jice-nospam, @edwin0cheng )

Sorry for late reply. I am busy recently.
The __js_raw_asm  macro is a hack for old stdweb, which speed for the js - rust unboxing.
And if it is the problem right now, we can just use the normal js! macro.

@gazben And could you mind to tell me which cargo-web version you use ?

@edwin0cheng ah, great! Thanks for the fast reply!
I was able to reproduce the issue as well and I'm on cargo-web 0.6.23.

@edwin0cheng @jice-nospam I created a PR for the fix you suggested because it was small and easy. If you find something better that is fast and works with the new stdweb, feel free to reject/close it.
https://github.com/unrust/uni-gl/pull/6

@edwin0cheng Little late to the party, sorry about that. The version is: cargo-web 0.6.23

@juchiast Published as 0.1.1.


Return Result from rust functions?

Hey, what types can I return from a rust function as the second parameter of Result?

For Rust functions called from C++: anything with a Display impl. You'll need to declare the function signature inside the mod ffi as returning -> Result<T> without an explicit error type, but the actual implementation outside of the mod ffi can have any error type with Display. Returning an error will turn into an exception in C++ with type rust::Error whose message is the Display of your Rust error.

For C++ functions called from Rust: if you declare the return type -> Result<T> then the error type you get when calling is always cxx::Exception. The Display impl of Exception will give you the message of the exception thrown by C++ according to std::exception::what (https://en.cppreference.com/w/cpp/error/exception/what).