Flame tiled web rendering vertical lines issue while camera movement

Current bug behaviour

Expected behaviour

Vertical lines issue in web whenever camera moves, in android as APK there is no issue. Those vertical lines exist only for the web.
https://user-images.githubusercontent.com/52130837/143884831-18c50e76-03c2-4afe-8829-4437223b542d.mp4
Steps to reproduce

https://beach-website.web.app/#/
use arrow keys to move the player
repo: https://github.com/Jcupzz/beach_hack_website_2022
Flutter doctor output

Output of: flutter doctor -v

More environment information

flame: ^1.0.0-releasecandidate.16
flame_tiled: ^1.0.0-releasecandidate.15
Log information

Enter log information in this code block

More information
https://github.com/flutter/flutter/issues/14288

I think it is texture bleeding. May be you can try adding padding to your texture when packing.

I think it is texture bleeding. May be you can try adding padding to your texture when packing.

I tried adding extrusion of 1 pixel and 2 pixel to each tiled sprite using texturepacker...it doesn't work. I think the reason is due to drawAtlas method which doesn't work for flutter web. Flutter doesn't support drawAtlas method for web. The site works perfectly for android but doesn't work for web

@Jcupzz have you tried this with 1.0.0? The fallback was removed in the stable release, but that said, you can get those artifacts with drawAtlas too. See #1153.

@Jcupzz have you tried this with 1.0.0? The fallback was removed in the stable release, but that said, you can get those artifacts with drawAtlas too. See #1153.

@spydon Yes, I have tried with 1.0.0 still the problem persists. Well, in android the same code is working perfectly there are no vertical lines issue. So I think with drawAtlas I don't get those artifacts

I also discovered this bug some time ago... I wanted to make a tile based game with Flutter / Flame, but can't do it because of this. I opened issues on this in the Flutter (https://github.com/flutter/flutter/issues/74127) and Flame #637 repo some time ago with no success. There is also a big issue (https://github.com/flutter/flutter/issues/14288) on this in the flutter repo which was opened in 2018 but is not resolved yet...
I think it hast to do with the methods canvas.scale and canvas.translate. Every plattform even Android is affected (just scale the canvas by something like 1.32). It just happens that certain screen sizes with the right scaling dont produce this bug. For example when I move Mario in the game of @Jcupzz I have no problems only when i resize the browser windows from full screen. (I have a 4k monitor)
It would be cool, if we find a fix / workaround for this, because a friend of mine an me really want to make a tile based game with Flame.
The following is a minimal example to reproduce this (resize the window if it doesn't happen):
import 'package:flame/game.dart';
import 'package:flutter/material.dart';

void main() => runApp(GameWidget(game: MyGame()));

class MyGame extends FlameGame {
  Paint p = Paint()..color = Colors.blue;

  @override
  void render(Canvas canvas) {
    super.render(canvas);

    int tilesInX = 16;
    int tilesInY = 16;
    double tileSize = 16;

    canvas.scale(size.x / (tilesInX * tileSize));

    for (int x = 0; x < tilesInX; x++) {
      for (int y = 0; y < tilesInY; y++) {
        canvas.drawRect(
          Rect.fromLTWH(
            x * tileSize,
            y * tileSize,
            tileSize,
            tileSize,
          ),
          p,
        );
      }
    }
  }
}

@felithium I don't think there is much we can do unfortunately, since it seems to be a Flutter bug.
We can of course try to fix it upstream, but I wouldn't have a clue of where to start even...
Or if there is some kind of work around that we can do maybe, where the tiles are overlapping with one pixel for example?

Hey, I might have found a solution. After spending hours trying different solutions to find a workaround (which I actually did aswell) I found out that this problem does not appear when you exactly use canvas.drawRectImage AND set the isAntialias of the Paint instance to false. If you for example use canvas.drawImage it simply does not matter if isAntialias is true or false,
the artifacts will eventually appear. I have no clue why that is...
I fixed the game of @Jcupzz by stepping in the source of Flame where the TiledMap is painted. And it does use canvas.drawRectImage, but isAntialias is not set, so by default true, so I set it to false manually.
This is the file but the latest version is slightly different than the version of @Jcupzz:
https://github.com/flame-engine/flame/blob/main/packages/flame/lib/src/sprite_batch.dart
void render(
    Canvas canvas, {
    BlendMode? blendMode,
    Rect? cullRect,
    Paint? paint,
  }) {
    paint ??= Paint();

    if (kIsWeb) {
      for (final batchItem in _batchItems) {
        paint..blendMode = blendMode ?? paint.blendMode;

        canvas
          ..save()
          ..transform(batchItem.matrix.storage)
          ..drawRect(batchItem.destination, batchItem.paint)
          ..drawImageRect(
            atlas,
            batchItem.source,
            batchItem.destination,
            paint..isAntiAlias = false, // i changed this
          )
          ..restore();
      }
    } else {
      canvas.drawAtlas(
        atlas,
        _transforms,
        _sources,
        _colors,
        blendMode ?? defaultBlendMode,
        cullRect,
        paint,
      );
    }
  }

I couldn't produce the artifacts anymore.
https://user-images.githubusercontent.com/41200990/147857916-af79ac0d-3c3f-431b-b18e-6f63601e046f.mp4
Would be cool if someone else could confirm this, because I am not 100% if I am not seeing ghosts after spending to long on this problem.
Hope this helps!

Hey, I might have found a solution. After spending hours trying different solutions to find a workaround (which I actually did aswell) I found out that this problem does not appear when you exactly use canvas.drawRectImage AND set the isAntialias of the Paint instance to false. If you for example use canvas.drawImage it simply does not matter if isAntialias is true or false,
the artifacts will eventually appear. I have no clue why that is...
I fixed the game of @Jcupzz by stepping in the source of Flame where the TiledMap is painted. And it does use canvas.drawRectImage, but isAntialias is not set, so by default true, so I set it to false manually.
This is the file but the latest version is slightly different than the version of @Jcupzz:
https://github.com/flame-engine/flame/blob/main/packages/flame/lib/src/sprite_batch.dart
void render(
    Canvas canvas, {
    BlendMode? blendMode,
    Rect? cullRect,
    Paint? paint,
  }) {
    paint ??= Paint();

    if (kIsWeb) {
      for (final batchItem in _batchItems) {
        paint..blendMode = blendMode ?? paint.blendMode;

        canvas
          ..save()
          ..transform(batchItem.matrix.storage)
          ..drawRect(batchItem.destination, batchItem.paint)
          ..drawImageRect(
            atlas,
            batchItem.source,
            batchItem.destination,
            paint..isAntiAlias = false, // i changed this
          )
          ..restore();
      }
    } else {
      canvas.drawAtlas(
        atlas,
        _transforms,
        _sources,
        _colors,
        blendMode ?? defaultBlendMode,
        cullRect,
        paint,
      );
    }
  }

I couldn't produce the artifacts anymore.
https://user-images.githubusercontent.com/41200990/147857916-af79ac0d-3c3f-431b-b18e-6f63601e046f.mp4
Would be cool if someone else could confirm this, because I am not 100% if I am not seeing ghosts after spending to long on this problem.
Hope this helps!

Hey, I might have found a solution. After spending hours trying different solutions to find a workaround (which I actually did aswell) I found out that this problem does not appear when you exactly use canvas.drawRectImage AND set the isAntialias of the Paint instance to false. If you for example use canvas.drawImage it simply does not matter if isAntialias is true or false, the artifacts will eventually appear. I have no clue why that is...
I fixed the game of @Jcupzz by stepping in the source of Flame where the TiledMap is painted. And it does use canvas.drawRectImage, but isAntialias is not set, so by default true, so I set it to false manually.
This is the file but the latest version is slightly different than the version of @Jcupzz: https://github.com/flame-engine/flame/blob/main/packages/flame/lib/src/sprite_batch.dart
void render(
    Canvas canvas, {
    BlendMode? blendMode,
    Rect? cullRect,
    Paint? paint,
  }) {
    paint ??= Paint();

    if (kIsWeb) {
      for (final batchItem in _batchItems) {
        paint..blendMode = blendMode ?? paint.blendMode;

        canvas
          ..save()
          ..transform(batchItem.matrix.storage)
          ..drawRect(batchItem.destination, batchItem.paint)
          ..drawImageRect(
            atlas,
            batchItem.source,
            batchItem.destination,
            paint..isAntiAlias = false, // i changed this
          )
          ..restore();
      }
    } else {
      canvas.drawAtlas(
        atlas,
        _transforms,
        _sources,
        _colors,
        blendMode ?? defaultBlendMode,
        cullRect,
        paint,
      );
    }
  }

I couldn't produce the artifacts anymore.
2022-01-01.19-23-46.mp4
Would be cool if someone else could confirm this, because I am not 100% if I am not seeing ghosts after spending to long on this problem.
Hope this helps!

I appreciate the efforts you have taken, good job. I tested with paint..isAntiAlias = false it worked in mine too. However, I was working on a latest version of tile image which I made by editing in photoshop which I haven't uploaded to github yet. In that newer version of game even though I made paint..isAntiAlias = false and tested the problem persists, sadly there are white vertical lines.
https://user-images.githubusercontent.com/52130837/147858738-48e7a634-2b75-4b59-b244-4f0e65e49e38.mp4
For the above new version I haven't added extrusion to the tile image(tile width is 64).
Well, for the one that you have tested there I think I have added extrusion of 2 or 1 pixels(not sure), because in the tmx file the tile width and height is 66.
So, I think the actual problem is not fully solved. But you have found a work around to solve the problem @felithium 👏👏👏

Hey, I might have found a solution. After spending hours trying different solutions to find a workaround (which I actually did aswell) I found out that this problem does not appear when you exactly use canvas.drawRectImage AND set the isAntialias of the Paint instance to false. If you for example use canvas.drawImage it simply does not matter if isAntialias is true or false, the artifacts will eventually appear. I have no clue why that is...
I fixed the game of @Jcupzz by stepping in the source of Flame where the TiledMap is painted. And it does use canvas.drawRectImage, but isAntialias is not set, so by default true, so I set it to false manually.
This is the file but the latest version is slightly different than the version of @Jcupzz: https://github.com/flame-engine/flame/blob/main/packages/flame/lib/src/sprite_batch.dart
void render(
    Canvas canvas, {
    BlendMode? blendMode,
    Rect? cullRect,
    Paint? paint,
  }) {
    paint ??= Paint();

    if (kIsWeb) {
      for (final batchItem in _batchItems) {
        paint..blendMode = blendMode ?? paint.blendMode;

        canvas
          ..save()
          ..transform(batchItem.matrix.storage)
          ..drawRect(batchItem.destination, batchItem.paint)
          ..drawImageRect(
            atlas,
            batchItem.source,
            batchItem.destination,
            paint..isAntiAlias = false, // i changed this
          )
          ..restore();
      }
    } else {
      canvas.drawAtlas(
        atlas,
        _transforms,
        _sources,
        _colors,
        blendMode ?? defaultBlendMode,
        cullRect,
        paint,
      );
    }
  }

I couldn't produce the artifacts anymore.
2022-01-01.19-23-46.mp4
Would be cool if someone else could confirm this, because I am not 100% if I am not seeing ghosts after spending to long on this problem.
Hope this helps!

I appreciate the efforts you have taken, good job. I tested with paint..isAntiAlias = false it worked in mine too. However, I was working on a latest version of tile image which I made by editing in photoshop which I haven't uploaded to github yet. In that newer version of game even though I made paint..isAntiAlias = false and tested the problem persists, sadly there are white vertical lines.
https://user-images.githubusercontent.com/52130837/147858738-48e7a634-2b75-4b59-b244-4f0e65e49e38.mp4
For the above new version I haven't added extrusion to the tile image(tile width is 64).
Well, for the one that you have tested there I think I have added extrusion of 2 or 1 pixels(not sure), because in the tmx file the tile width and height is 66.
So, I think the actual problem is not fully solved. But you have found a work around to solve the problem @felithium 👏👏👏

Hey, I might have found a solution. After spending hours trying different solutions to find a workaround (which I actually did aswell) I found out that this problem does not appear when you exactly use canvas.drawRectImage AND set the isAntialias of the Paint instance to false. If you for example use canvas.drawImage it simply does not matter if isAntialias is true or false, the artifacts will eventually appear. I have no clue why that is...
I fixed the game of @Jcupzz by stepping in the source of Flame where the TiledMap is painted. And it does use canvas.drawRectImage, but isAntialias is not set, so by default true, so I set it to false manually.
This is the file but the latest version is slightly different than the version of @Jcupzz: https://github.com/flame-engine/flame/blob/main/packages/flame/lib/src/sprite_batch.dart
void render(
    Canvas canvas, {
    BlendMode? blendMode,
    Rect? cullRect,
    Paint? paint,
  }) {
    paint ??= Paint();

    if (kIsWeb) {
      for (final batchItem in _batchItems) {
        paint..blendMode = blendMode ?? paint.blendMode;

        canvas
          ..save()
          ..transform(batchItem.matrix.storage)
          ..drawRect(batchItem.destination, batchItem.paint)
          ..drawImageRect(
            atlas,
            batchItem.source,
            batchItem.destination,
            paint..isAntiAlias = false, // i changed this
          )
          ..restore();
      }
    } else {
      canvas.drawAtlas(
        atlas,
        _transforms,
        _sources,
        _colors,
        blendMode ?? defaultBlendMode,
        cullRect,
        paint,
      );
    }
  }

I couldn't produce the artifacts anymore.
2022-01-01.19-23-46.mp4
Would be cool if someone else could confirm this, because I am not 100% if I am not seeing ghosts after spending to long on this problem.
Hope this helps!

I also discovered this bug some time ago... I wanted to make a tile based game with Flutter / Flame, but can't do it because of this. I opened issues on this in the Flutter (flutter/flutter#74127) and Flame #637 repo some time ago with no success. There is also a big issue (flutter/flutter#14288) on this in the flutter repo which was opened in 2018 but is not resolved yet...
I think it hast to do with the methods canvas.scale and canvas.translate. Every plattform even Android is affected (just scale the canvas by something like 1.32). It just happens that certain screen sizes with the right scaling dont produce this bug. For example when I move Mario in the game of @Jcupzz I have no problems only when i resize the browser windows from full screen. (I have a 4k monitor)
It would be cool, if we find a fix / workaround for this, because a friend of mine an me really want to make a tile based game with Flame.
The following is a minimal example to reproduce this (resize the window if it doesn't happen):
import 'package:flame/game.dart';
import 'package:flutter/material.dart';

void main() => runApp(GameWidget(game: MyGame()));

class MyGame extends FlameGame {
  Paint p = Paint()..color = Colors.blue;

  @override
  void render(Canvas canvas) {
    super.render(canvas);

    int tilesInX = 16;
    int tilesInY = 16;
    double tileSize = 16;

    canvas.scale(size.x / (tilesInX * tileSize));

    for (int x = 0; x < tilesInX; x++) {
      for (int y = 0; y < tilesInY; y++) {
        canvas.drawRect(
          Rect.fromLTWH(
            x * tileSize,
            y * tileSize,
            tileSize,
            tileSize,
          ),
          p,
        );
      }
    }
  }
}

I also tested this with paint..isAntiAlias = false but didn't work. So I think maybe in mario it worked because of the extrusion of 1 or 2 pixels( I don't remember it correctly)

Hey, I might have found a solution. After spending hours trying different solutions to find a workaround (which I actually did aswell) I found out that this problem does not appear when you exactly use canvas.drawRectImage AND set the isAntialias of the Paint instance to false. If you for example use canvas.drawImage it simply does not matter if isAntialias is true or false, the artifacts will eventually appear. I have no clue why that is...
I fixed the game of @Jcupzz by stepping in the source of Flame where the TiledMap is painted. And it does use canvas.drawRectImage, but isAntialias is not set, so by default true, so I set it to false manually.
This is the file but the latest version is slightly different than the version of @Jcupzz: https://github.com/flame-engine/flame/blob/main/packages/flame/lib/src/sprite_batch.dart
void render(
    Canvas canvas, {
    BlendMode? blendMode,
    Rect? cullRect,
    Paint? paint,
  }) {
    paint ??= Paint();

    if (kIsWeb) {
      for (final batchItem in _batchItems) {
        paint..blendMode = blendMode ?? paint.blendMode;

        canvas
          ..save()
          ..transform(batchItem.matrix.storage)
          ..drawRect(batchItem.destination, batchItem.paint)
          ..drawImageRect(
            atlas,
            batchItem.source,
            batchItem.destination,
            paint..isAntiAlias = false, // i changed this
          )
          ..restore();
      }
    } else {
      canvas.drawAtlas(
        atlas,
        _transforms,
        _sources,
        _colors,
        blendMode ?? defaultBlendMode,
        cullRect,
        paint,
      );
    }
  }

I couldn't produce the artifacts anymore.
2022-01-01.19-23-46.mp4
Would be cool if someone else could confirm this, because I am not 100% if I am not seeing ghosts after spending to long on this problem.
Hope this helps!

I also discovered this bug some time ago... I wanted to make a tile based game with Flutter / Flame, but can't do it because of this. I opened issues on this in the Flutter (flutter/flutter#74127) and Flame #637 repo some time ago with no success. There is also a big issue (flutter/flutter#14288) on this in the flutter repo which was opened in 2018 but is not resolved yet...
I think it hast to do with the methods canvas.scale and canvas.translate. Every plattform even Android is affected (just scale the canvas by something like 1.32). It just happens that certain screen sizes with the right scaling dont produce this bug. For example when I move Mario in the game of @Jcupzz I have no problems only when i resize the browser windows from full screen. (I have a 4k monitor)
It would be cool, if we find a fix / workaround for this, because a friend of mine an me really want to make a tile based game with Flame.
The following is a minimal example to reproduce this (resize the window if it doesn't happen):
import 'package:flame/game.dart';
import 'package:flutter/material.dart';

void main() => runApp(GameWidget(game: MyGame()));

class MyGame extends FlameGame {
  Paint p = Paint()..color = Colors.blue;

  @override
  void render(Canvas canvas) {
    super.render(canvas);

    int tilesInX = 16;
    int tilesInY = 16;
    double tileSize = 16;

    canvas.scale(size.x / (tilesInX * tileSize));

    for (int x = 0; x < tilesInX; x++) {
      for (int y = 0; y < tilesInY; y++) {
        canvas.drawRect(
          Rect.fromLTWH(
            x * tileSize,
            y * tileSize,
            tileSize,
            tileSize,
          ),
          p,
        );
      }
    }
  }
}

I also tested this with paint..isAntiAlias = false but didn't work. So I think maybe in mario it worked because of the extrusion of 1 or 2 pixels( I don't remember it correctly)

This could also have to do with rendering pixel art at non integer scales. Tiles that are, for example, 16 pixels wide, aren't going to render very well scaled to 17 pixels wide. This is a common issue with pixel art. It can be somewhat fixed by what's been discussed above, i.e. using antialiasing, but this subtly blends colors together, somewhat ruining the perfectness of pixel art. I've instead fixed it in my game by ensuring everything is positioned and scaled at integer increments. Crucially, I made my own copy of FixedResolutionViewport and modified it to only scale at integer increments. This works for my pixel perfect game but might not be suited for every game.

Interesting, so you restrict the camera zoom level to integers (1, 2, 3, ...)? And the viewfinder's position to integer coordinates as well? And same for all the components?

Yes, everything is stuck to an integer grid and specifically I ceil the scale of the viewport. This way it's locked to an integer scale slightly larger than the screen to fill it rather than flooring or rounding. This also means I can't take advantage of the built-in camera smoothing since I have to jump from pixel to pixel. I may figure out a way around that but haven't gotten there yet.
As a side note, I'm using flame_oxygen, which means I think I have more control to make my systems operate at integers only.

Interesting, what about component rendering -- how do you ensure that a component renders at the integer screen coordinates only?

I just use a rounded version of the position component before rendering, which locks it to the pixel grid. Even if the viewport is scaled up, the sprites scale and lock to the pixel grid, keeping all the sprites consistent, and the whole scene like a single pixel art image.

Crucially, I made my own copy of FixedResolutionViewport and modified it to only scale at integer increments.

Is there any sample code that you can share?

Sure, it's a small change. I copied the full FixedResolutionViewport class from viewport.dart to a file in my project and in resize added a .ceil().toDouble() to the _scale:
157,160c55,61
<     _scale = math.min(
<       canvasSize!.x / effectiveSize.x,
<       canvasSize!.y / effectiveSize.y,
<     );
---
>     _scale = math
>         .min(
>           canvasSize!.x / effectiveSize.x,
>           canvasSize!.y / effectiveSize.y,
>         )
>         .ceil()
>         .toDouble();

I also round() the _scaledSize in order to ensure the viewport sits on an exact pixel, like this:
*** 165,168 ****
      _resizeOffset
        ..setFrom(canvasSize!)
        ..sub(_scaledSize)
<       ..scale(0.5);
--- 66,70 ----
      _resizeOffset
        ..setFrom(canvasSize!)
        ..sub(_scaledSize)
>       ..scale(0.5)
>       ..round();

You can replace either of those with ceil, floor, or round for your needs, but I chose ceil for _scale so that the scene would scale outside of the window to fill the screen more. Of course that cuts off some of my game world but that's fine for my game. I round _resizeOffset to match all my other entities which are also rounding their coordinates.
Then of course create and apply your custom viewport to the camera. Camera and Viewport

Do you want to PR that viewport @natebot13? It seems like it could be useful to others too.

Thank you for the promising solutions.
I added the filterQuality setting in addition to paint..isAntiAlias = false and it improved mine.
void render(
    Canvas canvas, {
    BlendMode? blendMode,
    Rect? cullRect,
    Paint? paint,
  }) {
    paint ??= Paint();

    if (kIsWeb) {
      for (final batchItem in _batchItems) {
        paint..blendMode = blendMode ?? paint.blendMode;

        canvas
          ..save()
          ..transform(batchItem.matrix.storage)
          ..drawRect(batchItem.destination, batchItem.paint)
          ..drawImageRect(
            atlas,
            batchItem.source,
            batchItem.destination,
            paint..isAntiAlias = false
              ..filterQuality = FilterQuality.low, // i changed this
          )
          ..restore();
      }
    } else {
      canvas.drawAtlas(
        atlas,
        _transforms,
        _sources,
        _colors,
        blendMode ?? defaultBlendMode,
        cullRect,
        paint,
      );
    }
  }

Not really a solution, but if you run with Impeller this issue shouldn't occur.

Here's a great article by @erickzanardo that explains how to work around this issue:
https://verygood.ventures/blog/solving-super-dashs-rendering-challenges-eliminating-ghost-lines-for-a-seamless-gaming-experience?utm_campaign=ghost_lines&utm_source=twitter&utm_medium=social

@spydon Thank you, for linking the article. I was running into the same problem and will probably endup doing this in the short term. However it seems that is a persisting issue and a Viewport that scales to the device pixel boundaries seems to me like a more sustainable solution.
I looked into implementing #2810 however I was not able to. I managed to get the lines to be static (instead of changing when moving) but I was unable to replicate the effect that @natebot13 was able to achieve.
Is there any documentation on how the Viewport/Viewfinder work together and why these classes all inherit a resolution, and how the ScaleProvider affects the cameras behaviour? Related to this I have also found it difficult to convert screen coordinates into world coordinates! However I could not understand what is actually happening from the source code alone and have not found additonal resources.
I am happy to implement #2810 myself if there is further documentation available, otherwise any help would be greatly appreciated!

Is there any documentation on how the Viewport/Viewfinder work together

If you've already read the docs about it on our docs page I can recommend reading the dartdocs that accompany the code, they are pretty good.

and why these classes all inherit a resolution, and how the ScaleProvider affects the cameras behaviour?

The scale for the viewfinder is the zoom and the scale for the viewport is used to set up things like the FixedResolutionViewport.

Related to this I have also found it difficult to convert screen coordinates into world coordinates!

Just use: (updating soon, on the phone)

Just took a brief look at the code again: While the default viewports do have dartdocs explaining what they do, they do not have dartdocs/comments explaining how they do it.
I tried basing a device-pixel integer viewport on the FixedResolutionViewPort and the old implementation I believe, but did not really understand what is happening, esspecially what the class it self, it's super-class and the ScaleProvider class change regarding the viewports behaviour.
I will look into this further after the holidays 🎅

I think I did however the values did not match what I expected, I was particulary confused because these can be called on multiple objects. Did I understand correctly that I first need to translate them from screen to global coordinates using the camera and then from global to local using the World component?

No, you only have to do it on the CameraComponent and it will bring it straight to world coordinates, since the world doesn't modify the coordinates, it is only observed through the camera.

No, you only have to do it on the CameraComponent and it will bring it straight to world coordinates, since the world doesn't modify the coordinates, it is only observed through the camera.

Ah just had a quick look at my code, turns out I was only using the viewfinder to convert from canvas to world coordinates, I'm guessing thats where the discrepancy came from. I will test it once I'm back at work.
Thank you for the quick response, eventhough this is off-topic for this issue 😄

Ah just had a quick look at my code, turns out I was only using the viewfinder to convert from canvas to world coordinates, I'm guessing thats where the discrepancy came from. I will test it once I'm back at work.

Ah true, dartdocs are for "what it does" not "how it does it".

Thank you for the quick response, eventhough this is off-topic for this issue 😄

Np, I can recommend joining our Discord server if you're not there already btw.

So I tried again to fix this issue, firstly I added margins and spacing. That seemed to make the lines "smoother" or lighter, but they are still there. However they are now static and horizontal!
I tried to implement the DeviceIntegerViewport without much luck:
class DeviceIntegerViewport extends Viewport implements ReadOnlyScaleProvider {
  static FlutterView _firstView() =>
      f.WidgetsBinding.instance.platformDispatcher.views.first;

  bool clipping;

  DeviceIntegerViewport({this.clipping = true});

  double _ratio = 0;

  @override
  Vector2 size = Vector2.zero();

  @override
  Vector2 get scale => Vector2.all(1 / _ratio);

  @override
  void onLoad() => _resize();

  @override
  void onViewportResize() => _resize();

  void _resize() {
    final _size = _firstView().physicalSize.toVector2();
    if (_size == size) return;

    size = _size;
    _ratio = _firstView().devicePixelRatio;
    position.round();
  }

  @override
  void clip(Canvas canvas) {
    if (clipping) canvas.clipRect(size.toRect());
  }
}

A side from not showing any visible effect it also does not change size properly but I do not understand why, when resizing the browser window it seems to change size at all (causing clipping when enlarging and not moving the centered player to the center). However as far as I understand this should work, what am I missing?

Correction: There are no lines anymore but I can see the background between them, checking if I correctly added margin and spacing. Still the Viewport I have written does not work/do anything 😢

It appears like the entire tile is shown, so maybe the transparent margin/spacing causes the background to show through?

When zooming by 2 using the viewfinder the lines appear all around:

Changing the viewfinder zoom to devicePixelRation or its inverse also resulted in only horizontal lines. Therefore I think this is the same bug.
Changing the window size it is possible to find a sweet spot where there are no lines.
This was all tested without a viewport!

Hey @benni-tec 👋
Have you tried the suggested solution at the Troubleshooting section? It has solved that issue in many of our projects

I think I fixed a part of the Viewport, it does properly change size now, but the centered player still does not stay centred (do I need to adjust the position by the difference?).
The lines now allways appear vertically and horizontally and stay consistent when resizing. Basically I'm forcing the game to always use the physical size and the adjust by the inverse of the devicePixelRation to undo the scaling flutter is doing, is this correct?
class DeviceIntegerViewport extends Viewport with f.WidgetsBindingObserver implements ReadOnlyScaleProvider {
  static FlutterView _firstView() => f.WidgetsFlutterBinding.ensureInitialized().platformDispatcher.views.first;

  bool clipping;

  DeviceIntegerViewport({this.clipping = true});

  Vector2 _size = _firstView().physicalSize.toVector2();
  double _ratio = _firstView().devicePixelRatio;

  @override
  void onLoad() {
    f.WidgetsBinding.instance.addObserver(this);
  }

  @override
  void didChangeMetrics() {
    _size = _firstView().physicalSize.toVector2();
    _ratio = _firstView().devicePixelRatio;

    position.round();
  }

  @override
  Vector2 get size => _size;

  @override
  Vector2 get scale => Vector2.all(1 / _ratio);

  @override
  void onViewportResize() => position.round();

  @override
  void clip(Canvas canvas) {
    if (clipping) canvas.clipRect(size.toRect());
  }
}

@spydon @erickzanardo If you prefer I can move this discussion about implementing #2810 in to that issue, however I was hoping that particpants here would have more insight, since a similar solution for the old API was already implemented in this issue!

Especially for large tile sets this does get quite tedious and requires up to 4x the space.

I agree with ya, even on small projects, but with relative big tilesets it can get tedious, I remember that took me some time to go through all of the tiles in Super Dash 🙃

As this was fixed before by adjusting the camera (in the old camera system) I think it should also be possible to do the same with a viewport. Am I wrong in that assumption?

From everything that I researched when trying to solve that issue on Super Dash, I think this is not 100% solvable in the camera code. Like I mention on that article, this error happens due to point-float imprecision, and sadly, there is nothing we can do solve that (at least not without trying to figure out how to build a new whole system of storing point-float numbers in computers 😅).
That imprecision gets worse or better depending on which platform is the game running, for example, on web it is quite noticeable, and that is mostly likely because the JS number has a worse accuracy in other platforms, ofc this is not a rule and in some games it may run better on web than elsewhere, but at least in my experience that was on pattern that I noticed.
I don't really believe that we can 100% automatically solve the issue without the user intervention, but I believe that solution presented on the article is the only achievable one (I would love to be proved wrong on this btw), so I think what we should do, is to expand it and make it less tedious, for example, now you have to manually select a lot of tiles, I am pretty sure we can make a smart algorithm that would "auto-patch" tiles, making the process less tedious and more scalable for larger projects.

I think currently my biggest problem is that I do not understand how the viewport really works, espacially how virtualSize can impact scaling and such. I tried implementing the scaling (instead of just forcing it to use the physical size) analogous to FixedResolutionViewport without much luck, the behaviour did not change at all.
Is there something I'm missing with the viewport API??
class DeviceIntegerViewport extends Viewport with f.WidgetsBindingObserver implements ReadOnlyScaleProvider {
  static FlutterView _firstView() => f.WidgetsFlutterBinding.ensureInitialized().platformDispatcher.views.first;

  DeviceIntegerViewport();

  Vector2 _physicalSize = _firstView().physicalSize.toVector2();
  late double _ratio = math.min(size.x / _physicalSize.x, size.y / _physicalSize.y);

  @override
  void onLoad() {
    f.WidgetsBinding.instance.addObserver(this);
  }

  @override
  void didChangeMetrics() {
    _physicalSize = _firstView().physicalSize.toVector2();
    onViewportResize();
  }

  @override
  void onViewportResize() {
    final scaleX = size.x / _physicalSize.x;
    final scaleY = size.y / _physicalSize.y;
    _ratio = math.min(scaleX, scaleY);

    position.round();
  }

  @override
  Vector2 get scale => Vector2.all(_ratio);

  @override
  Vector2 get virtualSize => _physicalSize;

  @override
  void clip(Canvas canvas) {}
}

My tests (see above) lead me to believe that this should be possible: With the default viewport the lines change when resizing the browser and they even disappear completly at certain sizes. Shouldn't it be possible then to find that scaling (it should be devicePixelRatio right?) and adjust by that in the viewport?

They disappear because the size of the canvas changes and they probably get closer to a full integer, or to even numbers, which are mostly are likely to cause imprecision erros, when I tested such approach, it reduced the frequency of the issue, but it didn't solved for good. But like I mentioned, I would love to be proved wrong on this hahahah, so if you feeling motivated on digging more on that approach, that would be awesome, even if it doesn't get 100% solved, but improves, that is great already!

My tests (see above) lead me to believe that this should be possible: With the default viewport the lines change when resizing the browser and they even disappear completly at certain sizes. Shouldn't it be possible then to find that scaling (it should be devicePixelRatio right?) and adjust by that in the viewport?

They disappear because the size of the canvas changes and they probably get closer to a full integer, or to even numbers, which are mostly are likely to cause imprecision erros, when I tested such approach, it reduced the frequency of the issue, but it didn't solved for good. But like I mentioned, I would love to be proved wrong on this hahahah, so if you feeling motivated on digging more on that approach, that would be awesome, even if it doesn't get 100% solved, but improves, that is great already!

Yes I do agree on why this changes, still I think it should be possible. As far as I know the devicePixelRatio is only dependent on the display so it should not change when resizing the window.
I was able to get the lines to be static both using a viewport and by limiting the size of the game-widget using constraints to be a multiple of the devicePixelRatio or its inverse. I think I maximised the lines by doing this. Why shouldn't this also work in reverse, so minimizing the lines?

Whelp now I'm offically confused, as it turns out the devicePixelRatio is hard-coded to 1 in browsers, so nothing of this should realy matter...
How did any of the previous solution involving devicePixelRatio work (in the browser) at all?
I can't spend anymore time on this today I will look into this issue again later, maybe the solution lies in what sizes result in no lines 🤔

So I just had another go at it and fixed the problem in like 5 mintues 🤦
Looking at the sizes that did not cause lines I noticed they were all multiples of 4, so I tried forcing the game widget's size (using a SizedBox) to be a multiple of 4, and it worked!
Actually it also works with a multiple of 2, but not 1 so I'm not realy sure what the 2 actually does but it does work! Huzza
I also used a commit that does not have marings/spacings in the tilesets yet!
I also wrote a small Viewport in order to prevent edges, which works just fine as far as I can tell!
class MultipleViewport extends MaxViewport {
  final int multipleOf;

  MultipleViewport({this.multipleOf = 2, super.children});

  @override
  void onGameResize(Vector2 size) {
    super.onGameResize(size);
    size.x = size.x.nearestMultiple(multipleOf).toDouble();
    size.y = size.y.nearestMultiple(multipleOf).toDouble();
  }

  @override
  bool containsLocalPoint(Vector2 point) => true;

  @override
  void clip(Canvas canvas) {}

  @override
  void onViewportResize() {}
}

extension NearestMultiple on num {
  int nearestMultiple(int of) => this ~/ of * of;
}

@erickzando Could you test this viewport as well and see if it works for you? You are using flame in the browser right?
I'm guessing this would not work if devicePixelRatios != 1, however I did not test this yet!

@benni-tec Interesting, I don't understand how this could work for the general case.
Are all your components placed in relation to the size of the viewport maybe?

No, I'm just using flame_tiled to load the map, it is therfore pixel-aligned.
Just tried it on my laptop, it does not work there because it turns out that flutter now does seem to set devicePixelRatio != 1 in browsers...
Still mutliple-of-2 did fix the issue for devicePixelRatio == 0. Do you have an idea how I could combine these two in a sensible manner?

So I found this issue flutter/flutter#32115 wich can scale to imitate a devicePixelRatio of 1 by @ardera, the widget can also be found in https://gist.github.com/ardera/25a8c81a54fb37b0dc750d383caac5d9
By using my MultipleViewport (with 2 as a multiple) and wrapping the GameWidget in ardera's FakeDevicePixelRatio widget set to 1, I was able to get rid of the lines on my laptop as well!
I will try this later on some more displays, but I think this works now. Still this definetly isn't the most elegant solution especially since it needs a wrapper widget. However this eliminate the need to manually correct the tiles!
Due to time constraints on my part I will stick with it for now!

I forced Impella on macOS, Android and iOS and the lines have gone but now getting unexpected double lines. I think Bilinear filtering is still on since I can see AA where the pink and orange meet.

Seems to have no effect on the rendering
        sprite.paint.isAntiAlias = false;
        sprite.paint.filterQuality = FilterQuality.none;

for what it's worth, @ryokuchayurai 's solution from above (https://github.com/flame-engine/flame/issues/1152#issuecomment-1134349737) seems to fix the issue for me.
i'm merely prototyping a tower defense game with tiled background. not a serious issue. so i needed a quick solution. padding tiles feels like the wrong solution. and FilterQuality.low actually sounds like the right solution for a pixel art game. in fact, FilterQuality.none would be the ideal choice I guess.. :upside_down_face:
weirdly, ofc because why not, the FilterQuality.low fix breaks desktop rendering while fixing web rendering.. :rofl: but a !kIsWeb for the paint part works in this case.
using FilterQuality.none, however, seems to work just fine on my tested platforms. that's what i'm using now.
fyi:
    final map = await TiledComponent.load(
      '$basename.tmx',
      Vector2(16.0, 16.0),
      useAtlas: !kIsWeb,
      layerPaintFactory: (it) => _layerPaint(),
    );

  Paint _layerPaint() {
    return Paint()
      ..isAntiAlias = false
      ..filterQuality = FilterQuality.none;
  }


Feature: Fetch upto 200 news articles

Resolves #2075
Changes

Updated get_news() in Ticker to get up to 200 news articles (previously 8-10)
The method now fetches news directly from the ticker's news page (https://finance.yahoo.com/quote/MSFT/latest-news/) instead of using the previous search based approach which was limiting

Usage
import yfinance as yf
news = yf.Ticker("MSFT").news
print(len(news))

Warning

Breaking change: The returned data structure/schema has changed. Further feedback is required on how to proceed.

Could there be an error if the count is greater than 200? Even if it isn't raised but simply logged?

Also the api returns a 404 response

Can you please show me what you did so I can try reproducing?

Can you please show me what you did so I can try reproducing?

Yes, sorry. After some more testing (to get the exact response) I realized I was sending GET requests and you were sending POST. However I am now getting 200.

@ValueRaider

Can the default count be much lower e.g. 10 to reduce Yahoo server load? I know it's still one web request, but server-side probably different.

Can the default count be much lower e.g. 10 to reduce Yahoo server load? I know it's still one web request, but server-side probably different.

Default for get_news() is now 10 articles.


Provide alternative for $GITHUB_PATH inside MSYS2 with path-type: minimal

I want to use path-type: minimal (the default), but I want to be able to add things to PATH like appending to $GITHUB_PATH does. I don't want to inherit $env:PATH entirely.
Currently, a workaround I use is to do echo 'export PATH=$PATH:/blabla' >> .bashrc, which I don't think is as elegant as the $GITHUB_PATH solution. I propose $MSYS2_PATH as the equivalent to $GITHUB_PATH in MSYS2.

Currently, a workaround I use is to do echo 'export PATH=$PATH:/blabla' >> .bashrc

May I ask why you are using that workaround? Would not the export PATH=path/to/folder:$PATH command work?

I've not thought of that and I'm unsure if that would work. My rationale is that I would add my path directly to PATH by exporting it in .bashrc. I'm not sure if the changes are inherited in next steps (that's what I want).

I'm not sure if the changes are inherited in next steps (that's what I want).

Yes, the changes are "inherited" in next steps if you are using shell: msys2 {0} option in actions yml file.

That did not seem to work. Here is a snippet of what I am doing:
  build_windows_msys2:
    name: Windows
    runs-on: windows-2019
    strategy:
      matrix:
        config:
          - {msystem: MINGW32, arch: i686}
          - {msystem: MINGW64, arch: x86_64}
    defaults:
      run:
        shell: msys2 {0}
    steps:
    - uses: actions/checkout@v3

    - uses: msys2/setup-msys2@v2
      with:
        msystem: ${{ matrix.config.msystem }}
        release: false
        install: >-
          git
          zip
          wget
          curl
          mingw-w64-${{ matrix.config.arch }}-gcc
          mingw-w64-${{ matrix.config.arch }}-ntldd

    - name: Set Environment Variables
      run: |
        echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
        echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-windows-${{ matrix.config.arch }}" >> "$GITHUB_ENV"
        export PATH="$PATH:$HOME/.local/bin:$USERPROFILE/.local/bin:$(cygpath '${{ steps.git-path.outputs.path }}')"

    - uses: actions/setup-python@v4
      id: install-python
      with:
        python-version: '3.11'

    - name: Cache Poetry and other build tools
      id: build-tools
      uses: actions/cache@v3
      with:
        path: ~/.local
        key: build-tools-msys2-${{ runner.os }}-${{ steps.install-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

    - name: Install Poetry
      if: steps.build-tools.outputs.cache-hit != 'true'
      uses: snok/install-poetry@v1

    - name: Configure Poetry
      run: |
        echo "$PATH" # does not have %USERPROFILE%/.local/bin and ~/.local/bin
        poetry config virtualenvs.path "$(cygpath -w "$USERPROFILE/.local/virtualenvs")"

Hopefully this explains my intentions better.

Now I wonder why poetry need additional directories in PATH environment variable. But that would be different topic. Please wait for other to comment on this issue.

If anyone is curious, this worked for me to get MinGW tools working my MSYS2 shell:
      - name: Add MinGW64 to MSYS2 shell PATH
        run: export PATH="${RUNNER_TEMP}/msys64/mingw64/bin:${PATH}"

I have exactly the same problem, exporting the same path in every step isn't ideal, in every other shell env. I can add to GITHUB_PATH once and that's it, but on MSYS2 it doesn't work like that of course.

Appending to .bashrc is a nice workaround for this problem, thx

Also, would be nice to have eg. path parameter on msys2/setup-msys2 action and it should do this work for us behind the scene.

+1 for adding a path input option to append or prefix the path. I'm trying to add only the system nodejs install directory, but not everything, as the npm version available from msys2 doesn't work with latest versions of vite.
I would think this would be rather easy to implement. Could add a new case here (https://github.com/msys2/MSYS2-packages/blob/99ac5123c37254e5e3fdda53663d8c09d30cf1cd/filesystem/profile#L28-L45) which is almost the same as the * case, but add the input path as well.


Set a date for a OSM meetup

A Thursday hacknight or a Saturday
A Mapping party
Attract veterans and newbies alike

Date Set! September 23rd, 2017 from 10am-5pm,


Clarify whether the order of multiple TextEdits matters and what 'overlapping text edits' means

If multiple TextEdits are applied to a text document, all text edits describe changes made to the initial document version. Execution-wise text edits should be applied from the bottom to the top of the text document. Overlapping text edits are not supported.

clarify whether multiple inserts at the same location are allowed or considered  'overlapping text edits'
clarify whether inserts, replaces and deletes can have the same location.
clarify if edits are sorted by the sender, or whether receiver needs to sort them (and how).
ideally, provide a code sample (maybe even API on TextDocument) on how to apply edits

If the language server does not have to order the text edits in the list (as https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#new-textdocumentedit says), the client needs a way to sort the text edits. This would mean ,IMO, that multiple edits in the same location should not be allowed.

Here is what we IMO need to spec:

edits overlap iff edit1.end > edit2.start
if edits touch each other (edit1.end == edit2.start) the order in which they appear matters. The client needs to first apply edit1 and then edit2 iff indexOf(edit1) < indexOf(edit2). Otherwise edit2 and then edit1.
it is up to the client to determine on how to best apply these edits. This might depend on API already available on the client.

@aeschli do you want to take care of this?

@dbaeumer I sort of disagree with your interpretation. IMO the point of having a stipulation that 'edits do not overlap' would be precisely to avoid complexities in the spec of having to specify any details around what order a client should apply them in. In other words the order shouldn't matter to the semantics. Therefore I think we should consider that even if the edits just 'touch' eachother they should be considered as 'overlapping'.
I.e any edits that server could merge together into a single equivalent edit should be considered as 'overlapping' and it should not be allowed. A well-behaved server should make sure to merge such edits to avoid any potential ambiguities around their application order.

IMO the complexity is the same whether we say that the server needs to merge them or the client needs to handle this.
From implementing two servers calling into other libraries both created touching edits but never overlapping edits.

It might be helpful to separate the WorkspaceEdit out into atomic units of work.
A sketch of a design, which also better handles overlapping edits from independent sources:
Allow applyEdits to take an array of WorkspaceEdits. Each WorkspaceEdit is considered an atomic change, it is either applied completely or not at all. Insertions at the same place are handled in order, as @dbaeumer describes above. Insertions at the same place by distinct WorkspaceEdits are considered overlapping. applyEdits when called with an array of WorkspaceEdits returns {appliedEdits: WorkspaceEdit[], incompatibleEdits: WorkspaceEdit[]}. Every edit in incompatibleEdits either overlaps with itself or with at least one edit in appliedEdits.

@aeschli ping :-)


Offline/non-KGS game viewing - transfer SGFs from eidogo? or send user to gokibitz?

This feature already exists.


Cluster name applied to kubernetes but not applied to any of the overrides

Describe the bug
During kubespray run the cluster name is applied to kubernetes from inventory file, but when you attempt to deploy mysql and all openstack services they still refer to the cluster as cluster.local. Also there is no mention of the change in the wiki
To Reproduce
Steps to reproduce the behavior:

Deploy genestack. You will notice

Expected behavior
All affected files need to have default cluster name changed to match the one in the inventory file.
Server (please complete the following information):

OS: Ubuntu
Version 22.04

Additional context
Here is a list of the files that have to be corrected:
the kustomize/mariadb-operator/kustomization.yaml  - clusterName needs to be changed
/opt/genestack/helm-configs/keystone/keystone-helm-overrides.yaml - cluster_domain_suffix needs to be changed
/opt/genestack/helm-configs/glance/glance-helm-overrides.yaml - cluster_domain_suffix needs to be changed
/opt/genestack/helm-configs/heat/heat-helm-overrides.yaml - cluster_domain_suffix needs to be changed
/opt/genestack/helm-configs/cinder/cinder-helm-overrides.yaml - cluster_domain_suffix needs to be changed
/opt/genestack/helm-configs/octavia/octavia-helm-overrides.yaml - cluster_domain_suffix needs to be changed
/opt/genestack/helm-configs/neutron/neutron-helm-overrides - cluster_domain_suffix needs to be changed
/opt/genestack/helm-configs/nova/nova-helm-overrides.yaml - cluster_domain_suffix needs to be changed
/opt/genestack/helm-configs/placement/placement-helm-overrides.yaml - cluster_domain_suffix needs to be changed
/opt/genestack/helm-configs/horizon/horizon-helm-overrides.yaml - cluster_domain_suffix needs to be changed
For skyline the secrets creation has to be corrected:
kubectl --namespace openstack
create secret generic skyline-apiserver-secrets
--type Opaque
--from-literal=service-username="skyline"
--from-literal=service-password="$(< /dev/urandom tr -dc _A-Za-z0-9 | head -c${1:-32};echo;)"
--from-literal=service-domain="service"
--from-literal=service-project="service"
--from-literal=service-project-domain="service"
--from-literal=db-endpoint="mariadb-galera-primary.openstack.svc.<FIX_ME>"
--from-literal=db-name="skyline"
--from-literal=db-username="skyline"
--from-literal=db-password="$(< /dev/urandom tr -dc _A-Za-z0-9 | head -c${1:-32};echo;)"
--from-literal=secret-key="$(< /dev/urandom tr -dc _A-Za-z0-9 | head -c${1:-32};echo;)"
--from-literal=keystone-endpoint="
http://keystone-api.openstack.svc.<FIX_ME>:5000"

--from-literal=default-region="RegionOne"
and then this file also needs to be correct for skyline:
/opt/genestack/kustomize/skyline/base/ingress-apiserver.yaml  - host definition at bottom

There are comments in some/all of the (ex: helm-configs/nova/nova-helm-overrides.yaml) that suggest cluster_domain_suffix can be overridden by env vars. At first glance, I don't see how/where that would be done. There is the k8s_cluster[vars][cluster_name] in the inventory, but I think that's only tangentially related. This might explain why cluster.local still exists in the SJC cluster despite our using specified FQDNs everywhere we thought we needed to.


.destroy() method issue

There is an issue on the later versions of the javascript file. Im not really sure whats causing it but my animation works fine on the 3.0.8 version.
example:
http://peteringram0.github.io/ninjabot/
https://github.com/peteringram0/ninjabot
If you change bodymovin.js script to the latest version when running .destroy and then .loadAnimation you can see in the DOM that the animation is running however it appears tiny or no images are loading. I have been looking though the commit log from the 29th and cant work out what has caused this.
Any ideas?
Thanks :+1:

@peteringram0 yes, there seems to be an error. I'll fix it tonight.
thanks!

Ive spent half the day on it lol, good luck :+1:

@peteringram0 temporarily, you can pass a new object with the animation each time like so:
JSON.parse(JSON.stringify(nodHead))
JSON.parse(JSON.stringify(shakeHead))

Did you have any luck on finding a longer term solution for this please?
Thanks

@peteringram0 I found the issue, and I will upload a quick fix tonight.
I will deploy a final fix on the next big update.


Changing colors dynamically

I am trying to change colors of maphilight dynamically.
reponse = JSON.parse(reponse);
        $('area').each(function()  {
            $(this).attr('data-maphilight', '{"stroke":0, "fillColor":"CCFFCC", "fillOpacity":0.3, "alwaysOn":true}');
        })

        for (var i = 0; reponse.length > i; i++) {
            var test = '#'.concat(reponse[i].nomTerrain);
            $(test).attr('data-maphilight', '{"stroke":0, "fillColor":"FF0000", "fillOpacity":0.3, "alwaysOn":true}');
        }

        $('img[usemap]').maphilight();

This works only once. When it comes to a second time, it doesn't ! It changes CSS classes, but not the maphilight! pls help me !!

Hi lacroixdavid1,
Did you get any workaround for this issue?

Yes it it is working now. Instead of using .attr() i use .data() to change
options on the fly
Le 2015-06-16 6:14 AM, "akshaykamble"<EMAIL_ADDRESS>a écrit :

Hi lacroixdavid1,
Did you get any workaround for this issue?
—
Reply to this email directly or view it on GitHub
https://github.com/kemayo/maphilight/issues/58#issuecomment-112373911.


Bug of greyed out/disabled buttons

What version of Node.js are you using?
18.12.1
What version of npm are you using?
8.19.2
What operating system are you using?
Windows
What version of SnailyCAD are you currently using?
1.32.0
Describe the Bug
The shaded boxes (in Dispatch but surely elsewhere) do not prevent the action of the box from being performed.
Expected Behavior
That we cannot launch the action of the button when the box and the cursor are grayed out
To Reproduce
No response

Admins are able to perform some actions no matter they're active or not. Please see #1133


cbt count takes longer time than expected

Client
Bigtable
Describe Your Environment
cbt count on Bigtable with millions of records
Expected Behavior
cbt count should return and display the #records even if the records are more than 100Million.
Actual Behavior
cbt count does not return records for more than 1 hour
cbt throws below error, while trying the count operation ->
Retryable error: rpc error: code = DeadlineExceeded desc
Here is the command that I use from cloud shell ->
cbt -project my-project -instance my-instance count my-table
The table contains around 100-110 million records. But I need to verify it by running a count on Bigtable.
Bigtable instance configuration details -
Instance type - Development
Storage type - HDD

CBT count does a read rows and counts on the client side.  We don't have an easier way to do that.  You can run a Dataflow job, but that's also a bit onerous.

There are probably two TODOs:

There's probably a bug in our GoLang retry logic which didn't resume after the deadline exceeded.

There's also an opportunity for a more effective method of counting.  We can use SampleRowKeys to get partitions of the table, and then run multiple go routines to read multiple partitions concurrently.

@enocom, we should address TODO 1 first, which would likely require some discussion.  @garye, any insights would be appreciated about TODO 1.
TODO 2 is speculative, and should be filed as a separate feature request.

From the message it looks like it was retried. The scan encountered the server-side deadline but should be retried after that. It probably just hadn't finished yet when @pranay29 gave up.

@pranay29 Does cbt exit when it reports Retryable error or is it logging that message without exiting?

I will retry and give you the exact message but I think it retries.

The error in the OP is Retryable error: rpc error: code = DeadlineExceeded desc.  As @garye said, that's a warning only, and that a retry is in progress.

Yes, I see that in the code here. Other than splitting a large request into multiple parts (as you mentioned above), I'm not sure if there's anything actionable here. The retry code looks OK to me.

These are the logs from the command that I used to count on the Bigtable table -
2018/10/18 21:31:12 Retryable error: rpc error: code = DeadlineExceeded desc = Error while reading table 'projects/my-proj/instances/my-instance/tables/my-table', retrying in 93.774911ms
2018/10/18 21:58:40 Retryable error: rpc error: code = DeadlineExceeded desc = Error while reading table 'projects/my-project/instances/my-instance/tables/my-table', retrying in 111.569721ms

As we see from the timestamps, it is quite evident that count is not optimized, though reads  from Bigtable are.

Thanks for the update @pranay29.
The Retryable error you're seeing is the client bumping up against a deadline on the backend.
I think the suggestion by @sduskis is the best approach.

CBT count does a read rows and counts on the client side. We don't have an easier way to do that. You can run a Dataflow job, but that's also a bit onerous.

Yes @sduskis you are right. We even tried a Dataflow job but it returned with same Retryable error.
It would be nice to have a fix around this so that count command returns results more effectively.


Clean up of previously generated benchmarks

When I created a benchmark, some classes are generated to output path. Then I deleted this benchmark from sources. But sbt benchmarkproject/run is still trying to find those classes causing error as follows:
[error]   symbol:   class JMHSample_01_HelloWorld
[error]   location: package org.openjdk.jmh.samples
[error] /Users/alex/projects/orca/benchmarks/target/scala-2.11/generated-sources/jmh/org/openjdk/jmh/samples/generated/JMHSample_01_HelloWorld_wellHelloThere.java:68: error: cannot find symbol
[error]                 l_jmhsample_01_helloworld0_0.wellHelloThere();
[error]

Is it a bug? Or am I doing something wrong?

running clean and compile in the benchmark project should handle that,
but it would be nice to have the run task know that streams had changes and trigger a new incremental compile

Correct @sokrahta, I'd love to implement this tracking feature however do not have the time currently. If you'd be able to help out please do! :-)


Add pkcs7 format for a digital signature.

Hi,
thanks for your great work!
Could you add pkcs7 format, the one used for signing via smart cards, and therefore the digital signature?
If you interface with the browser certificate manager to obtain it, and make the software create at least a basic signature, CADES Baseline, then it can be compliant for the current qualified electronic signature exemple:
https://sourceforge.net/projects/j4sign/files/freesigner/
Thanks again for your beautiful work!
Happy new Year!
Regards,
A.

Currently cert signing has some issues so we wont be adding anything to it until that issue is resolved.
We are looking into this tho, once issue is resolved we may be able to add other formats
https://github.com/Stirling-Tools/Stirling-PDF/issues/364

#650 fixes the PDF signing issue and introduces support for a new format: Java Keystore. Since PKCS7, as well as other formats can be converted into JKS using the keytool CLI program, there are no plans to implement dedicated support for each specific format.
The keytool program is included with any standard JDK/JRE distribution. You can find it under %JAVA_HOME%/bin on Windows.


Preparing custom datasets instructions

This tutorial explains how users can bring their own datasets or add new datasets.
Fixes #487

This is a documentation update, there shouldn't be any failing tests. It looks like there is some incorrect test code in the "main" branch as of today @carmocca


How would I include a SQLite database with this template?

Would I need to place all of the database-oriented files into the "static files folder"?

Depends.

Do you want to ship a SQLite DB with pre-defined data? If so, adding it to the static directory would be the easiest solution.

You can also choose to utilize Electron Builder, I would recommend reading this resource. You can define a path to your SQLite DB in there and tell Electron Builder to copy it to a specific location when the app is getting bundled.

If your database doesn't contain any pre-defined data I think the most logical step would be to generate a SQLite DB on the user's machine during runtime.

All 3 are completely valid options. I recommend moving the SQLite db when your app is run for the first time to the appData directory (app.getPath('appData')).

Also, I think this issue has less to do with the template itself, and rather on how you should handle these files in an Electron app. I honestly have never used SQLite with Electron, but I bet there are useful resources out there on the internet.

Mr. Graham,
First, a million thanks for your updates and explanations.
I created an .env file and wrote these values to it. Regrettably, the default path persists. How do I make the changes stick?
NODE_ENV=local
NODE_STORAGE_PATH=documents
NODE_STORAGE_PATH_EXTRA=/Users/imaginativeone/Documents/Software-Development/Electron/electron-sqlite-vue-tailwind
NODE_STORAGE_PATH_DATABASE_EXTRA=/database
Thanks,
Doug

On Mar 18, 2022, at 4:22 PM, Bart Ramaekers @.***> wrote:
Also, I think this issue has less to do with the template itself, and rather on how you should handle these files in an Electron app. I honestly have never used SQLite with Electron, but I bet there are useful resources out there on the internet.
—
Reply to this email directly, view it on GitHub https://github.com/Deluze/electron-vue-template/issues/12#issuecomment-1072770622, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMQNA444SCFWQROB6TWCV3VATQY5ANCNFSM5RCXEVTA.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.

Mr. Ramaekers,
I wanted to make sure to acknowledge you as well.
Doug

On Mar 20, 2022, at 9:19 PM, Doug Franklin @.***> wrote:
Mr. Graham,
First, a million thanks for your updates and explanations.
I created an .env file and wrote these values to it. Regrettably, the default path persists. How do I make the changes stick?
NODE_ENV=local
NODE_STORAGE_PATH=documents
NODE_STORAGE_PATH_EXTRA=/Users/imaginativeone/Documents/Software-Development/Electron/electron-sqlite-vue-tailwind
NODE_STORAGE_PATH_DATABASE_EXTRA=/database
Thanks,
Doug

On Mar 18, 2022, at 4:22 PM, Bart Ramaekers @.*** @.***>> wrote:
Also, I think this issue has less to do with the template itself, and rather on how you should handle these files in an Electron app. I honestly have never used SQLite with Electron, but I bet there are useful resources out there on the internet.
—
Reply to this email directly, view it on GitHub https://github.com/Deluze/electron-vue-template/issues/12#issuecomment-1072770622, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMQNA444SCFWQROB6TWCV3VATQY5ANCNFSM5RCXEVTA.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.


"Release 2.7.2"

@nibalizer Looks good. Thanks for releasing a new tag with updated versions. It is a lot nicer to specify tags in my Puppetfile than specific commit SHA's :)


hadolint ignore=DL3008

Is this # hadolint ignore=DL3008 necessary?

Not removed. Better to have this code

@vladpona can you explain the purpose?

@davidgatti The problem is with python vendor.
As you may know the python is top slow and unstable scripting language. But also top popular and fastest growing.
Sometimes vendor may change minor package version inside of distributive. For example I saw this behavior inside Debian 9. When the package version was changed from 2.5 to 2.7
This is not only "update" but switch to another branch. And it triggers warning (at APT in my case) with non-zero return code.
This is not a problem if you just interacting with OS. You just will see the warning like "W: package *** switched to another version". And the update process will be done.
But for docker every non-zero return inside of Dockerfile will break the installation.
So "hadolint ignore=xxx" - it's instructions to ignore such warnings and to continue installation process

Wooo, who knew :) thank you for the explanation.


This PR is related to BAEL-7090

This PR aims to add a Java class to the module.

retest this please


Consider allowing table mapping by attribute on the DbSet

In #15746 is is suggested that we allow TableAttribute on DbSet properties. Using Table for this is problematic as described there, but we could allow another attribute to be used for this.
Also, we should consider this along with #15241 which is also about attributing the DbSet property for a similar reason.

Looks nice, but there are another real case scenario which is not covered by this feature:
Tables may contain archived data splitted by years
GOODS_1995
GOODS_1996
...

So, based on year you have to change table name.
What is more flexible is to change table name in linq chain
context.DbSet<Goods>().TableName(“GOODS_” + year)
   .Where(..)
   ...

@sdanyliv I think the suggested method to deal with that problem in relational databases is to use a separate column called year and then just include it in any queries you write i.e. SELECT * FROM goods WHERE year=1995.

@shravan2x, it is not suggested method it is how database designed to avoid table locks. And it is just sample. In real situation there are more complicated cases.

Oh that's interesting, I haven't encountered something like that before. Do you have any pointers to example use cases?

@shravan2x I had a similar use-case with a legacy application in a previous job... The "primary key" (generated in a client app) was appended as a suffix to related table names. It was a workaround for slow data access times using VB6 + Microsoft Access. The challenge is developers want to use a modern tech stack that improves their productivity, but sometimes have to put patches in to support legacy systems... I wound up writing a small ORM very similar to Dapper to support accessing that system.
The use-case I would recommend implementing - and wouldn't mind doing - would allow a syntax similar to:
context.Dbset<T>.ToTable("Goods", null /* default */).WithPrefix($"{entity.DateField.Year}_");
// - AND ALSO -
context.DbSet<T>.ToTable("Goods", "Shipping").WithSuffix($"_{entity.PrimaryKey}");

This sort of use-case kind of stinks, but it's a real use-case for more than a few customer scenarios I'm sure. In most cases, I think the utility of a capability like this is based more on integrating with legacy applications than it is on new projects.
The obvious trade-off is that implementing something like what I described effectively encourages continuing designs similar to this in non-legacy scenarios, where proper indexing and design would likely solve whatever problems this pattern is attempting to solve... How difficult would it be for a customer to support a use-case similar to this as an extension?
As a consumer, I'd rather use a product that's got a ton of good integration testing like EFCore than rolling my own implementation.
Do you guys have any ideas about how you'd like to see the original issues might be implemented that someone could review? I wouldn't mind taking a stab.


mvn打包七牛云jar包问题

在打包七牛云jar报的时候报一下错误：
[root@localhost plugin_qiniu-master]# mvn clean assembly:assembly
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for                        io.github.otale:plugin_qiniu:jar:1.0.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-comp                       iler-plugin is missing. @ line 83, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten t                       he stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support buildin                       g such malformed projects.
[WARNING]
[INFO]
[INFO] --------------------< io.github.otale:plugin_qiniu >--------------------
[INFO] Building plugin_qiniu 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ plugin_qiniu ---
[INFO]
[INFO] --------------------< io.github.otale:plugin_qiniu >--------------------
[INFO] Building plugin_qiniu 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> maven-assembly-plugin:2.2-beta-5:assembly (default-cli) > package @ p                       lugin_qiniu >>>
Downloading from central: https://repo.maven.apache.org/maven2/io/github/otale/t                       ale/least/tale-least.pom
[WARNING] The POM for io.github.otale:tale:jar:least is missing, no dependency i                       nformation available
Downloading from central: https://repo.maven.apache.org/maven2/io/github/otale/t                       ale/least/tale-least.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.960 s
[INFO] Finished at: 2018-06-05T09:03:45+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project plugin_qiniu: Could not resolve depend                       encies for project io.github.otale:plugin_qiniu:jar:1.0.0: Could not find artifa                       ct io.github.otale:tale:jar:least in central (https://repo.maven.apache.org/mave                       n2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit                       ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea                       d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso                       lutionException
[root@localhost plugin_qiniu-master]#
把maven源换成阿里云的，同样的报错，求解！

我对java不是很懂，能把你打包好的七牛云插件发我吗？


The example to use this?

can you give the example to use this library?
i don't understand to use this.

Hey,
I don't know how familiar you are with golang, but here is a short example that receives and prints text messages. Keep in mind that signatures may still change. This example uses Baozisoftware/qrcode-terminal-go to print the qr code in the terminal window (it's pretty big).
package main

import (
	"fmt"
	whatsapp "github.com/Rhymen/go-whatsapp"
	"os"
	"time"
	"github.com/Baozisoftware/qrcode-terminal-go"
)

func main() {
	wac, err := whatsapp.NewConn(15 * time.Second)
	if err != nil {
		fmt.Fprintf(os.Stderr, "error creating connection: %v\n", err)
		os.Exit(1)
	}

	qrChan := make(chan string)
	printQr := func() {
		obj := qrcodeTerminal.New()
		obj.Get(<-qrChan).Print()
	}

	go printQr()
	_, err = wac.Login(qrChan)
	if err != nil {
		fmt.Fprintf(os.Stderr, "error logging in: %v\n", err)
		os.Exit(1)
	}

	wac.AddHandler(myHandler{})
	<-time.After(1 * time.Minute)
}

type myHandler struct{}

func (myHandler) HandleError(err error) {
	fmt.Fprintf(os.Stderr, "%v", err)
}

func (myHandler) HandleTextMessage(message whatsapp.TextMessage) {
	fmt.Println(message)
}

we added some basic examples to repo, so that it is easy to understand how to use our package


Bug Fix bugs to pass TPCDS cases

Proposed changes
Issue Number: close #xxx
Problem summary
Describe your changes.
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[ ] No
[ ] I don't know

Has unit tests been added:

[ ] Yes
[ ] No
[ ] No Need

Has document been added or modified:

[ ] Yes
[ ] No
[ ] No Need

Does it need to update dependencies:

[ ] Yes
[ ] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[ ] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.5 seconds
load time: 664 seconds
storage size:<PHONE_NUMBER>1 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221220065953_clickbench_pr_65485.html


Arrow and calendar icons in transactions filter are not visible in dark mode

Describe the bug
Arrow and calendar icons in transactions filters (type, category and date) are not visible in dark mode
To Reproduce
Steps to reproduce the behavior:

Go to https://spendwise-seven.vercel.app/
Login to your account (or create one)
Add transaction(s)
Switch to dark mode (if not already)
See the error

Expected behaviour
The arrow and calendar icons should change to a different colour when in dark mode so that they can be visible in dark mode. Change the icons colour to '#B6CEFC80' when in dark mode.
Screenshots

Hey @ani1609, I would like to work on this issue. Can you please assign it to me?

@ghubrakesh sure

can work on this please assign to me

Can I work on this issue??
Please assign me this

@Bikram-ghuku sure


[Fix] Ensure -k flag is included for key-requiring thirdweb CLI commands

#3871  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @jnsdls and the rest of your teammates on  Graphite


Faster Text Display Speeds

I found that the fastest text display speed, 1, was not fast enough for my tastes. values below 1 but above 0 don't have any effect, because the clock is already ticking once per frame.
In order to increase the apparent display speed, I suggest adding a parameter to the themes editor which allows more than one character to be drawn at a time. This way, even if the clock is ticking at the same rate, the text can appear to display faster.
I've already hacked this solution into my project, and it works as expected. I don't currently have a fork of Dialogic and I'm also not sure that my code is up to quality; there may also not be an interest in this feature. But, feel free to message me and I can put together a pull request.

It is a good idea to pick how many characters should show up. Feel free to share the snippets of code or try to make a pull request and we can always modify it until it is mergeable :)

okay, I'll make a pull request probably tomorrow :)

Pull request is up, number 618

In the future, if you type "closes (this link)" in your PR, you can link that PR with this issue such that once the PR is successfully merged, this issue will automatically close.


Pre-requisites for Fedora 24

Hi Clifford,
For Fedora 24, the following pre-requisites line should be suitable:
sudo dnf install make automake gcc gcc-c++ kernel-devel clang bison \
         flex readline-devel gawk tcl-devel libffi-devel git mercurial \
         graphviz python-xdot pkgconfig python python3 libftdi-devel

Thanks! Added in commit 266e758.


Release EC2/EIP pair

(For developing scripts, easy cleanup is good... but we want to be sure we don't accidentally delete live sites. Perhaps check list of known names and make sure they don't resolve to these? Not the end of the world to clean-up by hand, either.)

cleanup.rb does this. Requires name to be reentered for safety. (Got the idea from github project deletion.)


remove noisy warning in StepCounterHook

fix #21523

Nagging Assignee @case540: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@xiejw Hi, would you mind taking a look?

Nagging Reviewer @xiejw: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 29 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @xiejw: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 44 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @xiejw: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 29 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @xiejw: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 44 days with no activity and the awaiting review label has been applied.

Nagging Reviewer @rchao: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 14 days with no activity and the awaiting review label has been applied.

@rchao Thanks for your review.

@rthadur Thanks :-)


Update PulumiUP docs banner ad

This PR updates the text on the PulumiUP banner to the below image.

Fixes https://github.com/pulumi/pulumi-hugo/issues/217

Should we just remove this?  It's stylistically pretty "different" than everything else in the docs content, and doesn't feel like something we need to advertise here anymore on every docs page.

@susanev I am going to just implement your changes so we can put this behind us haha. Will have an updated PR ready today

@cnunciato This is ready to be looked at again.


Fix sticky navigation bug on firefox

This should fix #1

Sry I should read the README.md Contributing part before open this PR

Hey cettoana no worries. Thanks for implementing the fix! Feel free to open a PR again, I'll go ahead and merge it.


⚠ Samsung has degraded performance

In 03fe837, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2596 ms

Resolved: Samsung performance has improved in 1d758c8.


Python 3.x interpreter not found

🌍 Environment

Your operating system and version: Microsoft Windows 10 Enterprise, 10.0.18363 Build 18363
Your python version: Python 3.8.5
How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?: no
Your Rust version (rustc --version): rustc 1.52.1 (9bc8c42bb 2021-05-09)
Your PyO3 version: 0.13.2
Have you tried using latest PyO3 main (replace version = "0.x.y" with git = "https://github.com/PyO3/pyo3")?: yes

💥 Reproducing
Check the python version available with commands
PS C:\GIT\Rust\call-python> py --version
Python 3.8.5

I set the python3 command alias in powershell with:
Set-Alias python3 py
Set-Alias python py

And check the python3 interpreter availability
PS C:\GIT\Rust\call-python> python --version
Python 3.8.5
PS C:\GIT\Rust\call-python> python3 --version
Python 3.8.5

cargo.toml
[package]
name = "call-python"
version = "0.3.0"
authors = ["Johnz86"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies.pyo3]
version = "0.13.2"
features = ["auto-initialize"]

main.rs
use pyo3::prelude::*;
use pyo3::types::IntoPyDict;

fn main() -> Result<(), ()> {
    Python::with_gil(|py| {
        main_(py).map_err(|e| {
          // We can't display Python exceptions via std::fmt::Display,
          // so print the error here manually.
          e.print_and_set_sys_last_vars(py);
        })
    })
}

fn main_(py: Python) -> PyResult<()> {
    let sys = py.import("sys")?;
    let version: String = sys.get("version")?.extract()?;
    let locals = [("os", py.import("os")?)].into_py_dict(py);
    let code = "os.getenv('USER') or os.getenv('USERNAME') or 'Unknown'";
    let user: String = py.eval(code, None, Some(&locals))?.extract()?;
    println!("Hello {}, I'm Python {}", user, version);
    Ok(())
}

Try to run the project and fail
PS C:\GIT\Rust\call-python> cargo run
   Compiling proc-macro2 v1.0.26
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.72
   Compiling proc-macro-hack v0.5.19
   Compiling winapi v0.3.9
   Compiling cfg-if v1.0.0
   Compiling inventory v0.1.10
   Compiling smallvec v1.6.1
   Compiling scopeguard v1.1.0
   Compiling unindent v0.1.7
   Compiling libc v0.2.94
   Compiling pyo3 v0.13.2
   Compiling instant v0.1.9
   Compiling lock_api v0.4.4
error: failed to run custom build command for `pyo3 v0.13.2`

Caused by:
  process didn't exit successfully: `C:\GIT\Rust\call-python\target\debug\build\pyo3-541bbc8efb2ac98e\build-script-build` (exit code: 1)
  --- stderr
  Error: "Python 3.x interpreter not found"
warning: build failed, waiting for other jobs to finish...
error: build failed

I tried to set PYO3_PYTHON
PYO3_PYTHON = C:\Python38

And I get:
   Compiling pyo3 v0.13.2
error: failed to run custom build command for `pyo3 v0.13.2`

Caused by:
  process didn't exit successfully: `C:\GIT\Rust\call-python\target\debug\build\pyo3-541bbc8efb2ac98e\build-script-build` (exit code: 1)
  --- stderr
  Error: "Failed to run the Python interpreter at C:\\Python38: Access is denied. (os error 5)"

Hello! I had the same issue.
PYO3_PYTHON should point to the binary's exact path, not to it's parent folder.
Wrong:
PYO3_PYTHON = C:\Python38
Should work:
PYO3_PYTHON = C:\Python38\python.exe
👍🏻

In addition, regarding the original usage of Set-Alias @Johnz86 posted, I'm afraid that we wouldn't be able to detect usage of Set-Alias - you'll need to either use PYO3_PYTHON as per answer above, or make sure that python.exe is somewhere on your PATH.
Sorry it took me so long to answer this.

Hey there,
Would be extremely grateful if someone could detail how to do this:
PYO3_PYTHON = C:\Python38\python.exe  on windows.. dunno where to assign this variable I tried almost everywhere and nothing works.

I got the same error and its nuts, its actually working when importing and running the library, but when I try to fix the cargo.toml file I get this error, which is no sense, since the environment is there, as shown in the image after the error, its showing the python version, does anyone now how I configure it so its recognized by cargo.???

I encountered this issue also.
Did you know on Windows, the default installation options don't include installing Python on the PATH, but the default installation options do include installing the py launcher on the PATH? Perhaps pyo3 could be smarter and fall back to py -3 or simply py when no executable is specified.
I tried setting PYO3_PYTHON=py to see if a generic executable as found on the path could be supplied, so that I don't have to think about which Python executable to use, but that produced a different error:
Unable to create process using '"C:\Program Files\Python 3.11\py""': The system cannot find the file specified.

That error looks like it's revealing a couple of possible bugs:

The mis-matched double-quotes suggest that maybe quotes are being added incorrectly.
The routine seemingly inferred a Python installation at "C:\Program Files\Python 3.11", but then weirdly put $PYO3_PYTHON at the end of it, which isn't where the launcher is found. Why if the routine could find "C:\Program Files\Python 3.11" could it not find "python.exe" there?

Since the routine seemed to be able to infer the location of some Python executable, I tried setting PYO3_PYTHON=python, but that caused the Microsoft Store to launch, prompting install of Python 3.10, and pyo3 reported yet another error: error: Python script failed.
I guess the best thing for me to do is write my own logic to locate Python and to set PYO3_PYTHON to the location of that executable, but it would be nice if pyo3 could infer the location more consistently with what a user might expect on Windows, so that most users could rely on a default behavior, similar to how they can for launching Python interactively.

We pass the value of PYO3_PYTHON directly into std::process::Command, and will subsequently use whatever executable is on your PATH.
The error "unable to create process" sounds like a bug somewhere else in the Python ecosystem. e.g. https://github.com/pypa/pip/issues/5223
It sounds like py.exe is on your path and is being picked up correctly, however somehow your installation may be corrupted? in general we haven't written support for the py.exe launcher, given a proposed design of how support for it should work I'd be happy to discuss on windows.


error: proc macro panicked

I was following Developer Quickstart: setup section.
I run arch-based distro (cachyos), mentioned deps were installed with: sudo pacman -Sy nodejs yarn rust
|
Had to install webkit2gtk to resolve error: failed to run custom build command for javascriptcore-rs-sys v0.4.0
Cmd
~/Downloads/Cultivation-FixedCultivation
❯ yarn start:dev

Output
Compiled successfully!

You can now view cultivation in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://<IP_ADDRESS>:3000

Note that the development build is not optimized.
To create a production build, use yarn build.

webpack compiled successfully
error: proc macro panicked
   --> src/main.rs:262:12
    |
262 |       .run(tauri::generate_context!())
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: The `distDir` configuration is set to `"../build"` but this path doesn't exist

warning: unexpected `cfg` condition name: `target_od`
   --> src/proxy.rs:311:7
    |
311 | #[cfg(target_od = "macos")]
    |       ^^^^^^^^^^^^^^^^^^^
    |
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_od, values("macos"))'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(target_od, values(\"macos\"))");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
help: there is a config with a similar name and value
    |
311 | #[cfg(target_os = "macos")]
    |       ~~~~~~~~~

Files successfully emitted, waiting for typecheck results...n(bin)
Issues checking in progress...
warning: `cultivation` (bin "cultivation") generated 1 warning
error: could not compile `cultivation` (bin "cultivation") due to 1 previous error; 1 warning emitted
No issues found.

It's looking for a directory you don't have, just make the directory or use yarn build

yarn build output:
~/Downloads/Cultivation-FixedCultivation 38s
❯ yarn build
yarn run v1.22.22
$ react-scripts build && run-script-os
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
Compiled successfully.

File sizes after gzip:

  81.39 kB  build/static/js/main.1203b77d.js
  4.28 kB   build/static/css/main.0e75e7c8.css
  1.78 kB   build/static/js/787.f4007b32.chunk.js

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

  yarn global add serve
  serve -s build

Find out more about deployment here:

  https://cra.link/deployment

$ yarn tauri build
$ tauri build
   Compiling cultivation v1.4.7 (/home/popcat19/Downloads/Cultivation-FixedCultivation/src-tauri)
warning: unexpected `cfg` condition name: `target_od`
   --> src/proxy.rs:311:7
    |
311 | #[cfg(target_od = "macos")]
    |       ^^^^^^^^^^^^^^^^^^^
    |
    = help: consider using a Cargo feature instead
    = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
             [lints.rust]
             unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_od, values("macos"))'] }
    = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(target_od, values(\"macos\"))");` to the top of the `build.rs`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default
help: there is a config with a similar name and value
    |
311 | #[cfg(target_os = "macos")]
    |       ~~~~~~~~~

warning: method `as_root` is never used
  --> src/system_helpers.rs:48:6
   |
47 | pub trait AsRoot {
   |           ------ method in this trait
48 |   fn as_root(&self) -> Self;
   |      ^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: method `in_terminal_noclose` is never used
  --> src/system_helpers.rs:69:6
   |
67 | trait InTerminalEmulator {
   |       ------------------ method in this trait
68 |   fn in_terminal(&self) -> Self;
69 |   fn in_terminal_noclose(&self) -> Self;
   |      ^^^^^^^^^^^^^^^^^^^

warning: `cultivation` (bin "cultivation") generated 3 warnings
    Finished `release` profile [optimized] target(s) in 40.72s
warning: the following packages contain code that will be rejected by a future version of Rust: num-bigint v0.1.44, num-complex v0.1.43, num-rational v0.1.42
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
    Bundling cultivation_1.4.7_amd64.deb (/home/popcat19/Downloads/Cultivation-FixedCultivation/src-tauri/target/release/bundle/deb/cultivation_1.4.7_amd64.deb)
    Bundling cultivation_1.4.7_amd64.AppImage (/home/popcat19/Downloads/Cultivation-FixedCultivation/src-tauri/target/release/bundle/appimage/cultivation_1.4.7_amd64.AppImage)
       Error failed to bundle project: error running appimage.sh: error running appimage.sh: `failed to run /home/popcat19/Downloads/Cultivation-FixedCultivation/src-tauri/target/release/bundle/appimage/build_appimage.sh`
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Current Directory:
~/Downloads/Cultivation-FixedCultivation 58s
❯ ls -l
drwxr-xr-x    - popcat19  1 Sep 14:09  .github
drwxr-xr-x    - popcat19  1 Sep 14:09  .husky
drwxr-xr-x    - popcat19  1 Sep 14:09  .idea
drwxr-xr-x    - popcat19  1 Sep 14:09  .vscode
drwxr-xr-x    - popcat19  5 Sep 23:05  build
drwxr-xr-x    - popcat19  1 Sep 14:09  docs
drwxr-xr-x    - popcat19  5 Sep 21:33  node_modules
drwxr-xr-x    - popcat19  1 Sep 14:09  public
drwxr-xr-x    - popcat19  1 Sep 14:09  src
drwxr-xr-x    - popcat19  5 Sep 21:34  src-tauri
.rw-r--r--  154 popcat19  1 Sep 14:09  .editorconfig
.rw-r--r--  803 popcat19  1 Sep 14:09  .eslintrc.json
.rw-r--r--   44 popcat19  1 Sep 14:09  .gitattributes
.rw-r--r--  358 popcat19  1 Sep 14:09  .gitignore
.rw-r--r--  101 popcat19  1 Sep 14:09  .lintstagedrc.json
.rw-r--r--   72 popcat19  1 Sep 14:09  .prettierignore
.rw-r--r--   43 popcat19  1 Sep 14:09  .prettierrc.json
.rw-r--r--  11k popcat19  1 Sep 14:09  LICENSE
.rw-r--r-- 2.2k popcat19  1 Sep 14:09  package.json
.rw-r--r-- 6.0k popcat19  1 Sep 14:09  README.md
.rw-r--r-- 3.9k popcat19  1 Sep 14:09  README_zh-CN.md
.rw-r--r-- 3.9k popcat19  1 Sep 14:09  README_zh-TW.md
.rw-r--r-- 4.7k popcat19  1 Sep 14:09  THEMES.md
.rw-r--r--  506 popcat19  1 Sep 14:09  tsconfig.json
.rw-r--r-- 438k popcat19  1 Sep 14:09  yarn.lock

Yeah looks like it built just fine. The error you have is due to an issue with appimage bundling, but appimage doesn't function correctly anyways so you can simply remove it from the build.
You can open your tauri.conf.json from /Cultivation-FixedCultivation/src-tauri and change the line "targets": all, to "targets": ["deb", "nsis", "msi", "app", "dmg", "updater"],


[Request] Add extension to register all functions as services in DI container

Proposal
Introduce a new AddFuncitonsAsServices extension method on IFunctionsWorkerApplicationBuilder that automatically registers every function class detected by the functions framework in the dependency injection container.
This allows all function classes to participate in the container's self-checking logic during startup of the project, preventing runtime errors much later when actually executing specific functions if dependencies cannot be resolved.
Background
AspNetCore MVC provides a AddControllersAsServices() extension that registers all controllers in the container automatically.
This not only enables things such as being able to decorate controller classes via the container, but more importantly it allows controller classes to participate in the Microsoft DI container self-checking mechanism, which iterates through all services registered in the container and checks whether or not their dependencies can be resolved. This mechanism is enabled by default while in debug mode and allows developers to catch DI-related errors much earlier in the pipeline: the validation error is raised during container construction, instead of only during a specific call to the affected controller action.
My proposal is that a similar extension be created for functions/durable functions, which would allow consumers to easily add all functions as services. A potential name for such extension could be AddFuncitonsAsServices(), for consistency.
While consumers can register functions manually themselves and still have them participate in the container self-check process, this approach is error-prone, creates coupling with the azure functions library, and potentially duplicates logic: users would be tasked with creating their own logic to "detect" all function classes, which is something that the functions framework already does to perform its main job. The alternative is to manually register each individual function as separate calls, which not only doesn't scale well, but is fairly noisy, leads to situations where some functions are forgotten to be registered (which could then potentially lead to runtime issues being detected only after deployment), and also forces developers to remember to add a registration whenever they create a new function.
If the team is resistant to adding such helper extension, the framework should at least expose discovered functions in some sort of callback so that consumers could then register those types themselves without having to replicate the function detection logic.
This is a spin-off of:

https://github.com/microsoft/durabletask-dotnet/issues/88

And a replication of:

https://github.com/microsoft/durabletask-dotnet/issues/107

Thanks, @julealgon . Flagging this for review/discussion and to evaluate the impact of the benefits it brings.