Straight.el cannot install a working (recent) version of Eglot

(only lightly) related to joaotavora/eglot#492
Straight uses its emacsmirror recipe to fetch project.el as far as I understand, which points to another repo https://github.com/emacsmirror/epkgs/blob/master/.gitmodules#L16449-L16451
And that repo is outdated : https://github.com/emacsmirror/project/blob/master/project.el#L4
@raxod502 @tarsius do you know if there's anything we can do to forcefully update that recipe ? Basically with the current state, installing eglot will fetch<EMAIL_ADDRESS>anyway, and therefore trying to start eglot will trigger (void function project-root), as the API had a breaking change between 0.1.3 and 0.3

It looks like gnu-elpa-mirror should be used to fetch project and there would be no problem. But for some reason, C-u M-x straight-get-recipe RET gnu-elpa-mirror RET doesn't list project in the candidates :(

And apparently, the issue is that project gets filtered out of gnu-elpa-mirror because it's a "built-in package".
Since users might have the wrong version of the package "builtin", could we provide a user option to override this check if we want ? Speaking about those 2 functions :
(defun straight--package-built-in-p (package)
  "Given PACKAGE symbol, return non-nil if it's built in to Emacs.
The return value of this function might change between different
versions of Emacs for the same package.

If a package is built in, then the package won't be listed in GNU
ELPA (Mirror) and it won't be an error if no recipe can be found
for it."
  (unless straight--cached-built-in-packages
    (require 'finder-inf)
    (let ((table (make-hash-table)))
      (dolist (cell package--builtins)
        (puthash (car cell) t table))
      (setq straight--cached-built-in-packages table)))
  (gethash package straight--cached-built-in-packages))

(defun straight-recipes-gnu-elpa-mirror-retrieve (package)
  "Look up a PACKAGE recipe in the GNU ELPA mirror.
PACKAGE should be a symbol. If the package is maintained in GNU
ELPA (and should be retrieved from there, which isn't the case if
the package is built in to Emacs), return a MELPA-style recipe.
Otherwise, return nil."
  (unless (straight--package-built-in-p package)
    (when (file-exists-p (symbol-name package))
      `(,package :type git
                 :host github
                 :repo ,(format "emacs-straight/%S" package)
                 ;; Kinda weird, but in fact this is how package.el
                 ;; works. So if we want to replicate the build
                 ;; process, we should trust that the gnu-elpa-mirror
                 ;; put the correct files into the repository, and
                 ;; then just link *everything*. As an FYI, if we
                 ;; don't do this, then AUCTeX suffers problems with
                 ;; style files, see
                 ;; <https://github.com/raxod502/straight.el/issues/423>.
                 :files ("*" (:exclude ".git"))))))

The Emacsmirror currently gets core packages from the latest release candidate not the master branch. I intend to change that soon.

Oh, this looks like the culprit of what I thought as #529.

I have updated straight.el so that it filters out an explicit blacklist of packages from GNU ELPA (and mirror), rather than all built-in packages. This should allow you to use packages from GNU ELPA that supersede builtins while still not using those packages that are obsolete backports of builtins for older Emacs versions. Please let me know if it fixes the issue for you.

Since users might have the wrong version of the package "builtin", could we provide a user option to override this check if we want ?

The reason I implemented the above solution instead of what you suggested is that some packages from GNU ELPA should never be installed, such as cl-lib.
;; This is a forward compatibility package, which provides (a subset of) the
;; features of the cl-lib package introduced in Emacs-24.3, for use on
;; previous emacsen (it should work on Emacs≥21 as well as XEmacs).

;; Make sure this is installed *late* in your `load-path`, i.e. after Emacs's
;; built-in .../lisp/emacs-lisp directory, so that if/when you upgrade to
;; Emacs-24.3, the built-in version of the file will take precedence, otherwise
;; you could get into trouble (although we try to hack our way around the
;; problem in case it happens).

;; This code is largely copied from Emacs-24.3's cl.el, with the alias bindings
;; simply reversed.

This looks like it should work, I'll try again when I have time :)

It's perfect thanks ! (sorry for triggering the seq issue though :( )

It seems to be an unfortunate side effect of making any changes to this kind of code. After all, the intended consequence of this change a number of subtle changes in version resolution; the problem is just that not all of the subtle changes were the right subtle changes. I am not even sure how the problem could be avoided; the issues that come up are inevitably weird edge cases with specific packages or system configurations and I don't know how possible it is to cover them with tests.
The only real solution I see, at least for now, is for all users of straight.el to pin package versions. Perhaps however @hlissner will have thoughts, given that they are the one most affected by these bugs.

I do think that pinning will prevent most of these issues. And if we want to do pinning, that means we should be able to access/use older versions ; therefore I think that moving a lot of these recipes out of "built-in" territory and into "fetch from repository on the network" is a good move.
It's more work for end-users, and maybe some utilities written in elisp might help people handle pin management (or even provide a safe hatch, as a unique boolean variable to revert entirely to the old behaviour), but it's probably for the best ?

What do you mean? straight.el already provides a full solution, namely the lockfile system. The only issue is Doom doesn't use it currently.

Didn't know there was a lockfile. I'll probably try to dig it a little bit later

FWIW The Emacsmirror now mirrors "core" package (i.e. packages that are part of Emacs but are also available from GNU Elpa) from the master branch of Emacs.
Given the current update frequency, these packages are updated about every two weeks, but I intend to improve that.
Due to limitations/bugs of git filter-repo I had to discard old history. Only history since shortly after Emacs 27.1 is included for the time being. Including older history would take an hour and create a repository that is 16GB large for each of these 13 packages. Garbage collection would help but likely take another hour. I am guessing that as of right now a pull would take about 24h, even if non of these packages changed.
git filter-repo is supposed to support incremental filtering but that does not work for me. I am fairly confident this can be fixed but am still waiting for a response from the author of this tool.

I haven't heard back on https://github.com/newren/git-filter-repo/issues/141 it.
@raxod502 Maybe you could take git filter-repo --state-branch to see if it is just me who is holding it wrong.

Yeah, I don't know -- I've never used the tool and indeed there seems to be no documentation on that option. Seems like a bug to me!

To be clear I get the same error as you when I run that command, though.


Failed to load source: Error Domain=JSServer Code=500 "Unable to resolve module AccessibilityInfo from `/Users/

Failed to load source: Error Domain=JSServer Code=500 "Unable to resolve module AccessibilityInfo from `/Users/

Hey, thanks for reporting this issue!
It looks like your description is missing some necessary information, or the list of reproduction steps is not complete. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.
I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!

I find the reason,the reason is  that when i npm install a third component ,some files of  nodemodules been removed!.I must try to re init the reactNative project.
I think its a bug of reactNative
tips:
the component is react-native-picker

Sorry!My English is not good!


Task is not updated #1991

added method for converting task update event

refs #1991

@erdemedeiros I did those changes and also fixed a integration test regarding audit that was failing.


[Refactor] Decouple UI Components from Data

Remove data queries from UI components in Storybook. Consider AppNav and LessonCard/ReviewCount. Each relies on a GraphQL query and uses a different approach to dealing with this situation in Storybook:

AppNav comments out the story that would require a query
LessonCard/ReviewCount introduces a prop to avoid using a mock for the client provider

For UI component stories, we should either decouple the components from their queries, or decide on a strategy for mocking/using the Apollo client Provider. I recommend that we adopt the decoupling strategy for the sake of simplicity.
More detail in this wiki article

not an issue anymore. will create another ticket if this is not the case


refactor: use chrome instead browser api

Fix: #12

:tada: This PR is included in version 5.1.3 :tada:
The release is available on:

GitHub release
v5.1.3

Your semantic-release bot :package::rocket:


Web Workflow Serial screen on Full Editor page crashing on non-focus input

CircuitPython Version
Adafruit CircuitPython 9.0.0-beta.0 on 2024-01-27; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3
9.0.2
9.1.0 beta 0

Workflow(s)
WEB
Browser(s)
Google Chrome Version 123.0.6312.86 (Official Build) (64-bit)
Chromium Version 123.0.6312.86 (Official Build) snap (64-bit)

Console Log
Load different workflow
index.js:37 Initializing File Transfer Client...
index.js:37 Waiting for connection status to change...
index.js:35 Connected!

Steps

Add the following code.py to the board:

a = ''
while a != 'q':
    a = input('_$ ')

Click on the Restart button
Without moving the mouse from the Restart button, press the enter key or the space bar

Description
In the Serial screen on the Web Workflow Full Editor site, if you use the Reset button to perform a soft reboot and then don't click within the serial screen, the serial screen won't have input focus but it still attempts to respond to keystrokes so if you press the space bar/enter key, code.py (or the REPL if no code.py exists) will attempt to read the input but since the window doesn't have focus there's actually no input there and CircuitPython errors out with an EOFError
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
_$ Traceback (most recent call last):
  File "code.py", line 3, in <module>
EOFError:

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.

Additional information
Once you know what's going on this isn't really a problem but when it first happened to me, the code.py file I was running didn't handle the error well and the terminal behavior was very confusing.

Here's the error I get when performing the above procedure:
Uncaught TypeError: Cannot read properties of undefined (reading 'zIndex')
    at ButtonValueDialog._removeTopModalLayer (dialogs.js:136:89)
    at ButtonValueDialog._closeModal (dialogs.js:171:18)
    at ButtonValueDialog.close (dialogs.js:191:14)


Config sent to daemon has nonsensical defaults

The Issue
When a user chooses to participate in the data network in the android app,
the daemon is started with additional components including the peer protocol server
this component heavily dependent on blob management.
The blob management is crippled when the the "save blobs" option is turned off.
https://github.com/lbryio/lbry-android-sdk/blob/a7ee2cd4d0a0c12462e5187301588596aa4c901a/src/main/python/lbrynetservice.py#L89-L99
When the blob management is not allowed to save files - it is serving blobs from memory only.
Is this the intended behavior?

@ycohen-dev The reason save_blobs is set to False by default is due to storage space limitations on mobile. We will be able to set this to True for the participation in the data network once the SDK implements proper storage space management settings.


chore(main): release 1.1.10

:robot: I have created a release beep boop
1.1.10 (2023-08-18)
Bug Fixes

修改 auto merge action 配置 (1cb4814)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/lwsgh/release-please-example/releases/tag/v1.1.10 :sunflower:


Create CHANGELOG.md

fix #60

This changelog is ready, but I strongly suggest merging #58 before our formal release.
Some Django beginners had some issues installing IDOM, and that PR adds the detail needed to resolve that.

Did some more minor changes after re-reading. I think I'm satisfied with it now. Feel free to review.

Should there be an automated way to enforce additions to the changelog? Maybe something like this?

That can be added later though in a different PR.

I was thinking of that too, however, it might get annoying for minor PRs such as readme spelling fixes to be forced update the changelog.
If we want to do this, we can do something about that via the skipLabels option within that CI workflow. Like PRs tagged with documentation can be skipped, and then optionally we can add a no-changelog tag on top of that.
But all of that might end up being more effort than manually enforcing changelog updates.

Since it'll probably just be us contributing for the time being it's probably not that important to do now.


Thanks!!


Update software.md

Description
There was a typographical error in the documentation, "sintax" was used instead of "syntax"

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

hello admin kindly look into the change I'm trying to make


sonoff mqtt adapter iobroker

Hello,
new problem what I just discovered.
I have iobroker sonoff mqtt adapter running.
The point to switch is correctly set from true to false and back.
But nothing happens on the device. It doesn't turn on or off.
If I switch the point manually myself, then it works perfectly, just like when I switch the point via the normal visualization. Just not from the home point.
Anyone have an idea?
  "name": "Wandlampe",
  "setTopic": "sonoff/0/Wandlampe/POWER",
  "getTopic": "sonoff/0/Wandlampe/POWER",
  "onValue": "true",
  "offValue": "false"

Hi, are you sure that" true" and "false" are the right values?
Did you flash a alternative software into your sonoff device like tasmota?
Maybe the easiest way to find out the right commands you should use is to listen to your MQQT broker and look what values are used if you switch your devices ion and off.
I am using http://mqtt-explorer.com/ on Linux.
I am using tasmota with sonoff and the values are 1 for on and 0 for off.
Br. Frank

Problem has been solved. there has to be a /set at the end.
"setTopic": "sonoff/0/Wandlampe/POWER/set",
cu Deta


mathpix url change

https://download.mathpix.com/windows/mathpix_snipping_tool_setup.latest.exe
https://mathpix.com/win_app/mathpix_snipping_tool_setup.exe 404

Thank you, I just updated the script.


fix broken tests

You could change the require('1m.csv') to a dynamic import: (await import('1m.csv')).default.
(The .default is required because the dynamic import resolves to a Module, which is an object with a default prop. Otherwise, the loader would get this Module object rather then the actual URL string.)

Also, please pull the newest state of main. Some merge issues should appear due to the lib typo fix.
Apparently GitHub doesn't notice this because it seems like it's still possible to merge automatically, although it shouldn't (?)


License

It would be nice to attach a license which is applicable on the code/template/assets available in this repository.

Thanks for the suggestions. I will do it. Thanks

Hi,
tnx for this beautiful template,
can you please tell me how can I connect the mailchimp to subscribe.php?


docs: update roadmap. should we come up with a better place for roadmap?

We hadn't updated this and coro is essentially stable now.
Added new roadmap features.
For discussion: is this page best place to store a roadmap, it isn't very community driven.
Code change checklist

[x] I have ensured that all methods and functions are fully documented using doxygen style comments.
[x] My code follows the coding style guide.
[x] I tested that my change works before raising the PR.
[x] I have ensured that I did not break any existing API calls.
[x] I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

I think this is fine, we just need something to remind us of the Roadmap (maybe a discord bot to ping in Library-Development?)

sounds good!


pkg/generator: Refactor generator_test.go

refers to #252
Break down generator_test.go for better test lisibility

also we should use
t.Errorf("want %v\ngot %v", Exp, buf.String()) instead of
t.Errorf("want %v, got %v", mainExp, buf.String()) for erroring out.
Let's do that in a separate pr.

lgtm after removing the TODO comment.

TODO comment removed

Merging. Could you also address those two issues in separate PRs?

yes sure !


checkov: 2.0.1201 -> 2.0.1204

Description of changes
https://github.com/bridgecrewio/checkov/releases

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 176850 run on x86_64-linux 1

1 package built:

checkov


[WIP] Use Github Actions instead Travis CI

This is only Proof of Concept which I'll probably never finish, so if you want to do this better feel free to create your own PR based on this.
For the time being, I see this advantages of Github over Travis

more concurrent jobs (20 vs 2)
more minutes unitl job will fail(6h vs 1h)
more time until workflow will fail(72h vs 2h)
heavily integrations with Github with plugins

This PR isn't complete and this things should be fixed:

fix linux, android builds
for now there is no cache, but this is must be feature(https://github.com/marketplace/actions/cache)
add real editor/project manager tests with help virtual X destkop(#38428 for now this is unavailable in master branch) - code which only run project manager is commented due to crashes from attached issue
adding artifacts with generated binaries(I can't find information how long are stored or how big is space limit)
clean-up code - travis yml was pretty formated and have 150 lines of text, github actions yml is ugly, and is ~2x bigger than travis

There is commented Cppcheck step because it took over 1h, and this is too much for checking.
I suggest move this to new file and execute it on different branch to execute it e.g. once per week.
Also should be also added support to Sonarcloud and maybe even Coverity Scan(dropped in past) which can take as base this gitlab-ci.yml file - https://gitlab.com/qarmin/godot/-/blob/master/.gitlab-ci.yml
Example of Sonarcloud project - https://sonarcloud.io/dashboard?id=qarmin_godot
Here is example of simple and good github actions integrations in Assimp - https://github.com/assimp/assimp/actions
Example outputs/jobs - https://github.com/qarmin/godot/actions/runs/94442494, https://github.com/qarmin/godot/actions

I started working on a WIP branch to migrate Godot's CI to GitHub Actions, but this PR seems more complete so far.

how fun, oidn broke the editor... trying to fix that

Thanks for doing this, really appreciated it, I created a branch with caching and the windows build just to remove appveyor it was annoying me.
Added the caching and some python versioning tools which make it more generic and cross-platform to setup python :) which is really cool actually.

Closing as superseded by #40282, #40335 and #40131
We still have mobile/web builds to port to GitHub Actions, but it should be relatively easy now that the work is done for desktop, including caching.

Seems unrelated to  #40131? Was that a typo?

Also: something, something, monopolies...

That was a typo yes.


Lack of IntelliJ support

I noticed that @rajcspsg updated this with: https://github.com/rajcspsg/sbt-clojure (branch latest_sbt_support).
It's awesome in theory, but the problem to me seems to be that my IntelliJ IDE will still complain that the clojure imports don't exist. As a result, all imports are red and using the functions are red too.  Is there any way around this, or is there any fix?
Otherwise, I'm stuck just having to compile them separately.

@decoursin this may be due to https://youtrack.jetbrains.com/issue/FL-15340(Intellij doesn't support clojure directly only via cursive).
I suggest install both scala and cursive plugin.
mark both scala src directory and clojure src directory as source directory.
If it still doesn't solve the problem then it is due to lack of clojure support in Intellij as mentioned above but not due to this plugin.

Yeah, that actually works. I had marked the clojure src directory as source directory, that didn't work by itself, but installing the cursive plugin combined with that does actually indeed work. Thank you.
 I develop Clojure with Emacs. But that's not your problem haha

I also tried this with the Clojure-Kit plugin (in combination with marking the clojure directory as source directory), but unfortunately that doesn't work - you need the cursive plugin.

Unfortunately in JVM world Intellij is the king. No editor has support for gradle, scala, groovy like Intellij does.
If it solves the problem, then you can close this ticket.


Update information on the latest RHEL images

[Enter feedback here]
This page has not been updated since 2022.
There are many new images added to RHEL after 8.6. The versions 8.7/8.8/8.9 are not present in doc.
Cx is looking to know when will 8.10 be available as this is released in May 22nd.
Please update the doc asap. Thanks

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 98dae3fd-1714-918b-1c03-7cc25bf5acf9
Version Independent ID: c958b3df-9826-e187-d276-d56b8d09ddec
Content: Red Hat Enterprise Linux images available in Azure - Azure Virtual Machines
Content Source: articles/virtual-machines/workloads/redhat/redhat-imagelist.md
Service: virtual-machines
Sub-service: redhat
GitHub Login: @mathapli
Microsoft Alias: mathapli

@jeethendrad
Thanks for your feedback! We will investigate and update as appropriate.

Thanks for your contribution to our documentation
We are moving to a new user feedback system. As part of that effort, we are creating a content request in our backlog to address this gap and are closing this GitHub issue. The updated content will be published shortly.

Please continue to provide feedback about the documentation. We appreciate your contributions to our community.
#please-close


Workflow persistence

Hi, are there persistence features? This is, in case there is a crash in the server application, is the updated workflow data/status saved somewhere?

Hi Jaime. Currently there are no persistence features in MicroFlow and the only way to track the flow status is to use logging. Having the ILogger.Verbosity set to LogLevel.All you can get a clue of what's going on. But tracking the data like activity constructor arguments or properties isn't currently supported. I think it's not that hard to support structured tracking in MicroFlow. For instance we can register the trackers that will be notified whenever the activity is started, finished or faulted. And notification data could include the values of every activity property. Persistence is then can be easily implemented as tracker that saves notification data into some storage.


In crypto section, hint at how to comply with US export control laws

In crypto section, hint at how to comply with US export control laws as described in
Understanding Open Source Technology & US Export Controls.

Currently there's form text that says:

Note that some software does not need to use cryptographic mechanisms.

Let's change that to:

Note that some software does not need to use cryptographic mechanisms. If your project results' software (1) includes, activates, or enables encryption functionality, and (2) might be released from the United States to outside the United States or to a non-US-citizen, you may be legally required to take a few extra steps. Typically this just involves sending an email; for more information, see Understanding Open Source Technology & US Export Controls (Encryption section).

Most OSS developers don't know about export control laws, but it can get developers in trouble anyway. If we add a little hint, we can perhaps help them avoid legal problems. This law is easy to comply with, but only if you know about it.

Is it worth caveat'ing this with something like "this is not legal advice, it is always check with your attorney to obtain advice with any particular issue or problem" ?

I'd rather not. I don't think this statement counts as legal advice. It simply alerts you that in some cases you may need to send an email as described in a document that has received lots of legal review.

Works for me. I'm probably overly paranoid on using that disclaimer.


errors with tabbarIOS

JSON value 'black' of type NSString cannot be converted to NSNumberreactConsoleError
4ExceptionsManager.js:87 The tab bar icon '(null)' did not match any known image or system icon
the second set of errors go away when i provide a systemIcon prop to the tab items but it doesnt seem like I can use the library

It seems null gets passed to the TabBar. Does the icon exist? Can you post the offending code? Is the TabBarExample working for you?

I'm getting the same thing in<EMAIL_ADDRESS>Here's the code I'm using:
var Icon = require('react-native-vector-icons/FontAwesome');
var myIcon = (<Icon name="rocket" size={30} color="#900" />)

//...
      <TabBarIOS style={{flex: 1}}>
        <Icon.TabBarItem iconName="rocket" title="Woo">
          <Text>what</Text>
        </Icon.TabBarItem>

It seems like I can reproduce this with simply:
var Icon = require('react-native-vector-icons/FontAwesome');

var MyApp = React.createClass({
  getInitialState: function() {
    Icon.getImageSource('rocket', 30).then((source) => this.setState({ rocketIcon: source }));
//...
  }
});

Specifying a color to getImageSource seems to work.
  Icon.getImageSource('rocket', 30, [1,1,1])

Looks like this is related to how UIColor gets loaded:
https://github.com/facebook/react-native/blob/3b6d029a55efe1ffa5afcafe60d2d2445aadd502/React/Base/RCTConvert.m#L380

I have been able to fix this by simply adding a color prop to each item but now the icons dont show up the tab bar. it only shows the title in each item.
var Icon = require('react-native-vector-icons/Ionicons');

...

       <TabBarIOS
          tintColor='#000'
          barTintColor='#FFF'
          translucent={ false }
        >
          <Icon.TabBarItem
            title='Posts'
            iconName='ios-list-outline'
            selectedIconName='ios-list'
            color='#000'
            size={ 28 }
            selected={ this.state.selectedTab === tabs.Posts }
            style={ styles.tabIcon }
            onPress={() => {
              this.setState({
                selectedTab: tabs.Posts,
              });
            }}
          >
            { this._renderContent() }
          </Icon.TabBarItem>
        </TabBarIOS>```

React Native is moving color processing to the JavaScript side in version 0.12.
0.7.2 fixes this issue.

@oblador thanks! you rock.

@toothrot :heart_eyes:

this is awesome, works now! thank you!


"cargo vet certify" github bot workflow

"cargo vet certify, but all with bots/webapps in github so devs don't have to know/use the cli"
An MVP for a bot-based UX should be based on github, either on top of dependabot or a different bot. The design should be extensible enough to port to other infra like gitlab or mozilla's stuff, but supporting those is not in scope for the first version. Of course we will keep that future in mind and not wildly hardcode github stuff. Use json messages, standard auth protocols, etc. where it makes sense.
Basic workflow sketch:

cargo-vet fails in ci and spits out json describing the failure (already done)
this triggers some sort of bot event to have it consume that json and post a comment on the PR saying audits need to be done and linking to a webapp
the webapp has a ui for displaying what audits needs to be done, and links to the URLs that cargo vet diff and friends would use
the webapp has a ui for specifying you completed the audit and for what criteria, displaying the EULA text for those criteria (and whatever else certify supports)
the webapp has authentication integration with github so when you push certify buttons in the app it does the thing over on github

unclear details:

do the certifies appear on the existing PR, open new PRs, or push to main immediately?
are the certify commits expected to be done by the bot account or the auditor's account?
should there be one commit per audit, or a single "all the audits" commit

if the latter, are audits batched up and the user says "all done" in the app, or do they get submitted to github as each one is performed (editing the mega commit)?

#329 is an initial prototype of this but without any authentication logic, so it just has the user copy base64 strings of json blobs around to sheppard data between the app and github

how to test the current impl:
git fetch origin pull/329/head:nika
git checkout nika
cd certify-gui; npm install; npm run dev

then go to this localhost url.
Which should show this:

To generate new errors for the cargo-vet to report/handle there is a mock project inside the tests.
First, install whatever code for cargo-vet you currently have:
cargo install --path ./

...
   Compiling cargo-vet v0.3.0 (C:\Users\ninte\dev\cargo-vet)
    Finished release [optimized] target(s) in 1m 25s
   Replacing C:\Users\ninte\.cargo\bin\cargo-vet.exe
    Replaced package `cargo-vet v0.1.0 (C:\Users\ninte\dev\cargo-vet)` with `cargo-vet v0.3.0 (C:\Users\ninte\dev\cargo-vet)` (executable `cargo-vet.exe`)

Then go to the test-project and update a package:
> cd tests/test-project/
> cargo update -p clap
    Updating crates.io index
    Updating clap v3.1.8 -> v3.2.21
      Adding clap_lex v0.2.4

Now cargo vet should fail
> cargo vet
Vetting Failed!

4 unvetted dependencies:
  clap:3.2.21 missing ["safe-to-deploy"]
  atty:0.2.14 likely missing ["safe-to-deploy"]
  clap_lex:0.2.4 likely missing ["safe-to-deploy"]
  hermit-abi:0.1.19 likely missing ["safe-to-deploy"]

recommended audits for safe-to-deploy:
    cargo vet diff clap 3.1.8 3.2.21     (used by test-project)  (176 files changed, 13437 insertions(+), 10196 deletions(-))
    cargo vet inspect atty 0.2.14        (used by clap)          (508 lines)
    cargo vet inspect clap_lex 0.2.4     (used by clap)          (860 lines)
    cargo vet inspect hermit-abi 0.1.19  (used by atty)          (938 lines)

estimated audit backlog: 25939 lines

You can get this report in json form with --output-format=json:
cargo vet --output-format=json
{
  "certify_web_gui_data": null,
  "conclusion": "fail (vetting)",
  "failures": [
    {
      "missing_criteria": [
        "safe-to-deploy"
      ],
      "name": "atty",
      "version": "0.2.14"
    },
    ...
  ],
  "suggest": {
    "suggest_by_criteria": {
      "safe-to-deploy": [
        {
          "name": "clap",
          "notable_parents": "test-project",
          "suggested_criteria": [
            "safe-to-deploy"
          ],
          "suggested_diff": {
            "diffstat": {
              "count": 23633,
              "raw": " 176 files changed, 13437 insertions(+), 10196 deletions(-)\n"
            },
            "from": "3.1.8",
            "to": "3.2.21"
          }
        },
        ...

With the changes in nika's PR, you can now pass --certify-web-gui  to make it generate the giant base64 blob that her UI takes in the url (I think it's just a compressed version of the rest of the json):
cargo vet --output-format=json --certify-web-gui
{
  "certify_web_gui_data": "Z3ppcDsfiwgAAAAAAAD/lVVNbxtHDP0rgz3VgbSokh5aHwIkAYrmkEvQW9doqB2uNPAsZzsfUjaB/3sfZyVZdg5JTrI15OMj+R71temjyxwdNbf/fG2ERm5um0QDr3NYxyLNqnHj5B3btzNCLk+WJx9mvFKxALDN3aqxnIA2ZRcEIH/vXTJ9pMymJzFbfIRxcp7tygB4ZUisyZyQbIIYMj705M0xxPuUSUFMiMZJJ32QHINHpqGSw7g8Hl3eh5JNKnGKLjnZoYAk/q+w9JxWeOj3htJtJy/MRyarEUA8omH901ImM8QwmsSS8N2B9blIZE9KaqKYkwmDyXs2A4inGWTHVvHeCzh6rzgpDPlIsSZHBoXB7UrUF82zfHA915x3QYT7WjsH1Mmx1OaFszZtWOwUnORUoz+4VBJr+aUssFMoEZ2ZX7jdtRjtPOXQlxjR72xGJ0C+QW7zsPpmk5d1PVnmj+zu6Lw3EjI2gSXY0jNWlaCYUBI+Ud/l2RyKF460dV7/Q3tTjVW4Ti4T4s9TSOj4SftOppJBu5M3SifEZDRWS0Ys08UlYeI4hDii+FDAyIed6xFwcHw874glI3rhDcCPhC/jSp8wHhQ7h7OEstsrqELN+JqSKnCrclKgLe/p4LBPAGPLIKtz7GQLid6nKtySaFe3M4UjmBVvMNkAwbTmTySSnGFp6/kxWtGXuaqwEeHX2L23FxWpLQzlTP09x4W1TgLuqUDgPJK4qahEKxqslN2o5K5I4wHaSVwXkFBLUTF9H1yuOAi78s2R5rqA9xaE/Ly6ahqesiCbTqOCBMUu1qVx6zBxmHta9u7O0uzk0S2Gekg23dSd7ilaFrXxjhwc9NiLGlpB1cEOecBVf2sjnZA9cMxOlfOsydOuzV9YwkF3ncIIzzlomSsmiEM4o8tQWgvX1qOAi0JJL4QiCOUSL7u5Sk24Ll4rVleDuEq1Bn3CRjh9wk1gBIShE/22mukUW6epOqj8kjnuHW7RjtUjWY+CupHtMtzFztviAIYXnAEYWoeJfNioZ1si+U5G6mNIN6vvCOvEG1qGr5YKS/mRGfesUt2GA+Z6Pv3Pbsb5Kjw9Ft/ciFQwWXMOvsofypcv308/RT3cnX5C0vUPUO9pajTDZ/wwNa/aTfu7Wb82r9qX7cuNQgv0Rv7d44/X81N3d91RzvMV3K9A2fz20yhK6l/Pn58h/TzQvipyDdc8gdq0mz9+EOvu4X8s59hquQcAAA==",
  "conclusion": "fail (vetting)",
  "failures": [
    {
      "missing_criteria": [
        "safe-to-deploy"
      ],
      "name": "atty",
      "version": "0.2.14"
    },
    ...

correction: the current base64 blob is actually a new json format designed for this usecase. in particular the current json is missing some information the GUI wants like a listing of every supported criteria you can audit for and their description strings / X-implies-Y relationships. If we move away from the base64 format I suggest that we either unconditionally emit this information in json output, or make it something you can toggle on with a flag.

@mystor had you actually worked out what the bot scripting was going to look like, or were other people on the hook for that step?
I'm mentally sketching out what I want a cleaned up version of this API to look like, I see two reasonable choices but which is better depends on how a bot wants to interface with things (will consult with my coworkers on this, but gonna sketch out the options from the cli's perspective to get them out there). (Also names here are kinda strawman.)

Add --output-format=json-full which includes all the "extra" information about the repo like the defined criteria that a gui/bot would want to have available (probably some subset of the current stuff you're base64ing).

Add cargo vet metadata which prints out just that info as its own json object.

I aesthetically like 2 because it feels very orthogonal and generalizable. My expectation is that 1 is a lot nicer for bots because one json object unconditionally dumped sounds a lot easier than 2 objects, with the second needing to be manually requested on error.
As for getting info back in, I'm not a huge fan of the --from-gui (take a json blob of commands from stdin) approach. We already have plumbing commands on cargo-vet and ideally any automation on top of cargo-vet would just use that. That said I'm willing to believe that this format is somehow more desirable (or that you will inevitably just write a script that does --from-gui so maybe it's best to just build it in and save everyone some time).

I don't think we'd really want this workflow to assume that main ever doesn't pass vet, so I expect it'd only run on existing PRs, and either update the PR or open a new PR into that PR's branch (though that's probably a github thing and might have bad ergonomics?) so that vet can be passing in the PR before merging into main.

* are the certify commits expected to be done by the bot account or the auditor's account?

I don't think it matters a ton either way. The auditor should definitely be credited in the who for the audit, but I think it'd be fine if the certify commits themselves came from the bot.

* should there be one commit per audit, or a single "all the audits" commit

I think a single "all the audits" commit would be fine.

  * if the latter, are audits batched up and the user says "all done" in the app, or do they get submitted to github as each one is performed (editing the mega commit)?

I would expect that they're batched up and applied in a single "all done", but I suppose doing something more live could be a reasonable approach? I worry a bit about wasting a ton of CI time with that though, as we'd be re-running CI for each new audit performed, and it wouldn't be passing.

@mystor had you actually worked out what the bot scripting was going to look like, or were other people on the hook for that step?

I hadn't quite gotten to that step in figuring this out. I was originally working on getting a basic framework working with the UI and a mechanism for applying the changes, and was then going to figure out how that would integrate with a bot-based workflow.

I'm mentally sketching out what I want a cleaned up version of this API to look like, I see two reasonable choices but which is better depends on how a bot wants to interface with things (will consult with my coworkers on this, but gonna sketch out the options from the cli's perspective to get them out there). (Also names here are kinda strawman.)
1. Add `--output-format=json-full` which includes all the "extra" information about the repo like the defined criteria that a gui/bot would want to have available (probably some subset of the current stuff you're base64ing).

2. Add `cargo vet metadata` which prints out just that info as its own json object.

I aesthetically like 2 because it feels very orthogonal and generalizable. My expectation is that 1 is a lot nicer for bots because one json object unconditionally dumped sounds a lot easier than 2 objects, with the second needing to be manually requested on error.

One of the reasons I added a new system was to simplify the amount of data being sent into the app as much as possible, as I was planning to communicate it on the client side using the URL. The original idea bholley proposed in #293 was to use a wasm blob of cargo-vet itself within the web client so that the blob could be kept simple and minimal.

As for getting info back in, I'm not a huge fan of the --from-gui approach (take a json blob of commands from stdin). We already have plumbing commands on cargo-vet and ideally any automation on top of cargo-vet would just use that. That said I'm willing to believe that this format is somehow more desirable (or that you will inevitably just write a script that does --from-gui so maybe it's best to just build it in and save everyone some time).

The decision do to it this way with --from-gui rather than have the bot handle the communication with the web UI was largely because of the discussion in #293, though I'm not super attached to it.


CVC maxlength based on card-type?

Does it make sense to change maxlength based on cc-type?
Not sure if 3 or 4 is a better default when there's no card type — 3 because it's more common, 4 because it's more permissive (like for whatever reason a user fills in the cvc before card type is detected).

So I actually thought about this when I made that decision, but it's definitely good you brought it up so I can explain. This decision was made before I implemented eager typing, but the logic still holds.
The default absolutely has to be 4. You can't rely on $ccType because that's going to be undefined not only initially, but also when the card is invalid. $ccEagerType could be defined, but that's optional (changeable though).
The maxlength has meaning to the browser and the potential for confusion here is huge. A user won't intend to type more than four digits into the CVC field. But what if they mistype their card as 35... (JCB) instead of 34 (Amex). Forcibly preventing the user from typing that 4th digit of their CVC will frustrate them. A 4 digit CVC there would be invalid, but we only know that if we let the user type the whole value.

Ok, sounds reasonable. Thanks!


Add basic instrument gallery view

Closes #30.

Just to clarify, the only commits in this pull request that are different from #40 are the last two commits https://github.com/DDMAL/VIM/pull/41/files/06e94a1e353b849db3b7caa57307bbd552f05445..2d460cd4c79065047487ea07c0c64938ed902ddd ?

Yeah...I'll update the changes after that one is merged...


Cristobal: inside JS - 4 weeks

Inside JS

Learning Objectives

Priorities: 🥚, 🐣, 🐥, 🐔 (click to learn more)

There is a lot to learn in this repository. If you can't master all the material
at once, that's expected! Anything you don't master now will always be waiting
for you to review when you need it. These 4 emoji's will help you prioritize
your study time and to measure your progress:

🥚: Understanding this material is required, it covers the base skills you'll
need to move on. You do not need to finish all of them but should feel
comfortable that you could with enough time.
🐣: You have started all of these exercises and feel you could complete them
all if you just had more time. It may not be easy for you but with effort you
can make it through.
🐥: You have studied the examples and started some exercises if you had time.
You should have a big-picture understanding of these concepts/skills, but may
not be confident completing the exercises.
🐔: These concepts or skills are not necessary but are related to this module.
If you are finished with 🥚, 🐣 and 🐥 you can use the 🐔 exercises to push
yourself without getting distracted from the module's main objectives.

0. Asserting

Skills:

[x] 🥚 Predicting Execution: You can use the browser's debugger to step
through your code. Before each step you can make a prediction about what
will happen, after each step you can check your prediction.
[x] 🥚 Assertion Testing: You can write assertion tests to predict what
values will be in your program at a specific step of execution.

Language Features

[x] 🥚 Comments: You can write clear, helpful comments and can explain
different ways comments can be used in a program.
[x] 🥚 Strings: You can write and read string values in a program.
[x] 🥚 let vs. const: You can explain the differences between let
and const including: uninitialized declarations and reassignment.
You can determine when a variable can be assigned with const in a
program.
[x] 🥚 Strict Comparison: You can explain how the === and !==
operators compare strings, and can predict the result of any string
comparison.
[x] 🥚 console.log: You can use console.log to create program traces
in the console, and to print other helpful info for developers.
[x] 🥚 console.assert: You can use the console.assert for assertion
testing, and can write a helpful message assertion message.

1. Primitives and Operators

Skills:

[x] 🥚 Predicting Truthiness: You can predict the truthiness of any
primitive value.
[x] 🐣 Tracing Operators: You can use an operators trace table to
evaluate expressions with more than one operator, and you can check your
work with the [trace] button.

Language Features

[x] 🥚 Primitive Types: You can explain the difference between the 5
main primitive types (string, number, boolean, null,
undefined) and what they are used for in a program.
[x] 🥚 typeof: You can predict the typeof operator's output for
values from any of the 5 main primitive types.
[x] 🥚 Explicit Coercion: You can predict & check the outputs when using
Boolean(), String() and Number() to convert between primitive
types.
[x] 🥚 Truthiness Operators: You can explain how truthiness is used
when evaluating &&, ||, ! and ? :.
[x] 🐣 Short-Circuiting: You can write an example that demonstrates how
short-circuiting works with && and ||.
Implicit Coercion:

[x] 🐣 You can explain what implicit coercion is and how it can cause
problems in your programs.
[x] 🐣 You can explain the rules for implicit coercion in common operators
such as +, ! and >.

[ ] 🐣 Comparisons: You can predict and check the result of any
primitive comparison.
[x] 🐣 Template Literals: You can read and trace multi-line template
literal strings.
[ ] 🐥 Statements vs. Expressions: You can identify if a piece of code
is a statement or an expression.
[x] 🐔 Arithmetic: You can use JavaScript to do math, and can explain or
debug your expressions when they evaluate to something unexpected.

2. Control Flow

Skills:

[ ] 🥚 Imperative Programming: You can define the imperative
programming paradigm and can explain how you know the programs in this
chapter are imperative.
Writing Interactive Programs: For programs that take a string from
users:

[ ] 🥚 Blanks: You can complete a program by filling in the blanks.
[ ] 🐣 Bugs: You can fix bugs in an otherwise complete program.
[ ] 🐣 Goals: You can write the missing portion of a program.
[ ] 🐔 Empty Page: You can develop a program with specific behavior
starting from an empty page.

[ ] 🐥 User Numbers: You can complete, debug and write programs that
cast user input from string to number.
🐥 Stateful Programs: You can step through, debug and complete
programs with an HTML/CSS interface that store user data in a variable
between interactions.
Refactoring Control Flow:

[ ] 🐥 Conditionals: You can refactor between truthiness operators and
if/else statements.
[ ] 🐥 Loops: You can either refactor between all loop types, or
explain when it is not possible (or a good idea).

Language Features: You are comfortable reading and tracing programs that
use ...

[ ] 🥚 Block Scope: You can show how block scope works using code
snippets and your browser's debugger.
[ ] 🥚 Conditionals: You can predict and trace a program's path through
conditional statements.
[ ] 🥚 While Loops: You can predict and trace simple programs that use
while loops.
[ ] 🥚 for-of Strings: You can predict and trace simple programs that
iterate through the characters of a string using for-of.
[ ] 🥚 For Loops: You can explain how a for loops works by refactoring
simple for loops into while loops.
[ ] 🐣 Break: You can predict and trace simple programs that use
break.
[ ] 🐣 Continue: You can predict and trace simple programs that use
continue.

3. Functions

Skills:

[x] 🥚 Tracing: You can use the debugger to predict and check the
execution of small programs that use functions. This includes:
[x] 🥚 Test Cases: You can explain a simple function's behavior using
inputs & outputs.
[x] 🐣 Documenting Functions: You can write a JS Doc comment to describe
a function's behavior, inputs and outputs.

Language Features:

[ ] 🥚 ES6 Arrow Functions:

Defining a Function: You can show where a function is defined in a
program.
Parameters: You can find a function's parameters in it's definition
Return Statement: You can find the return statements in a function's
definition.
Calling a Function: You can show where a function called in a
program
Arguments: You can show the arguments passed to a function call.
Return Value: You can show how a function's return value is used
after the function call.

[ ] 🥚 Default Parameters: You can explain how default parameters work,
and how they help a developer read/understand a function definition.
[ ] 🐣 The Callstack: You can explain and inspect the callstack using
the browser's debugger.
[ ] 🐥 Variables in Functions: You can explain three different ways a
variable in a function can be declared/assigned, and can show this in
the debugger:

Parameters: A parameter is assigned it's value when a function is
called with arguments.
Local Variables: A variable declared in the function's curly braces.
Parent Scope Variables: A variable that was declared outside of the
function but used inside the function (avoid this for now.)

5. Unit Testing

Skills:

[ ] 🥚 Testing Environments: You understand that the conventional
describe/it/expect.toEqual functions are defined by a testing
library and made available as global variables in a testing
environment. They are not part of JavaScript!
[ ] 🥚 File Sub-Extensions: You can identify how a file is used by it
sub-extension: file.__.js. Sub-extensions are a convention for
developers and development tools. They do not change how JavaScript
inside the file works.
[ ] 🥚 Reading Tests: You can read unit tests to understand what a
function is supposed to do.
[ ] 🥚 Stepping Through Tests: You can step through unit tests in the
debugger, stepping over the global testing functions and into the
function you are testing.
[ ] 🐣 Writing Tests: Given a working function, you can write passing
unit tests to describe it's behavior.
[ ] 🐣 Debugging Functions: Given working tests and a function with
small mistakes, you can use the tests as a guide while debugging the
function.
[ ] 🐥 Passing Tests: Given working unit tests and an empty function,
you can write code to pass the tests.

Language Features:

nothing new here!

6. ES Modules

Skills:

[ ] 🥚 Spec Files: You can work with functions and unit tests separated
into two files.
[ ] 🥚 Visualizing Dependencies: You can use the
VSCode Dependency Cruiser extension
and the ?deps lens to visualize the dependencies in a folder.
[ ] 🐣 Refactoring Tests: You can refactor a function and unit tests
from one file to two files: one with the function, one with the unit
tests.

Language Features:

[ ] 🥚 Module Files: Are always in strict mode by default, no more
'use strict'!
[ ] 🥚 Named Exports: You can export a variable and it's value using
export const _ = () => {};
[ ] 🥚 Named Imports: You can import a variable and it's value from
another file using import { _ } from './path/to/file.js';
[ ] 🐥 Module Life-Cycle: You understand that ES Modules are static,
and are evaluated at creation phase.

6. Using Functions

Skills:

[ ] 🥚 Procedural Programming: You can define the procedural
programming paradigm and can explain how you know the programs in this
chapter are procedural.
[ ] 🥚 Using Functions: You can use a pre-written functions in a
program.
[ ] 🐣 Writing Functions: You can write functions that are used in a
program.
[ ] 🐥 Refactoring Functions: You can refactor a function out of a
program and test the function separately.
[ ] 🐔 Reverse-Engineering: You can reverse-engineer an example program
and refactor parts of your program into separate functions.

Language Features:

Nothing new here!

7. Arrays

Skills:

[ ] 🥚 Reference vs. Value: You can explain how arrays are stored in
memory and can demonstrate using examples run in JS Tutor.
[ ] 🥚 Deep vs. Shallow Comparison: You can explain use the concept of
reference vs. value to explain how a deep comparison is different than a
shallow comparison.
Side-Effects: You can ...

[ ] 🥚 Explain what side-effects are with an example.
[ ] 🥚 Avoid side effects when writing your own functions.
[ ] 🐣 Write tests to check if a function has side-effects.
[ ] 🐣 Fix side-effects in buggy functions.

Integrating Arrays: You can work with programs that use arrays to store
user data:

[ ] 🥚 Call: You can call pre-written functions in a program:
[ ] 🐣 Write: You can write functions that are used in a pre-written
program.
[ ] 🐣 Refactor: You can refactor logic from a program into a separate
function. You can avoid side-effects and test your function.
[ ] 🐔 Reverse-Engineer: You can reverse-engineer a program,
refactoring logic to a separate function if necessary.

🐥 Stateful Programs: You can step through, debug and complete
programs with an HTML/CSS interface that store user data in an array between
interactions.

Language Features: You are comfortable reading and tracing programs that
use ...

[ ] 🥚 Array Literals: You can create a new array in your program with
initial values using the array literal syntax:
const arr = ['items'];
🥚 Adding and Removing Items: You can use these methods to add and
remove items in an array:

[ ] arr.push(): Adds a new item to the end of an array.
[ ] arr.pop(): Removes the last item in an array.
[ ] arr.shift(): Adds a new item to the front of an array.
[ ] arr.unshift(): Removes the first item in an array.

🥚 Reading Items: You can read items in an array using:

[ ] arr[i]: Access a specific item in an array using square brackets a
positive index.
[ ] arr.at(i): Access a specific item in an array using .at() and a
positive or negative index.

[ ] 🥚 Updating Items: You can update any item in an array using it's
index, square brackets and assignments: arr[4] = 'hello'.
🥚 Iterating Over Arrays:

[ ] for (const item of arr): You use for-of loops to iterate
forwards through an array.
[ ] for (let i = ...): You can use for loops to iterate forwards and
backwards through an array.

[ ] 🥚 Array.isArray(): You can use Array.isArray() to check if
something is an array: Array.isArray(something)
[ ] 🥚 Spread Syntax: you can use spread syntax to create a shallow
copy of an array: const shallowCopy = [...arr];

8. Functional Array Methods

Skills:

[ ] 🥚 Declarative Programming: You can define the declarative
programming paradigm and can explain how you know that code using
functional array methods is declarative.
🥚 Array Strategies: You can explain these array strategies using a
diagram or drawing:

[ ] Mapping: Modifying each item in an array and putting the results
in a new array.
[ ] Filtering: Creating a new array with only the items from the old
array that match some criteria.
[ ] Every Item: Checking if every item in an array matches some
criteria.
[ ] Some Items: Checking if at least one item in an array matches some
criteria.
[ ] Finding: Finding the first item in an array that matches some
criteria.
[ ] Reducing: Combining all the items in an array to create a single
result.

🐣 Using Callbacks: You can explain what a callback is, and can ...

[ ] Pass a callback into a higher-order function that consumes it.
[ ] Write a callback for a higher-order function to consume.
[ ] Consume callbacks in a higher-order function that you write.
[ ] Decide when to declare callbacks inline, and when to declare them
separately.

[ ] 🐣 Debugging Functional Array Methods: You can step through code
that uses functional array methods in your debugger, and can use the
scopes panel to explain what is happening behind the scenes.

Language Features:

Array Methods: You can read and trace code that uses these array
methods, you can also use them to solve simple coding challenges:

[ ] 🥚 [].every
[ ] 🥚 [].some
[ ] 🐣 [].map
[ ] 🐣 [].filter
[ ] 🐣 [].find
[ ] 🐥 [].reduce

[ ] 🐣 Higher-Order Functions: You can explain what a higher order
function is using a simple example.
[ ] 🐣 Implicit Returns: You understand when a function can be written
with an implicit return and can decide if it makes your code more or
less readable.

9. Objects

Skills:

[ ] 🥚 Avoiding Side Effects: You can read, debug and write functions
that use objects as arguments, without creating side-effects.
🐣 Stateful Programs: You can step through, debug and complete
programs with an HTML/CSS interface that store user data in an object
between interactions.

Language Features:

[ ] 🥚 Object Literals: You can declare a new object with initial
key/value pairs using object literal syntax:
const obj = { a: 1, b: 2 };.
[ ] 🐣 Dots vs. Brackets: You can explain the difference between dot
and bracket access in an object and can decide which one is best in
your code.
[ ] 🐣 For-In Loops:

Week 1
I Need Help With:
My learning process is positively affected when I get explanations in a slow, practical and easy way, I don’t learn by given “a written example” of something. That’s why I prefer watching YouTube tutorials or any other interactive material. Finding answers by myself at this stage (on the internet) is really difficult, either I get more confused or I don’t understand anything.
What went well?

I understand the main objective of console.assert
I feel a little bit more confident with the use of the ‘debugger’
I can make a small basic program that returns the value of an object in an array
I know by heart the structure of a basic function

What went less well?

I think that nested functions is something confusing at this point, I need an example using apples and tomatoes to understand better

Lessons Learned

JavaScript is not easy, the hardest I study the better. I might have to check on some logic exercises online that can help me to stimulate my brain

Sunday Prep Work

Finishing the exercises in study lenses and practicing with small programs to keep training my logic

My learning process is positively affected when I get explanations in a slow, practical and easy way, I don’t learn by given “a written example” of something. That’s why I prefer watching YouTube tutorials or any other interactive material.

Watching other tutorials or interactive materials is great!  the exercises in the repository are meant for practicing, they're not supposed to be the explanation that works for everyone.
Either way you should continue to practice learning from example code.  As a developer you will spend much more time reading code than writing it, so the more you practice learning from examples now the easier it will be when you need to read full applications written by someone else. (which is unavoidable, companies don't have video tutorials explaining how their code bases work)
That said, what could we make that might help you?  more guide videos maybe?

Finding answers by myself at this stage (on the internet) is really difficult, either I get more confused or I don’t understand anything

Searching the internet is much harder than people say it is. "Just google it" ignores a lot of the hidden skills it takes to filter through all the pages and find the answers you need.  Maybe you could also ask questions about searching in the Need Help channel?

I think that nested functions is something confusing at this point, I need an example using apples and tomatoes to understand better

You don't need to understand nested functions at this point.  the CallStack examples were just to help you explore the debugger and visualize the CallStack, you won't need to write nested functions any time soon.

Week 2
I Need Help With:
This has been a very challenging module for me. I think I need to have a better understanding of the basic JavaScript syntaxes and concepts before jumping to functions and more advanced stuff. The current exercises in Study Lenses are beyond "basic" and console.assert is making them even harder to understand. I know we have had enough time to study and master the basis but I still need to fill some gaps in my brain. Explanations are sometimes too advanced also.
What went well?

I am able to create an array with a lot of objects inside and recall them later.
I can push new objects and remove them from an array using push and unshift.
I can explain why x = ["a", "b", "c"] is not the same as y = ["a", "b", "c"]

What went less well?

Passing arrays as functions is super difficult. I need more examples please.

Lessons Learned

I know what an array is and why do we need them in our code.
I can manipulate arrays with unshift, shift, push, and pop

Sunday Prep Work

I will keep watching YouTube tutorials an try to understand the exercises in study lenses.

Passing arrays as functions is super difficult. I need more examples please.

can you explain what you mean with this?

yes that is what I mean @danielhalasz
passing an array into a function

ok, let's see.
const myArray = [1999, "Caracas", "music"];

can you predict what is the outcome of this?

I think the console will be printing "Caracas" as this object occupies the position #1 in the array? No? 🤔

of course you can, but the purpose of functions is that they are reusable..
and there can be much more complex stuff within its scope..this was just the simplest example..
also, arrays can be much bigger are more complex.

I think the console will be printing "Caracas" as this object occupies the position #1 in the array? No? 🤔

yes, it is "Caracas", but to be precise, it actually occupies index 1 (which is position 2)

oh, index 1, got it, for me it's more than clear now, I wanted this explanation!!! Thank you Daniel.

for a more complex example, you can think about an array or object that contains for example data about a user profile.. and then a function that does something with a certain element inside that.. and then each time you need, you can call that function on a different user's profile data, let's say..

let's say based on the address, calculating how far it is..or whatever :)

like a group of workers in a company with their available vacation days so, the function will check how many days they have, and show the names and tell if they can already go on Hollidays?

yep

Week 3
I Need Help With:

I consider that this week was productive, I have been doing a lot of research on the Internet about arrays and iterations and now I have a clear concept of them; I might need a few more buttons to practice the while loop and the switch statement if necessary.
I understand that an arrow function is a compact alternative to a traditional function, however; the structure is really confusing, and personally, I think it is easier reading the traditional ones.

What went well?

I understand what an array is and how to declare it empty and how to push items later (like a shopping basket).
I learnt that the push function does not only pushes strings or numbers inside an array but also the value of a variable.
I can create a function from scratch and call it.

What went less well?

I struggled for a whole day trying to solve the remove numbers exercise, tried all the possible logic inside my brain but was unable to find a solution until one of my colleagues @Haneefa-Shaik explained to me what needed to be done.
It confuses me using external functions (import and export from...). Therefore, I am currently solving the exercises again but this time without using any libraries, all the code in the same JS file.

Lessons Learned

I am more confident with arrays and functions in general.
I can incorporate a for loop inside a function and link my DOM to JS.

Sunday Prep Work-

I will continue to play with functions and stimulate my logic as much as I can.

the while loop and the switch statement if necessary.

you can if you like them, but as mentioned, you can also completely avoid them in your projects..as Louis said too..just good to know they exist..

an arrow function is a compact alternative to a traditional function

well again, good to know to read both, they arrow functions are the newer standard..and they remind us that functions are variables too
const myFunction = (number1, number2) => {
     let sum = number1 + number2 ;
     return sum;
};
console.log(myFunction(2, 3));

Therefore, I am currently solving the exercises again but this time without using any libraries, all the code in the same JS file.

yes, this can be good practice, to first do it in one file, then later separate them..

Week 4
I Need Help With:

I have problems understanding things when they are explained in a fast way. Last week's lesson was hard to follow. I would prefer to have someone who explains like: Ok students, let's create a function following these steps: number 1, let's declare a variable, number 2, let's write a statement, number 3, let's create the loop, etc. instead of switching between topics, tabs, and windows and not being able to follow what they are doing. It would be nicer if the topics were explained in the most basic possible manner and, in a tutorial approach.

I sometimes have difficulties finding logic in the exercises, they are logical but I think and re-think again to find a correlation. It's not an easy task to link functions with other functions.

What went well?

I understand the difference between for ... in and for ... of. While the first one loops property names of an object, the second one iterates in arrays.
I have a clear idea of what parameters and arguments are.
I went back to previous topics and practiced the parseInt function and created a small addition program.

What went less well?

I believe that my logic is not working in the exercises given lately. More videos like this one will help me: adding numbers by Evan

Lessons Learned

I am more confident with arrays and functions in general.
I can incorporate a for loop inside a function and link my DOM to JS.
I am writing the new ES6 arrow function structure in a notebook so that I can learn it by heart.

Sunday Prep-Work

I will do a quick review of previous topics to refresh my memory.

I have problems understanding things when they are explained in a fast way. Last week's lesson was hard to follow. I would prefer to have someone who explains like: Ok students, let's create a function following these steps: number 1, let's declare a variable, number 2, let's write a statement, number 3, let's create the loop, etc. instead of switching between topics, tabs, and windows and not being able to follow what they are doing. It would be nicer if the topics were explained in the most basic possible manner and, in a tutorial approach.

yes, the first part was quick, but it was just a review of homework, that all of you were supposed to do before and it was already taking time from the class. this is why we have Discord, so if there are questions during the week about an assignment, the coaches can reply, or even have an extra Zoom session. Plus, you can rewatch the video :)

I sometimes have difficulties finding logic in the exercises, they are logical but I think and re-think again to find a correlation. It's not an easy task to link functions with other functions.

would more detailed description in the readmes and more comments in the files help?

I believe that my logic is not working in the exercises given lately.

can you post some code in Discord of the specific code in question?


Estimate max number of allowed inputs in coin selection

Context
We currently use a hard-coded limit of 10 inputs for a single transaction. This is pretty far from what reality allows.
https://github.com/input-output-hk/cardano-wallet/blob/eccc130290f71a18b471f2e16a31614b3cddc2d4/lib/core/src/Cardano/Wallet/Api/Server.hs#L363-L364
When working on benchmarking, we've already explored a bit the true limitation of the system, although based on a transaction max size known a priori (8kb):
https://github.com/input-output-hk/cardano-wallet/blob/master/lib/core/test/bench/db/Main.hs#L183-L229
Decision
How many inputs are we allowed to select is a tricky question to answer in practice because not all inputs are born equals! One inputs may increase the transaction's size more than another one (and vice-versa) because of the impact it has on change.
Therefore, a simpler strategy to adopt would be to:

Figure out the "theoretical" maximum number of inputs, from a given maximum transaction's size (irrespective of the number of outputs), for a given backend target (this depends on the transaction's binary format)
Run the coin selection using this number
After constructing a transaction, control that its size doesn't exceed the maximum transaction size.

This would be fairly resilient in practice and be a real best-effort at constructing transactions with the downside of sometimes wasting computing power in making selection for transactions that will require too many inputs already.
Acceptance Criteria

For each binary format / backend target, we must compute a theoretical maximum number of inputs from a given transaction's max size (https://github.com/input-output-hk/cardano-wallet/blob/master/lib/core/test/bench/db/Main.hs#L183-L229 is a good starting point).

TransactionLayer for http-bridge must be extended with a function:
estimateMaxNumberOfInputs
    :: Quantity "byte" Word16
    -- ^ Transaction max size in bytes
    -> Word8
    -- ^ Maximum number of inputs, estimated

TransactionLayer for jormungandr must be extended with a similar function.

Both implementation must include extensive comments about where the results come from and what hypotheses or simplifications were made.

Development Plan

[ ] Properties for the estimateMaxNumberOfInputs function.

PR

Number
Base

#?
master

QA

Should the estimate be a max bound? That is, if there were coin selection with maxNumInputs + 1, then the encoded tx would exceed the max size.
About the estimation strategy. "Control that its size doesn't exceed the maximum transaction size" -- what does that mean? Does it mean to repeatedly run coin selection with lower maxNumInputs until the transaction size is below the max?
Should this estimation function use the network backend Binary modules to calculate exact transaction sizes?

@rvl

It should be as close as possible to a realistic max bound, using what we know of how the CS algorithm work (for instance, there's at least one input per output). And it's preferable for this limit to be slightly more permissive than the opposite. We may indeed sometimes end up with transaction that are slightly too big (cf answer to your second question).

No, it means that we run it once, if it fails we reject the transaction because it's too big. Incidentally, if the fallback (largest first) yield a transaction that is too big, there's no point retrying with less inputs because we can't yield a better selection anyway. In practice we could fix the max number of inputs to an arbitrary big value and always measure the actual size afterwards. We try to make this upper bound smaller to avoid wasting computational time on tx we know would already be too big.

Yes.

Moving this back to In Progress since we aren't using the corresponding functions in the wallet layer at the moment:
https://github.com/input-output-hk/cardano-wallet/blob/39050fd491e36ca0c40e5519fcb5e402d44b0bc3/lib/core/src/Cardano/Wallet.hs#L624-L629
I'll add a bullet point to the ticket and make sure it's used.

@rvl I've also extended the QA section with links. The idea is really to make the work easy for @piotr-iohk and avoid having him figuring out where to look for the tests. We're starting to have a rather big codebase, with tests spread across many modules, and even though there are some naming convention, it's always good to point at the information you want to highlight :+1:

I thought the corresponding wallet layer functions would be implemented in another ticket. There is nothing in the AC about it.

lgtm :+1:
Sort of related tests are in #533.


Watch: Wait for first compilation to succeed

Hi,
I found this through your link in https://github.com/Microsoft/TypeScript/issues/3469#issuecomment-348162840
what would be super useful in TypeScript watch scenarios, would be to wait for watch to complete the first compile before starting on the next (possibly parent) file.
As tsc does not clean up the outDir, all our watch commands are prefixes with a command to delete the output directory, such that we start from a clean base and would get compile errors immediately if some packages imports a file which source (TS) no longer exists.
And if a watch exists on a linked project which output dir is removed, tsc gets irrevocably broken.
Therefore it would be a great help if watchs could be started in sequence.
Not sure how TypeScript specific/helpful you would like to make this project, just an idea for now.

It just occurred to me, that we might be able to work around removing the output dir while some tsc instances are already watching it, by doing it before starting the individual watch compilations.
I will try your tool with our setup later to investigate this. But unless it does something special to wait, I would expect the some initial watch invocation to fail.
But they might be eventually converge into a stable whole?

I'd imagine I'd have a "clean-and-watch" workspace level command that does:
{
  "clean-and-watch": "wsrun clean && wsrun build --stages && wsrun watch-without-clean"
}

then you can yarn run clean-and-watch
Slower than a normal watch, but should work.
In terms of how to do this without slowing down, I suppose it could have pluggable "criteria" for when a process is actually done - something like --doneCriteria "Compilation complete.+watching"

@spion Thanks, that's actually a clever order to run things, works great :)
Also works nicely with lerna (lerna run clean && lerna run build && lerna run --parallel watch-only), though I am looking forward to try the wsrun [<package>] option in order to not build packages that are not needed for the task at hand.
So my immediate problem is solved, but since now at least 3 people seem interested in such a doneCriteria flag I will keep this open for now.


Error: Error at ~/Projects/material-motion-js/packages/streams/src/observables/IndefiniteSubject.ts:89:3: A computed property name in a class property declaration must directly refer to a built-in symbol.
Error at ~/Projects/material-motion-js/packages/streams/src/observables/MotionObservable.ts:91:7: Argument of type '(value: number, dispatch: NextChannel<number>) => void' is not assignable to parameter of type 'NextOperation<T, number>'.
  Types of parameters 'value' and 'value' are incompatible.
    Type 'T' is not assignable to type 'number'.
Error at ~/Projects/material-motion-js/packages/streams/src/properties/ReactiveProperty.ts:23:3: Module '"~/Projects/material-motion-js/packages/streams/src/types"' has no exported member 'ObserverOrNext'.
Error at ~/Projects/material-motion-js/packages/streams/src/types.ts:65:8: Parameter 'T' implicitly has an 'any' type.
Error at src/interactions/Draggable.ts:30:7: Cannot find name 'InputKind'.
Error at src/interactions/Draggable.ts:38:27: Property 'translated' does not exist on type 'MotionObservable<Point2D>'.
Error at src/interactions/index.ts:18:10: Module '"src/interactions/Draggable"' has no exported member 'default'.
    at Runner.run (~/Projects/material-motion-js/node_modules/tslint/lib/runner.js:92:27)
    at Object.<anonymous> (~/Projects/material-motion-js/node_modules/tslint/lib/tslint-cli.js:139:6)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (~/Projects/material-motion-js/node_modules/tslint/bin/tslint:3:1)
error Command failed with exit code 1.

Expected behavior
All errors are formatted with the appropriate formatter and saved to the file at --out.

@appsforartists would you mind trying this again with the latest tslint?

For me this is still an issue with<EMAIL_ADDRESS>

@adidahiya more info has been provided, it's not working with the newest version. I can remove --type-check from my command and immediately get formatted results.
node ./node_modules/tslint/bin/tslint -c ./tslint.json -p ./tsconfig.json -t stylish --type-check $@ || exit 1
vs
node ./node_modules/tslint/bin/tslint -c ./tslint.json -p ./tsconfig.json -t stylish $@ || exit 1
I also tried with multiple formatters and type-check seems to break them all.

Closing since --type-check is no longer necessary and is now deprecated.


Invoke ShellExecute on dism.exe for enabling Windows Features

Changes:

All calls to dismApi have been replaced with invoking ShellExecute on the Dism.exe. This is because the DismAPI has issues when being used in packaged context. The behavior of enabling Windows Features has been kept the same and all relevant tests have been updated.

Microsoft Reviewers: Open in CodeFlow

I disabled the tests InstallWithWindowsFeatureDependency_FeatureNotFound and InstallWithWindowsFeatureDependency_Force, as they were failing for the reason you are making this change.  Apparently there is some difference between the activation paths.
Please re-enable them in your branch.


[devel] sesman: Prevent the use of 'alternate shell'

By setting the new config value 'AllowAlternateShell' to 'no' it is now possible to prevent the use of an alternate shell, which can be set by the connecting user.
The default remains unchanged and any shell is allowed if the config value is not specified. It can also be set explicitly to 'yes' to achieve the same outcome.
Fixes: #850

Port of #2634 from the v0.9 stream


Travis-CI fails on Python3.5 because of portalocker

A Travis-CI build failed because the newest version of portalocker uses type hints via variable annotations which is available only in Python 3.6+.
We can either drop Python 3.5 support or try to install older portalocker if Python==3.5.

Why do we need portalocker by the way @mjpost ? I checked TF and Torch's download utility functions and none of them implement locking.

#31 is why we need portalocker. I'm open to alternatives, but I do think it's important we have it.

Ohh, quite edgy stuff : p


Deprecate and remove dart native extensions

Tracking issue for Deprecate and remove dart native extensions, see  #45451 for more detail

@srawlins please reassign if someone else is handling this

What is a native extension?

OK I've looked at the referenced issue. I'll reassign when we decide who will cover this.

In-lined from the parent issue:

In Dart 2.14 issue a deprecation warning whenever analyzer or CFE see dart-ext: import.
In Dart 2.15 remove support for dart-ext: imports and hide Dart VM C API symbols from standalone dart binary shipped with SDK


Rename info MessageInfo to auth MessageAuth

In cosmwasm_std, rename info MessageInfo to auth MessageAuth.
I have been using info everywhere and it is quite generic. I noticed that both the sender as well as the sent_funds were being used to authorize someone for an action (either the address or the payment is used as a key).
API breaking

This breaks the Rust API in the contract code must be updated.
This does NOT break the Wasm API, as the same bytes are passed to the contract.

I think the real issue we have here is that we reuse the term "message" for the inner JSON in the Cosmos SDK message:
type MsgExecuteContract struct {
  Sender    sdk.AccAddress  `json:"sender" yaml:"sender"`          // "message info", referring to the inner message
  Contract  sdk.AccAddress  `json:"contract" yaml:"contract"`      // stripped off
  Msg       json.RawMessage `json:"msg" yaml:"msg"`                // contract defined "message"
  SentFunds sdk.Coins       `json:"sent_funds" yaml:"sent_funds"`  // "message info", referring to the inner message
}

What about renaming the inner to payload? We then have multiple options organizing the data in the contract

Passing the whole message to the contract, with a statically typed sender and sent_funds and a contract specific payload type
Pass payload, sender, sent_funds as two or three arguments (sender, sent_funds can be grouped to Message)
Move fields to env.message.sender/env.message.sent_funds. However, then env does not work for query anymore.
Create a message API in order to query the fields on demand. This is a bit harder to implement but saves serde cost in many cases. Would work for env as well.

Pass payload, sender, sent_funds as two or three arguments (sender, sent_funds can be grouped to Message)

I think this second case is what we have now and what I would like to rename. MessageInfo -> MessageAuth and we can rename the msg argument to payload for clarity (this is a decision of each contract, but can do in the examples)

Move fields to env.message.sender/env.message.sent_funds. However, then env does not work for query anymore.

Yup, this is why Env and MessageInfo/MessageAuth are to be kept separate

Create a message API in order to query the fields on demand. This is a bit harder to implement but saves serde cost in many cases. Would work for env as well.

I think this would be great for Env. I will open a new issue for that.

Pass payload, sender, sent_funds as two or three arguments (sender, sent_funds can be grouped to Message)

I think this second case is what we have now and what I would like to rename. MessageInfo -> MessageAuth and we can rename the msg argument to payload for clarity (this is a decision of each contract, but can do in the examples)

Move fields to env.message.sender/env.message.sent_funds. However, then env does not work for query anymore.

Yup, this is why Env and MessageInfo/MessageAuth are to be kept separate

Create a message API in order to query the fields on demand. This is a bit harder to implement but saves serde cost in many cases. Would work for env as well.

I think this would be great for Env. I will open a new issue for that.

I thought to do the same a #688 with MessageInfo and create a MessageAuth or Auth trait that can be implemented by a simple struct in tests, and by multiple exports in the VM. Then I realized that it contains Vec<Coin> which is a non-primitive type (not number nor string) and would need JSON parsing in any case. So, let's just leave info: MessageInfo as a concrete struct and discuss it's naming.

I thought to do the same a #688 with MessageInfo and create a MessageAuth or Auth trait that can be implemented by a simple struct in tests, and by multiple exports in the VM. Then I realized that it contains Vec<Coin> which is a non-primitive type (not number nor string) and would need JSON parsing in any case. So, let's just leave info: MessageInfo as a concrete struct and discuss it's naming.

and would need JSON parsing in any case

The main difference is that a call out only creates work when used. The MessageInfo is processed even if unused.

and would need JSON parsing in any case

The main difference is that a call out only creates work when used. The MessageInfo is processed even if unused.

If MessageInfo is only passed in handle and init, it is used 95% of the cases.
We always need to check the caller. And the cases where we do not check the sent funds, we really should probably error if any funds are send (like Ethereum's non-payable)

If MessageInfo is only passed in handle and init, it is used 95% of the cases.
We always need to check the caller. And the cases where we do not check the sent funds, we really should probably error if any funds are send (like Ethereum's non-payable)

I would like to just do the rename. Definitely not fold it in with Env.
If you like #688 and want to do something similar for MessageInfo, I am open to it, but not fully sure of the benefit it brings.

I would like to just do the rename. Definitely not fold it in with Env.
If you like #688 and want to do something similar for MessageInfo, I am open to it, but not fully sure of the benefit it brings.

I would like to just do the rename.

Yeah, I can see that. I just don't think "auth" is any better than "info" since there can be a million reasons to send funds that have nothing to do with authentication.

I would like to just do the rename.

Yeah, I can see that. I just don't think "auth" is any better than "info" since there can be a million reasons to send funds that have nothing to do with authentication.

No one else has complained about the name. So, "If it ain't broke, don't fix it!".

I think the big issue is that we need the grouping at all. In MsgExecuteContract there are 3 flat fields that are passed to the execution: (sender, funds, msg). Pulling out two ouf those three is hard. We used "meta" before, now "info", maybe "auth". But none of them is great. We can't properly give this groups a name and I think the group should not exist in the first place.
In Ethereum/Solidity you access the same 3 fields (data, sender, value) at one level:

So if we are sure we don't need more, we could just roll them out as 3 args. Or have a
struct Message<P> {
    sender: HumanAddress;
    funds: Vec<Coin>,
    // Contract defined payload
    payload: P,
}

What both solutions have in common is they don't need a new name for 2 out of those 3.


get count

I cherry picked the Count and AutoPlan changes with a couple adjustments to the documentation.  I'd love to have support for writing TAP output to a file.  Please submit a separate pull request for that one, based on my comments above.
Thanks @tahmmee

Thanks, yea I don't actually want to merge everything - just the Count would be nice...I soon realized I wanted stdout - but I may rethink that.

+1 Fnew(w io.Writer)
or returning strings for external writers to use instead of directly doing the Printf


One bug fix and two minor improvements

Found a bug in rebar_mix_hook when construcing the EbinDirsString. I also found some minor improvements, one is making use of an otherwise unused macro and the second is a small optimization when building the full path to the ebin dirs.

Thanks!


Complie error code -536852669

I try to build a chat project. The error occuried.
C:\Users\hqfy.nuget\packages\microsoft.dotnet.ilcompiler\1.0.0-alpha-27416-01\build\Microsoft.NETCore.Native.targets(235,5): error MSB3073: 命令“"C:\Users\hqfy.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\1.0.0-alpha-27416-01\tools\ilc" @"obj\debug\netcoreapp2.0\win-x64\native\ChatServer.ilc.rsp"”已退出，代码为 -536852669。 [D:\guiltydomain\guiltydomain_netcore\Server\Chat\Chat_dotnet.csproj]

Would it be possible to share the project that hits the error with us?

I created a new project,and added dependency project one by one.
It had an error below:
MSBUILD : error MSB1025: 运行 MSBuild 时发生内部错误。
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Go7(RegexRunner )
at System.Text.RegularExpressions.CompiledRegexRunner.Go()
at System.Text.RegularExpressions.RegexRunner.Scan(Regex regex, String text, Int32 textbeg, Int32 textend, Int32 textstart, Int32 prevlen, Boolean quick, TimeSpan timeout)
at System.Text.RegularExpressions.Regex.Run(Boolean quick, Int32 prevlen, String input, Int32 beginning, Int32 length, Int32 startat)
at System.Text.RegularExpressions.Regex.Match(String input, Int32 startat)
at System.Text.RegularExpressions.Regex.Match(String input)
at Microsoft.Build.Shared.CanonicalError.Parse(String message)
at Microsoft.Build.Utilities.TaskLoggingHelper.LogMessageFromText(String lineOfText, MessageImportance messageImportance)
at Microsoft.Build.Tasks.Exec.LogEventsFromTextOutput(String singleLine, MessageImportance messageImportance)
at Microsoft.Build.Utilities.ToolTask.LogMessagesFromStandardErrorOrOutput(Queue dataQueue, ManualResetEvent dataAvailableSignal, MessageImportance messageImportance, StandardOutputOrErrorQueueType queueType)
at Microsoft.Build.Utilities.ToolTask.HandleToolNotifications(Process proc)
at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
at Microsoft.Build.Tasks.Exec.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
at Microsoft.Build.Utilities.ToolTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
at Microsoft.Build.BackEnd.TaskBuilder.InitializeAndExecuteTask(TaskLoggingContext taskLoggingContext, ItemBucket bucket, IDictionary2 taskIdentityParameters, TaskHost taskHost, TaskExecutionMode howToExecuteTask)    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteBucket(TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Dictionary2 lookupHash)
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteTask(TaskExecutionMode mode, Lookup lookup)
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteTask(TargetLoggingContext loggingContext, BuildRequestEntry requestEntry, ITargetBuilderCallback targetBuilderCallback, ProjectTargetInstanceChild taskInstance, TaskExecutionMode mode, Lookup inferLookup, Lookup executeLookup, CancellationToken cancellationToken)
at Microsoft.Build.BackEnd.TargetEntry.ProcessBucket(ITaskBuilder taskBuilder, TargetLoggingContext targetLoggingContext, TaskExecutionMode mode, Lookup lookupForInference, Lookup lookupForExecution)
at Microsoft.Build.BackEnd.TargetEntry.ExecuteTarget(ITaskBuilder taskBuilder, BuildRequestEntry requestEntry, ProjectLoggingContext projectLoggingContext, CancellationToken cancellationToken)
at Microsoft.Build.BackEnd.TargetBuilder.ProcessTargetStack(ITaskBuilder taskBuilder)
at Microsoft.Build.BackEnd.TargetBuilder.BuildTargets(ProjectLoggingContext loggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, String[] targetNames, Lookup baseLookup, CancellationToken cancellationToken)
at Microsoft.Build.BackEnd.RequestBuilder.BuildProject()
at Microsoft.Build.BackEnd.RequestBuilder.BuildAndReport()
at Microsoft.Build.BackEnd.RequestBuilder.RequestThreadProc(Boolean setThreadParameters)
MSBUILD : error MSB1025: 运行 MSBuild 时发生内部错误。
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary2 globalProperties, Dictionary2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, Boolean detailedSummary, ISet1 warningsAsErrors, ISet1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
Unhandled Exception: OutOfMemoryException.
Compuer : win10 16G

error like this occured
Can you give me a e-mail, I will send the project to you

this error occured

My e-mail is at my github home page.

Ok, I have sent the code. Thanks for help

@jkotas  Have you received mail from<EMAIL_ADDRESS>Is it necessary to send mail  again?

Yes, I received the email. Thanks! I did not have a chance to take a look yet.

Ok, If there is anything I can do for you just tell me

This is problem with infinite generic expansion.

The public void Recycle(IPoolAllocatedObject<T> t) method on ObjectPool<T> calls IActionQueue.QueueAction<IPoolAllocatedObject<T>>(...).
This causes the compiler to compile all possible implementations of IActionQueue.QueueAction. The method is generic and the compiler cannot tell which implementation is actually going to be used, so it compiles all of them.
One of these implementations is GameFramework.ServerAsyncActionProcessor.QueueAction<T> that ends up referencing in ObjectPool<IPoolAllocatedObject<T>> and the recursion repeats.

Eventually, the compiler will crash will out of memory as it is trying to create more and more generic types that look like this:
GameFramework.ObjectPool1<GameFramework.PoolAllocatedAction1<GameFramework.IPoolAllocatedObject1<GameFramework.PoolAllocatedAction1<GameFramework.IPoolAllocatedObject1<GameFramework.PoolAllocatedAction1<GameFramework.IPoolAllocatedObject1<GameFramework.PoolAllocatedAction1<GameFramework.IPoolAllocatedObject1<GameFramework.PoolAllocatedAction1<...
This is duplicate of #363

The generic virtual interface methods tend to be unfriendly to AOT compilation (both full AOT compilation like CoreRT and partial AOT compilation like crossgen/NGen). Also, their runtime performance is not good because of their invocation is relatively slow. It is best to avoid them for these reasons.

Hope this helped. Closing as dup of #363. Thank you for sharing the repro.

Thanks. We will try to avoid this issue


Bobcat 2.0: documentation refresh

It's time to properly handle the documentation :). This is a summary ticket for all tasks related to the docs update.

[ ] migrate whatever is worth and still true from the wiki to our docs site
[ ] document the new functionality related to interfaces handling
[ ] document the setup with various cloud providers, e.g. SauceLabs, Crossbrowsertesting, etc. (#69)
[ ] running tests in parallel (#218)
[ ] document how to run tests on CI servers, e.g. Jenkins, Bamboo, etc. (#258)
[ ] review the existing codebase regarding and update or add JavaDocs on the whole public API

JavaDocs:

[ ] Junit 5
[ ] bb-aem-core
[ ] bb-aem64


Gamepad controls improvements (analog input)

What do you think about implementing an alternative analog input scheme for the gamepad (make both classic and alternative available via a switch)? The original seems to be using digital input even if dualshock is used.
RT (R2) = analog accelerate
LT (L2) = analog reverse
Left stick = analog steer
Right stick = control camera, either original R2, L2, R2+L2 mapped to left, right, down, or gta-sa style free camera
Also it seems the original game doesn't allow both dpad and left stick to be used simultaneously.
Emulated version chooses input type depending on the gamepad type (digital/dualshock)
Port uses a weird scheme where dpad works until any stick is touched, then dpad can't steer anymore. That's confusing at the very least.
My gamepad input is going through x360ce, everything mapped correctly, in case if it's important.

In addition to this, I would personally hope to see if it's possible to reintroduce something that was in the original Driver but inexplicably missing from the sequel: an option to toggle the Automatic Handbrake off. For me, it always triggers at all the wrong times and it makes driving with any semblance of full control a throw of the dice, since at any moment you could just instantly be facing backwards when you were only trying to avoid oncoming traffic.

hi mate,  could you help?, in redriver2 whenever i connect my ps2 controller, the  camera goes revers, like pressing L2 AND R2, any solution?

hi mate,  could you help?, in redriver2 whenever i connect my ps2 controller, the  camera goes revers, like pressing L2 AND R2, any solution?

@DCxDemo controller bindings now can be reassigned.