[Question] Usage as a library

(Note: I looked around but couldn't find a better place to ask questions about rust-analyzer.)
I need to build an application to parse Rust crates and extract some information about them (e.g. how many types implement a certain trait). Seeing what it's capable of doing as an IDE plugin, Rust analyzer looks like the perfect fit for my use case.
The user guide states (emphasis mine):

At its core, rust-analyzer is a library for semantic analysis of Rust code as it changes over time

However, I couldn't find any reference about whether this is a supported use case of rust-analyzer. Do you think that would work? Or will I face too many issues when trying to use RA as a standalone library?

I think you can use rust-analyzer for that, but keep in mind that while rust-analyzer can be used as a library, it doesn't really support this well. Breaking changes are done regulary, API is not stable and sometimes not well-documented, etc.. This was a goal at the start, but now...

This was a goal at the start, but now...

It's still a goal and guides the architecture, it's just that making the library usable by other projects is not a priority right now.
There are some projects using RA as a library, but you will have to pin the version or handle regular breaking changes. Also, the analysis regarding types and traits is not 100% perfect yet. It's easier if you're just looking for impls, but then you could probably also do that with rustdoc's json output.

Thanks for the replies! The idea to parse the output or rustdoc looks promising.
@flodiebold  Could you point me to some other projects you mentioned using RA as a library? That would help me get a good idea of the kind of work involved.

You can look up dependents on crates.io: https://crates.io/crates/ra_ap_ide/reverse_dependencies and https://crates.io/crates/ra_ap_rust-analyzer/reverse_dependencies for example.

Let's close this since the question was answered.


Front page should have discord/github buttons at the top

@Superpat brought up for visibility and first impressions

Closed with #35


Can't find a permission.

Keeping it short.
I can't find the permission for the command "/pex group  rank "10""
Any help is appreciated.

If this is a PEX 1.x question, you'd be looking for permissions.groups.rank.<group> and the command is actually pex group <group> rank <number>.  (Found using pex user Stormbow toggle debug on my 1.7.2 server.)
For the purposes of setting up and testing servers, I always advise server owners to give themselves (and no one else, ever) full access to all of the PEX commands with pex user <user> add permissions.* e.g., pex user Stormbow add permissions.*.  This way a server owner can move themselves around to any group and get the feel of the group as if they were a true member of it while setting up and troubleshooting any issues.

Thank you, that's exactly what I need to know.

You're welcome.


Ignore or label tags by non-artist users

Prerequisites

[X] Did you read FAQ section in readme.md?
[X] Did you test with the latest releases or commit?
[X] Did you search for existing issues in Issues?

Description
Does the script have a way to ignore or label "unlocked" tags added to images by users other than the artist? Since users can tag an image, many images have inaccurate or irrelevant tags added after the fact. I'm mostly interested in avoiding including those in the image info files, but I imagine it would also be useful to exclude them from the download-by-tag feature.
To be clear, I don't want to avoid any given tag entirely, just exclude unlocked instance of that tag from info files or metadata. The issue is whether a given tag was added/locked by the original artist for each image. Example tags below. I want to keep those first three "non-editable" tags, while leaving out the rest of that mess. Sometimes they're accurate, but often they're misleading, and sometimes they're complete garbage.
Is there a way to do this in the script as is? If not, is there any workaround I can apply myself?

Version
v20220924 running from terminal in Linux

I'm mostly interested in avoiding including those in the image info files,

Are you using the raw json or the .txt file? The raw json has userId attribute to differentiate the author.

but I imagine it would also be useful to exclude them from the download-by-tag feature.

This one might not be possible, as the server doesn't differentiate the tags when searching.

Ahh, you're correct, I had checked the info and basic json files, but didn't realized the raw json could differentiate. Perfect, I can use that to filter tags if I decide to be picky about it, but switching to the raw json solves my main problem. Appreciated!


Month picker input - dialog model binding doesn't work properly

Describe the bug
I'm using the month-picker prop on a datepicker component and binding it with v-model to a previously saved date. This works perfectly for other modes like date-picker and year-picker, where the dialog displays the saved date correctly when opened. However, with month-picker, the dialog initially shows the current month and year instead. Once I make changes in the dialog, it functions correctly, but the issue persists on initialization.
To Reproduce
Steps to reproduce the behavior:
Open provided link to see the error: https://stackblitz.com/edit/vuepic-vue-datepicker-rmbqah?file=src%2Fcomponents%2FPlayground.vue
Expected behavior
The model binding should work on initialization too, so the dialog displays the correct date on the first load.
Desktop & mobile (please complete the following information):

Browser: Chrome, Firefox, Edge
Library: 9.0.0

I am also experiencing the same thing, datepicker works fine indeed, only monthpicker does show the value of the current month instead of the one in the value, then it also emits this wrong value that changes my form value.
Only difference with @nagymarci9411 is that i am using version 8.8.0

@nagymarci9411 @timmeijers This is expected behavior as the default v-model binding for the month picker differs from the date picker, therefore by not providing an object, it is treaded as empty. You might want to take a look at model-type or provide an object value


[EXT-SEC-AUDIT] Inconsistent error handling and use of panic

Issue transferred from an external security audit report.

Severity: Medium
Difficulty: Low
Type: Error Reporting
Finding ID: TOB-OL-109
Target: go/consensus/tendermint/apps/staking/state/state.go, multiple locations
Description
The deserialization failures are handled inconsistently inside the staking state code. Some
functions are returning errors and some are using panic. This mismatch might lead to false
assumptions about which function might fail when developing the codebase. Examples of
both cases can be witnessed on Figures TOB-OL-110.1 and TOB-OL-110.2.

Figure TOB-OL-109.1 shows https://github.com/oasislabs/oasis-core/blob/f331a877721f44cc2412b4248d66e95f83f4cf9c/go/consensus/tendermint/apps/staking/state/state.go#L297-L308
Figure TOB-OL-109.2 shows https://github.com/oasislabs/oasis-core/blob/f331a877721f44cc2412b4248d66e95f83f4cf9c/go/consensus/tendermint/apps/staking/state/state.go#L108-L117

Exploit Scenario
An Oasis developer calls a function which panics with an assumption that it doesn’t fail and
introduces a possibility for a Denial of Service.
Recommendation
Short term, modify the staking state module to return errors.
Long term, avoid using panic unless necessary. Panics are fatal and should only be used
when the error cannot be solved.

This should be addressed once #2674 is merged as it makes error handling more consistent.


Explicit mode

There was a voting on Twitter about this topic and it seems that while the majority of voters are okay with dropping sigils in the upcoming version, still many of them are conservative and would keep on coding the sigil-style.
I think we should go both ways, just like QB64 does and allow both styles. Here is an early idea.
A compiler directive (PRAGMA) should declare whether the code uses the old style or whishes to define variables explicitly. The programmer may go on the old style if they set the following directive in the beginning of the program:
PRAGMA implicit_declaration = 1
LET undefd_byte! = 42

However if the directive is unset or is set to 0, the new style is used:
DIM my_var AS BYTE
LET my_var = 42
LET undefd_var = 42 : REM !!! this will throw a compiler error

In this case you can still use the $#%! characters at the end of the variable names but they will be ignored by the compiler.
Other things to take into consideration:

Function definitions should also use the AS keyword, e. g FUN my_fun (param AS type) AS type
Built-in functions must be able to auto select the correct type, e.g LET x! = RND() should work by automatically choosing the byte type of RND. This may turn out to be very challenging to implement. For example PRINT my_fun(RND()) - which type of RND to call?
The CAST keyword must be changed, e. g. CAST expression AS type. Optionally we may introduce new functions like ASBYTE(), ASINT() etc
DATA statements must also use AS keyword

Please add your thoughts.

I wasn't thinking about the built-in functions, the casting and the DATA statement when I proposed on Twitter to go the way of QuickBASIC. Taking all that into account, I believe that's too much trouble to do all that adapting work.
I think the most important thing is the explicit definition of variables by default: that can save a lot of trouble with debugging, especially if you don't/can't use an auto-completing editor while writing the XC=Basic code. It's too easy to misspell a variable name and cause some obscure trouble that can be hard to debug. After all, that's why the explicit definition was introduced in other languages :slightly_smiling_face:
Since this is a BASIC dialect for old platforms, I think you could keep the sigils: I grew up with TI 99 4/A Basic, then ZX Spectrum Basic, and then C64 Basic. All of those used "$" for string variables, and the C64 dialect used other sigils too, so I don't see a problem with keeping using those. I'm fine with "#" identifying "semi-long" variables, for instance.
When I started using XC=Basic, I got immediately comfortable with the sigils you implemented, and I relied on the compiler to error out whenever I forgot to add the "!" sigil to my byte variables.
So, to recap, my suggestion is: do implement PRAGMA to be backwards-compatible with old programs, make explicit definition of variables the default, and keep the rest as it is :slightly_smiling_face:

Yes, explicit declaration will save from errors caused by misspelled variable names. That's one thing. The other thing is that it's very easy to forget to append the sigil to the variable name causing a compiler error. If there is a solution for function calls, sigils won't be needed any more (in explicit mode).

I'd far prefer type definitions, as I often forget to add the sigils after I've defined a variable, and have to go back and correct my code.
This is probably just me being new to the language though, and I'm sure I'd get used to sigils over time, if implementing type definitions causes too many problems.

Entirely rewritten in V3.


Agent-enhancement integration (Step 2)

Implemented:

Scaffold for pipeline, stages, agents, and tools.
Prototyper for local experiments.
LLM Chat model.
Placeholders for other stages/agetns/tools/models.
Updated dependencies to address known bugs/vuls.

TODO:

Prototyper for cloud experiments.
Other agents: Evaluator, Analyzer.
Better logging and file saving.

The result of a local experiment:
2024-09-02 15:02:19,578 [PID: 37604] INFO [run_all_experiments._print_experiment_results]: ================================================================================
*ada-url, bool ada_can_parse_with_base(const char *, size_t, const char *, size_t)*
build success rate: 0.5, crash rate: 0.0, found bug: 0, max coverage: 0.0, max line coverage diff: 0.0
max coverage sample:
max coverage diff sample:
max coverage diff report: None

There are some "false negative build failures" because LLM modified build.sh and built the fuzz target binary into a different name, e.g.:
+ clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -Wno-error=enum-constexpr-conversion -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion -Wno-error=deprecated-declarations -Wno-erro
r=implicit-function-declaration -Wno-error=implicit-int -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -O1 -fno-omit-frame-pointer -gli
ne-tables-only -Wno-error=enum-constexpr-conversion -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion -Wno-error=deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error
=implicit-int -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -fsanitize=fuzzer ./ada.o ada_c.o -o /out/ada_c
+ cp /src/ada-url/fuzz/url.dict /src/ada-url/fuzz/ada_c.options /src/ada-url/fuzz/parse.options /out/

2024-09-02 15:02:01,983 [PID: 37604] DEBUG [prototyper._validate_fuzz_target_and_build_script]: ROUND 98 Fuzz target compile Succeessfully: True
2024-09-02 15:02:01,983 [PID: 37604] DEBUG [container_tool.execute]: Executing command (ls /out/parse) in b4a0f1ad77527a5fc63e88c3136f9fc230a02811a54b5cb747a83e1e7da4e5a5:
2024-09-02 15:02:02,102 [PID: 37604] DEBUG [container_tool._execute_command]: Executing command (['docker', 'exec', 'b4a0f1ad77527a5fc63e88c3136f9fc230a02811a54b5cb747a83e1e7da4e5a5', '/bin/bash', '-c', 'ls /out
/parse']) in container b4a0f1ad77527a5fc63e88c3136f9fc230a02811a54b5cb747a83e1e7da4e5a5: Return code 2. STDOUT: , STDERR: ls: cannot access '/out/parse': No such file or directory

2024-09-02 15:02:02,103 [PID: 37604] DEBUG [prototyper._validate_fuzz_target_and_build_script]: ROUND 98 Final fuzz target binary exists: False
2024-09-02 15:02:02,391 [PID: 37604] DEBUG [container_tool._execute_command]: Executing command (['docker', 'stop', 'b4a0f1ad77527a5fc63e88c3136f9fc230a02811a54b5cb747a83e1e7da4e5a5']): Return code 0. STDOUT: b4
a0f1ad77527a5fc63e88c3136f9fc230a02811a54b5cb747a83e1e7da4e5a5

/gcbrun skip

/gcbrun skip

Running an experiment locally before merging.


Clean up tests + fix import

Refactors TestCase decorators to use unittest.skipUnless to simplify the logic greatly.
Solves import bug with comet_ml on test_tracking.py
Introduces requires decorators for comet_ml and wandb

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


Trying to install from my command prompt, I got this

C:\Users\Hp\larjapoll>pip install paystacksdk
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement paystacksdk (from versions: none)
ERROR: No matching distribution found for paystacksdk
C:\Users\Hp\larjapoll>

Hi @edfolmi it seems you are missing a dash character in the SDK name. It should be paystack-sdk. Kindly check PyPI for further clarification.

it works, I appreciate you


feature request: make a functional c++ extension

Please implement something that will allow people to compile simple c++ programs properly. And for the love of god, make it simple.
Right now we have a buggy mess called https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022. It takes like 5 seconds to start up a terminal, it's set to x86 by default, and AFAICT there's no way to save this environment inside vscode. Furthermore, we need to follow these convoluted steps to get c++ to work properly: https://code.visualstudio.com/docs/cpp/config-msvc.
Finally, it doesn't work on windows 10. I'm getting random include and library errors, even after installing the Windows SDK and C++ development workload from VS.

I literally have cl.exe and mspdbcore.dll in the same directory and this task still can't find it.
Here's the tasks.json:
{     "tasks": [         {             "label": "build",             "type": "cppbuild",             "command": "cl.exe",             "args": [                 "/O2",                 "/Zi",                 "/std:c++20",                 "${file}",                 "/link",                 "d3d11.lib",                 "user32.lib"             ],             "options": {                 "cwd": "${workspaceFolder}"             },             "presentation": {                 "clear": true             }         }     ],     "version": "2.0.0" }
I'm not saying this is evidence of vendor lock in. But it's getting pretty suspicious.

Thank you very much for your feedback. I would suggest that you engage with the team that owns the C++ extension by filing issues in their issue tracker - https://github.com/microsoft/vscode-cpptools/issues. Thank you!


Move slider labels in front on hover, make test-button update sliders

This worked nicely! Having the test button update the sliders really improves the experience when testing algorithms.


Dask compute error: ParserError: Too many columns specified:

I am running the following code that reads a 680GB .csv file into a Dask DataFrame, while selecting a few columns, and converting specific column types to integer:
import dask.dataframe as dd
import dask

file_path = "/Volumes/Seagate/Work/Tickets/Third ticket/Extinction/species_all.csv"
cols = ['year', 'species', 'occurrenceStatus', 'individualCount', 'decimalLongitude', 'decimalLatitde']
dataset = dd.read_csv(file_path, names=cols,usecols=cols)

dataset['year']=dd.to_numeric(dataset['year'])
dataset['individualCount']=dd.to_numeric(dataset['individualCount'])
dataset['decimalLongitude']=dd.to_numeric(dataset['decimalLongitude'])
dataset['decimalLatitde']=dd.to_numeric(dataset['decimalLatitde'])

subset_data = dataset[dataset['year']>2000]

Now when I run the .compute function either on dd or Dask I get differing number of columns specified when run on the subset data compared to the dataset:
dts = dask.compute(subset_data)

ParserError: Too many columns specified: expected 6 and found 4

dts = dask.compute(dataset)

ParserError: Too many columns specified: expected 6 and found 3

Although sometimes I Get this error when adding sep=",":
ValueError: Unable to parse string "3162074496	4fa7b334-ce0d-4e88-aaae-2e0c138d049e	URN:catalog:CLO:EBIRD:OBS892558907	Animalia	Chordata	Aves	Columbiformes	Columbidae	Zenaida	Zenaida macroura		SPECIES	Zenaida macroura (Linnaeus" at position 0

However, when I change it to tab-delimited sep="\t", I get this error:
ValueError: Unable to parse string "Animalia" at position 0  /Users/X/Conda/anaconda3/lib/python3.8/site-packages/dask/core.py:121: DtypeWarning: Columns (2) have mixed types.Specify dtype option on import or set low_memory=False.   return func(*(_execute_task(a, cache) for a in args))

I can remove the user warning with dtype='str', and only convert year to numeric then I get this error:

ParserError: Error tokenizing data. C error: EOF inside string starting at row 130532

Dask version: dask 2021.4.0
Python version: Python 3.9.5
Operating System: macOS Big Sur version 11.4
Install method (conda, pip, source): conda
Data is downloaded from gbif.org - the entire dataset (simple_csv.zip)

Hi @lime-n, it’d be great if you could provide a minimal example as described here. Please let us know if you’re able to manage this, otherwise it's a bit difficult to see what's happening.
Looking up a bit about the error

ParserError: Error tokenizing data. C error: EOF inside string starting at row 130532

It seems some other people reported that you get this when there is some problem in your data. Maybe this can help a bit. https://stackoverflow.com/questions/60345503/pandas-parsererror-error-tokenizing-data-c-error-eof-inside-string

I'm going to close this, but please reopen @lime-n if you are able to provide more information.


Allowing multiple IEnumerable implementations for an entity property

Because there is no many to many implementation like in ef 6, I made my own prototype for making my life a bit easier. This prototype contains two implementations, one of the link entity and one of the entity I'm trying to manage. To make this less vague you will find a sample below.
Imagine I have a 'Users' and a 'Permissions' table. A user can have multiple permissions and a permission can have multiple users. This requires me to create a link table called 'UserPermissions'. Currently I have to write something like this to get everything working:
private ICollection<UserPermission> userPermissions = new List<UserPermission>();

public IReadOnlyCollection<Permission> Permissions => userPermissions.Select(x => x.Permission).ToList().AsReadOnly();

Code like this increases the chance of mistakes. Although there might be a much simpler way of archiving the desired result?
To solve this problem I created a so called 'ManyToManyList' class where I combine the UserPermission and Permission tables.
public class ManyToManyList<TSource, TResult> : List<TSource>, IList<TResult> where TSource : ILinkEntity, new() where TResult : Entity {
   //removed the actual code to make the example simpler
}

With the ManyToManyList I can define my property like this.
public ManyToManyList<UserPermission, Permission> Permissions { get; set; } = new ManyToManyList<UserPermission, Permission>();

The only problem that's causing this not to work is found in the 'TryGetElementType' method, which is found in 'SharedTypeExtensions.cs' located at 'src/Shared/'. This method currently checks if there is only one IEnumerable implementation and returns null if this is not the case.
Instead of returning 'null' when multiple implementations are found, it would be great if it just gave the first implementation. I know, this would make things ambiguous, but what about a method called 'TryGetFirstElementType'?
Forgive me if I'm totally pointing in the wrong direction or created some weird code :)

What is the rationale behind picking the first implementation? Why not second one?

@thombrink Have you seen this blog post series? https://blog.oneunicorn.com/2017/09/25/many-to-many-relationships-in-ef-core-2-0-part-1-the-basics

@smitpatel To make my prototype work as I intended it, it had to be the first implementation, because a base class obviously has to be the first implementation, which in my case was the List<UserPermission> class. Besides that I would pick the first one because you have to draw a boundary somewhere and the first one seems the most logical choice to me.

@anpete Yes I did. That's how I currently implement the many-to-many structure. The problem that I have with that approach is that it feels unnatural to use. I don't want UserPermissions, I want the Permissions of the queried User. It would even better if I didn't need a link table at all (like in ef 6). That's the reason why I created this prototype.

@thombrink What are you hoping to do with the Permissions navigation property? The only thing that immediately comes to mind is to use it in queries--for example, Include--but I'm pretty sure this won't work because it would be treated as a navigation to the join entity, so eager loading would load the join entities, but not the entities on the other side of the join.

@ajcvickers Just everthing I want, select, add, update and delete. I already made that part work. For example, when I add an Permission to the 'ManyToManyList' it automaticly creates and adds an join entity.
I also added a safety check to be sure I don't add an item which is already present, this could be removed for performance issues of course.
        public void Add(TResult item)
        {
            var parameter = Expression.Parameter(typeof(TSource), "x");

            Expression prop = Expression.PropertyOrField(parameter, resultGuidProperty.Name);
            Expression predicate = Expression.Equal(prop, Expression.Constant(item.Id));

            var lambda = Expression.Lambda<Func<TSource, bool>>(predicate, parameter).Compile();

            var existing = base.Find(new Predicate<TSource>(lambda));
            if (existing != null) return;

            var newItem = new TSource();
            sourceGuidProperty.SetValue(newItem, entityKey);
            resultGuidProperty.SetValue(newItem, item.Id);

            base.Add(newItem);
        }

Because I tested everything with a in memory database, I didn't had the eager loading problem.
To solve this I could add an Include extension which combines the Include and ThenInclude methods trough reflection.
Something like this psudocode (I will add some fully working code later on)
public static IIncludableQueryable<TJoinEnity, TEntity, TProperty> Include<TJoinEnity, TEntity, TProperty>(
            [NotNull] this ManyToMany<TJoinEnity, TEntity> source,
            [NotNull] Expression<Func<TJoinEnity, TProperty>> navigationPropertyPath)
            where TEntity : class
        {
               var includableQueryable = Include(source, navigationPropertyPath);

               var parameter = Expression.Parameter(typeof(TJoinEnity), "x");
               var name = //get the property name of the TEntity object
               var body = Expression.PropertyOrField(parameter, name);
               var expr = Expression.Lambda<Func<TJoinEnity, TEntity>>(body, parameter);

               return includableQueryable.ThenInclude(expr);
        }

My lunch break is over so I will create a working example of the above code when I'm home.

@ajcvickers I just updated my previous comment, it now contains a 'Include' method that's fully working (to keep things clear I will create a new comment next time)

A safer version of the 'Include' method, which uses less reflection.
        public static IQueryable<TEntity> Include<TEntity, TProperty, TJoinEntity>(
            this IQueryable<TEntity> source,
            Expression<Func<TEntity, ManyToManyList<TJoinEntity, TProperty>>> navigationPropertyPath)
            where TEntity : class
            where TProperty : Entity
            where TJoinEntity : class, IJoinEntity, new()
        {
            var memberExpression = navigationPropertyPath.Body as MemberExpression;
            var memberName = memberExpression.Member.Name;

            var propertyType = typeof(TProperty);
            var joinEntityType = typeof(TJoinEntity);

            var matchingProperties = joinEntityType.GetProperties().Where(x => x.PropertyType == propertyType);
            PropertyInfo property = null;
            foreach (var p in matchingProperties)
            {
                if(property == null)
                {
                    property = p;
                }
                else
                {
                    throw new Exception($"Multiple properties of the type '{propertyType.Name}' are not allowed.");
                }
            }

            if(property == null)
            {
                throw new Exception($"The type '{joinEntityType.Name} does not contain a property of the type '{propertyType.Name}.");
            }

            var propertyName = property.Name;

            return source.Include($"{memberName}.{propertyName}");
        }

We periodically close 'discussion' issues that have not been updated in a long period of time.
We apologize if this causes any inconvenience. We ask that if you are still encountering an issue, please log a new issue with updated information and we will investigate.


Fix tests for recursive spec file search

To be merged after packit/packit#1005
TODO:

[x]  Add test for recursive spec file search

Signed-off-by: Matej Focko<EMAIL_ADDRESS>

recheck


How to do count with a custom query

I can do somethig like
Model.query().count()

but if I do something like
Model.query({name: 'test'}).count()

throws
TypeError: undefined is not a function

on .count function

Well, first {name: 'test'} is not a valid option for the query method. Anyway, this should do what you want:
Model.query().where('stuff_id', 34).count()
// or
Model.query({
  where: {'stuff_id', 34}
}).query().count()

Note that in the first case calling query() without parameters returns the query builder which is subsequently used to access other query building methods, where as in the second example the first call to query() is passing some options, so it will not return a query builder, but a model instance instead. This is why it is necessary to call query() a second time without parameters.


bridge/gasutils: check for network EIP-1559 support (redo)

Coverage decreased (-0.01%) to 99.525% when pulling 87e7122a14c01fd4c719589a5bd19a0cc0f5781c on eip1559-check into 7ec118b95d49bda2a3e4ade6d0df05e9bef54aec on dev.


Minor phpdoc fixes

As you can see in AbstractColor->parse(), there are many formats for specifying a background color. Case in point, you can't specify transparency with strings #424242.

Refs #697 and pings @frederikbosch :)


Snarky tone in readme

If you’re not sure whether you need it, you probably don’t.

This reads like the readme is talking down to me for not immediately knowing what this library is supposed to do.  In any case, it's not very helpful.

In any case, it's not very helpful.

just like opening this issue tbqh

You know you don't really have problems when the main thing you're conserned with is snarky tone in readme.

Are you saying that documentation issues aren't valid?
Beyond the tone I just found the statement to be confusing. This turned out to be exactly the library I needed before I even understood what it was. I think you could improve the readme by removing it.

If you’re not sure whether you need it, you probably don’t.

This statement is helpful and misleading at the same time, but it depends on the reader.
I personally found it great, because of that you think twice if you really need this module or not.


syncing content

@RichardLitt I'm getting the same thing where I can't update all the content and go through merge issues with content on the website because of config files, etc, and I don't know why? I thought #30 fixed that. Am I misunderstanding something about the process? (That seems most likely to me since my mental model of git is still... faulty.)

I'm sorry! I've been looking at this, and it's really hard for me to figure out what commits you're adding. I see two extra commits from Josh, but nothing different from you since #30.
Can you please check out RichardLitt/master and apply content edits there, and RichardLitt/gh-pages to apply edits for the website? The main issue is that you're still using the old origin - zcashfoundation/master - but I've made substantial changes since then.
Happy to jump on a call and figure this out. Let me know if that would help.

Ahhh I bet that's the problem, wrong branch.

Okay I'm still confused :0
Getting the same error here: https://github.com/RichardLitt/zcashfoundation.github.io/pull/32
What I want to do: Bring content (blog posts, etc.) from our current website repo into this one, so that they are up to date with each other.
At this point I feel like I should have you do it @RichardLitt because clearly I am not understanding something
If you think the best resolution would be going over it on a phone call, I'm good with that! Monday?

All of that content is already here. I don't think you're adding anything new - just, the commits look different because I cleaned it up in https://github.com/RichardLitt/zcashfoundation.github.io/pull/30/files. Take a look at https://github.com/RichardLitt/zcashfoundation.github.io/pull/30/files and see if there is any different content you want to bring over - for now, I am pretty sure you have everything.
Make sense?
Monday works for me, too. When works for you?

Closed in #30.


collection of windows eventlogs from session hosts not working

What happened? Provide a clear and concise description of the bug, including deployment details.
When doing a bicep deployment with following parameters:
"avdIdentityServiceProvider": ADDS
"avdDeployMonitoring": true
"deployAlaWorkspace": true
"deployCustomPolicyMonitoring": false
Log Analytics workspace and data collection rules are correctly deployed, session host is registered as a resource in the data collection rule but the windows eventlogs don't get send to the workspace.
I assume because managed identity is not enabled for the session hosts when using ADDS as IdentityServiceProvider.
Please provide the correlation id associated with your error or bug.
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
What was the expected outcome?
Table "Event" visible in  log analyticts workspace
Relevant log output
No response

@d875167 thank you for submitting the issue, we are reviewing it.

@d875167 bug fixed by PR 641, please try again.
@swathibhat1 @moisesjgomez


UTY-1970: invalid enum definition

Description
Shifted all C# enum definition to start from 0 to ensure no invalid enums are generated by default constructors. Serialization is done by value + min_val and Deserialization value - min_val. A warning is also generated to advice users to redefine the schema enums to start from 0.
Tests
Change the playground schema for Color (sorted and unsorted, sequential and non-sequential) and ran the code generator to ensure the enum definition, serialization and deserialization function in ColorData is what's expected.
Documentation
Todo
Did you remember a changelog entry?
Primary reviewers
If your change will take a long time to review, you can name at most two primary reviewers who are ultimately responsible for reviewing this request. @ mention them.

Need to repoint this to develop


indexing signed-ness

https://github.com/Akuli/jou/blob/0c6e5e077996e7d3809bc88aa5ccc8d63782bc39/src/build_cfg.c#L600
I believe it doesn't work, because signed and unsigned types are indistinguishable in LLVM and we don't tell LLVM anywhere whether to interpret the index as signed or unsigned.

And it doesn't work. Here index 128 as type byte, so this should print the last letter of the 129 letter string, but instead it prints a zero byte (as can be seen with ./jou asd.jou | hexdump -C)
declare putchar(ch: int) -> int

def main() -> int:
    # How hard can it be to create byte value 128...
    x_int = 128
    x_int_ptr: void* = &x_int
    x_byte_ptr: byte* = x_int_ptr
    x_byte: byte = *x_byte_ptr

putchar("012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789abcdefghi"[x_byte])
    putchar('\n')
    return 0


Theme Colour

i have just purchased the angular 6+ theme for 49$ . i just wanted to know that the default color of the theme is white and i have to change that to dark ?
what should i do ? because i have just purchased this theme because of the the "dark theme".

Hi @Muhammadumair0
Please look at src/scss/style.scss

hello, i have the same problem, i purchased the angular admin and i want the dark theme!! i dont have comments on style.scss!! can u help me please!!?

/*!

CoreUI Pro - Bootstrap 4 Admin Template
@version v1.0.8
@link http://coreui.io/pro/
Copyright (c) 2018 creativeLabs Łukasz Holeczek
@license http://coreui.io/pro/license/
*/

// Override Boostrap variables
@import "bootstrap-variables";
// Import Bootstrap source files
@import "node_modules/bootstrap/scss/bootstrap";
// Override core variables
@import "core-variables";
// Import core styles
@import "core/core";
// Import UI Kits
@import "uikits/uikits";
// Custom styles
@import "custom";

1.0.8 is old version you have to download latest version 2.x

thank you for your response i will download "coreui-pro-angular-admin-template-2.0.0" package!!


diff-quality checks only the first modified file

Hi,
When running diff-quality --violations pyflakes --compare-branch master (i.e. letting diff-quality run pyflakes itself), only the first modified file is checked.
To reproduce:
git clone git@github.com:fperrin/diff-cover-issue-demo.git
cd diff-cover-issue-demo/
git checkout check_only_first
diff-quality --violations pyflakes

This reports only the issue in hello.py, but if you git diff master.. it's obvious you should have a warning in hi.py too.
I think the problem is in violationsreporter.base.QualityReporter.violations; after checking the first file, self.reports is set, so when violations() is called on the second file, it does nothing.

Ill try and get a look at this over the weekend, thanks!

Howdy!
Just wanted to report I have tracked down the bug. Seems like my test suite is biased towards passed in reports.
While I figure out a good fix (if you need a workaround) you can pass in a report
(venv) ~/code/diff-cover-issue-demo   check_only_first  diff-quality --violations pyflakes report.txt
-------------
Diff Quality
Quality Report: pyflakes
Diff: origin/master...HEAD, staged, and unstaged changes
-------------
hello.py (0.0%):
    2: undefined name 'unknown_var'
hi.py (0.0%):
    2: undefined name 'unknown_var'
-------------
Total:   2 lines
Violations: 2 lines
% Quality: 0%
-------------

PR up, I wanna see if I can fix 48 before releasing

Released! https://pypi.python.org/pypi/diff_cover/0.9.9

Thank you for finding this! Also thanks for the fantastic reproduction steps


Error when executing TGI with mariiaponom/llama_7b_class_lora

it works: https://huggingface.co/mariiaponom/llama_7b_class_lora
It does create copies though.
Originally posted by @Narsil in https://github.com/huggingface/text-generation-inference/issues/896#issuecomment-1691770960
When I launch:
volume=$PWD/data
model=mariiaponom/llama_7b_class_lora
docker run --gpus all --shm-size 1g -e HUGGING_FACE_HUB_TOKEN=... -p 8080:80 -v $volume:/data ghcr.io/huggingface/text-generation-inference:1.0.2 --model-id $model --quantize bitsandbytes-nf4
I have this error: No local weights found in mariiaponom/llama_7b_class_lora with extension .bin

The same error if I try to launch a model trained with autotrain hugging face application

Try running 1.0.3 This is the version that has the fix. (It worked previously but only on CLI, not in docker)


DBZ-3328 Avoid copying in Oracle LogMiner DML parser

https://issues.redhat.com/browse/DBZ-3328
This PR does not yet address the mutability or the removal of LogMinerColumnValue.  The goal so far was to address removing the unnecessary allocations and multiple intermediate collections.  The LogMinerColumnValue is used by other parts of the code that will need some further analysis to see if/how we can remove the class entirely.

I don't quite get the logic in BaseChangeRecordEmitter#getColumnValues(), why the de-tour via Table, if we already got the T column values in our hands?

This de-tour is because no where does Xstream and LogMiner guarantee that the column values are going to be read in position order within the table.  The reordering is necessary so that the framework's code that emits the event has the correct value in the right index to match the expected column type at that position, see TableSchemaBuilder#createValueBuilder.

The only (prod) caller of LogMinerDmlEntry.getOldValues() copies the result into an array right away; can we return the array then from LogMinerDmlEntry itself right away? Better yet, instead of an array of LogMinerColumnValue, can we solely return arrays with old and new column values?

We could but we would still need a List<String> then to hold the column names so we can then perform the reorder of the values after-the-fact in order to avoid doing lookups in the parser for column-name to array-index position by name.
With LOB support in the connector, columns won't ever be sent to the adapter in array-index position anymore.  We now have to account for the fact that LOB values are provided after-the-fact of the non-LOB values in a DML statement or RowLCR and so we have no choice but to "re-order" the final values array so that we don't break TableSchemaBuilder.

Did you see any improvements in the parser benchmark you created?

I didn't run the benchmark but I'll definitely do that and let you know.

Hum, hum. Could you share some representative DML statements, showing what we actually receive? So to better understand what sort of issues we need to deal with. Thx!

Sure, lets take the following table structure:
CREATE TABLE tablea ( id numeric(9,0), data clob, created_on date );

The user then performs an insert into the table
INSERT INTO tablea (1, TO_CLOB('<some long text>'), SYSDATE);

This gets materialized by LogMiner as follows:
INSERT: insert into "DEBEZIUM"."TABLEA" ("ID","DATA","CREATED_ON") values ('1',EMPTY_CLOB(),TO_DATE('....'));
SEL_LOB_LOCATOR: update "DEBEZIUM"."TABLEA" set "DATA" = lob_c where "ID"='1' and "CREATED_ON"=TO_DATE('...');
LOB_WRITE: <database package text>
LOB_WRITE: <database package text>
LOB_TRIM: <database package text>

Now the user updates the same row but only updates the CLOB value:
SEL_LOB_LOCATOR: update "DEBEZIUM"."TABLEA" set "DATA" = lob_c where "ID"='1' and "CREATED_ON"=TO_DATE('...');
LOB_WRITE: <database package text>
LOB_WRITE: <database package text>

Now the user updates the same row against but adjusts the date:
UPDATE: update "DEBEZIUM"."TABLEA" set "CREATED_ON"=TO_DATE(<newvalue>) WHERE "ID"='1' AND "CREATED_ON"=TO_DATE(<oldvalue>);
SEL_LOB_LOCATOR: update "DEBEZIUM"."TABLEA" set "DATA" = lob_c where "ID"='1' and "CREATED_ON"=TO_DATE(<newvalue>);
LOB_WRITE: <database package text>
LOB_WRITE: <database package text>

Does that help?

Did you see any improvements in the parser benchmark you created?

I compared the latest master against this PR and overall the performance was actually a tad slower in terms of ops/sec.  I'm also going to test a small variant (need to validate unit / integration tests) were we don't add the nulled missing columns to the values array to see if that is backward compatible.  If that does end up being compatible, that performs better unanimously for all DML operations across the board than the current master, I'll update the PR as I get more details.

Does that help?

Yes, it does, thx! Could you please add these examples to the class-level comment on LogMinerDmlParser, so we have a comprehensive documentation of the supported DML statements there?

@Naros, pushed one small update.

@gunnarmorling Ok, the last commit 61ed7c1 takes care of writing the column values from the parsers directly to an object array rather than using the intermediate LogMinerColumnValue & friend classes.   This should be good for a review.
These changes still need to be tested on XStream but they pass on LogMiner.

These changes still need to be tested on XStream but they pass on LogMiner.

Confirmed XStream passes as well.

Ok, excellent.  LGTM now, merging. Thanks a lot, @Naros, this should be a very helpful improvement 🎉 .


Translation to Spanish: Verify and update translation of basic-javascript.json

Working on it.

@jorgeruvalcaba roger that! Thank you!

Este archivo había sido traducido antes del cambio de currículo.  Por error se habían perdido las traducciones.    Disculpas (aunque yo no las había retirado).

[X] Comment your JavaScript Code
[X] Declare JavaScript Variables
[ ] Storing Values with the Equal Operator
[ ] Initializing Variables with the Equal Operator
[ ] Understanding Uninitialized Variables
[ ] Understanding Case Sensitivity in Variables
[X] Add Two Numbers with JavaScript
[X] Subtract One Number from Another with JavaScript
[X] Multiply Two Numbers with JavaScript
[X] Divide One Number by Another with JavaScript
[ ] Increment a Number with Javascript
[ ] Decrement a Number with Javascript
[X] Create Decimal Numbers with JavaScript
[X] Multiply Two Decimals with JavaScript
[X] Divide one Decimal by Another with JavaScript
[ ] Finding a Remainder in Javascript
[ ] Assignment with Plus Equals
[ ] Assignment with Minus Equals
[ ] Assignment with Times Equals
[ ] Assignment with Divided by Equals
[ ] Convert Celsius to Fahrenheit
[X] Declare String Variables
[ ] Escaping Literal Quotes in Strings
[ ] Quoting Strings with Single Quotes
[ ] Escape Sequences in Strings
[ ] Concatenating Strings with Plus Operator
[ ] Concatenating Strings with the Plus Equals Operator
[ ] Constructing Strings with Variables
[ ] Appending Variables to Strings
[X] Find the Length of a String
[X] Use Bracket Notation to Find the First Character in a String
[ ] Understand String Immutability
[X] Use Bracket Notation to Find the Nth Character in a String
[X] Use Bracket Notation to Find the Last Character in a String
[X] Use Bracket Notation to Find the Nth-to-Last Character in a String
[ ] Word Blanks
[X] Store Multiple Values in one Variable using JavaScript Arrays
[X] Nest one Array within Another Array
[X] Access Array Data with Indexes
[X] Modify Array Data With Indexes
[ ] Access Multi-Dimensional Arrays With Indexes
[X] Manipulate Arrays With push()
[X] Manipulate Arrays With pop()
[X] Manipulate Arrays With shift()
[X] Manipulate Arrays With unshift()
[ ] Shopping List
[X] Write Reusable JavaScript with Functions
[ ] Passing Values to Functions with Arguments
[ ] Global Scope and Functions
[ ] Local Scope and Functions
[ ] Global vs. Local Scope in Functions
[ ] Return a Value from a Function with Return
[ ] Assignment with a Returned Value
[ ] Stand in Line
[X] Understanding Boolean Values
[X] Use Conditional Logic with If Statements
[ ] Comparison with the Equality Operator
[ ] Comparison with the Strict Equality Operator
[ ] Comparison with the Inequality Operator
[ ] Comparison with the Strict Inequality Operator
[ ] Comparison with the Greater Than Operator
[ ] Comparison with the Greater Than Or Equal To Operator
[ ] Comparison with the Less Than Operator
[ ] Comparison with the Less Than Or Equal To Operator
[ ] Comparisons with the Logical And Operator
[ ] Comparisons with the Logical Or Operator
[ ] Introducing Else Statements
[ ] Introducing Else If Statements
[ ] Logical Order in If Else Statements
[ ] Chaining If Else Statements
[ ] Golf Code
[ ] Selecting from many options with Switch Statements
[ ] Adding a default option in Switch statements
[ ] Multiple Identical Options in Switch Statements
[ ] Replacing If Else Chains with Switch
[ ] Returning Boolean Values from Functions
[ ] Return Early Pattern for Functions
[ ] Counting Cards
[X] Build JavaScript Objects
[ ] Accessing Objects Properties with the Dot Operator
[ ] Accessing Objects Properties with Bracket Notation
[ ] Accessing Objects Properties with Variables
[X] Updating Object Properties
[X] Add New Properties to a JavaScript Object
[X] Delete Properties from a JavaScript Object
[ ] Using Objects for Lookups
[ ] Testing Objects for Properties
[ ] Introducing JavaScript Object Notation (JSON)
[ ] Accessing Nested Objects in JSON
[ ] Accessing Nested Arrays in JSON
[ ] Record Collection
[X] Iterate with JavaScript For Loops
[X] Iterate Odd Numbers With a For Loop
[X] Count Backwards With a For Loop
[ ] Iterate Through an Array with a For Loop
[ ] Nesting For Loops
[X] Iterate with JavaScript While Loops
[ ] Profile Lookup
[X] Generate Random Fractions with JavaScript
[X] Generate Random Whole Numbers with JavaScript
[X] Generate Random Whole Numbers within a Range
[X] Sift through Text with Regular Expressions
[X] Find Numbers with Regular Expressions
[X] Find Whitespace with Regular Expressions
[X] Invert Regular Expression Matches with JavaScript
[X] Create a JavaScript Slot Machine
[X] Add your JavaScript Slot Machine Slots
[X] Bring your JavaScript Slot Machine to Life
[X] Give your JavaScript Slot Machine some Stylish Images

No hay problema, integraré las que faltan. Gracias por avisar @vtamara

Este es el archivo con más cambios de traducción pendientes.   Te pido el favor de hacer commit de lo que llevas para poder apoyar la completación --tal parece que muy pronto empiezan a operar rutas en español con lo cual quedará visible lo que hemos traducido (se estaba hablando de mañana sábado).

@jorgeruvalcaba @vtamara I can work on this tonight if you guys let me know which part is pending to be done.

@vtamara @justinian336 Enterado, el transcurso del día haré commit.

Se integraron las siguientes challenges:

[x] Storing Values with the Equal Operator.
[x] Initializing Variables with the Equal Operator.
[x] Understanding Uninitialized Variables.
[x] Understanding Case Sensitivity in Variables.
[x] Increment a Number with Javascript.
[x] Decrement a Number with Javascript.
[x] Finding a Remainder in Javascript
[x] Assignment with Plus Equals
[x] Assignment with Minus Equals
[x] Assignment with Times Equals
[x] Assignment with Divided by Equals
[x] Convert Celsius to Fahrenheit

Continúo trabajando.

@jorgeruvalcaba te invito a hacer una solicitud de cambio (pull request) de lo que llevas y a solicitar revisión en el canal, después te invito a realizar las mejoras que te sugieran y a seguir traduciendo de arriba hacía abajo.  @justinian336 podría comenzar de abajo hacía arriba.

Listo @vtamara, me parece bien. Continuaré traduciendo de arriba hacia abajo.

Se integraron estos nuevos challenges:

[x] Escaping Literal Quotes in Strings.
[x] Quoting Strings with Single Quotes.
[x] Escape Sequences in Strings.
[x] Concatenating Strings with Plus Operator.
[x] Concatenating Strings with the Plus Equals Operator.
[x] Constructing Strings with Variables.
[x] Appending Variables to Strings.
[x] Understand String Immutability
[x] Word Blanks
[x] Access Multi-Dimensional Arrays With Indexes

List updated:

[x] Comment your JavaScript Code.
[x] Declare JavaScript Variables.
[x] Storing Values with the Equal Operator
[x] Initializing Variables with the Equal Operator
[x] Understanding Uninitialized Variables
[x] Understanding Case Sensitivity in Variables
[x] Add Two Numbers with JavaScript
[x] Subtract One Number from Another with JavaScript
[x] Multiply Two Numbers with JavaScript
[x] Divide One Number by Another with JavaScript
[x] Increment a Number with Javascript
[x] Decrement a Number with Javascript
[x] Create Decimal Numbers with JavaScript
[x] Multiply Two Decimals with JavaScript
[x] Divide one Decimal by Another with JavaScript
[x] Finding a Remainder in Javascript
[x] Assignment with Plus Equals
[x] Assignment with Minus Equals
[x] Assignment with Times Equals
[x] Assignment with Divided by Equals
[x] Convert Celsius to Fahrenheit
[x] Declare String Variables
[x] Escaping Literal Quotes in Strings
[x] Quoting Strings with Single Quotes
[x] Escape Sequences in Strings
[x] Concatenating Strings with Plus Operator
[x] Concatenating Strings with the Plus Equals Operator
[x] Constructing Strings with Variables
[x] Appending Variables to Strings
[x] Find the Length of a String
[x] Use Bracket Notation to Find the First Character in a String
[x] Understand String Immutability
[x] Use Bracket Notation to Find the Nth Character in a String
[x] Use Bracket Notation to Find the Last Character in a String
[x] Use Bracket Notation to Find the Nth-to-Last Character in a String
[x] Word Blanks
[x] Store Multiple Values in one Variable using JavaScript Arrays
[x] Nest one Array within Another Array
[x] Access Array Data with Indexes
[x] Modify Array Data With Indexes
[x] Access Multi-Dimensional Arrays With Indexes
[x] Manipulate Arrays With push()
[x] Manipulate Arrays With pop()
[x] Manipulate Arrays With shift()
[x] Manipulate Arrays With unshift()
[ ] Shopping List
[x] Write Reusable JavaScript with Functions
[ ] Passing Values to Functions with Arguments
[ ] Global Scope and Functions
[ ] Local Scope and Functions
[ ] Global vs. Local Scope in Functions
[ ] Return a Value from a Function with Return
[ ] Assignment with a Returned Value
[ ] Stand in Line
[x] Understanding Boolean Values
[x] Use Conditional Logic with If Statements
[ ] Comparison with the Equality Operator
[ ] Comparison with the Strict Equality Operator
[ ] Comparison with the Inequality Operator
[ ] Comparison with the Strict Inequality Operator
[ ] Comparison with the Greater Than Operator
[ ] Comparison with the Greater Than Or Equal To Operator
[ ] Comparison with the Less Than Operator
[ ] Comparison with the Less Than Or Equal To Operator
[ ] Comparisons with the Logical And Operator
[ ] Comparisons with the Logical Or Operator
[ ] Introducing Else Statements
[ ] Introducing Else If Statements
[ ] Logical Order in If Else Statements
[ ] Chaining If Else Statements
[ ] Golf Code
[ ] Selecting from many options with Switch Statements
[ ] Adding a default option in Switch statements
[ ] Multiple Identical Options in Switch Statements
[ ] Replacing If Else Chains with Switch
[ ] Returning Boolean Values from Functions
[ ] Return Early Pattern for Functions
[ ] Counting Cards
[x] Build JavaScript Objects
[ ] Accessing Objects Properties with the Dot Operator
[ ] Accessing Objects Properties with Bracket Notation
[ ] Accessing Objects Properties with Variables
[x] Updating Object Properties
[x] Add New Properties to a JavaScript Object
[x] Delete Properties from a JavaScript Object
[ ] Using Objects for Lookups
[ ] Testing Objects for Properties
[ ] Introducing JavaScript Object Notation (JSON)
[ ] Accessing Nested Objects in JSON
[ ] Accessing Nested Arrays in JSON
[ ] Record Collection
[x] Iterate with JavaScript For Loops
[x] Iterate Odd Numbers With a For Loop
[x] Count Backwards With a For Loop
[ ]Iterate Through an Array with a For Loop
[ ]Nesting For Loops
[x] Iterate with JavaScript While Loops
[ ] Profile Lookup
[x] Generate Random Fractions with JavaScript
[x] Generate Random Whole Numbers with JavaScript
[x] Generate Random Whole Numbers within a Range
[x] Sift through Text with Regular Expressions
[x] Find Numbers with Regular Expressions
[x] Find Whitespace with Regular Expressions
[x] Invert Regular Expression Matches with JavaScript
[x] Create a JavaScript Slot Machine
[x] Add your JavaScript Slot Machine Slots
[x] Bring your JavaScript Slot Machine to Life
[x] Give your JavaScript Slot Machine some Stylish Images

Challenges translated to Spanish:

[x] Shopping List.
[x] Passing Values to Functions with Arguments.
[x] Global Scope and Functions.
[x] Local Scope and Functions.
[x] Global vs. Local Scope in Functions.
[x] Return a Value from a Function with Return.
[x] Assignment with a Returned Value.
[x] Stand in Line.
[x] Comparison with the Equality Operator.
[x] Comparison with the Strict Equality Operator.
[x] Comparison with the Inequality Operator.

Gracias @jorgeruvalcaba, yo voy actualizando la lista conforme vas avanzando.

###New challenges translated to spanish.

[x] Comparison with the Strict Inequality Operator.
[x] Comparison with the Greater Than Operator.
[x] Comparison with the Greater Than Or Equal To Operator.
[x] Comparison with the Less Than Operator.
[x] Comparison with the Less Than Or Equal To Operator.
[x] Comparisons with the Logical And Operator.
[x] Comparisons with the Logical Or Operator.
[x] Introducing Else Statements.
[x] Introducing Else If Statements.
[x] Logical Order in If Else Statements.
[x] Chaining If Else Statements.
[x] Golf Code.
[x] Selecting from many options with Switch Statements.
[x] Adding a default option in Switch statements.
[x] Multiple Identical Options in Switch Statements.
[x] Replacing If Else Chains with Switch.
[x] Returning Boolean Values from Functions.
[x] Return Early Pattern for Functions.
[x] Counting Cards.
[x] Accessing Objects Properties with the Dot Operator.
[x] Accessing Objects Properties with Bracket Notation.
[x] Accessing Objects Properties with Variables.
[x] Using Objects for Lookups.
[x] Testing Objects for Properties.
[x] Introducing JavaScript Object Notation (JSON).
[x] Accessing Nested Objects in JSON.
[x] Accessing Nested Arrays in JSON.
[x] Record Collection.
[x] Iterate Through an Array with a For Loop.
[x] Nesting For Loops.
[x] Profile Lookup.

With this the list would be completed.

Great work @jorgeruvalcaba, that was a long one! Can you make the PR so we can start the QA?


[core] Upgrade the @types/jss dependency to 9.5.6

JSSPlugin type definition was corrected in @types/jss version 9.5.6.
Relevant commit: https://github.com/DefinitelyTyped/DefinitelyTyped/commit/eb8b3eff61e3606fe812b65384190e7aba925fce
Relevant PR: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/29041

@qvxqvx It's a great first pull request on Material-UI 👌🏻. Thank you for working on it!


callback not appended to proxy call

with v0.5-alpha2, the callback is not appended to the proxy call, sample code: https://gist.github.com/xqin1/cb67da4d3410b784fb3a , load the code in Chrome, and type 'createMapImage()' in console, examine the console and you can see the request is sent to proxy but the callback is not appended.
with v0.4, the callback is appended to the proxy call correctly.

I don't know if this is the problem, but in my case (after searching for about 1 hour) I found this solutions to get the proxy working (it successfully displayed a cross-origin image): https://github.com/niklasvh/html2canvas/pull/554

@Cristy94, your branch does fix the problem thanks


Project creation gives "Doppler Error: You do not have access to this project"

Hello! This issue is forked from #14.
When I run terraform apply to create a new project with provider 1.2.2 like this:
terraform {
  required_providers {
    doppler = {
      source = "DopplerHQ/doppler"
    }
  }
}

variable "doppler_token" {
  type = string
}

provider "doppler" {
  doppler_token = var.doppler_token
}

resource "doppler_project" "alexmuller-test-6" {
  name = "alexmuller-test-6"
  description = "testing"
}

using a dp.pt personal token, the Terraform process errors with:
Error: Doppler Error: You do not have access to this project.

However the project does get created (but not stored in terraform.tfstate because of the error?)
I can request it over the HTTP API using the same token:
http https://api.doppler.com/v3/projects/project\?project\=alexmuller-test-6 "Authorization:Bearer dp.pt.redacted"
HTTP/1.1 200 OK

{
    "project": {
        "created_at": "2023-06-27T08:50:37.655Z",
        "description": "testing",
        "id": "alexmuller-test-6",
        "name": "alexmuller-test-6",
        "slug": "alexmuller-test-6"
    },
    "success": true
}

Is this maybe some kind of race condition where Terraform tries to verify the project creation quickly after creation, and the API doesn't have the project fully created?

Full Terraform debug logs
2023-06-27T09:50:37.300+0100 [DEBUG] provider: using plugin: version=5
2023-06-27T09:50:37.300+0100 [DEBUG] provider.terraform-provider-doppler_v1.2.2: plugin address: address=/var/folders/w7/p2sy_p9x7d9cjpsznc91yh4r0000gq/T/plugin4251998933 network=unix timestamp=2023-06-27T09:50:37.300+0100
2023-06-27T09:50:37.307+0100 [WARN]  ValidateProviderConfig from "provider[\"registry.terraform.io/dopplerhq/doppler\"]" changed the config value, but that value is unused
doppler_project.alexmuller-test-6: Creating...
2023-06-27T09:50:37.310+0100 [INFO]  Starting apply for doppler_project.alexmuller-test-6
2023-06-27T09:50:37.310+0100 [DEBUG] doppler_project.alexmuller-test-6: applying the planned Create change
2023-06-27T09:50:37.874+0100 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
2023-06-27T09:50:37.874+0100 [ERROR] vertex "doppler_project.alexmuller-test-6" error: Doppler Error: You do not have access to this project.
╷
│ Error: Doppler Error: You do not have access to this project.
│
│   with doppler_project.alexmuller-test-6,
│   on main.tf line 18, in resource "doppler_project" "alexmuller-test-6":
│   18: resource "doppler_project" "alexmuller-test-6" {
│
╵
2023-06-27T09:50:37.888+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2023-06-27T09:50:37.889+0100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/dopplerhq/doppler/1.2.2/darwin_arm64/terraform-provider-doppler_v1.2.2 pid=14229
2023-06-27T09:50:37.889+0100 [DEBUG] provider: plugin exited

Um - it looks like this might be a bug with the HTTP API, not the Terraform provider. I'm getting a 403 back from the API but it is actually creating the project.
Sorry about that!

No worries, @alexmuller! I think you're right, this looks like an API issue. I saw that you submitted a support ticket with our core team. I'll follow along over there and help out if I can 👍

Brill, thank you!


Use of "isInputRange" in various functions is overly-restrictive

eyal reported this on 2018-04-25T12:11:27Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=18797
CC List

simen.kjaras

Description
std.algorithm.sorting.topNCopy, for example, uses isInputRange!SRange when it merely iterates its elements. To iterate the elements, an opApply range is fine, but is unnecessarily forbidden.

Various other phobos functions use isInputRange when they only need the ability to iterate.

Need a "isForeachRange" template perhaps, to replace "isInputRange" when only foreach is needed? Or perhaps an assertion on the "ForeachType!T" should be used instead here?

simen.kjaras commented on 2018-04-25T12:29:09Z
> Need a "isForeachRange" template perhaps

https://dlang.org/phobos/std_traits#isIterable


Remove cyclical dependency

Cyclical dependency in monorepo

lerna WARN ECYCLE Encountered a cycle in the dependency graph. This may cause instability!

terra-base has a dependency on terra-i18n and terra-i18n has a dependency on terra-base.

https://github.com/cerner/terra-core/blob/master/packages/terra-i18n/package.json#L36
https://github.com/cerner/terra-core/blob/master/packages/terra-base/package.json#L32

Issue Type

[ ] New Feature
[ ] Enhancement
[ ] Bug
[x] Other

Steps to Reproduce

Run npm install

Since terra-base is a hoc of terra-i18n, I think we should remove there terra-base dependency in terra-i18n.

Resolved in #418


Switching exec for eslint

I want to use the local version of eslint ./node_modules/.bin/eslint instead of the global one and this how my current setup looks like.
let g:neomake_open_list=2
let g:neomake_javascript_enabled_makers = ['standard']
let g:neomake_jsx_enabled_makers = ['standard']
if findfile('.eslintrc', '.;') !=# ''
  let g:neomake_javascript_enabled_makers = ['eslint']
  let g:neomake_jsx_enabled_makers = ['eslint']
  let g:neomake_javascript_eslint_maker = {
        \ 'exec': $PWD . '/node_modules/.bin/eslint'
        \ }
endif

autocmd! BufWritePost * Neomake

But it doesn't look like it's working although if I add echo($PWD . '/node_modules/.bin/eslint') the right path gets output. How can I fix this?

maybe neomake_javascript_eslint_maker.bin = $PWD . '/node_modules/.bin/eslint' or something like that ?

I don't think neomake_javascript_eslint_maker.bin is a valid option?

Put this in your .bashrc (or similar)
$PATH=/node_modules/.bin:$PATH
You'll then realise that you don't ever need to install anything globally, which is a plain silly idea anyway. :smile:

Any help with this issue?

Turns out I had a typo! it's exe not exec, so this works
  let g:neomake_javascript_eslint_maker = {
  \ 'exe': $PWD .'/node_modules/.bin/eslint'
  \ }

But to get everything working you need to do this which I find a bit odd, I'd expect overriding one property to be merged with the other default properties not to override everything.
  let g:neomake_javascript_eslint_maker = {
  \ 'exe': $PWD .'/node_modules/.bin/eslint',
  \ 'args': ['-f', 'compact'],
  \ 'errorformat': '%E%f: line %l\, col %c\, Error - %m,' .
  \ '%W%f: line %l\, col %c\, Warning - %m'
  \ }

For anyone else landing on this issue, the correct variable is g:neomake_javascript_eslint_exe (omit _maker), but to make life easier, I've made a plugin to do it. If you have vim-plug:
Plug 'benjie/neomake-local-eslint.vim'

@benjie I fixed my typo and thanks for the npm-which script :+1:

@benjie thanks! extremely helpful

There's a trick I learned, now ported to Neomake:
function! NeomakeESlintChecker()
  let l:npm_bin = ''
  let l:eslint = 'eslint'

  if executable('npm')
    let l:npm_bin = split(system('npm bin'), '\n')[0]
  endif

  if strlen(l:npm_bin) && executable(l:npm_bin . '/eslint')
    let l:eslint = l:npm_bin . '/eslint'
  endif

  let b:neomake_javascript_eslint_exe = l:eslint
endfunction
autocmd FileType javascript :call NeomakeESlintChecker()

autocmd! BufWritePost,BufReadPost * Neomake

credit to @gcorne.
This works when Neovim is already open, and you open a new .js buffer.
Thank you.

That certainly has more safeties than my plugin which is literally just these two lines as an ftplugin:
let s:eslint_path = system('PATH=$(npm bin):$PATH && which eslint')
let b:neomake_javascript_eslint_exe = substitute(s:eslint_path, '^\n*\s*\(.\{-}\)\n*\s*$', '\1', '')

Mine is not part of VIM but safer, more efficient and simpler.
PATH=$PATH:node_modules/.bin

Which is probably what you want in your shell for normal usage anyway.
Matt
On Thu, 28 Jan 2016, 10:05 Benjie Gillam<EMAIL_ADDRESS>wrote:

That certainly has more safeties than my plugin which is literally just
these two lines as an ftplugin:
let s:eslint_path = system('PATH=$(npm bin):$PATH && which eslint')let b:neomake_javascript_eslint_exe = substitute(s:eslint_path, '^\n*\s*(.{-})\n*\s*$', '\1', '')
—
Reply to this email directly or view it on GitHub
https://github.com/benekastah/neomake/issues/247#issuecomment-176099998.

@forbesmyester That's neat! If you write it backwards than it'll work even if you have eslint installed globally
PATH=node_modules/.bin:$PATH

although it won't work if you're in a subdirectory.
I guess one solution would be to add ../node_modules/.bin, ../../node_modules/.bin...
but that's ugly. I'm using that vimscript for now.
@benjie yeah you should definitively add it to your plugin :)

Why not make this function more genetic then, pass a checker and it sets it for you instead of tying it to eslint only.

PRs welcome ;)

in case anyone else finds this thread, npm bin is really slow and was causing my vim startup time to be longer than i cared for. This package is faster, so i'm using @gunar's trick, with an extra check:
function! NeomakeESlintChecker()
  let l:npm_bin = ''
  let l:eslint = 'eslint'

  if executable('npm-which')
    let l:eslint = split(system('npm-which eslint'))[0]
    return 0
  endif

  if executable('npm')
    let l:npm_bin = split(system('npm bin'), '\n')[0]
  endif

  if strlen(l:npm_bin) && executable(l:npm_bin . '/eslint')
    let l:eslint = l:npm_bin . '/eslint'
  endif

  let b:neomake_javascript_eslint_exe = l:eslint
endfunction

autocmd FileType javascript :call NeomakeESlintChecker()

Hi,
Should have got to this sooner but you know GIT can give you the project
dir...
git rev-parse --show-toplevel

See
http://stackoverflow.com/questions/957928/is-there-a-way-to-get-the-git-root-directory-in-one-command
, there are other options to achieve this in a GIT centric way.
Matt
On Wed, 30 Mar 2016, 05:27 Joe Moon<EMAIL_ADDRESS>wrote:

in case anyone else finds this thread, npm bin is really slow and was
causing my vim startup time to be longer than i cared for. This
https://www.npmjs.com/package/npm-which package is faster, so i'm using
@gunar https://github.com/gunar's trick, with an extra check:
function! NeomakeESlintChecker()
let l:npm_bin = ''
let l:eslint = 'eslint'
if executable('npm-which')
let l:eslint = split(system('npm-which eslint'))[0]
return 0
endif
if executable('npm')
let l:npm_bin = split(system('npm bin'), '\n')[0]
endif
if strlen(l:npm_bin) && executable(l:npm_bin . '/eslint')
let l:eslint = l:npm_bin . '/eslint'
endif
let b:neomake_javascript_eslint_exe = l:eslint
endfunction
autocmd FileType javascript :call NeomakeESlintChecker()
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/benekastah/neomake/issues/247#issuecomment-203240402

Hi all,
Like @sodiumjoe, I found npm run to be frustratingly slow, but I didn't want to have any external/global npm dependencies, so I more or less re-implemented it vimscript, in an autoloaded function to get the same behavior. It struck me that this could come in handy elsewhere, so I made it into a little plugin: jaawerth/nrun.vim. I'm new to vimscript, so critiques, PR's, etc are welcome!
I'm using it like this:
let g:neomake_javascript_eslint_exe = nrun#Which('eslint')
let g:neomake_javascript_enabled_makers = ['eslint']

autocmd! BufWritePost * Neomake
autocmd! BufWinEnter * Neomake

For portability I went ahead and rolled all of the above  into a single ftplugin here

@jaawerth Because you're doing let g: it's setting the option globally; you probably only want it buffer based (so different projects can use different versions of eslint), via let b: - e.g. https://github.com/benjie/neomake-local-eslint.vim/blob/master/ftplugin/javascript.vim

@benjie Ah, great point. Updated. I've also stopped setting the eslint makers and removed the autocmd, since it makes more sense to set that elsewhere.

@jaawerth Can you comment on where to set autocomd ?

@jaawerth excellent plugin, thanks!

@siemiatj - Sorry for the delayed response there, guess I missed a notification! Anyway, I'm no expert on best practices here, but for the sake of avoiding overrides where possible and separating functionality from settings, if you're going for reusability it can be better to put the autocmd stuff either in init.vim itself, or in a designated file to source for all your JS/linting/whatever functionality needs. Though it's not really a big deal for the ftplugin itself, depending on how widespread it's supposed to be used.
@balaclark - No problem - please feel free to leave feedback and/or PRs if you find anything missing or broken!

@jaawerth You've made my nvim super snappy again. Thanks!

@simonsmith
Please elaborate on what helped you.
It should be fixed in the core.

@blueyed don't think it's an issue with neomake ultimately. The problem the above plugin solves is that a project depends on a specific version of eslint, and you can have both a project-local and global installation of the eslint bin. The plugin checks local first, then traverses up to find the global as a fallback.

@blueyed - nrun.vim is a small plugin that contains a pure vimscript native implementation of what npm bin does + which behavior. It's a lot faster because npm's CLI commands all come with a small but frustratingly noticeable delay due to how npm loads its configuration when called. It's inspired by this thread, but I find it useful for more than just Neomake, since it's a node best practice to use the locally-installed version of most node-based dev/build tools to avoid version conflicts and the like.
It's basically just this function - I'd be more than happy to submit a PR if you'd like!

@jaawerth
I do not grasp the issue fully, but it sounds good in general: please go ahead with a new PR/issue.

@blueyed - Sorry for the delayed response, but will do! In a vacuum my first instinct would be to make the local project fallback the default behavior and let people override it as needed e.g. let g:neomake_javascript_eslint_exe = 'eslint', but for the sake of not making breaking changes to Neomake, would you prefer I add it as an optional behavior behind a flag?
A little more background if you're interested
CLI tools used in the build process for a project can have a number of versions with compatible plugins, config syntax, etc, and a differing versions can lead to false errors or a failure to build entirely, so it's a best practice to add them as devdeps in package.json, which locks them into a compatible semver version. This allows a dev to clone a project and get the full build environment running with a simple npm install without having to hunt for and manually install a missing tool. This can happen with any of the node-based linting/build tools available in Neomake; eslint, jscs, scss-/style/csslint, tsc, tslint, coffeelint, etc, and to my knowledge defaulting to a local version won't break of any these tools.
For example, eslint only looks for plugins and config presets relative to its install location, so if a project is configured to use eslint-plugin-react or the popular styleguide eslint-config-airbnb, a global exe will fail to find it, bail on the whole process, and throw an error.

@jaawerth
Hmm, as for my Python virtualenvs, I rely on $PATH/$VIRTUAL_ENV mostly..
For other cases https://github.com/embear/vim-localvimrc comes in handy, where you could set *_exe.
But I can see that this is cumbersome in general.
What about a generic function to handle this (like Syntastic) has, and then use it in makers where it is relevant?  Might also be some flag on the maker then.
Would be nice to create a new issue with some plan, or a PR right away.

Sure thing; I already have a generic function in my little nrun plugin, just need to integrate it, so a quick PR it is!

I case somebody uses vim-rooter and wants to change the  executable path dynamically after vim-rooter has changed the current working directory.
vim-rooter uses BufEnter and the autocommand that calls :Rooter is normally called after any BufEnter you specify in your vim config, so you need to use BufWinEnter to not have to redefine vim-rooter behaviour manually, for it to be called after the directory has changed.
au BufWinEnter *.rb :let b:neomake_ruby_rubocop_exe =  system('PATH=$(pwd)/bin:$PATH && which rubocop | tr -d "\n"')

Also note that autocmd BufReadPost * Neomake won't work, since BufReadPost is called before vim-rooter has changed the directory. Again, a workaround would be to use BufWinEnter instead. Note that this BufWinEnter statement needs to be defined after the one that changes the executable path.

Now that there's npx, should this be used instead?

If you do; make sure you pass the --no-install flag!

The advantage to doing this on a per-file basis is the cost is only incurred once at the start and then we run the binary directly from then onwards for that file. With npx the binary search will take place every execution which may add a slight increase to latency (especially to people running on spinning rust rather than SSDs). It might be a good default though, so long as it has an escape hatch?

I'm not sure about an escape hatch, but I think it would be a good default for any npm linters since it's usually recommended to install locally rather than globally and this would mean neomake would work out of the box for everyone.

For anyone still interested, I've configured some of my makers to use npx
here's the config, though you'll have to deconstruct it for your own use
Helper function: https://github.com/davidosomething/dotfiles/blob/master/vim/autoload/dkoproject/neomake.vim#L68
Setup: https://github.com/davidosomething/dotfiles/blob/master/vim/autoload/dkoproject/neomake/javascript.vim#L7

Maybe it is worth adding something to the documentation/FAQ then?
ALE has an option to look for makers/linters in node_modules, but I still think that you should rather "just" configure your $PATH correctly, similar to Python, where you add the bin of your virtualenv to the $PATH.


ValueError: buffer is smaller than requested size

Hi, I download & convert deeplabv3 model in python virtual environment. Then vim a json file,
{
    "model": {
        "model_name": "deeplabv3",
        "model": "/home/user/demo/public/deeplabv3/FP32/deeplabv3.xml",
        "weights": "/home/user/demo/public/deeplabv3/FP32/deeplabv3.xml"
    },
    "engine": {
        "config": "/opt/intel/openvino/deployment_tools/open_model_zoo/tools/accuracy_checker/configs/deeplabv3.yml"
    },
    "compression": {
        "target_device": "CPU",
        "algorithms": [
            {
                "name": "DefaultQuantization",
                "preset": "performance",
                "params": {
                    "stat_subset_size": 300
                }
            }
        ]
    }
}

And then I modify the VOC2012 datasets' path in dataset_definitation.yml.
Last I run the command:
$pot -c /opt/intel/openvino/deployment_tools/tools/post_training_optimization_toolkit/configs/examples/deeplabv3.json -e
Error exit:
Traceback (most recent call last):
File "/home/user/Documents/post/bin/pot", line 11, in
load_entry_point('pot==1.0', 'console_scripts', 'pot')()
File "/home/user/Documents/post/lib/python3.6/site-packages/pot-1.0-py3.6.egg/app/run.py", line 34, in main
app(sys.argv[1:])
File "/home/user/Documents/post/lib/python3.6/site-packages/pot-1.0-py3.6.egg/app/run.py", line 48, in app
metrics = optimize(config, args.save_model)
File "/home/user/Documents/post/lib/python3.6/site-packages/pot-1.0-py3.6.egg/app/run.py", line 99, in optimize
model = load_model(config.model)
File "/home/user/Documents/post/lib/python3.6/site-packages/pot-1.0-py3.6.egg/compression/graph/model_utils.py", line 41, in load_model
graph_from_ir, meta_data = stdout_redirect(restore_graph_from_ir, xml_path, bin_path)
File "/home/user/Documents/post/lib/python3.6/site-packages/pot-1.0-py3.6.egg/compression/utils/logger.py", line 114, in stdout_redirect
res = fn(*args, **kwargs)
File "/opt/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/utils/ir_reader/restore_graph.py", line 43, in restore_graph_from_ir
ir = IREngine(path_to_xml, path_to_bin)
File "/opt/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/utils/ir_engine/ir_engine.py", line 51, in init
self.__load_ir()
File "/opt/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/utils/ir_engine/ir_engine.py", line 169, in __load_ir
self.__load_bin()
File "/opt/intel/openvino_2020.1.023/deployment_tools/model_optimizer/mo/utils/ir_engine/ir_engine.py", line 142, in __load_bin
value = np.frombuffer(buffer=bin_buff, dtype=precision, count=size, offset=offset)
ValueError: buffer is smaller than requested size

@biyuehuang  Hi again : )
I see the typo in your POT config (you specify the path to xml twice, instead of bin)
please change:
"weights": "/home/user/demo/public/deeplabv3/FP32/deeplabv3.xml" -> "weights": "/home/user/demo/public/deeplabv3/FP32/deeplabv3.bin"

@eaidova Sorry, I make such a simple mistake. It can work now.