hh_client reports errors on package - composer-php

I am following the instruction in Getting started on official Hacklang website.
As it says, I run:
$ touch .hhconfig
$ mkdir bin src tests
$ cat > hh_autoload.json
{
"roots": [
"src/"
],
"devRoots": [
"tests/"
],
"devFailureHandler": "Facebook\\AutoloadMap\\HHClientFallbackHandler"
}
$ composer require hhvm/hsl hhvm/hhvm-autoload
Then I run hh_client, which throws 74 errors like those:
Typing[4110] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 4110
--> vendor/autoload.hack
318 | \HH\autoload_set_paths(/* HH_FIXME[4110] incorrect hhi */ $map, Generated\root());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Typing[4110] Invalid argument
--> vendor/autoload.hack
318 | \HH\autoload_set_paths(/* HH_FIXME[4110] incorrect hhi */ $map, Generated\root());
| ^^^^
--> /private/tmp/hh_server/hhi_3f14b466/functions.hhi
82 | KeyedContainer<string, KeyedContainer<string, string>> $map,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected KeyedContainer<string, string>
--> vendor/hhvm/hhvm-autoload/src/FailureHandler.hack
46 | final public function handleFailure(string $kind, string $name): void {
| ^^^^^^^^^^^^^ But got (function(string $kind, string $name): void)
Naming[2050] You cannot use HH_FIXME or HH_IGNORE_ERROR comments to suppress error 2050
--> vendor/bin/hh-autoload.hack
179 | GenerateScript::main(vec(/* HH_IGNORE_ERROR[2050] */ $GLOBALS['argv']));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
...
Those errors are related to hh_autoload and hsl package installed through composer.
Why is it???

The Hack typechecker recently (as of HHVM 4.62) changed from 'allow by default' to 'ban by default' for error codes in HH_FIXME comments.
Try adding this to your .hhconfig:
allowed_fixme_codes_strict = 2050, 4110

Related

React Native and Firebase ios build error "no visible #interface for X declares the selector X

I'm using expo project to create ios app and when i create ios build i got the following two errors. I've been stuck on these errors for long time. I couldn't fine the solution for these errors.
❌ (node_modules/react-native-firebase/ios/RNFirebase/config/RNFirebaseRemoteConfig.m:52:86)
50 |
51 | RCT_EXPORT_METHOD(enableDeveloperMode) {
> 52 | FIRRemoteConfigSettings *remoteConfigSettings = [[FIRRemoteConfigSettings alloc] initWithDeveloperModeEnabled:YES];
| ^ no visible #interface for 'FIRRemoteConfigSettings' declares the selector 'initWithDeveloperModeEnabled:'
53 | [FIRRemoteConfig remoteConfig].configSettings = remoteConfigSettings;
54 | }
55 |
❌ (node_modules/react-native-firebase/ios/RNFirebase/config/RNFirebaseRemoteConfig.m:87:51)
85 | rejecter:
86 | (RCTPromiseRejectBlock) reject) {
> 87 | BOOL status = [[FIRRemoteConfig remoteConfig] activateFetched];
| ^ no visible #interface for 'FIRRemoteConfig' declares the selector 'activateFetched'
88 | resolve(#(status));
89 | }
90 |
These are my project versions:
"react-native": "0.68.2",
"expo": "~45.0.0",
"react-native-firebase": "^5.6.0",
"#react-native-firebase/app": "^16.4.6",
"#react-native-firebase/messaging": "^16.4.6"
I'm using XCode 14.1
Please remove react-native-firebase dependency.
Instead, Please use #react-native-firebase/remote-config dependency.
I am not sure what features you implement with firebase, but react-native-firebase dependency didn't upgrade its version for 3 years.
So, there are a lot of conflicts.

Error while build error[E0282]: type annotations needed

error[E0282]: type annotations needed
--> /home/amiya/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9
|
541 | let accuracy = P::ACCURACY.saturated_into();
| ^^^^^^^^ consider giving `accuracy` a type
...
1595 | / implement_fixed!(
1596 | | FixedI64,
1597 | | test_fixed_i64,
1598 | | i64,
... |
1601 | | "_Fixed Point 64 bits signed, range = [-9223372036.854775808, 9223372036.854775807]_",
1602 | | );
| |__- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0282]: type annotations needed
--> /home/amiya/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9
|
541 | let accuracy = P::ACCURACY.saturated_into();
| ^^^^^^^^ consider giving `accuracy` a type
...
1604 | / implement_fixed!(
1605 | | FixedI128,
1606 | | test_fixed_i128,
1607 | | i128,
... |
1611 | | [-170141183460469231731.687303715884105728, 170141183460469231731.687303715884105727]_",
1612 | | );
| |__- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0282]: type annotations needed
--> /home/amiya/.cargo/registry/src/github.com-1ecc6299db9ec823/sp-arithmetic-2.0.0/src/fixed_point.rs:541:9
|
541 | let accuracy = P::ACCURACY.saturated_into();
| ^^^^^^^^ consider giving `accuracy` a type
I am using Ubuntu 20.04, its giving same error for both
WASM_BUILD_TOOLCHAIN=nightly-2020-08-23 cargo build --release
and
WASM_BUILD_TOOLCHAIN=nightly-2020-10-05 cargo build --release
https://github.com/substrate-developer-hub/substrate-node-template/blob/4d97032c11b8c65936e53a61607d4522d45a29ea/Makefile
https://stackoverflow.com/a/63993797/1566713
Note: This should be fixed soon in substrate v2.0.1
For now you may need to downgrade your toolchain: https://substrate.dev/docs/en/knowledgebase/getting-started/#downgrading-rust-nightly
The known working date for me is 2020-10-5 for all toolchains, and the default uses nightly from that date.
I am on Ubuntu 20.04LTS as well, and use:
$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: ....
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu
nightly-2020-10-05-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
installed targets for active toolchain
--------------------------------------
wasm32-unknown-unknown
x86_64-unknown-linux-gnu
active toolchain
----------------
nightly-2020-10-05-x86_64-unknown-linux-gnu (default)
rustc 1.49.0-nightly (beb5ae474 2020-10-04)
Here's the issue https://github.com/paritytech/substrate/issues/7287
Solve with just this single line
rustup default nightly-2020-10-06 && rustup target add wasm32-unknown-unknown
This was fixed already in v2.0.1, try deleting the project and cloning again using the following command.
git clone -b v2.0.1 --depth 1 https://github.com/substrate-developer-hub/substrate-node-template

How do I get Istanbul to recognize code coverage when using ESM?

I'm using ESM to loading my modules and I use them in this way:
// More info on why this is needed see (https://github.com/mochajs/mocha/issues/3006)
async function wire(){
await import("./Sanity.spec.mjs");
await import("./Other.spec.mjs");
run();
}
wire();
I run these tests using nyc mocha --delay --exit ./test/suite.js, but when I run Istanbul it does not seems to recognize my imports and fails to provide coverage information...
3 passing (14ms)
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
How can I get Istanbul to recognize the ESM loaded code?
Native ESM support is available from Mocha v7.1.0 (February 2020).
See:
Relase notes: https://github.com/mochajs/mocha/releases/tag/v7.1.0
Pull request: https://github.com/mochajs/mocha/pull/4038

Stuck building gatsby-starter-netlify-cms

I recently switched from react static to gatsby & hit a wall. When I install & build gatsby-starter-netlify-cms I get an error:
success open and validate gatsby-configs — 0.049 s
success load plugins — 1.757 s
success onPreInit — 53.736 s
success delete html and css files from previous builds — 0.013 ssuccess initialize cache — 0.725 s
success copy gatsby files — 4.323 s
success onPreBootstrap — 0.261 s
success source and transform nodes — 1.672 s
success building schema — 6.302 s
success createPages — 0.634 s
success createPagesStatefully — 0.525 s
success onPreExtractQueries — 0.211 s
success update schema — 1.565 s
error GraphQL Error Field "image" must not have a selection since type "String" has no subfields.
file: C:/Users/Jason/Dropbox/Documents/Projects/jamamuuga-s-portfolio-gatsby-netlifycms/src/templates/product-page.js
1 |
2 | query ProductPage($id: String!) {
3 | markdownRemark(id: { eq: $id }) {
4 | frontmatter {
5 | title
> 6 | image {
| ^
7 | childImageSharp {
8 | fluid(maxWidth: 2048, quality: 100) {
9 | ...GatsbyImageSharpFluid
10 | }
11 | }
12 | }
13 | heading
14 | description
15 | intro {
16 | blurbs {
error Command failed with exit code 1.
I tried with both yarn & npm seperately to no avail.
You should check your markdown files and find files which have empty values for the field image, or values that point to non existing image. Frontmatter of a markdown file referes to the top of the file which containes some metadata of the file and is surrounded with ---. For example:
---
image:
//my coment: list of some other variables follow, like heading, title....
---

use smo to clone azure SQL database?

I'm writing a program to test update scripts for Azure sql.
The idea is to
- first clone a database (or fill a clone with the source schema and content)
- then run the update script on the clone
Locally I have this working, but for azure I have the probem that I don't see any file names. If I restore one database to another on the same azure "server", don't I have to rename the data files during restore too?
For local restore I do this:
restore.Devices.AddDevice(settings.BackupFileName, DeviceType.File);
restore.RelocateFiles.Add(new RelocateFile("<db>", Path.Combine(settings.DataFileDirectory, settings.TestDatabaseName + ".mdf")));
restore.RelocateFiles.Add(new RelocateFile("<db>_log", Path.Combine(settings.DataFileDirectory, settings.TestDatabaseName + "_1.ldf")));
restore.SqlRestore(srv);
Is something similar required for cloning a database on azure?
Lots of Greetings!
Volker
You can create a database as a copy of [source]:
CREATE DATABASE database_name [ COLLATE collation_name ]
| AS COPY OF [source_server_name].source_database_name
{
(<edition_options> [, ...n])
}
<edition_options> ::=
{
MAXSIZE = { 100 MB | 500 MB | 1 | 5 | 10 | 20 | 30 … 150…500 } GB
| EDITION = { 'web' | 'business' | 'basic' | 'standard' | 'premium' }
| SERVICE_OBJECTIVE =
{ 'basic' | 'S0' | 'S1' | 'S2' | 'S3'
| 'P1' | 'P2' | 'P3' | 'P4'| 'P6' | 'P11'
| { ELASTIC_POOL(name = <elastic_pool_name>) } }
}
[;]

Resources