julia MethodError: no method matching length(::WinRPM.RPMVersionNumber) - windows

got this error running Julia v1.0.0 x64 upon win10 x64.
Because of this I am unable to use any graphical libraries.
Error: Error building Gtk:
│ [ Info: Multiple package candidates found for mingw64(libjpeg-8.dll), picking newest.
│ ERROR: LoadError: MethodError: no method matching length(::WinRPM.RPMVersionNumber)
│ Closest candidates are:
│ length(!Matched::Core.SimpleVector) at essentials.jl:571
│ length(!Matched::Base.MethodList) at reflection.jl:728
│ length(!Matched::Core.MethodTable) at reflection.jl:802

It not working currently. All you can do is to vote on these GitHub issues:
https://github.com/JuliaGraphics/Gtk.jl/issues/369
https://github.com/JuliaPackaging/WinRPM.jl/issues/163
Good plotting alternative is Plots.jl with GR backend or PyPlot.jl (PyPlot.jl can be also used with Plots.jl for standarized API).

Related

Build settings in Android Studio on Windows

I am facing the problem while making the build of the app. Some files are autogenerated and during that some of the import paths are written wrong:
In update_attendance.ast.gql.dart
// GENERATED CODE - DO NOT MODIFY BY HAND
import 'package:firm_mobile%5Csrc%5Cnetwork%5Cgraphql%5Coperations%5Cevents%5Cupdate_attendance%5C__generated__%5Cupdate_attendance.ast.gql.dart'
as _i2;
import 'package:gql/ast.dart' as _i1;
Error:
[SEVERE] ferry_generator:graphql_builder on lib/src/network/graphql/operations/events/update_attendance/update_attendance.graphql:
Could not format because the source could not be parsed:
line 1, column 213 of .: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
╷
1 │ import 'package:firm_mobile\src\network\graphql\operations\events\update_attendance\__generated__\update_attendance.ast.gql.dart' as _i5;import 'package:firm_mobile\src\network\graphql\operations\events\update_attendance\__
generated__\update_attendance.data.gql.dart' as _i2;import 'package:firm_mobile\src\network\graphql\operations\events\update_attendance\__generated__\update_attendance.var.gql.dart' as _i3;import 'package:firm_mobile/src/networ
k/graphql/schema/__generated__/serializers.gql.dart' as _i6;import 'package:built_value/built_value.dart';import 'package:built_value/serializer.dart';import 'package:ferry_exec/ferry_exec.dart' as _i1;import 'package:gql_exec/gql_exec.d
art' as _i4;
│ ^^
╵
Where in the settings of Android Studio I can check or change how the / has to be interpreted (format settings)?
I am using Windows. On Mac this problem doesn't appear. But I need to solve it on Windows.
Apparently, it is the problem of the package ferry_generator on Windows' machines. It is still an open issue, but there are some possible solutions.
Check this discussion.
Downgrade was not an option for me, so i set in the pubspec.yaml the github link to the ferry_generator.
It is working by now, no one knows how it will be in near future. Hope, that the issue will be solved soon.

WordNet with swi-prolog

I'm trying to use the WordNet package for swi-prolog and I can't seem to be able to use it after install. I'm on MacOS Big Sur. I have tried fresh installs with both homebrew and macports, and I've even tried the docker container and I get the same error every time.
This is the process and ouput:
derek#Dereks-MBP-2 thelazyreader % swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.2.4)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?- pack_install(wordnet).
% Contacting server at https://www.swi-prolog.org/pack/query ... ok
Select download location for wordnet#0.9.3
(1) * https://api.github.com/repos/JanWielemaker/wordnet/zipball/V0.9.3
(2) GIT repository at https://github.com/JanWielemaker/wordnet.git
(3) Cancel
Your choice?
% Contacting server at https://www.swi-prolog.org/pack/query ... ok
% "V0.9.3" was downloaded 46 times
Package: wordnet
Title: Access to WordNet database
Installed version: 0.9.3
Author: Jan Wielemaker <jan#swi-prolog.org>
Home page: https://github.com/JanWielemaker/wordnet
Download URL: https://github.com/JanWielemaker/wordnet/releases/*.zip
Install "wordnet-0.9.3" (7,451 bytes) Y/n?
true.
?- pack_list_installed.
Installed packages (1):
i wordnet#0.9.3 - Access to WordNet database
true.
?- use_module(library(wordnet)).
ERROR: source_sink `library(wordnet)' does not exist
ERROR: In:
ERROR: [19] throw(error(existence_error(source_sink,...),_12810))
ERROR: [15] '$resolve_source_path'(library(wordnet),_12842,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2318
ERROR: [14] '$load_file'(library(wordnet),user,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2292
ERROR: [9] <user>
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
?-
If I run in debug mode this is the output I get...
[debug] ?- use_module(library(wordnet)).
ERROR: source_sink `library(wordnet)' does not exist
ERROR: In:
ERROR: [19] throw(error(existence_error(source_sink,...),_4386))
ERROR: [18] '$existence_error'(source_sink,library(wordnet)) at /opt/local/lib/swipl/boot/init.pl:3794
ERROR: [17] '$abs_file_error'(library(wordnet),[],[file_type(prolog),...]) at /opt/local/lib/swipl/boot/init.pl:1221
ERROR: [16] absolute_file_name(library(wordnet),_4496,[file_type(prolog),...]) at /opt/local/lib/swipl/boot/init.pl:1157
ERROR: [15] '$resolve_source_path'(library(wordnet),_4544,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2318
ERROR: [14] '$load_file'(library(wordnet),user,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2292
ERROR: [13] '$load_one_file'(library(wordnet),user,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2128
ERROR: [12] '$load_files'(library(wordnet),user,[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2105
ERROR: [11] load_files(user:library(wordnet),[if(not_loaded),...]) at /opt/local/lib/swipl/boot/init.pl:2085
ERROR: [10] use_module(user:library(wordnet)) at /opt/local/lib/swipl/boot/init.pl:2023
ERROR: [9] <user>
I'm stumped here. Any direction on where I can look or what I can try would be most welcome. Thanks!
Pack page: Package "wordnet"
Explainer on Wikipedia: WordNet
The module is in a file called wn.pl, not wordnet.pl.
On my machine, after having run pack_install(wordnet)., one finds this:
$HOME/.local/share/swi-prolog/pack/wordnet
|
├── pack.pl
├── prolog
│   ├── wn.pl
│   └── wn_portray.pl
└── README.md
So:
?- use_module(library(wn)).
However:
ERROR: Cannot find WordNet data files. Please set the environment
ERROR: variable WNDB to point at the directory holding the WordNet files
So these files need to be installed, too.

How to change schema validation for flutter's pubspec.yaml?

When I specify version different from common standard, for example, version: 0.x.x, it does not get included into app version info after build and I get schema validation error during other build operations:
flutter --no-color pub get
Running "flutter pub get" in my_app...
Error on line 18, column 10 of pubspec.yaml: Invalid version number: Could not parse "0.x.x".
╷
18 │ version: 0.x.x
│ ^^^^^
╵
pub get failed (65; ╵)
Also I get a following tooltip:
Schema validation: String is violating the pattern: '^\d+\.\d+\.\d+(?:[+-]\S+)?$' that hints at obligatory regexp format that should be followed by version values.
How could I change pubspec.yaml validation schema in order to allow for versions of custom format?
i had same issue. In pubspec.yaml, I have set app version as :
version: 4.1+41000
Then, I replaced this with the line:
version: 4.1.0+41000
And issue was resolved. It is as per documentation written in pubspec.yaml file,
. # The following defines the version and build number for your application.
A version number is three numbers separated by dots, like 1.2.43
followed by an optional build number separated by a +.

Could this leak be caused by the Android 11 DP2

I'm using the Android 11 DP2 on a Pixel 4 XL, and since then, I get this leak a lot. I suspect that it's caused by the developer preview, but I'm not entirely sure.
I tried to search for this leak online, but I didn't find anything related.
What do you think?
┬───
│ GC Root: System class
│
├─ android.app.ApplicationPackageManager class
│ Leaking: NO (a class is never leaking)
│ ↓ static ApplicationPackageManager.mHasSystemFeatureCache
│ ~~~~~~~~~~~~~~~~~~~~~~
├─ android.app.ApplicationPackageManager$1 instance
│ Leaking: UNKNOWN
│ Anonymous subclass of android.app.PropertyInvalidatedCache
│ ↓ ApplicationPackageManager$1.mCache
│ ~~~~~~
├─ android.app.PropertyInvalidatedCache$1 instance
│ Leaking: UNKNOWN
│ Anonymous subclass of java.util.LinkedHashMap
│ ↓ PropertyInvalidatedCache$1.tail
│ ~~~~
├─ java.util.LinkedHashMap$LinkedHashMapEntry instance
│ Leaking: UNKNOWN
│ ↓ LinkedHashMap$LinkedHashMapEntry.key
│ ~~~
├─ android.app.ApplicationPackageManager$HasSystemFeatureQuery instance
│ Leaking: UNKNOWN
│ ↓ ApplicationPackageManager$HasSystemFeatureQuery.this$0
│ ~~~~~~
├─ android.app.ApplicationPackageManager instance
│ Leaking: UNKNOWN
│ ↓ ApplicationPackageManager.mContext
│ ~~~~~~~~
├─ android.app.ContextImpl instance
│ Leaking: UNKNOWN
│ ↓ ContextImpl.mAutofillClient
│ ~~~~~~~~~~~~~~~
╰→ com.example.app.ui.activities.SplashActivity instance
​ Leaking: YES (ObjectWatcher was watching this because com.example.app.ui.activities.SplashActivity received Activity#onDestroy() callback and Activity#mDestroyed is true)
​ key = 6a69a2a3-1d38-4d27-8c4c-cae915bea1b1
​ watchDurationMillis = 15093
​ retainedDurationMillis = 10089
METADATA
Build.VERSION.SDK_INT: 29
Build.MANUFACTURER: Google
LeakCanary version: 2.2
App process name: com.example.app
Analysis duration: 4326 ms```
Yes, this is very likely to be an Android leak. No idea if it's new, but I haven't seen it before. Do you do anything special with auto fill?
You should report it on the Android bug tracker, ideally with a sample project to reproduce it. If you can't reproduce easily, at least providing a link to a heap dump would help investigating.
Based on the names involved in the leaktrace, if ApplicationPackageManager has an application scope (and therefore is not leaking) then ContextImpl.mAutofillClient is holding on to an activity reference for too long.
The field is defined here: https://android.googlesource.com/platform/frameworks/base/+blame/master/core/java/android/app/ContextImpl.java#235
I haven't found any recent changes in autofill that would explain this leak. We can see in the source code of Activity that when an activity gets its base context attached, it sets itself as the autofill client for that base context: https://android.googlesource.com/platform/frameworks/base/+blame/master/core/java/android/app/Activity.java#1124
It never unsets itself, so either that's the mistake, or the base context is expected to have the same scope as the activity.
Another thing that I find weird though is static ApplicationPackageManager.mHasSystemFeatureCache which means that ApplicationPackageManager has a static fields that starts with m (member field). That's a weird name, usually a mistake that doesn't happen in the android sources. And indeed I can't find it: https://android.googlesource.com/platform/frameworks/base/+blame/master/core/java/android/app/ApplicationPackageManager.java but maybe they haven't shared the updated sources yet? What device are you using this on?

Why does Chocolatey fail to pack a ~2GB self-contained package?

I would like to build a self-contained "app.nupkg" package from "app.nuspec" file using cpack command. Here is the directory tree of my application:
C:\CHOCO_REPO\APP
│ app.nuspec
│
├───bin
│ dist
│ Setup.exe
│
└───tools
chocolateyinstall.ps1
chocolateyuninstall.ps1
The dist file (size ~2G) is actually the program. When I try to run:
cpack app.nupgk
I get:
bin\dist
Cannot access a closed stream
with debug option:
cpack app.nuspec -d
I get:
Attempting to build package from 'app.nuspec'.
bin\dist
Attempting to delete file "C:\choco_repo\APP\app.nupkg".
Chocolatey had an error occur:
System.ObjectDisposedException: Can not access a closed Stream.
at System.IO.Compression.DeflateStream.EnsureNotDisposed()
at MS.Internal.IO.Packaging.CompressStream.Flush()
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.FlushExposedStreams()
at MS.Internal.IO.Zip.ZipIOLocalFileBlock.UpdateReferences(Boolean closingFlag)
at MS.Internal.IO.Zip.ZipIOBlockManager.SaveContainer(Boolean closingFlag)
at MS.Internal.IO.Zip.ZipIOBlockManager.SaveStream(ZipIOLocalFileBlock blockRequestingFlush, Boolean closingFlag)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.Packaging.PackagePart.Close()
at System.IO.Packaging.Package.DoClose(PackagePart p)
at System.IO.Packaging.Package.DoOperationOnEachPart(PartOperation operation)
at System.IO.Packaging.Package.System.IDisposable.Dispose()
at NuGet.PackageBuilder.Save(Stream stream)
at chocolatey.infrastructure.app.nuget.NugetPack.BuildPackage(PackageBuilder builder, IFileSystem fileSystem, String outputPath)
at chocolatey.infrastructure.app.services.NugetService.pack_run(ChocolateyConfiguration config)
at chocolatey.infrastructure.app.runners.GenericRunner.run(ChocolateyConfiguration config, Container container, Boolean isConsole, Action`1 parseArgs)
at chocolatey.infrastructure.app.runners.ConsoleApplication.run(String[] args, ChocolateyConfiguration config, Container container)
at chocolatey.console.Program.Main(String[] args)
Exiting with 1
Any help? thank you
It could be the size. NuGet and .NET have some limitations around the size of what can go into the package.
It could be just Choco, but I doubt it since it is built as AnyCPU which means x64 when in 64-bit.
I've seen some folks do some ingenious things to take a 6GB iso and split it into multiple packages that are dependencies of a master package.

Resources