Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.11] logseq 0.9.20 -> 0.10.6 #285583

Merged
merged 6 commits into from
Feb 24, 2024

Conversation

schmittlauch
Copy link
Member

@schmittlauch schmittlauch commented Feb 1, 2024

Description of changes

Backports several updates of logseq to unbreak it in 23.11 stable. The current version there is marked as insecure due to depending on electron-25.9.0.

Backports the following PRs: #272126 #273570 #274180 #281751 #282003

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@schmittlauch
Copy link
Member Author

@GrahamcOfBorg build logseq

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Feb 1, 2024
@schmittlauch schmittlauch requested a review from kilianar February 3, 2024 20:58
@mfenniak
Copy link
Contributor

mfenniak commented Feb 7, 2024

FYI logseq 0.10.6 is now released and available in unstable (#286593).

(cherry picked from commit 28ad44d)
@schmittlauch schmittlauch changed the title [23.11] logseq 0.9.20 -> 0.10.5 [23.11] logseq 0.9.20 -> 0.10.6 Feb 7, 2024
@schmittlauch
Copy link
Member Author

Thx, also includng a backport for #286593 now.

@schmittlauch
Copy link
Member Author

I noted some graphics accelleration error messages in the logs when starting logseq-0.10.6, but the application itself works fine.

[12641:0207/153638.540702:ERROR:shared_context_state.cc(99)] Skia shader compilation error

Unfortunately that seems to be a common Electron thing (especially with bundles), see #270699. An rm ~/.config/Logseq/GPUCache -rf resolves this.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1451

@davidak
Copy link
Member

davidak commented Feb 24, 2024

I noted some graphics accelleration error messages in the logs

@schmittlauch I had the same messages in terminal after updating my 23.11 system while the logseq package stayed the same (0.10.5 from unstable), but only on the first start of logseq after the update. When i updated logseq from unstable, i did not see the messages again. So it seem rather related to system components than logseq itself.

Full log
[davidak@gaming:~]$ logseq
(rsapi) init loggers
DRI driver not from this Mesa build ('23.1.9' vs '23.3.3')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '23.3.3')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '23.3.3')
failed to bind extensions
16:56:43.710 › Logseq App(0.10.5) Starting... 
16:56:43.723 › restore proxy settings {:type "system"}
16:56:43.724 › set proxy to {:type "system"}
[27875:0224/165646.424052:ERROR:shared_context_state.cc(99)] Skia shader compilation error
------------------------
// Vertex SKSL
#extension GL_NV_shader_noperspective_interpolation: require
uniform float4 sk_RTAdjust;in float4 radii_selector;in float4 corner_and_radius_outsets;in float4 aa_bloat_and_coverage;in float4 radii_x;in float4 radii_y;in float4 skew;in float2 translate_and_localrotate;in half4 color;flat out half4 vcolor_S0;noperspective out float2 varccoord_S0;void main() {// Primitive Processor FillRRectOp::Processor
vcolor_S0 = color;float aa_bloat_multiplier = 1;float2 corner = corner_and_radius_outsets.xy;float2 radius_outset = corner_and_radius_outsets.zw;float2 aa_bloat_direction = aa_bloat_and_coverage.xy;float is_linear_coverage = aa_bloat_and_coverage.w;float2 pixellength = inversesqrt(float2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));float4 normalized_axis_dirs = skew * pixellength.xyxy;float2 axiswidths = (abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw));float2 aa_bloatradius = axiswidths * pixellength * .5;float4 radii_and_neighbors = radii_selector* float4x4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);float2 radii = radii_and_neighbors.xy;float2 neighbor_radii = radii_and_neighbors.zw;float coverage_multiplier = 1;if (any(greaterThan(aa_bloatradius, float2(1)))) {corner = max(abs(corner), aa_bloatradius) * sign(corner);coverage_multiplier = 1 / (max(aa_bloatradius.x, 1) * max(aa_bloatradius.y, 1));radii = float2(0);}float coverage = aa_bloat_and_coverage.z;if (any(lessThan(radii, aa_bloatradius * 1.5))) {radii = float2(0);aa_bloat_direction = sign(corner);if (coverage > .5) {aa_bloat_direction = -aa_bloat_direction;}is_linear_coverage = 1;} else {radii = clamp(radii, pixellength * 1.5, 2 - pixellength * 1.5);neighbor_radii = clamp(neighbor_radii, pixellength * 1.5, 2 - pixellength * 1.5);float2 spacing = 2 - radii - neighbor_radii;float2 extra_pad = max(pixellength * .0625 - spacing, float2(0));radii -= extra_pad * .5;}float2 aa_outset = aa_bloat_direction * aa_bloatradius * aa_bloat_multiplier;float2 vertexpos = corner + radius_outset * radii + aa_outset;if (coverage > .5) {if (aa_bloat_direction.x != 0 && vertexpos.x * corner.x < 0) {float backset = abs(vertexpos.x);vertexpos.x = 0;vertexpos.y += backset * sign(corner.y) * pixellength.y/pixellength.x;coverage = (coverage - .5) * abs(corner.x) / (abs(corner.x) + backset) + .5;}if (aa_bloat_direction.y != 0 && vertexpos.y * corner.y < 0) {float backset = abs(vertexpos.y);vertexpos.y = 0;vertexpos.x += backset * sign(corner.x) * pixellength.x/pixellength.y;coverage = (coverage - .5) * abs(corner.y) / (abs(corner.y) + backset) + .5;}}float2x2 skewmatrix = float2x2(skew.xy, skew.zw);float2 devcoord = vertexpos * skewmatrix + translate_and_localrotate.xy;if (0 != is_linear_coverage) {varccoord_S0.xy = float2(0, coverage * coverage_multiplier);} else {float2 arccoord = 1 - abs(radius_outset) + aa_outset/radii * corner;varccoord_S0.xy = float2(arccoord.x+1, arccoord.y);}sk_Position = devcoord.xy01;}
// Fragment SKSL
#extension GL_NV_shader_noperspective_interpolation: require
flat in half4 vcolor_S0;noperspective in float2 varccoord_S0;void main() {// Stage 0, FillRRectOp::Processor
half4 outputColor_S0;outputColor_S0 = vcolor_S0;float x_plus_1=varccoord_S0.x, y=varccoord_S0.y;half coverage;if (0 == x_plus_1) {coverage = half(y);} else {float fn = x_plus_1 * (x_plus_1 - 2);fn = fma(y,y, fn);float fnwidth = fwidth(fn);coverage = .5 - half(fn/fnwidth);coverage = clamp(coverage, 0, 1);}half4 outputCoverage_S0 = half4(coverage);{ // Xfer Processor: Porter Duff
sk_FragColor = outputColor_S0 * outputCoverage_S0;}}
// Vertex GLSL
#version 300 es

#extension GL_NV_shader_noperspective_interpolation : require
precision mediump float;
precision mediump sampler2D;
uniform highp vec4 sk_RTAdjust;
in highp vec4 radii_selector;
in highp vec4 corner_and_radius_outsets;
in highp vec4 aa_bloat_and_coverage;
in highp vec4 radii_x;
in highp vec4 radii_y;
in highp vec4 skew;
in highp vec2 translate_and_localrotate;
in mediump vec4 color;
flat out mediump vec4 vcolor_S0;
noperspective out highp vec2 varccoord_S0;
void main() {
  vcolor_S0 = color;
  highp float aa_bloat_multiplier = 1.0;
  highp vec2 corner = corner_and_radius_outsets.xy;
  highp vec2 radius_outset = corner_and_radius_outsets.zw;
  highp vec2 aa_bloat_direction = aa_bloat_and_coverage.xy;
  highp float is_linear_coverage = aa_bloat_and_coverage.w;
  highp vec2 pixellength = inversesqrt(vec2(dot(skew.xz, skew.xz), dot(skew.yw, skew.yw)));
  highp vec4 normalized_axis_dirs = skew * pixellength.xyxy;
  highp vec2 axiswidths = abs(normalized_axis_dirs.xy) + abs(normalized_axis_dirs.zw);
  highp vec2 aa_bloatradius = (axiswidths * pixellength) * 0.5;
  highp vec4 radii_and_neighbors = radii_selector * mat4(radii_x, radii_y, radii_x.yxwz, radii_y.wzyx);
  highp vec2 radii = radii_and_neighbors.xy;
  highp vec2 neighbor_radii = radii_and_neighbors.zw;
  highp float coverage_multiplier = 1.0;
  if (any(greaterThan(aa_bloatradius, vec2(1.0)))) {
      corner = max(abs(corner), aa_bloatradius) * sign(corner);
      coverage_multiplier = 1.0 / (max(aa_bloatradius.x, 1.0) * max(aa_bloatradius.y, 1.0));
      radii = vec2(0.0);
  }
  highp float coverage = aa_bloat_and_coverage.z;
  if (any(lessThan(radii, aa_bloatradius * 1.5))) {
      radii = vec2(0.0);
      aa_bloat_direction = sign(corner);
      if (coverage > 0.5) {
          aa_bloat_direction = -aa_bloat_direction;
      }
      is_linear_coverage = 1.0;
  } else {
      radii = clamp(radii, pixellength * 1.5, 2.0 - pixellength * 1.5);
      neighbor_radii = clamp(neighbor_radii, pixellength * 1.5, 2.0 - pixellength * 1.5);
      highp vec2 spacing = (2.0 - radii) - neighbor_radii;
      highp vec2 extra_pad = max(pixellength * 0.0625 - spacing, vec2(0.0));
      radii -= extra_pad * 0.5;
  }
  highp vec2 aa_outset = (aa_bloat_direction * aa_bloatradius) * aa_bloat_multiplier;
  highp vec2 vertexpos = (corner + radius_outset * radii) + aa_outset;
  if (coverage > 0.5) {
      if (aa_bloat_direction.x != 0.0 && vertexpos.x * corner.x < 0.0) {
          highp float backset = abs(vertexpos.x);
          vertexpos.x = 0.0;
          vertexpos.y += ((backset * sign(corner.y)) * pixellength.y) / pixellength.x;
          coverage = ((coverage - 0.5) * abs(corner.x)) / (abs(corner.x) + backset) + 0.5;
      }
      if (aa_bloat_direction.y != 0.0 && vertexpos.y * corner.y < 0.0) {
          highp float backset = abs(vertexpos.y);
          vertexpos.y = 0.0;
          vertexpos.x += ((backset * sign(corner.x)) * pixellength.x) / pixellength.y;
          coverage = ((coverage - 0.5) * abs(corner.y)) / (abs(corner.y) + backset) + 0.5;
      }
  }
  highp mat2 skewmatrix = mat2(skew.xy, skew.zw);
  highp vec2 devcoord = vertexpos * skewmatrix + translate_and_localrotate;
  if (0.0 != is_linear_coverage) {
      varccoord_S0 = vec2(0.0, coverage * coverage_multiplier);
  } else {
      highp vec2 arccoord = (1.0 - abs(radius_outset)) + (aa_outset / radii) * corner;
      varccoord_S0 = vec2(arccoord.x + 1.0, arccoord.y);
  }
  gl_Position = vec4(devcoord, 0.0, 1.0);
  gl_Position = vec4(gl_Position.xy * sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w);
}

// Fragment GLSL
#version 300 es

#extension GL_NV_shader_noperspective_interpolation : require
precision mediump float;
precision mediump sampler2D;
out mediump vec4 sk_FragColor;
flat in mediump vec4 vcolor_S0;
noperspective in highp vec2 varccoord_S0;
void main() {
  mediump vec4 outputColor_S0 = vcolor_S0;
  highp float x_plus_1 = varccoord_S0.x;
  highp float y = varccoord_S0.y;
  mediump float coverage;
  if (0.0 == x_plus_1) {
      coverage = y;
  } else {
      highp float fn = x_plus_1 * (x_plus_1 - 2.0);
      fn = ((y) * (y) + (fn));
      highp float fnwidth = fwidth(fn);
      coverage = 0.5 - fn / fnwidth;
      coverage = clamp(coverage, 0.0, 1.0);
  }
  mediump vec4 outputCoverage_S0 = vec4(coverage);
  {
      sk_FragColor = outputColor_S0 * outputCoverage_S0;
  }
}


Errors:
link failed but did not provide an info log
[27804:0224/165652.475174:ERROR:gpu_process_host.cc(991)] GPU process exited unexpectedly: exit_code=133
DRI driver not from this Mesa build ('23.1.9' vs '23.3.3')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '23.3.3')
failed to bind extensions
DRI driver not from this Mesa build ('23.1.9' vs '23.3.3')
failed to bind extensions
[28064:0224/165652.785896:ERROR:shared_image_manager.cc(220)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[28064:0224/165652.790654:ERROR:shared_image_manager.cc(220)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[28064:0224/165652.802923:ERROR:shared_image_manager.cc(220)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[28064:0224/165652.810068:ERROR:shared_image_manager.cc(220)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[28064:0224/165652.818922:ERROR:shared_image_manager.cc(220)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[28064:0224/165652.819419:ERROR:shared_image_manager.cc(220)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[28064:0224/165652.819623:ERROR:shared_image_manager.cc(220)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[28064:0224/165652.824042:ERROR:shared_image_manager.cc(220)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[28064:0224/165652.824512:ERROR:shared_image_manager.cc(220)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
[28064:0224/165653.108657:ERROR:shared_image_manager.cc(220)] SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox.
16:56:53.241 › :electron.handler/watch-dir {:path "/home/davidak/.logseq/config"}
16:56:53.398 › :electron.handler/unwatch-dir {:path "/home/davidak/info/notes-logseq"}
16:56:53.399 › :electron.handler/watch-dir {:path "/home/davidak/info/notes-logseq"}

And the application did also work for we without additional errors despite the messages. I did not have to remove anything manually. Maybe the cache is cleared on the next start automatically.

The only issues i noticed when updating from 0.10.5 to .6 was logseq/logseq#11042 and logseq/logseq#3373, but the developers say the right sidebar is not supposed to be persistent.

I might do a test of 0.9.20 -> 0.10.6 later.

Copy link
Member

@davidak davidak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good

I downgraded the package to the versions of NixOS 23.05 (0.9.6) and updated to 23.11 version (0.9.20) and at the end to version from this PR (0.10.6). I did a re-index and restart every time and did not notice any issue.

I used a graph that i had used with 0.10.6 before, so the test might not be 100% accurate.

Keep in mind that this software is known for loosing data (especially with their sync), so i recommend to create a backup before updating and check if changed are saved to file after an update! (i did not have any data loss so far; using syncthing for sync)

@davidak davidak merged commit 036d304 into NixOS:release-23.11 Feb 24, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants