CircleTransformation with border

I am pretty sure you have support for a border with CircleTransformation, but how do you set this up in XAML? I cannot figure this out. Please assist.

Just use something like:
<fftransformations:SomeTransformation>
    <x:Arguments>
      <x:String>
        stringConstructorValue
      </x:String>
    </x:Arguments>
</fftransformations:SomeTransformation>

or
make a custom class which inherits from transformation:
public class MyTransformation : SomeTransformation
{
  public MyTransformation() : base("someParameter")
  {
  }
}

then use it in XAML as: <local:MyTransformation/>

Hmm it isnt working for CircleTransformation. Here is my XAML:
<ffImage:CachedImage.Transformations>
          <fftransformations:CircleTransformation>
            <x:Arguments>
              <x:Double>2</x:Double>
              <x:String>#FF8A07</x:String>
            </x:Arguments>
          </fftransformations:CircleTransformation>

I dont see any errors when debugging. I even see this in my debug messages:
05-07 18:35:15.802 D/ReuseBitmapDrawableCache( 1246): OnEntryAdded(key = https://www.someurl.com/83.jpeg;CircleTransformation,borderSize=2,borderHexColor=#FF8A07)

That's strange, it should work. As you see FFImageLoading is using correct transformation (CircleTransformation,borderSize=2,borderHexColor=#FF8A07). Do you have any reproduction?

Sorry, I'm not sure I follow what you mean with your question -- Are you sure you changed image source after you set Transformations?
I am new to your library so maybe I missed something I was supposed to do. All I do is bind my Source property to what I have in my ViewModel and then also in my XAML I have what I gave you above for the CircleTransformation. I see the Circle Image but just no border. I am using your Alpha-2 version if that helps.

@TravyDale If you set CachedImage.Source property first then set CachedImage.Transformations the image will be without transformations. You have to set CachedImage.Transformation property first, then set CachedImage.Source property.

How would I do this via XAML then? My property in my ViewModel doesnt get set until my 'NavigatedTo' method is called. I'd think that would re-set my Source proprety when the RaisePropertyChanged is fired. I am assuming the Transformation is already set at that point. Especially since I am seeing the debug message trying to use the borderSize and borderHexColor.

Yes, I see from logs that transformation is set correctly (https://www.someurl.com/83.jpeg;CircleTransformation,borderSize=2,borderHexColor=#FF8A07), so it should be working fine. I would uninstall all nugets and re-add them, don't forget about Transformations package. If it won't work disable assembly linking in project settings.

RC2 seems to have fixed it. Thanks!


Does this not support Redis autocomplete?

Does this not support Redis autocomplete? I tried Cache, it can autocomplete, but not for Redis.

Gotta give us more info: what kind of autocompletion do you want? Both Redis and Predis are visible within Laravel app, in PhpStorm 10 (due to a Metadata-file related bug, this package can't shine in PS 2016 for the moment, until Jetbrains fixes the issue). I just tested, they work fine, if you have imported them correctly.

For example, when I type Cache::, it will show :

While when I type Redis:: there is no tips:

Nope. Check your namespacing. It should be \Redis if you are namespacing:

@shehi It does not work:

Does the Redis class exist in the generate ide_helper file?

@barryvdh No, I searched for it, but find nothing.

And does the Predis\Client class exists?
See this check here: https://github.com/barryvdh/laravel-ide-helper/blob/e97ed532f09e290b91ff7713b785ed7ab11d0812/src/Generator.php#L188-L191
Does removing that check help?

@barryvdh No, that file does not contain anything about [Redis] or [Predis]

No I meant in your own application. See the referenced lines.

If I remove that line, it will return
[Symfony\Component\Debug\Exception\FatalThrowableError]
  Fatal error: Class 'Predis\Client' not found

Try Invalidating your PhpStorm cache and reindexing.

You are not using IDEA IntelliJ with PHP plugins, are you?

@shehi  Do you mean this?

I'm using phpStorm 2106.1

Okkk, please don't :) Revert back to 10.x as we have standing bug in 2016.*. See #340 . I'd say close this task until it's fixed, but I will let @barryvdh decide that.

But can you use the Redis class at all then? Don't you need the Predis Client installed to be able to use that?
That is why the check is there.

https://laravel.com/docs/5.2/redis

Before using Redis with Laravel, you will need to install the predis/predis package (~1.0) via Composer.

Just to be 100% sure, you did required the predis package?

@barryvdh @shehi Sorry for that, I just missed to install predis/predis. Thanks for helping me.

as  @dvikas said it's work for me.
i change use Illuminate\Support\Facades\Redis;  to use Redis;
thanks for your help @dvikas


Design a Favicon

Favicon Required for Website
HEX Code #0094ff

Point to be noted:
Kindly make Pull Request in DEVELOP Branch

Point to be noted:
Kindly make Pull Request in DEVELOP Branch


When you click the wallet icon for the faucet it just spins

Something happened to the wallets or the provider is wrong here?

https://github.com/austintgriffith/scaffold-eth/pull/271


glsl compile error with GLSL ES 3.00

Describe the bug
I think it's a glsl code compile bug. Support for GLSL ES 3.00 is not very good.
To Reproduce
The source code of frag shader:
precision highp float;

in vec4 vColor;
in vec2 vPosition;
out vec4 fragColor;

void main () {
  float A = -dot(vPosition, vPosition);
  if (A < -4.0) discard;
  float B = exp(A) * vColor.a;
  fragColor = vec4(B * vColor.rgb, B);
}

The ShaderFactory.convertTo300 method converts the code to:
  #version 300 es
  #define GRAPHICS_API_WEBGL2
....

 precision highp float;

 in vec4 vColor;
 in vec2 vPosition;
 out vec4 fragColor;

 // This line is NOT I expect:
 out vec4 glFragColor;

 void main() {
   float A = -dot(vPosition, vPosition);
   if (A < -4.0) discard;
   float B = exp(A) * vColor.a;
   fragColor = vec4(B * vColor.rgb, B);
 }

Screenshots

Expected behavior

Keep the GLSL ES 3.00 code unchanged. OR
Covert to a lower version can compile.

Perhaps giving the user the option to choose would be a wise decision.

PS: String replacement is an unsafe approach for handling GLSL syntax. But I have no idea if there's a better approach to solve the problem.

current compile workflow:

will case some problom:

glsl300 -> webgl1.0 will cause error
glsl300 -> webgl2.0 will cause error in some grammar

maybe the final solution?

@zhuxudong @Sway007 I think WebGPU should also be taken into consideration. This is the way to ensure that our architecture is future-proof.
flowchart LR
shaderLab --> AST{AST Compile};
AST --WebGL2--> GLSL300;
AST --WebGL1--> GLSL100;
AST --WebGPU--> WGSL;

@zhuxudong For now, you just need to apply a quick patch.

@zhuxudong @Sway007 I think WebGPU should also be taken into consideration. This is the way to ensure that our architecture is future-proof.
flowchart LR
shaderLab --> AST{AST Compile};
AST --WebGL2--> GLSL300;
AST --WebGL1--> GLSL100;
AST --WebGPU--> WGSL;

@zhuxudong For now, you just need to apply a quick patch.

yes，the source of the AST is not only the shaderLab, such as you original glsl100 or glsl300 or wgsl, I don't know if we should consider this

yes，the source of the AST is not only the shaderLab, such as you original glsl100 or glsl300 or wgsl, I don't know if we should consider this

I think  choosing to establish a standard language is a better option. It makes no sense to support such a wide array of syntaxes. These languages should serve as compiled outputs, rather than inputs.


Textual boundaries are missing from the Master Details pane

Test URL: https://datagrid-detail-pane.surge.sh/datagrid/detail
Clarity Version: v2.0.0-rc.1
Angular Version: 8.0.0-rc.1
OS: any
Browser: any
Screen Reader: any
WCAG 2.1 Guideline:
Success Criterion 1.3.2 Meaningful Sequence
(Level A)
Description:
The Master Details pane is implemented as a dialog with textual boundaries but those boundaries are currently empty as seen below.

Screen reader users will not hear anything when they read these elements.
Steps to Reproduce:

Using a screen reader go to https://datagrid-detail-pane.surge.sh/datagrid/detail
Open the Master Details pane
Read the entire dialog and observe that there are no textual boundaries at the beginning or end of the dialog

Recommendation:
Populate the elements used for the textual boundaries with descriptive text as seen below.

Beginning of details pane, activate the close button to return to the data grid

This should be implemented in the final version. The URL provided is outdated.
You can verify by going to https://deploy-preview-3797--vmware-clarity.netlify.com/dev/ and Datagrid->Detail page.

This should be implemented in the final version.  Follow the steps below to see the fix in the dev version

Go to https://deploy-preview-3797--vmware-clarity.netlify.com/dev/
Then go to Datagrid->Detail page.
Open the details pane and check the HTML for textual boundaries

Closing as resolved.


Wrong parameter name when there are two type parameters

I am writing in typescript.

The last one should be "c".

Same thing is happening for me.


There is a small documentation error here.

SUMMARY
There is a small documentation error here: https://github.com/ansible-middleware/amq/tree/main/roles/activemq
ISSUE TYPE

Bug Report

ACTUAL RESULTS
It should be activemq_tls_keystore_password instead of activemq_tls_keystore_pasword .
Sample connector with TLS:

  - name: amqp
    address: <IP_ADDRESS>
    port: 61616
    parameters:
      tcpSendBufferSize: 1048576
      tcpReceiveBufferSize: 1048576
      protocols: CORE
      useEpoll: true
      sslEnabled: True
      keyStorePath: "{{ activemq_tls_keystore_dest }}"
      keyStorePassword: "{{ activemq_tls_keystore_pasword }}"
      trustStorePath: "{{ activemq_tls_truststore_dest }}"
      trustStorePassword: "{{ activemq_tls_truststore_password }}"
      verifyHost: False

great catch!

:D Found it thanks to a spellchecker in my IDE: https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker

Fixed by #41


[Feature Discussion] Wannier90 support

One more issue/PR after this one!
(TL;DR at the bottom)
I've been doing some work with Wannier90 lately and didn't want to plot without my favorite package, so I have been working on implementing Wannier90 support. I think it makes the most sense to make that a pymatgen namespace package that provides all the data types Sumo works with (structures, lattices, band structures, etc.), just like pymatgen.io.espresso. This gives the package room to grow and decouples the development from sumo (I currently only plan to implement the stuff sumo needs, other features will come later.)
I have more or less already written the core of the package, and it works perfectly with SBSPlotter. I just need to implement the CLI, it will involve minimal changes like the proposed Quantum ESPRESSO support. The only new thing I want to implement is an option to automatically add the Wannierization windows (outer window and inner/frozen windows) to the plot. It's a lot easier to tweak the windows in the calculation and analyze the match/mismatch of bands when you can actually see them with your bands.
I'm thinking of a --show-windows flag to sumo-bandplot (or something along those lines), and using the new **kwargs implemented in draw_themed_line.
Here's an example using the comparison feature I've been working on (the top dashed line is the max energy of the frozen window).

TL;DR I'm opening this issue to solicit feedback. This feature will only require minimal changes to sumo, all the parsing will be done by a separate package.

This seems reasonable. Will it be easy to test?

I guess most of the unit tests would sit in whatever package I end up writing to handle the actual parsing of the Wannier90 calculations, it would be an identical situation to the proposed Quantum ESPRESSO support. I guess it would be tested the same way sumo would test plotting from any other code, but I don't think there are any plotting-specific unit tests in sumo right now.
(I actually have no idea how to write plotting-specific unit tests, Julia's Plots.jl has this idea of plotting recipes that I used when unit testing Julia plots, but I don't know if matplotlib has anything similar).

Plot testing is really hard! There is at least one package out there for matplotlib that tries to normalise the less predictable parameters (screen resolution etc), save images and then compare them.
For Sumo tests we don't render the plot but have a poke around the ax.lines etc. to see if the data looks correct.
As more code interfaces are added it doesn't make sense to test the actual plots; we should just check the data that makes it to a plotter.


[Snyk] Fix for 4 vulnerabilities

Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

requirements.txt

Vulnerabilities that will be fixed
By pinning:

Severity
Priority Score (*)
Issue
Upgrade
Breaking Change
Exploit Maturity

704/1000  Why? Has a fix available, CVSS 9.8
Arbitrary Code Execution SNYK-PYTHON-PYYAML-42159
PyYAML:  3.12 -> 4.2b1
No
No Known Exploit

704/1000  Why? Has a fix available, CVSS 9.8
Arbitrary Code Execution SNYK-PYTHON-PYYAML-559098
PyYAML:  3.12 -> 4.2b1
No
No Known Exploit

876/1000  Why? Mature exploit, Has a fix available, CVSS 9.8
Arbitrary Code Execution SNYK-PYTHON-PYYAML-590151
PyYAML:  3.12 -> 4.2b1
No
Mature

704/1000  Why? Has a fix available, CVSS 9.8
Information Exposure SNYK-PYTHON-REQUESTS-72435
requests:  2.14.2 -> 2.20
No
No Known Exploit

(*) Note that the real score may have changed since the PR was raised.
Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the effected dependencies could be upgraded.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Coverage remained the same at 98.795% when pulling ccadf7e2d3b3058c0dae0daf36926408822c6576 on snyk-fix-967d27e6ed9feb14b0509fad0ebdcc01 into 87dbc69b45a58f2e6caa6ba476cf662947ed0a33 on master.


update to c++17.

Better support for some new platforms

Hi @B1ueber2y! Thanks for your contribution :)


⌘C does not copy password on MacOSX 10.11.1 (15B42)

I cannot copy the selected password on Mac.
Actually, I cannot copy anything from this application at all.
KeeWeb v0.2.1 (built at 2015-11-10)
Environment: electron v0.34.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) KeeWeb/0.1.0 Chrome/45.0.2454.85 Electron/0.34.0 Safari/537.36

You are using an old desktop client version (KeeWeb/0.1.0).
Please, download the latest release and try on it, it has been fixed (auto-update for now is a mess, but I'm working on it).

duplicates #2

please, reopen if it repeats


Networking NAT is not working with firewall enabled

Issue description
I am trying to setup a router with NAT.
Network Address Translation is not working with networking.firewall.enable = true;, but it works with networking.firewall.enable = false;.
Steps to reproduce
My settings:
{

networking = {
  networkmanager.enable = true;
  firewall = {
    enable = true;
    allowPing = true;
    allowedTCPPorts = [ 22 ];
    allowedUDPPorts = [ ];
    logRefusedConnections = true;
    logRefusedPackets = true;
    extraCommands = ''
      iptables  -I INPUT -p tcp -m tcp --dport 22 ! -s <IP_ADDRESS>/24 -j nixos-fw-log-refuse
    '';
  };
  nat = {
    enable = true;
    internalInterfaces = [ "enp3s0" ];
    externalInterface = "enp2s0";
    internalIPs = [ "<IP_ADDRESS>/24" ];
  };
};

}

<IP_ADDRESS> is the IP of the router I am trying to setup

On another machine:

ip r add <IP_ADDRESS> via <IP_ADDRESS>
mtr <IP_ADDRESS>

Technical details
$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 4.9.70, NixOS, 18.03pre-git (Impala)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 1.11.16`
 - nixpkgs: `/nix/store/pgi61hdwa4jl0dvq3dqbhli6r955br01-nixpkgs-5b6c5964b088997d9600dd8b4f21033aefb5f067`

I'm not sure if it'll work but if you have time you could give it a try with networking.firewall.checkReversePath = false, that might be the cause.

My working config with both nat and firewall enabled: https://github.com/dezgeg/nixconfs/blob/master/kbuilder.nix#L35

@primeos thanks for suggestion, I will try it, but not now(I have solved the problem with firewall extraCommands).
But, anyway, if this will work then this thing is strange, probably it should be more simple with nix.


update lightning to v1.8.2

Checklist before submitting

[ ] Did you read the contributor guide?
[ ] Did you update any affected documentation?
[ ] Did you write any tests to validate this change?

Description
Fixes # (issue).
Review process to land

All tests and other checks must succeed.
At least one maintainer must review and approve.
If any  maintainer requests changes, they must be addressed.

The test is expected to fail due to addition of new directory, so will merge the PR.


hasSideForm fix (issue 2214)

Description
hasSideForm is false if the form only has a fieldset and no direct fields.
Related Issues
Related to #2214

 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.Alex Kau seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

the right fix is https://github.com/area17/twill/pull/2234


Add support for reading and writing to the Backup Data Register (#83).

This is my first attempt at fixing issue #83.

Thanks for the PR, it looks good to me, and most of my comments are "bikeshedding"
I'm not sure how I feel about panic! when indexing out of bouds as panics can be a pain to debug on embedded platforms. Since reg 0 doesn't exist, those errors would probably be pretty common as well.
On the other hand, data registers are something that never changes, so it should be fairly simple to catch the panic in a debugger.
Another option might be to ignore the names of the registers and make the indexes 0 based in the API. As far as I know, no other systems in the processor depends on data in these registers so where we put "1" won't make a difference.
Whichever option we go with, it would be nice with a more clear comment saying which range of registers are available.
Since I'm bikeshedding already, I think I would prefer read_data_register over read_bkp_dr. Most of the functions in the rest of the crate avoids abbreviated names.
Finally, could you add a line to CHANGELOG.md saying that this feature has been implemented?

No problem, bikeshedding is fine.
I'll change the function names to read_data_register and write_data_register.
I'll add a line to CHANGELOG.md.
What do the others think of the register: u8 argument, zero or one based index?
What do you think of the array based functions?

What do the others think of the register: u8 argument, zero or one based index?

0 based. I'm just not so sure about the u8, maybe it would be better to make it usize for compatibility with general indexing operations.

Hm, just noticed that travis failed for STM32F100 and STM32F101; are the SVD files broken and/or do we need to need to feature gate the backup domain stuff for STM32F103 and higher?

Hm, just noticed that travis failed for STM32F100 and STM32F101; are the SVD files broken and/or do we need to need to feature gate the backup domain stuff for STM32F103 and higher?

stm32-rs have regression. STM32F103 and other have different types.
I've fixed it in https://github.com/stm32-rs/stm32-rs/pull/256

I've found that the BKP_DR11 to BKP_DR42 registers do not work (writing a value to them and reading afterwards gives back 0). I already found that they used a different naming convention in the STM32F1 crate. Does anybody know more about this?

I've found that the BKP_DR11 to BKP_DR42 registers do not work (writing a value to them and reading afterwards gives back 0). I already found that they used a different naming convention in the STM32F1 crate. Does anybody know more about this?

It can be problem of incorrect BKP register address:

https://github.com/stm32-rs/stm32-rs/pull/256/commits/58f8163b78edc2d095b239cb21869c5f7defa89a
should fix problem

Related issue in old repo:
https://github.com/japaric/stm32f103xx/issues/18

@burrbull Thanks, I have tried your change and I saw that you've renamed bkp_dr11 - bkp_dr42 to dr11 - dr42, great! But they still don't work. Also, dr1 does not seem to work either...
I'll update this PR with my latest code. The code I'm using to test is:
        let mut x: [u16; 42] = [0; 42];
        for (i, d) in x.iter_mut().enumerate() {
            *d = (i + 1) as u16;
        }
        backup_domain.write_data_register_array(&x, 0);

        let mut buf: [u16; 42] = [0; 42];
        backup_domain.read_data_register_array(&mut buf, 0);
        for (i, d) in buf.iter().enumerate() {
            hprintln!("{}", d);
        }

With this change dr will be array.
So you don't need macros.
Access with dr[i] and bkp_dr[j]
where i = 0..9 j = 0..31

Aah, I'm sorry for the trouble, thanks. Why do we split into dr and bkp_dr? Should we reflect this divide in the API we're defining here too?

    pub fn read_data_register(&self, register: usize) -> u16 {
        match register {
            1..10  => read_drx!(self, dr, register-1),
            11..42 =>  read_drx!(self, bkp_dr, register-11)
             _=> unreachable!()
        }
   }

Aah, I'm sorry for the trouble, thanks. Why do we split into dr and bkp_dr? Should we reflect this divide in the API we're defining here too?

Because svd2rust still not support deriving for registers:
Waiting for:
https://github.com/rust-embedded/svd2rust/pull/256

OK, so the following points are open:

We should decide if we want to prevent people with low- or medium density STM32's of using the registers DR11-DR42 at compile time. Right now, reading always returns 0 and writing is a noop on these devices.
The PR for the stm32-rs repository from burrbull needs to be merged (and released?) before it makes sense to merge this code.
There is still code in stm32-rs repository that requires unsafe to write to either bkp or bkp_dr. See burrbull's review comments.

Let me know if there is still something I can do!

I think we should split each function on low/high variant, where first one will operate on dr and second feature gated function will operate on bkp_dr.

We should decide if we want to prevent people with low- or medium density STM32's of using the registers DR11-DR42 at compile time. Right now, reading always returns 0 and writing is a noop on these devices.

I'm not a fan of runtime checks, so I'd prefer a feature gate. If we do do runtime checks, i'd prefer some sort of error over returning valid looking data like 0

I think we should split each function on low/high variant, where first one will operate on dr and second feature gated function will operate on bkp_dr.

I like this solution

OK, I separated the functions in _low and _high.
I dropped the array / buffer functions, because I think it would introduce to much functions for just the backup register. But I think this code is very straightforward to implement by the library user. Also they are not always practical (for example if I want to store a u32 in the backup data register, I would have to go from a u32 to an array of 2 u16's anyway). If you want them back, shout out!
I'm not sure how to do the feature gate:

low/medium or high/xl density?
stm32f101, stm32f102, ..? or
high-backup-register?

Sorry, for the lots of back- and forward...

What do we do with the feature gate?
When will a new version of stm32f1 be released?
What else is in the way of merging this?

You can add #[cfg(feature="stm32f107")].
@adamgreig  promised make release this weekend.

That feature does not exist, right? Besides, I see that it depends on model number and on the amount of flash memory:

Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx
microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx
microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
High-density devices are STM32F101xx and STM32F103xx microcontrollers where the
Flash memory density ranges between 256 and 512 Kbytes.
XL-density devices are STM32F101xx and STM32F103xx microcontrollers where the
Flash memory density ranges between 768 Kbytes and 1 Mbyte.
Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.

The 84-byte data registers are only available in high-density, XL-density and connectivity line devices.

One of the solution is to add feature gate for each type of microcontroller: stm32f1xxxx (stm32f103c8). They can depend on other features like mem64.
But not everyone likes this solution.

One of the solution is to add feature gate for each type of microcontroller: stm32f1xxxx (stm32f103c8). They can depend on other features like mem64.
But not everyone likes this solution.

That seems like a pretty reasonable solution to me, but I haven't heard the arguments against it

I can make initial PR with these features.

@TheZoq2 One of the arguments against it is that we'd have to maintain a database of details even most users will not even know or care about. I'm okay with having features for medium, high, xl and and connectivity lines with low being implied if none of the higher features are selected.

@mjepronk please, rebase your changes.

@burrbull I think my repo was already up-to-date, but I've bumped the dependency stm32f1 to version 0.8 (because your work on that repo are required for this PR).

This repo is already on 0.8 #88  :)

Doh, sorry. I've merged...

@mjepronk How about a rebase? 😉

@therealprof @burrbull Done, sorry for the confusion. I didn't do the push --force the first time.

This looks good to me, do we want to wait for #90 before merging?

@mjepronk #90 has been merged which should be the last blocker for this, could you add the correct features for this?

Yes, I will pick this up ASAP.

Is there anything left to do before we can merge this?

Nope, I just missed the new pushed commits, thanks!
Also, I feel like it's time for another release, any objections to that? @therealprof

@TheZoq2 No objections.

Cool, version 0.4.0 has been published :tada:


[BUG] Unnecessary error details

Describe the bug
When an error is encountered, it spits out a bunch of extra error details. For example:
Whoops, that's an error! Please share this information with my developers:
Traceback (most recent call last):
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
    await ctx.command.invoke(ctx)
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1015, in invoke
    await self.prepare(ctx)
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 919, in prepare
    if not await self.can_run(ctx):
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1280, in can_run
    return await discord.utils.async_all(predicate(ctx) for predicate in predicates)
  File "/home/conner/.local/lib/python3.10/site-packages/discord/utils.py", line 698, in async_all
    for elem in gen:
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1280, in <genexpr>
    return await discord.utils.async_all(predicate(ctx) for predicate in predicates)
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 2197, in predicate
    raise MissingPermissions(missing)
discord.ext.commands.errors.MissingPermissions: You are missing Administrator permission(s) to run this command.

...the only information needed in this error is discord.ext.commands.errors.MissingPermissions: You are missing Administrator permission(s) to run this command.
To Reproduce
Run a command that yields an error.
Expected behavior
A two line output, one line explaining the bot encountered an error, and one line with the error message.
Additional context
Would also like to filter out Command not found errors.

Added some error handling tidbits, and got rid of command not found errors, but some errors still produce long outputs.


Fix setbuf use for VMS C

The VMS C RTL has setbuf() working for short pointers only, probably
the FILE pointer will always be in P0 (the lower 4GB).  Fortunately,
this only generates a warning about possible data loss (doesn't apply
in this case) that we can simply turn off.

Merged.
5848be0488c20591892f82a7c79c6d1637518b96 Fix setbuf use for VMS C


Feature/2227 improve visibility of total records number

Description
Always show the max number of records in the pagination even if the similarity search is applied.
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Closes #2227
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update

How Has This Been Tested
Please describe the tests that you ran to verify your changes. And ideally reference tests.

[x] test with a dataset cointaining less than 10000 records
[x] test with a dataset cointaining more than 10000 records

Checklist

[x] I have merged the original branch into my forked branch
N/A I added relevant documentation
[x] follows the style guidelines of this project
[x] I did a self-review of my code
N/A I added comments to my code
N/A I made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works

@davidberenstein1957 From official es documentation:

By default, you cannot use from and size to page through more than 10,000 hits. This limit is a safeguard set by the index.max_result_window index setting. If you need to page through more than 10,000 hits, use the search_after parameter instead.

We could include something like:

You cannot go through more than 10000 records. If you want to explore more records, you can combine queries, filters, and sorting to fine-grain your search. For more info about queries, visit the docs

And maybe explain this limit safeguard directly in argilla docs
cc @davidberenstein1957 @dvsrepo ??

@Paco Aranda Montes @.***>
thank you for the reference.
I agree with your suggested text. Also, we should reference/copy the
official documentation. By default, you cannot use from and size to page
through more than 10,000 hits. This limit is a safeguard set by the
index.max_result_window
https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window
index setting. If you need to page through more than 10,000 hits, use the
search_after
https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#search-after
parameter instead.
On Mon, Jan 23, 2023 at 9:14 AM leiyre @.***> wrote:

@.**** approved this pull request.
—
Reply to this email directly, view it on GitHub
https://github.com/argilla-io/argilla/pull/2231#pullrequestreview-1265140846,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGAZHZCJ6R4NCEXJU4JGA7DWTY4VJANCNFSM6AAAAAAUBUBTCI
.
You are receiving this because you were mentioned.Message ID:
@.***>

@paco Aranda Montes @.> thank you for the reference. I agree with your suggested text. Also, we should reference/copy the official documentation. By default, you cannot use from and size to page through more than 10,000 hits. This limit is a safeguard set by the index.max_result_window https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window index setting. If you need to page through more than 10,000 hits, use the search_after https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#search-after parameter instead.
…
On Mon, Jan 23, 2023 at 9:14 AM leiyre @.> wrote: @.**** approved this pull request. — Reply to this email directly, view it on GitHub <#2231 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAZHZCJ6R4NCEXJU4JGA7DWTY4VJANCNFSM6AAAAAAUBUBTCI . You are receiving this because you were mentioned.Message ID: @.***>

Do you mean to include the official references in the message or pointing some section in the argilla docs (https://docs.argilla.io/en/latest/reference/webapp/pages.html#dataset)? I think should be better to have this info only in the argilla docs, and point it there from the pagination message. Something like:

You cannot go through more than 10000 records. If you want to explore more records, you can combine queries, filters, and sorting to fine-grain your search. For more info about queries, visit the docs. For more details about this limit, see here

Hi,
For me the docs info is comparable to the case with the MAX_TOKEN_LENGTH and could be added to the docs.
Perhaps.
You cannot go through more than 10000 records. If you want to explore more records, you can combine queries, filters, and sorting to fine-grain your search. For more info about queries, visit the docs https://docs.argilla.io/en/latest/guides/features/queries.html?highlight=queries#. If you want, you can configure this limit at the cost of potential performance loss. For more details about this limit, see here https://docs.argilla.io/en/latest/reference/webapp/pages.html#dataset

On 23 Jan 2023, at 09:39, Francisco Aranda @.***> wrote:
@paco https://github.com/paco Aranda Montes @.> thank you for the reference. I agree with your suggested text. Also, we should reference/copy the official documentation. By default, you cannot use from and size to page through more than 10,000 hits. This limit is a safeguard set by the index.max_result_window https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-max-result-window index setting. If you need to page through more than 10,000 hits, use the search_after https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#search-after parameter instead.
… x-msg://3/#
On Mon, Jan 23, 2023 at 9:14 AM leiyre @.> wrote: @.**** approved this pull request. — Reply to this email directly, view it on GitHub <#2231 (review) https://github.com/argilla-io/argilla/pull/2231#pullrequestreview-1265140846>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAZHZCJ6R4NCEXJU4JGA7DWTY4VJANCNFSM6AAAAAAUBUBTCI . You are receiving this because you were mentioned.Message ID: @.***>
Do you mean to include the official references in the message or pointing some section in the argilla docs (https://docs.argilla.io/en/latest/reference/webapp/pages.html#dataset)? I think should be better to have this info only in the argilla docs, and point it there from the pagination message. Something like:
You cannot go through more than 10000 records. If you want to explore more records, you can combine queries, filters, and sorting to fine-grain your search. For more info about queries, visit the docs https://docs.argilla.io/en/latest/guides/features/queries.html?highlight=queries#. For more details about this limit, see here https://docs.argilla.io/en/latest/reference/webapp/pages.html#dataset
—
Reply to this email directly, view it on GitHub https://github.com/argilla-io/argilla/pull/2231#issuecomment-1399975355, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAZHZCGSTB7HV2TAK7Z7ZLWTY7TPANCNFSM6AAAAAAUBUBTCI.
You are receiving this because you were mentioned.

I agree with the message proposed. But the '10K' limit is "hard-coded" at least from the API  side. We need first to allow configure this param before showing this message.
What I propose is, to create an informational message just explaining a bit this limitation, and tackle the PAGINATION_LIMIT setup in a separate PR. Once is done, we can reference the docs section from the message. Just to work incrementally


Support Github Enterprise

Currently, the GitHubWebHookIpVerifier hardcodes the acceptable Github IPs to be in the subnet range of <IP_ADDRESS>/22.  This means that webhooks created in Github Enterprise deployments will fail because of this method
Is there a way we can configure this IP?

We could probably add an environmental variable to make this easier for enterprise installs. Maybe comma delimited?


Split block announce processing into two parts

This pull requests splits the block announce processing into two parts.
Into a phase that is called pre-validation that will be async and call
the block announce validator and into a second phase that processes the
result of the pre-validation.
The important change here is that the pre-validation phase is async.
This will be required by Cumulus/parachains. When a parachain announces
a block, it adds the candidate message send by the relay chain as extra
data into the block announcement. To verify this candidate message, the
relay chain parent is required that was used when building this message.
Now it can happen that we first receive the block announcement before
fully importing the relay chain block and this leads to the parachain
block not being imported. By making the pre-validation async, we will be
able to wait for the relay chain block to be imported to verify the
candidate message.

One worry is that if the BlockAnnounceValidator takes a long time to validate the announce, then block_announce_pre_validation will continue to grow.
Is this potentially a real problem, or am I worrying for nothing?

Right, it looks like spamming with announcements for unknown relay chain blocks could be an attack vector

One worry is that if the BlockAnnounceValidator takes a long time to validate the announce, then block_announce_pre_validation will continue to grow.
Is this potentially a real problem, or am I worrying for nothing?

From the Cumulus side my idea is that I will drop the announcements after some time (still not sure what I will use as signal). So, that we don't collect all these announcements indefinitely.
I could provide some generic solution that would abort "old" announcements when we see an announcement with an higher block number. This should prevent spamming.

I could provide some generic solution that would abort "old" announcements when we see an announcement with an higher block number. This should prevent spamming.

This won't work I think. If the spammer sends announcements for blocks numbers that are higher than the legitimate best block, the node won't see an announcement with an even higher block number for a while.
I think the best we can do here is simply limit the number of pending announcements and make sure peers that announce invalid blocks get their reputation decreased rapidly. Stale announcements can be cleaned up on finality change or when the peer the sent them disconnects.

 Sorry for taking soo long.

@bkchr Do you want us to handle the burnin?

@bkchr Do you want us to handle the burnin?

Who is "us". I planned to do a burnin.
I can create a polkadot pr and put the label on it.

@bkchr following up on the above discussion where to place the validation polling logic, what do you think of the following alternative solution?
diff --git a/client/network/src/protocol.rs b/client/network/src/protocol.rs
index f7fafee8e..4033b556f 100644
--- a/client/network/src/protocol.rs
+++ b/client/network/src/protocol.rs
@@ -600,6 +600,16 @@ impl<B: BlockT, H: ExHashT> Protocol<B, H> {
 			GenericMessage::Status(_) =>
 				debug!(target: "sub-libp2p", "Received unexpected Status"),
 			GenericMessage::BlockAnnounce(announce) =>
+				// Not to be committed:
+				//
+				// The underlying task is not registered for this future. Thus we might miss a wake
+				// up in case it is ready to progress. I think we can ignore this caveat because:
+				//
+				// 1. Protocol:poll is polled regularly and includes a
+				// `poll_block_announce_validation(cx)` at the very beginning.
+				//
+				// 2. This concerns block announcements send via the legacy substream only which (a)
+				// is not used much and (b) is going away soon.
 				self.push_block_announce_validation(who.clone(), announce),
 			GenericMessage::Transactions(m) =>
 				self.on_transactions(who, m),
@@ -1574,6 +1584,12 @@ impl<B: BlockT, H: ExHashT> NetworkBehaviour for Protocol<B, H> {
 			};
 			self.pending_messages.push_back(event);
 		}
+		while let Poll::Ready(result) = self.sync.poll_block_announce_validation(cx) {
+			match self.process_block_announce_validation_result(result) {
+				CustomMessageOutcome::None => {},
+				outcome => self.pending_messages.push_back(outcome),
+			}
+		}
 		if let Poll::Ready(Some((tx_hash, result))) = self.pending_transactions.poll_next_unpin(cx) {
 			if let Some(peers) = self.pending_transactions_peers.remove(&tx_hash) {
 				peers.into_iter().for_each(|p| self.on_handle_transaction_import(p, result));
@@ -1676,6 +1692,16 @@ impl<B: BlockT, H: ExHashT> NetworkBehaviour for Protocol<B, H> {
 					Some(Fallback::BlockAnnounce) => {
 						if let Ok(announce) = message::BlockAnnounce::decode(&mut message.as_ref()) {
 							self.push_block_announce_validation(peer_id, announce);
+							// The underlying task is not registered with the validation future
+							// added above. Thus it won't be notified in case the future is able to
+							// progress.
+							//
+							// Register the underlying task with the future by polling once.
+							if let Poll::Ready(result) = self.sync.poll_block_announce_validation(cx) {
+								self.process_block_announce_validation_result(result)
+							} else {
+								CustomMessageOutcome::None
+							}
 						} else {
 							warn!(target: "sub-libp2p", "Failed to decode block announce");
 						}
@@ -1690,14 +1716,6 @@ impl<B: BlockT, H: ExHashT> NetworkBehaviour for Protocol<B, H> {
 		};

 		if let CustomMessageOutcome::None = outcome {
-			// Check if there is any block announcement validation finished.
-			while let Poll::Ready(result) = self.sync.poll_block_announce_validation(cx) {
-				match self.process_block_announce_validation_result(result) {
-					CustomMessageOutcome::None => continue,
-					outcome => return Poll::Ready(NetworkBehaviourAction::GenerateEvent(outcome))
-				}
-			}
-
 			Poll::Pending
 		} else {
 			Poll::Ready(NetworkBehaviourAction::GenerateEvent(outcome))

@mxinden Please check the latest commit. I have done it slightly different.


change renderer

hello, thy for this plugin.
i use an other plugin for labeles
and i would like labels to be printed.
i'm not sure it is possible, i try to change renderer in your plugin but i'm not sure i do it on the right place.
any advice ?
i tried many things
like #98
or #76
but i don't understand how to add element to the renderer in «map.on( ... printStrart() ...
);» and if it the way to go
thank you.

Hey there. Now sure what went wrong, Do you mind creating an example with you code?


Implements pagination support for Teco

Pagination is a key feature of Teco 0.2 and TecoCore 0.5 release. This PR adds initial support for pagination in TecoServiceGenerator to make it work.

Now that the initial support is merged into Teco, we can also merge this PR.


Make RequireJSBundle independent from CacheBundle

This PR continues the work started in #147

@sergeyz could you review this PR instead of the old one? It should be fine, tests fails but seems to not be related to my edits

@sergeyz When do you think this can be merged? I would like to use this bundle for a project I'm working on

@ste93cry working on merge

By having the constraint 2.8.* for the Symfony entry, who has a greater or lower version won't be allowed to use this bundle, right? As it seems that it does not really depend on any other bundle, maybe you could change that constraint to something more relaxed, at least ~2.7

Sure, php 5.5 is ok for you?

Yes it's fine. I'm using anyway Symfony 2.8, so the minimum version of Symfony that I proposed was just an example

HI, @ste93cry !
After discussion with @vsoroka I've tried to avoid compiler pass and added services support to app.yml. Fix already in master, but, unfortunately, not in 1.10. It will be available in 1.10 branch shortly and in 1.10.1 release

Hi, I'm glad to see that you managed to find a better way to handle this PR. Please remember to sync the standalone repository too when it's time. Although this isn't the right place where to discuss this, I would like to report that there is still that I missed to see before: the PhpUtils component.

I'm going to work on split automation in next few days, lets keep issue open until I do it

@SergeyCherepanov any news on this? I would like to be sure this does not get missed, as merging the PR "closed" it (it does not show up anymore in the list)

Hi, @ste93cry! It not missed, its in todo list

@ste93cry today I pushed actual code to https://github.com/orocrm/RequireJSBundle. Had to switch branches because of sync issues. It looks like there will be issue with assets, we use https://github.com/fxpio/composer-asset-plugin to load them but composer.json is outdated.

Unfortunately, README.md misses the part that composer.json of an application have contain this configuration
  "extra": {
    "asset-installer-paths": {
      "npm-asset-library": "web/bundles/npmassets"
    }
  }

That defies the place for npm assets in public directory.
We have to update installation guide for RequireJS bundle

we use https://github.com/fxpio/composer-asset-plugin

Although for your use-case it may be better to use such a plugin, usually other tools are used to manage frontend dependencies (bower, npm, yarn). What about having a configuration option to set where the r.js optimizer is located? This would give users flexibility over which tool to use to install such assets

You are right, path to library location have to be configurable. We will add this improvement to our back log. But I'm not sure how soon when it'll be done. So if you are up for this, the contribution is highly appreciated.

Ok, I will try to see if I find the time to contribute the change. Another thing is that (even if it's not in the composer.json) the bundle requires the PhpUtils component, which is not yet extracted as a standalone repository


[error] No matching files. Patterns: .git/COMMIT_EDITMSG

I'm encountering the above error in my pre-commit setup in a Django project. My .pre-commit-config.yaml is as follows:
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v3.4.0
    hooks:
      - id: check-added-large-files
        args: ["--maxkb=5000"]
      - id: end-of-file-fixer
      - id: check-case-conflict
      - id: detect-private-key
      - id: check-docstring-first
  - repo: https://github.com/psf/black
    rev: 20.8b1
    hooks:
      - id: black
        exclude: (.*)/migrations
  - repo: https://gitlab.com/PyCQA/flake8
    rev: 3.8.4
    hooks:
      - id: flake8
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: v2.2.1
    hooks:
      - id: prettier
        exclude: >
          (?x)^(
              (.*)/static/vendors|
              (.*)/static/ico|
              ^.+\.html$|
              package-lock.json|
              yarn.lock|
              ^.+\.min\.(js|css)$
          )$
        additional_dependencies:
          -<EMAIL_ADDRESS>  - repo: https://github.com/commitizen-tools/commitizen
    rev: v2.12.1
    hooks:
      - id: commitizen
        stages: [commit-msg]
  - repo: https://github.com/awebdeveloper/pre-commit-stylelint
    rev: 0.0.2
    hooks:
      - id: stylelint
        additional_dependencies:
          [
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>          ]
        exclude: >
          (?x)^(
              (.*)/static/vendors|
              (.*)/static/css/main\.css|
              ^.+\.min\.(css)$
          )$

Here is a terminal recording demonstrating the problem:
https://user-images.githubusercontent.com/7713776/103385550-9ca55c80-4b03-11eb-9833-4b670911a9d1.mp4
Thanks

it looks like you have both commit and commit-msg stages set up -- however prettier doesn't support the commit-msg stage
the easiest is probably to do:
default_stages: [commit]

in your configuration

it looks like you have both commit and commit-msg stages set up -- however prettier doesn't support the commit-msg stage
the easiest is probably to do:
default_stages: [commit]

in your configuration

Thanks @asottile for the quick response. When I add default_stages: [commit] I encounter the following:
[WARNING] Unexpected key(s) present on https://github.com/pre-commit/mirrors-prettier => prettier: default_stages

So I modified it to stages: [commit] and now everything works just fine! Thank you very much!

default_stages is a top level key -- you're correct though, stages is the per-hook configuration


Help no longer works for generate command

Versions
Angular CLI: 1.6.7
Node: 9.5.0
OS: linux x64
Angular: 5.2.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.6.7
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.7
@schematics/angular: 0.1.17
typescript: 2.5.3
webpack: 3.10.0

Repro steps

Create a new cli project, for this I just did a ng new cli
Run help for generate command ng help generate or ng generate --help
Fails with an error and stacktrace

Observed behavior
Cannot read property '0' of undefined
TypeError: Cannot read property '0' of undefined
    at Class.getCollectionName (/home/scott/cli/node_modules/@angular/cli/commands/generate.js:57:36)
    at Class.printDetailedHelp (/home/scott/cli/node_modules/@angular/cli/commands/generate.js:179:37)
    at commandFiles.forEach.cmd (/home/scott/cli/node_modules/@angular/cli/commands/help.js:57:38)
    at Array.forEach (<anonymous>)
    at Class.run (/home/scott/cli/node_modules/@angular/cli/commands/help.js:36:22)
    at resolve (/home/scott/cli/node_modules/@angular/cli/ember-cli/lib/models/command.js:261:20)
    at new Promise (<anonymous>)
    at Class.validateAndRun (/home/scott/cli/node_modules/@angular/cli/ember-cli/lib/models/command.js:240:12)
    at CLI.callHelp (/home/scott/cli/node_modules/@angular/cli/ember-cli/lib/cli/cli.js:222:17)
    at Promise.resolve.then.then.then.then.result (/home/scott/cli/node_modules/@angular/cli/ember-cli/lib/cli/cli.js:156:23)

Desired behavior
Should work
Mention any other details that might be useful (optional)
This worked fine in 1.6.5. I updated 1.6.7 and it stopped.

Duplicate of https://github.com/angular/angular-cli/issues/9412.


Container is not ready - cannot connect to SQL server

It is not an issue as such, just looking for direction because cannot figure it out.
After resetting docker on Windows 10 machine, network seems to had been reset too.
Now when trying to create new container it fails updating hosts to my router IP rather than pc.
Initializing...
Setting host.containerhelper.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting host.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Starting Container
Staring at updatehosts.ps1 I cannot find out where it takes my router ip from.

Gateway and host IPs seem to be switched for some reason. On wireless connection similar story.
1.1 is network gateway and 1.116 is actually nic ip. But it thinks host is the gateway...
Initializing...
Setting host.containerhelper.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting host.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting host.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Starting Container

The part where it sets the host is this
    if ($sethost) {
        $gateway = (ipconfig | where-object { $_ –match "Default Gateway" } | foreach-object{ $_.Split(":")[1] } | Where-Object { $_.Trim() -ne "" } )
        if ($gateway -and ($gateway -is [string])) {
            Write-Host "Setting host.containerhelper.internal to $($gateway.Trim()) in container hosts file"
            UpdateHostsFile -hostsFile $myhostsFile -theHostname "host.containerhelper.internal" -theIpAddress $gateway.Trim() | Out-Null
        }
    }

It should work if you use NAT - the gateway from the container is the host and SQL Server listens to that if default configured. Described under updatehosts here: https://freddysblog.com/2019/11/04/using-sql-server-on-the-host/

Thanks Freddy, the nat seems to be setup, but docker is not using it for some reason.... Prior to last reset it was assigning addresses in 172.* range to all containers and now it's all 192.168.*
Can I force to use nat maybe through additional parameters?
PS C:\WINDOWS\system32> docker network list
NETWORK ID          NAME                                                                        DRIVER              SCOPE
b4051b332d1a        Default Switch                                                              ics                 local
e7208f0d6821        Intel(R) Dual Band Wireless-AC 7260 Virtual Switch                          transparent         local
b47fa707d85a        Realtek PCIe GbE Family Controller Virtual Switch                           transparent         local
dfda06277a4e        nat                                                                         nat                 local
f8e41478747a        none                                                                        null                local
d25fe1317906        vEthernet (Intel(R) Dual Band Wireless-AC 7260 Virtual Switch)              ics                 local
59a064266d49        vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)   ics                 local
b3d15eb682eb        vEthernet (Realtek PCIe GbE Family Controller Virtual Switch)               ics                 local

How does your docker deamon configuration look?

Ah yes, that's another change I did along with reset...
As was advised by somebody in yammer, to save space moved graph off from system drive.
{
"registry-mirrors": [],
"insecure-registries": [],
"debug": true,
"experimental": true,
"graph": "L:\Docker"
}

That shouldn't cause the default network to change...
Anyway - you can add -additionalparameters @('--network nat') to specify that you want to use nat.
You can also add your local IP to your hosts hosts file (ending with .internal), then -updatehosts will automatically copy that to the container.
Or you can use some of the docker internal addresses (which I haven't quite figured out yet what are/can).

Cant get my head around this...
The following command
$imageName14 = 'mcr.microsoft.com/businesscentral/onprem:14.7.37609.0-gb-ltsc2019'
New-NavContainer     -accept_eula
-accept_outdated     -imageName $imageName14
-auth UserPassword     -Credential $credential
-containerName $prodContainerName     -licenseFile $licenseFile
-updateHosts     -useBestContainerOS
-includeAL     -includeCSide
-enableSymbolLoading     -databaseServer $dbServer
-databaseInstance $dbInstance     -databaseName $dbName
-databaseCredential $dbcredentials `
-additionalParameters @('--net=nat')
Reports following output and fails to connect because <IP_ADDRESS> if my switch:
Initializing...
Setting host.containerhelper.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting host.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting host.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Starting Container
Hostname is bc14
PublicDnsName is bc14
But
PS C:\WINDOWS\system32> docker network inspect nat
[
{
"Name": "nat",
"Id": "dfda06277a4e5e132a587cbac136d478ace154d8f50aadff1e602a68ad4452eb",
"Created": "2020-01-13T07:09:42.9765204Z",
"Scope": "local",
"Driver": "nat",
"EnableIPv6": false,
"IPAM": {
"Driver": "windows",
"Options": null,
"Config": [
{
"Subnet": "<IP_ADDRESS>/20",
"Gateway": "<IP_ADDRESS>"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"af6f584a20715fb3c234ae7759f2d12adb44c58175756136935e12759a157da0": {
"Name": "bc14",
"EndpointID": "07d3fe7faf51eb16e83e74c2af42527162f32d51b38dd64ed81b6e872b832da1",
"MacAddress": "00:15:5d:7e:d4:71",
"IPv4Address": "<IP_ADDRESS>/16",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.windowsshim.hnsid": "A6382342-2760-4A45-A741-172ABD9ECF92",
"com.docker.network.windowsshim.networkname": "nat"
},
"Labels": {}
}
]
And
PS C:\WINDOWS\system32> docker container inspect bc14
[
{
"Id": "af6f584a20715fb3c234ae7759f2d12adb44c58175756136935e12759a157da0",
"Created": "2020-01-13T16:20:42.0608572Z",
"Path": "powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; .\Run\start.ps1",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 1284,
"ExitCode": 0,
"Error": "",
"StartedAt": "2020-01-13T16:20:44.6144995Z",
"FinishedAt": "0001-01-01T00:00:00Z",
"Health": {
"Status": "unhealthy",
"FailingStreak": 5,
"Log": [
{
"Start": "2020-01-13T16:21:14.617239Z",
"End": "2020-01-13T16:21:15.0062388Z",
"ExitCode": 1,
"Output": ""
},
{
"Start": "2020-01-13T16:21:45.0378493Z",
"End": "2020-01-13T16:21:45.4343405Z",
"ExitCode": 1,
"Output": ""
},
{
"Start": "2020-01-13T16:22:15.4597115Z",
"End": "2020-01-13T16:22:15.8232557Z",
"ExitCode": 1,
"Output": ""
},
{
"Start": "2020-01-13T16:22:45.8577046Z",
"End": "2020-01-13T16:22:46.1936401Z",
"ExitCode": 1,
"Output": ""
},
{
"Start": "2020-01-13T16:23:16.2247124Z",
"End": "2020-01-13T16:23:16.591308Z",
"ExitCode": 1,
"Output": ""
}
]
}
},
"Image": "sha256:c5f0694b800543ebc88514c014a92d37cf45c23e89942d9d0dde5f5eb345fbed",
"ResolvConfPath": "",
"HostnamePath": "",
"HostsPath": "",
"LogPath": "L:\Docker\containers\af6f584a20715fb3c234ae7759f2d12adb44c58175756136935e12759a157da0\af6f584a20715fb3c234ae7759f2d12adb44c58175756136935e12759a157da0-json.lo
g",
"Name": "/bc14",
"RestartCount": 0,
"Driver": "windowsfilter",
"Platform": "windows",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"C:\ProgramData\NavContainerHelper:C:\ProgramData\NavContainerHelper",
"C:\ProgramData\NavContainerHelper\Extensions\bc14\my:C:\Run\my",
"C:\ProgramData\NavContainerHelper\Extensions\bc14\Program Files:C:\navpfiles",
"c:\windows\system32\drivers\etc:C:\driversetc"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "nat",
"PortBindings": {},
"RestartPolicy": {
"Name": "unless-stopped",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"CapAdd": null,
"CapDrop": null,
"Capabilities": null,
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 0,
"ConsoleSize": [
0,
0
],
"Isolation": "hyperv",
"CpuShares": 0,
"Memory":<PHONE_NUMBER>,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": null,
"KernelMemory": 0,
"KernelMemoryTCP": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": null,
"ReadonlyPaths": null
},
"GraphDriver": {
"Data": {
"dir": "L:\Docker\windowsfilter\af6f584a20715fb3c234ae7759f2d12adb44c58175756136935e12759a157da0"
},
"Name": "windowsfilter"
},
"Mounts": [
{
"Type": "bind",
"Source": "c:\programdata\navcontainerhelper",
"Destination": "c:\programdata\navcontainerhelper",
"Mode": "",
"RW": true,
"Propagation": ""
},
{
"Type": "bind",
"Source": "c:\programdata\navcontainerhelper\extensions\bc14\my",
"Destination": "c:\run\my",
"Mode": "",
"RW": true,
"Propagation": ""
},
{
"Type": "bind",
"Source": "c:\programdata\navcontainerhelper\extensions\bc14\program files",
"Destination": "c:\navpfiles",
"Mode": "",
"RW": true,
"Propagation": ""
},
{
"Type": "bind",
"Source": "c:\windows\system32\drivers\etc",
"Destination": "c:\driversetc",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "bc14",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"1433/tcp": {},
"443/tcp": {},
"7045/tcp": {},
"7046/tcp": {},
"7047/tcp": {},
"7048/tcp": {},
"7049/tcp": {},
"80/tcp": {},
"8080/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"passwordKeyFile=c:\run\my\aes.key",
"licenseFile=c:\run\my\license.flf",
"databaseInstance=",
"enableApiServices=Y",
"useSSL=N",
"databaseServer=host.containerhelper.internal",
"securePassword=mypass",
"accept_outdated=Y",
"ExitOnError=N",
"locale=en-GB",
"databaseUsername=sa",
"encryptionSecurePassword=mypass",
"removePasswordKeyFile=Y",
"databaseSecurePassword=mypass",
"accept_eula=Y",
"auth=NavUserPassword",
"username=admin",
"databaseName=mydb",
"enableSymbolLoading=Y",
"COMPLUS_NGenProtectedProcess_FeatureEnabled=0",
"NAVDVDURL=https://nav2016wswe0.blob.core.windows.net/dvd/e938a2ba-ed5b-49fa-93c7-8f5e160a1b7e",
"VSIXURL=https://nav2016wswe0.blob.core.windows.net/dvd/al-3.0.191521.vsix",
"IsBcSandbox=N",
"CountryCode=gb",
"COUNTRYURL=https://nav2016wswe0.blob.core.windows.net/dvd/d33e8ee7-6a46-4b49-a5b9-92199adba492"
],
"Cmd": [
"powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; .\Run\start.ps1"
],
"Healthcheck": {
"Test": [
"CMD",
"powershell",
".\Run\HealthCheck.ps1"
],
"Interval":<PHONE_NUMBER>0,
"Timeout":<PHONE_NUMBER>0
},
"ArgsEscaped": true,
"Image": "mcr.microsoft.com/businesscentral/onprem:14.7.37609.0-gb-ltsc2019",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": {
"country": "gb",
"created": "201911060510",
"cu": "cu6",
"eula": "https://go.microsoft.com/fwlink/?linkid=861843",
"legal": "http://go.microsoft.com/fwlink/?LinkId=837447",
"maintainer": "Dynamics SMB",
"nav": "",
"osversion": "10.0.17763.805",
"platform": "14.0.37587.0",
"tag": "<IP_ADDRESS>",
"version": "14.7.37609.0"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "af6f584a20715fb3c234ae7759f2d12adb44c58175756136935e12759a157da0",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"1433/tcp": null,
"443/tcp": null,
"7045/tcp": null,
"7046/tcp": null,
"7047/tcp": null,
"7048/tcp": null,
"7049/tcp": null,
"80/tcp": null,
"8080/tcp": null
},
"SandboxKey": "af6f584a20715fb3c234ae7759f2d12adb44c58175756136935e12759a157da0",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"nat": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "dfda06277a4e5e132a587cbac136d478ace154d8f50aadff1e602a68ad4452eb",
"EndpointID": "07d3fe7faf51eb16e83e74c2af42527162f32d51b38dd64ed81b6e872b832da1",
"Gateway": "<IP_ADDRESS>",
"IPAddress": "<IP_ADDRESS>",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "00:15:5d:7e:d4:71",
"DriverOpts": null
}
}
}
}
]
Both seem to be using correct IPs, as if host.containerhelper.internal is the inly incorrect piece.

But of course in my local host hosts file I find whole bunch of entries one of which is
<IP_ADDRESS> host.containerhelper.internal
:(
Thanks Freddy!


Cancel dragging

I am trying to cancel dynamically the drag, how can I achieve this?
Do it like this:
ng-drag="{{dynamicProperty}}"

Hey!
This issue could be closed. I have fixed this in this way:
instead of binding -> ng-drag="{{dynamicProperty}}"
was need to be put simple reference -> ng-drag="dynamicProperty"

thanks

Thanks a lot.


Skip login page when authenticating with SSO

When logging in with GitHub or GitLab, go straight to the appropriate
target site, instead of landing on getappmap.com/login.
This is the final piece of work for https://github.com/getappmap/board/issues/338 .

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

v0.131.1
v0.131.1
GitHub release

Your semantic-release bot :package::rocket:


Pokemon names

I see now that this was done as I was working on it...  Here is my implementation anyways.

Are you able to fix up the merge conflicts that there currently are?
More than willing to add this once its added.

Merged this in - had to fix conflicts

Currently working on making some of these prints a little more human readable

@Reaver01 appreciate it mate - I was gowing through and doing it all - just currently working on something else important for work.
Ill be back on this iin an hr or so :)

I am about to head home, so I will delve into everything a little deeper when I am at my desktop.


After activating Angulat templating, the size of the indents increases

After activating Angulat templating, the size of the indents increases (they are not like the default ones from the editor)
I don't fully understand parameter mapping myself. How to change the size of indents? Or leave it unoverwritten (default from editor)

The file is not required
You can find the parameters by searching in VSCode
For example
[indent_size]: [editor.tabSize];
[indent_size] -parameter js-beautify
[editor.tabSize] - VSCode parameter

Probably by default VSСode divides editor.tabSize by 2... I'll see how VSСode does this.
Defaul value editor.tabSize=4.

Я не подумал об этом...
Поправлю это
https://code.visualstudio.com/docs/editor/codebasics#_autodetection

fixed 1.0.2


Readability and Efficiency Updates

It might be more readable to use a dictionary or a lookup table to map activation function names to the corresponding function objects, rather than using a series of if statements in the forward method.
You can simplify the backward method by using prev_chain_dw and prev_chain_db directly, rather than using np.dot to multiply them with da(self.lin_pass).
You can use the @staticmethod decorator to define the activation functions (e.g. sigmoid, tanh, d_sigmoid, and d_tanh) as static methods, so they can be called directly on the class (e.g. Layer.sigmoid(x)) rather than on an instance of the class (e.g. layer.sigmoid(x)).
It might be more efficient to compute the dot product of self.original_input and self.weights once and store the result in a variable, rather than computing it multiple times in the backward method.
You can use the @property decorator and define @num_neurons.setter method to make the num_neurons attribute read-only, so it cannot be modified after the object is created.
You can use the isinstance function to check if the input to the forward method is a NumPy array, rather than relying on the ndim attribute.
You can use the shape attribute of the input array to determine the number of input samples, rather than calling the size attribute of the input array and then dividing it by the number of neurons.

lmk if u want me to add comments and such


The background color needs to change

the background color is not fair for my editor and why you use this is a default color

uncheck the useBlueishStyle option


Reorganize readme

It is very strange that some of the badges are located at the top of the readme, but then the Travis and code coverage badges are located at the bottom of the README.  I’d rather keep all of the status badges together in one place at the top of the readme.
@ibacher Take a look at this, edit it to make it look nice and readable, and then merge whenever you are happy with the final product.

bors try

bors r+

@DilumAluthge Thanks for noticing this. I hadn't even looked at the README.


Is it possible to easily use Sync with a content-addressable, apend-only store?

Hi all,
I have a content-addressable store like so:
module Content_store = Irmin.Content_addressable.Make(Irmin_fs_unix.Append_only)(Irmin.Hash.SHA512)(Content)

I would like to architect my application such that:

The user can configure a set of remotes
If the application encounters a hash (details omitted, can concretize if necessary) that is not stored in the local content store, it will try to retrieve the content from the configured remotes and save it locally.

It is surely possible to implement this by writing a bunch of custom code, but I was wondering if I was overlooking something in the API to easily enable this. My best lead is to use this module, but it's a bit daunting.
Thanks!

Just found this:
https://ocaml.org/p/irmin-git/latest/doc/Irmin_git/Content_addressable/index.html

I tried using these modules, but I could not find an easy way, so my question still stands :sweat_smile:

Sorry for the noisy issue.
Let me further illustrate my use case, as I have hit another snag.
My goal is to create two stores, a KV store for articles, and a content-addressable store for content. I have functions that replace the content of an article with its hash.
Here is a simplified version of my code:
type hash = Irmin.Hash.SHA512.t
let hash_t = Irmin.Hash.SHA512.t

type 'a node = Text of string | Transclude of 'a

and content = Content of content node list

type 'a article =
  { content: 'a;
    iri: iri;  (* https://ocaml.org/p/iri/1.0.0 *)
    metadata: (string * string) list;
  }

let store_content : 'a Content_store.t -> content -> hash = ...

let hash_article : 'a Content_store.t -> content article -> hash article =
  fun store {content; _;} ->
  let hash = store_content store content in
  {content = hash; ...}

The stores are implemented like so (with the appropriate content modules):
module Content_store =
  Irmin.Content_addressable.Make
    (Irmin_fs_unix.Append_only)
    (Irmin.Hash.SHA512)
    (Content)

module Article_store = Irmin_git_unix.FS.KV(Article)

Here we have Article.t = hash article.
The thing that makes all this work is that the Content_store is accessible via Irmin.Hash.SHA512.t, which comes with a representation. This allows me to store the hash in the Article_store. Now it seems that this falls apart when switching to the sync-capable stores:
I have suceeded in creating a git-content-addressable store like so:
module Git_store = Irmin_git.Content_addressable(Git_unix.Make(Digestif.SHA512))
module Content_store = Git_store.Make(Content)

The issue is that this store is no longer indexed by Irmin.Hash.SHA512s, but rather by Digestif.SHA512, which are not compatible.
So ultimately, my question is about how to proceed. Should I write a representation for the abstract type Digestif.SHA512.t, or is there some way around this issue that I am failing to see?
Of course, I am also interested in any other comments, feedback or advice.
Also, thanks for the work on this amazing library! :heart:
For reference, here is the real code:
https://git.sr.ht/~jonsterling/ocaml-forester/tree/16cd57f4bffaa203cc4dcaca22c1fb05d343e913/item/forester-ui/lib/Cache.ml

@art-w You gave an example of how to implement a repr for an abstract type here:
https://github.com/mirage/repr/issues/108
I have been trying to work through the example, but am now stuck at implementing the binary encoders and decoders for the hashes:
module Hash : Irmin.Contents.S with type t = Digestif.SHA512.t = struct
  type t = Digestif.SHA512.t

  let t : Digestif.SHA512.t Repr.ty =
    let open Digestif.SHA512 in

    let pp h hash =
      Format.fprintf h "%s" (to_raw_string hash)
    in

    let of_string str =
      try Scanf.sscanf str "%s" (fun str -> Ok (of_raw_string str))
      with _ -> Error (`Msg "of_string")
    in

    let encode_json encoder hash =
      let (`Ok | _) = Jsonm.encode encoder (`Lexeme `Os) in
      let (`Ok | _) = Jsonm.encode encoder (`Lexeme (`String (to_raw_string hash))) in
      let (`Ok | _) = Jsonm.encode encoder (`Lexeme `Oe) in
      ()
    in
    let decode_json decoder =
      (* Must be able to decode the output of [encode_json] *)
      let (let*) = Result.bind in
      let* () = Repr.Json.decode decoder |> function `Lexeme `Os         -> Ok () | _ -> Error (`Msg "decode_json") in
      let* v  = Repr.Json.decode decoder |> function `Lexeme (`String v) -> Ok v  | _ -> Error (`Msg "decode_json") in
      let* () = Repr.Json.decode decoder |> function `Lexeme `Oe         -> Ok () | _ -> Error (`Msg "decode_json") in
      Ok (of_raw_string v)
    in

    (*This is as far as I got*)

    let encode_bin (hash : Digestif.SHA512.t) write =
      let encoder = Repr.Binary.Bytes.encode (`Fixed digest_size) |> Repr.Staging.unstage (*???*)in
      write hash
    in

    let decode_bin buffer at =
      (* Must be able to decode the output of [encode_bin] *)
      let len = Repr.Binary.Varint.decode buffer at in
      let v = String.sub buffer !at len in
      at := !at + len ;
      v
    in
    let size =
      Repr.Size.custom_dynamic
        ~of_value:(fun foo ->
          (* Optional, precompute the size that will be used by [encode_bin] *)
          let len = String.length foo in
          let varint_len_size = ref 0 in
          Repr.Binary.Varint.encode len
            (fun s -> varint_len_size := !varint_len_size + String.length s) ;
          !varint_len_size + len)
        ~of_encoding:(fun str offset ->
          (* You can skip this function, it's unused nowadays *)
          let at = ref offset in
          let len = Repr.Binary.Varint.decode str at in
          let varint_len_size = !at - offset in
          varint_len_size + len)
        ()
    in
    let pre_hash =
      (* Same as [encode_bin], unless the binary serialization has changed
         but we want to preserve the previous cryptographic hash for
         backward compatibility. *)
      encode_bin
    in

    let equal = equal in
    let compare = unsafe_compare in
    (* let equal a b = String.equal a.v b.v in *)
    (* let compare a b = String.compare a.v b.v in *)
    let short_hash ?seed foo =
      match seed with
      | None -> Hashtbl.hash foo
      | Some seed -> Hashtbl.seeded_hash seed foo
    in
    Repr.abstract
      ~pp ~of_string
      ~json:(encode_json, decode_json)
      ~bin:(encode_bin, decode_bin, size)
      ~pre_hash
      ~equal ~compare ~short_hash
      ()

  let merge = Irmin.Merge.(option (idempotent t))
end

I've succeeded in writing the repr for the hash type.
I now have the following module structure:
module Git_store = Irmin_git.Content_addressable(Git_unix.Make(Digestif.SHA512))
module Content_store = Git_store.Make(Content)

where Content_store has the following interface:
sig
  type 'a t = 'a Content_store.t
  type key = hash
  type value = Content.t
  val mem : [> Irmin.Perms.read ] t -> key -> bool
  val find : [> Irmin.Perms.read ] t -> key -> value option
  val add : [> Irmin.Perms.write ] t -> value -> key
  val unsafe_add : [> Irmin.Perms.write ] t -> key -> value -> unit
  val close : 'a t -> unit
  val batch : Irmin.Perms.read t -> ([ `Read | `Write ] t -> 'a) -> 'a
end

I am now wondering how to actually obtain a store? The docs say:
Values will be stored into .git/objects., how do I obtain a value of type 'a Content_store.t?

Hello! Thanks for the report, we are looking into the lack of constructor for the content-addressable store as it seems like an oversight...
In the meantime, regarding your previous questions:
Did you consider Repr.(map string) of_raw_string to_raw_string to reuse the existing string Repr.t instead of implementing all the abstract interface by yourself? (sorry for the suggestion if you already tried but I would love to know why you prefer the low-level alternative then? ^^)

My goal is to create two stores, a KV store for articles, and a content-addressable store for content. I have functions that replace the content of an article with its hash.

Oh this is actually how Irmin is implemented! What is your motivation for storing the content separate from the iri link / metadata? It's a shame that irmin-git lacks customizable metadata like the other backends due to its compatibility with git, but you could probably store both together (?) or split it into two entries in the KV store? (with one folder for contents, one folder for articles)
(I'm asking because I've a small doubt that your separate CA store will be replicated by git fetch algorithm, since it doesn't "see" that the contents are referenced from the articles by their hash... but I'll check if it works and update shortly)

As I was afraid, the objects stored in the git repo via Irmin_git.Content_addressable are free-standing: As there are not reachable from any commit by git algorithms, they don't get replicated from/to remotes when using fetch/push.
Can you tell me a bit more about why you wanted to use Content_addressable directly instead of just Irmin KV?

It's a shame that irmin-git lacks customizable metadata like the other backends due to its compatibility with git

Just to the record, you can associate metadata with a commit (like a gpg key, for example) and be compatible with Git. The latter are not “scannable” (in the sense that they are only values, not pointers; it seems to me that Git LFS uses these metadatas) but it may be worthwhile for Irmin to make use of this possibility.

Oh neat thanks for the tip! So we could lift this type restriction to allow users to store any metadata with their commits! But this wouldn't help @kentookura though as the git files metadata still appear to be restricted to file kind/permissions :/

Thanks for the details, I love that you are bringing transclusions to federations!
I could not find a reference to hashes in the code you linked, so reading between the lines I'm guessing the content hash is intended to track if the transcluded article has been updated since, to inform the user of the change? (Please correct me if I'm wrong!)
A couple of thoughts, in hope that they inspire you some ideas even I turn out to have completely misunderstood your problem: (sorry the examples got very long)

I'm not sure if it's necessary to store the contents separately from the article, as you could remember the expected hash of the transcluded article to detect changes using Contents.of_key/hash  (two names for the same function) to fetch an article from its hash:

type hash = Digestif.SHA1.t (* = the default hash algorithm used by [Irmin_git_unix.FS.KV] *)
let hash_t = Digestif.SHA1.(Repr.(map string) of_raw_string to_raw_string)

type transclusion = { tag : string; expected_hash : hash } [@@deriving irmin]
type node = Text of string | Transclude of transclusion [@@deriving irmin]
type content = Content of node list [@@deriving irmin]

type article = { content : content; metadata : (string * string) list }
[@@deriving irmin]

module Store = Irmin_git_unix.FS.KV (struct
  type t = article [@@deriving irmin]

  let merge = Irmin.Merge.(option (idempotent t))
end)

open Lwt.Syntax

(* these type definition with [@@deriving irmin] are only there for debug prints *)
type transclusion_error =
  [ `Deleted of article
  | `Updated of article * article
  | `Original_article_lost of article
  | `Unknown_article of string ]
[@@deriving irmin]

type transcluded_result = (article, transclusion_error) result
[@@deriving irmin]

let get_transcluded repo branch { tag; expected_hash } =
  let* article = Store.Contents.of_key repo expected_hash in
  let* latest_hash = Store.hash branch [ tag ] in
  match (article, latest_hash) with
  | Some article, Some latest_hash when latest_hash = expected_hash ->
      (* transcluded article is uptodate *)
      Lwt.return (Ok article)
  | Some article, None ->
      (* we still have access to the originally transcluded article contents,
         but can inform the user that it was deleted in more recent versions *)
      Lwt.return (Error (`Deleted article))
  | Some old_article, Some latest_hash ->
      (* inform the user that the article was updated since the transclusion *)
      let+ latest_article =
        Lwt.map Option.get @@ Store.Contents.of_key repo latest_hash
      in
      Error (`Updated (old_article, latest_article))
  | None, Some latest_hash ->
      (* should not happen... indicates that the git history
         was rewritten + git gc was run to force-fully erase
         the previous article contents from existence *)
      let+ latest_article =
        Lwt.map Option.get @@ Store.Contents.of_key repo latest_hash
      in
      Error (`Original_article_lost latest_article)
  | None, None ->
      (* should not happen either, either history rewrite like above
         or it might indicate that we are trying to transclude from
         an unknown remote *)
      Lwt.return (Error (`Unknown_article tag))

let date () = Int64.of_float (Unix.gettimeofday ())

let store_article t tag article =
  let message = Printf.sprintf "Update %s" tag in
  let info () = Store.Info.v ~author:"art-w" ~message (date ()) in
  Store.set_exn t ~info [ tag ] article

let main () =
  let* repo = Store.Repo.v @@ Irmin_git.config "/tmp/test-remote" in
  let* main = Store.main repo in

  (* create a first article *)
  let aw_0001 = { metadata = []; content = Content [ Text "first" ] } in
  let* () = store_article main "aw-0001" aw_0001 in

  (* compute hash of article, either from the article or its tag: *)
  let hash_aw_0001 = Store.Contents.hash aw_0001 in
  let* hash_aw_0001' = Store.hash main [ "aw-0001" ] in
  assert (hash_aw_0001' = Some hash_aw_0001);

  (* create a second article with a transclusion *)
  let aw_0002 =
    {
      metadata = [];
      content =
        Content [ Transclude { tag = "aw-0001"; expected_hash = hash_aw_0001 } ];
    }
  in
  let* () = store_article main "aw-0002" aw_0002 in

  (* when computing the transclusion to render the second article: *)
  let* tr =
    get_transcluded repo main { tag = "aw-0001"; expected_hash = hash_aw_0001 }
  in
  Format.printf<EMAIL_ADDRESS>(Irmin.Type.pp transcluded_result_t) tr;
  (* => prints "Ok article_contents" since the transclusion is uptodate *)

  (* if we update the first article, then its hash will change: *)
  let aw_0001_upd = { metadata = []; content = Content [ Text "UPDATED" ] } in
  let* () = store_article main "aw-0001" aw_0001_upd in
  assert (Store.Contents.hash aw_0001_upd <> hash_aw_0001);

  (* so if we retry to render the second article, we get a warning that the transcluded content has been updated *)
  let* tr =
    get_transcluded repo main { tag = "aw-0001"; expected_hash = hash_aw_0001 }
  in
  Format.printf<EMAIL_ADDRESS>(Irmin.Type.pp transcluded_result_t) tr;
  (* => prints "Error (`Updated (old_article, new_article))" *)

  (* to accept the changes, update the second article with the new expected_hash *)
  Lwt.return_unit

let () = Lwt_main.run (main ())

A difference between this and your previous CA store approach is that the articles are reachable from the git history and so their hashes will be synced by fetch/pull/push automatically.

(I think/assume that) storing the article will not allow me to retrieve a subcomponent of the article by hash?
when I have a representation of a type that contains other representations, are all components of this type retrievable via hash?

If I understand you correctly then no, if you store some Contents.t in Irmin then the sub-values reachable by traversing your Contents.t OCaml value are not themselves accessible by their content hash. You have to get your contents from the store, and then do the traversal in OCaml if you were only interested in a sub-part of that value. (but see below for a way to achieve this nevertheless!)

we have this notion of content target that controls what is actually being transcluded, so it would be nice for the store to be able to directly store the smallest unit of transclusion.

I don't know if that's actually required considering that your article contents are expected to be small (measured in ~kb?) before their transcluded articles are "inlined" (which I assumed is only done when rendering to xml). At this small scale it's unlikely to bring any performance benefit to directly access the smallest unit of transclusion (but it has a cost since it implies more content-hash are indexed).
But in case you really need it, a solution is to store mixed-contents into your Irmin store and to break your article values into multiple entries:
(* ... *)
type article = {
  content : content;
  title : string;
  metadata : (string * string) list;
}
[@@deriving irmin]

(* to represent the fact that we are going to store the sub-components of an article in irmin: *)
module Internal = struct
  type t =
    | Content of content
    | Title of string
    | Metadata of (string * string) list
  [@@deriving irmin]

  let merge = Irmin.Merge.(option (idempotent t))
end

module Store = Irmin_git_unix.FS.KV (Internal)

let date () = Int64.of_float (Unix.gettimeofday ())

(* utility function to split an [article] into its sub-components before storing it *)
let store_article db ~tag { content; title; metadata } =
  let message = Printf.sprintf "Update %s" tag in
  let info () = Store.Info.v ~author:"art-w" ~message (date ()) in
  Store.set_tree_exn ~info db [ tag ]
  @@ Store.Tree.of_concrete
  @@ `Tree
       [
         ("title", `Contents (Internal.Title title, `Normal));
         ("metadata", `Contents (Internal.Metadata metadata, `Normal));
         ("content", `Contents (Internal.Content content, `Normal));
       ]

open Lwt.Syntax
open Lwt.Infix

(* utility functions to query only a sub-component from an article *)
let get_title db tag =
  Store.get db [ tag; "title" ] >|= function
  | Internal.Title title -> title
  | _ -> invalid_arg "expected title"

let get_metadata db tag =
  Store.get db [ tag; "metadata" ] >|= function
  | Internal.Metadata metadata -> metadata
  | _ -> invalid_arg "expected metadata"

let get_content db tag =
  Store.get db [ tag; "content" ] >|= function
  | Internal.Content content -> content
  | _ -> invalid_arg "expected content"

(* or fetch everything at once: *)
let get_article db tag =
  let* root = Store.get_tree db [ tag ] in
  let+ title = Store.Tree.get root [ "title" ]
  and+ metadata = Store.Tree.get root [ "metadata" ]
  and+ content = Store.Tree.get root [ "content" ] in
  match (title, metadata, content) with
  | Internal.Title title, Internal.Metadata metadata, Internal.Content content
    ->
      { title; metadata; content }
  | _ -> invalid_arg "type error"

(* test *)
let main () =
  let* repo = Store.Repo.v @@ Irmin_git.config "/tmp/test-remote" in
  let* main = Store.main repo in

  let aw_0001 =
    {
      title = "first";
      metadata = [ ("date", "2024-08-03") ];
      content = Content [ Text "test" ];
    }
  in
  let* () = store_article main ~tag:"aw-0001" aw_0001 in

  let* t = get_title main "aw-0001" in
  Format.printf "Title<EMAIL_ADDRESS>t;

  let* art = get_article main "aw-0001" in
  Format.printf "Article<EMAIL_ADDRESS>(Irmin.Type.pp article_t) art;

  Lwt.return_unit

let () = Lwt_main.run (main ())

As you can see, this requires a bit of setup with utility functions to store and get stuff from Irmin. (In the future, we would like to improve on the type-safety in Irmin API to remove the need for invalid_arg "expected <subtype>" so let us know if you choose that option!)
When combined with the previous code example, this splitting will allow you to differentiate between the "article hash" (= content+metadata) and the "content hash" (which is what you were trying to get the hash of in your initial post?). I do not understand why the content hash is more important than the rest, as it seems to me that the title/author/etc changes are also relevant if they happen to change (?) and those are only captured by the "article hash"?
(When splitting, your article becomes a "folder" but you can still get its merkle hash (which captures the hash of all of its children title/metadata/content) with Store.hash t [tag])

Sorry this got so long... Do not hesitate to correct my misunderstandings or share additional details/constraints about your system :)

I could not find a reference to hashes in the code you linked, so reading between the lines I'm guessing the content hash is intended to track if the transcluded article has been updated since, to inform the user of the change? (Please correct me if I'm wrong!)

Ah, we have several branches that we are working on: https://git.sr.ht/~jonsterling/ocaml-forester/refs
My work is on this branch
At this point I'd really like for @jonsterling to pitch in :)

Sorry this got so long... Do not hesitate to correct my misunderstandings or share additional details/constraints about your system :)

This is extremely helpful, nothing to be sorry for!
I will come back to you once I've explored the options a bit.

@art-w I am wondering if it would be helpful to you if I report any issues I encounter when using the eio branch of irmin, or if it is too early to experiment with that branch.

Yes yes! Any feedback or issue report on the Eio PRs would be extremely welcome! We are planning a minor release with bugfixes for the current lwt version, but then the eio branch will become the main one. If you are already experimenting with it, I think you should use the version from https://github.com/mirage/irmin/pull/2316 (so the follow-up on the initial eio port, which fixes some known issues).
(Thanks for your links btw, I see a lot more content hashes there but haven't had time to dig into it yet :) )

@art-w Using mirage-crypto-rng-eio takes up to 19 seconds to start, but it works. I'll try to create a reproduction example sometime.

@art-w @jonsterling Do you think it is possible/practical to use Sync to track multiple remotes using a single store?
We are introducing the notion of a "host" to forester to prepare for some features we hope to implement in irmin:
https://git.sr.ht/~jonsterling/ocaml-forester/commit/a2c0537b0b61aa7270ea40fbea2c0d998c6addf6
Suppose the user configures some remote hosts foo and bar, which point to some irmin stores served via http.
The question I have is if it is possible to use Sync to maintain directories  "foo" and "bar" in my local store which are kept in sync with the remotes, or if it is better to just set up multiple stores.
PS.: If you are interested, the latest changes in our work regarding irmin are here: https://git.sr.ht/~jonsterling/ocaml-forester/log/irmin-datastore

Using mirage-crypto-rng-eio takes up to 19 seconds to start

Hm that is concerning. Sorry for the late reply, but I could not reproduce nor see anything in the code that could explain this so I didn't know how to respond... Can you confirm that the following is slow on your machine? (it takes at most 1ms on mine)
let () =
  Eio_main.run @@ fun env ->
  let t0 = Eio.Time.now env#clock in
  Mirage_crypto_rng_eio.run (module Mirage_crypto_rng.Fortuna) env @@ fun () ->
  let t1 = Eio.Time.now env#clock in
  Format.printf<EMAIL_ADDRESS>(t1 -. t0)

And that the following is not? (with the mirage-crypto-rng.unix dependency)
let () = Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna)

In which case, it should be fine for you to use the Mirage_crypto_rng_unix initialization instead of the Eio one, and we'll bubble the issue to the competent authorities to investigate why the eio version is so slow...

It should be possible to support the directory replication that you describe for the remotes in the local store, by using fetch to acquire the latest commit from the remote and updating the corresponding folder. In pseudo-code:
Store.set_tree_exn ~info local_store ["remotename"] @@ Commit.tree @@ Result.get_ok @@ Sync.fetch remote

But I think it'll be easier and more robust to use branches instead (like we would do when using git with remotes), as that would also preserve commit history of the remote:
Store.Branch.set local_store "remotename" @@ Result.get_ok @@ Sync.fetch remote

(Sorry I haven't had time to check your code, I'll try to update as soon as I can have a look)


Restore unsupported tools-version error

We lost this in the 5.4 refactoring of tools-version parsing.

@swift-ci please smoke test

BTW, potentially interesting detail I noticed: we allow a missing comment to mean "this is version 3" but that's actually not a complete representation of what version 3 allowed, because e.g. one could have a random comment at the top of the manifest. Since we haven't heard about this so far, it's probably fine, though 🤣

Hm, that's unfortunate.  Is there a unit test that would catch this?

BTW, potentially interesting detail I noticed: we allow a missing comment to mean "this is version 3" but that's actually not a complete representation of what version 3 allowed, because e.g. one could have a random comment at the top of the manifest. Since we haven't heard about this so far, it's probably fine, though 🤣

Could people be suffering in silence?  Would it break other packages to restore this?  Not necessarily immediately, but of course.  Or maybe it's better just to move on — do we have a sense of whether there are any v3 packages still in use?

Could people be suffering in silence? Would it break other packages to restore this? Not necessarily immediately, but of course. Or maybe it's better just to move on — do we have a sense of whether there are any v3 packages still in use?

To clarify: v3 hasn't been supported since Swift 5.0 as far as I can see, but what is supported is having a v3 manifest still present (as version-specific or main manifest) while there's also a newer manifest which then gets picked. If the regular manifest is a v3 one, we would only assume it's v3 if it has no comment at the top of the file at all which is technically inaccurate -- in other cases, we would error out.

To clarify: v3 hasn't been supported since Swift 5.0 as far as I can see, but what is supported is having a v3 manifest still present (as version-specific or main manifest) while there's also a newer manifest which then gets picked. If the regular manifest is a v3 one, we would only assume it's v3 if it has no comment at the top of the file at all which is technically inaccurate -- in other cases, we would error out.

Oh I see.  I misunderstood.

@swift-ci please smoke test


Unrecognized Type

Hello,
I am using Liberty <IP_ADDRESS> with apiDiscovery-1.0 feature to discover my REST services.
but i got this error when i try to open the REST document throw swagger-ui
java.lang.ClassNotFoundException: com.skios.model.Tag cannot be found by com.ibm.ws.io.swagger.core
java.lang.IllegalArgumentException: Unrecognized Type: [null]
So how i can use my class as a data type with @ApiModelProperty annotation
now i am using >> dataType = "List[com.skios.model.Tag]" that throw the exception

Can you please add a PR with a test case?


[v2 CLI flag] --instances_metadata

This is a feature request for adding the --instances_metadata flag to v2.
Its description is:
If provided, it is treated as a path to a metadata value which
is polled for a comma-separated list of instances to connect to. For example,
to use the instance metadata value named 'cloud-sql-instances' you would
provide 'instance/attributes/cloud-sql-instances'. Not compatible with -fuse

If this is a useful flag that you'd like to see ported to v2, add a :+1: to this request.

This might be covered by https://github.com/GoogleCloudPlatform/cloud-sql-proxy/issues/1045.

We're looking at adding support for dynamically configuring instance connection names from multiple sources (secret manager, pub/sub topics connected to a secret, and possibly instance metadata). Let's track that work over on #1045.