Unexpected Drag Offsets in SVG

I'm trying to use the drag gesture to draw a SVG path element using the start position on mouse down and the end position of cursor location. Problem is the offsets are wonky. In the below image, I have a arrow to where started dragging but you can see the arrow in grey is no where near that start location.

Furthermore if come back and drag again, its even further off. I'm presuming its picking back up its previous location? The code is pretty simple:
  const bind = useGesture({
    onDrag: (event) => {
      console.log('drag', event);
      onDrag(event, properties);
    },
    onMouseDown: (event: any) => {
      onDragStart(event, properties);
    },
    onDragEnd: (event) => {
      onDragEnd(event, properties);
    }
  }, {
    drag: {
      enabled: !disabled,
      threshold: 10
    }
  });

and then it just takes that those coordinates from the offset and maps them to start points:
const onDrag = (event) => {
    const [x, y] = event.offset;
    const endPoint = { x, y };

    setDragCoords([
      {
        startPoint: dragCoords?.[0]?.startPoint || endPoint,
        endPoint
      }
    ]);
  };

which is read by the line here:
const d = useMemo(() => {
    const points: any[] = sections
      ? [
        sections[0].startPoint,
        ...(sections[0].bendPoints || []),
        sections[0].endPoint
      ]
      : [];

    const pathFn = line()
      .x((d: any) => d.x)
      .y((d: any) => d.y)
      .curve(curveBundle.beta(1));

    return pathFn(points);
  }, [sections]);

You can see a demo of this behavior here: https://reaflow.dev/?path=/story/canvas--simple
The relevant source code in the project is here:

Drag Start - https://github.com/reaviz/reaflow/blob/master/src/symbols/Node/Node.tsx#L81-L98
Drag Mapping - https://github.com/reaviz/reaflow/blob/master/src/utils/useDrag.ts#L12-L22
Line Render - https://github.com/reaviz/reaflow/blob/master/src/Canvas.tsx#L151-L157

I'll have a look but top of my head, just reading your gesture code, here's a few things.

There's no reason this lib would fail on SVG more than on any other elements. This lib is just a thin layer of logic on top of React Synthetic events or native events.

If you're using v8, you can rely on the useDrag hook only, with triggerAllEvents config attribute set to true and the intentional flag combined.

@dbismut - Ya, I think its just something I'm doing wrong but you never know. Would love any feedback you have.

OK - I think I figured it out - I need to use movement rather than offset. Additionally I need to calculate the movement against the x/y of the rect.
    onDrag: ({ movement, ...rest }) => {
      onDrag({
        ...rest,
        offset: [movement[0] + x, movement[1] + y]
      }, properties);
    },

It's been a pretty busy week at work so I didn't have time to check yet but did you have a look at the initial option?

Ya - setting initial didn't seem to help. Perhaps you might be able to look at it? The code is open-source.

I'm on it but I'd like to discuss it with you first. Can you join the discord and ping me in the right channel?


[Skilling Calc] Add Gem Rocks

Same exp as gold ore, 65xp/per.

I would use same icon as skill guide: https://i.imgur.com/jJtCUAd.png
Calculator uses first letter capital for every word, do "Gem Rocks" for consistency ;)


Wrong text placement, when dpiY <> 96

I am using Svg library for generating PDF (via rendering SVG images to Metafile and embedding them with iTextSharp) and also for the direct printing.
However, PDF generating is perfect, while printing doesn't properly position the texts. I've been analyzing the Svg source files and the problem is in method Svg.GdiFontDefn.Ascent(ISvgRenderer renderer).
This method does some computation, but the returned float value is only correct, when dpiY of the Graphics is exactly 96. Since, luckily, Metafile's default DPI is also 96, my PDF generating is ok, However, as (my) default printing DPI is 300, all the texts are rendered erroneously.
For the test, I attached a "SvgError.svg" (zipped) with 3 colorful rectangles and texts. When printing (to the file) such an image, you get something like in the attached "output.png", where the texts are located too far up from their proper location.
SvgError.zip

Source code for easier testing:
using System;
using System.Windows.Forms;
using System.Drawing.Printing;
using Svg;
using Svg.Transforms;

namespace SvgError {
    public class App {
        [STAThread]
        public static void Main(string[] args) {
            PrintDocument printDoc = new PrintDocument();
            printDoc.PrintPage += printDoc_PrintPage;
            PrintDialog printDialog = new PrintDialog();
            printDialog.Document = printDoc;

            if (printDialog.ShowDialog(null) == DialogResult.OK) {
                printDoc.Print();
            }
        }

        private static void printDoc_PrintPage(object sender, PrintPageEventArgs e) {
            SvgDocument svgDoc = SvgDocument.Open<SvgDocument>("SvgError.svg");
            svgDoc.Draw(e.Graphics);
        }
    }
}

Currently I am using a workaround by writing a SvgRendererWrapper class, which implements ISvgRenderer, but delegates all the methods and the properties to the underlying SvgRenderer, except the DpiY property, in which I am always returning a selected constant value.
However, this is just an ugly workaround, as the Svg library is supposed to work correctly.
    public class SvgRendererWrapper : ISvgRenderer {
        private ISvgRenderer parent;
        private float dpiY;

        public SvgRendererWrapper(ISvgRenderer parent, float dpiY) {
            this.parent = parent;
            this.dpiY = dpiY;
        }

        public float DpiY {
            get {
                return this.dpiY;
            }
        }

        // all other methods and properties just delegate to "parent".
    }

I Ran into the same problem - this issue is that the Graphics context treats printer output as 100dpi, yet  graphics.DpiY returns the actual DPI of the printer device (generally something like 600dpi).
the Text logic is the only consumer of the DpiY - it uses this when calculating the baseline, which ends up being 6x more than it should if the printer is 600dpi.

Shall be fixed now with #356 - closing.


tests: for Android, check TMPDIR first in dispatch_io_muxed

With this fix, all the tests pass again when built and run natively on Android, as Android has no global /tmp directory but the Termux app that I'm using sets TMPDIR, which is the usual variable for POSIX.

@swift-ci please test


¿How can i share location in web channel?

I found the way to run the project i dont know anything about react and redux. But i did it. Now i have a problem with the location i need to shared that, but i dont know how? Anybody could help me with i read something about the backchannel but i cant undertand it very well. Thanks sorry for my bad english.

What do you mean "share the location"? Do you want the bot to know the user's current location?

Yes, GPS coordinates

Since this is a question about functionality and not a bug report of feature request, please ask it on Stack Overflow (with tag botframework) so that others can benefit from the answer. If you post a link to your question here I'll answer it there.

Ok sorry about that, this the link in stackoverflow
https://stackoverflow.com/questions/47227251/how-can-i-share-location-in-web-channel

i am using below code to pass the value to bot ActivityTypes.ConversationUpdate but i am not able to get any value in bot under ActivityTypes.ConversationUpdate. Can you help me ? Don't able to pass the value.
Full address is local variable on html page that have value like in this i-e if i want to pass London to bot and in conversation start bot display London .
<script type="text/javascript">
        // for location of user....
        var fulladdress ='landon';

 alert(fulladdress);
         // for Bot  .......
        const speechOptions = {
            speechRecognizer: new CognitiveServices.SpeechRecognizer({ subscriptionKey: 'key' }),
            speechSynthesizer: new CognitiveServices.SpeechSynthesizer({
                gender: CognitiveServices.SynthesisGender.Female,
                subscriptionKey: 'key',
                voiceName: 'Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)'
            })
        };

        var model = {
            "userId": '_' + Math.random().toString(36).substr(2, 9),
            "userName": "User Name",
            "botId": "Chatbot Main Tree",
            "botIconUrl": "//bot-framework.azureedge.net/bot-icons-v1/bot-framework-default-8.png",
            "botName": "Chatbot Main Tree",
            "secret": "Direct Line Secret",
            "iconUrl": "//bot-framework.azureedge.net/bot-icons-v1/bot-framework-default-8.png",
            "directLineUrl": "https://webchat.botframework.com/v3/directline",
            "webSocketEnabled": "True"
        };

        var dl = new BotChat.DirectLine(
            {
                  secret: model.secret,
                  token: model.token,
                  domain: model.directLineUrl,
                  webSocket: true,
                  sendTyping: true
            });

        BotChat.App({
            botConnection: {
                botConnection: dl,
                postActivity: activity => dl.postActivity({
                    from: { id: 'userid', name: 'username' },
                    name: 'postLocationData',
                    text: 'I said my location is ' + fulladdress,
                    type: 'ConversationUpdate',
                    value: fulladdress,
                    channelData: fulladdress
                })
                    .subscribe(function (id) {
                        console.log(fulladdress);
                    })
            },
            sendTyping: true,
            user: { id: model.userId, name: model.userName },
            bot: { id: model.botId, name: model.botName },
            speechOptions: speechOptions,
            resize: 'window',
        }, document.getElementById("BotChatElement"));
</script>


WIP: Instead of clearing resolution cache only invalidate the unresolved imports in response to action::set of typing installer

This should potentially help Microsoft/vscode#46025 where in directory watchers and resolutions are not cleared on every action::set response from typing installer.

Closing this since worked out better approach to handle typings files


Navigation problem after route

Hello! I have a problem with navigation, after route from one component to another.
After my app has loaded, I do an authorization check, then I route to another component.
   componentWillMount() {         this.props.Auth().then(() => {             if (this.props.needSignUp) {                 this.props.history.push({pathname: '/signup/'})             }         })     }
In the signup component, I have an Focusable elements
           <div>                 <Focusable>Button-1</Focusable>                 <Focusable>Button-2</Focusable>             </div>
When I trying to navigate this element, I get an error:
index.js:952 Uncaught TypeError: Cannot read property 'getNextFocusFrom' of undefined     at Navigation.focusNext (index.js:952)     at Navigation._this.onKeyDown (index.js:917)
What could be the reason?

Also, if I just open the signup component, without route, the navigation works.

I have the same problem. Have you checked resolve?

Can you guys give me an example in http://codesandbox.io?


ignite-9858 do not initialize local addresses for the client node

The ticket is resolved, closing PR.
Please close PRs for your resolved tickets and other non-needed PRs.
Alternatively, ask a committer

to use GitHub UI (committer can associate accounts here: https://gitbox.apache.org/setup/ )
or /scripts/apply_pull_request.sh from Apache Ignite source.
or mention in commit message 'Fixes #(a number of PR)'.

These methods will automatically close PR.
Feel free to reopen this PR if it is actual.


login error

I downloaded the integration, but when I try to connect I get this error:
Error setting up entry<EMAIL_ADDRESS>for aquarea 11:06:25 – (ERRORE) Aquarea Smart Cloud (integrazione personalizzata) Config entry<EMAIL_ADDRESS>for aquarea integration not ready yet: API error: 1000-1503 - Failed communication with adaptor. Please make sure it is connected to the network or check again after resetting adaptor.; Retrying in background 11:06:20 – (AVVISO) config_entries.py Unexpected error fetching<EMAIL_ADDRESS>data: API error: 1000-1503 - Failed communication with adaptor. Please make sure it is connected to the network or check again after resetting adaptor. 11:06:20 – (ERRORE) Aquarea Smart Cloud (integrazione personalizzata)
instead from the site https://aquarea-smart.panasonic.com/ I connect and I have no problem,

I solved by manually installing the integration


[backport] Add ChainerMN paper to references

Backport of #5570

Jenkins CI test (for commit 7da972bbdb0c744f8bee18b095939cead273760d, target branch v5) succeeded!

Oh I didn't mean to backport this, but thank you!


Benchmark about.

Is there any performance comparison between datatable and zlib libraries?

close this as benchmarks are available in the README file now.


Build Fails Without WITH_DISNEY_MATERIAL

In tag for 1.7.0-beta, I get an undefined reference error during build if I build without WITH_DISNEY_MATERIAL:
[ 93%] Linking CXX executable appleseed.cli
../appleseed/libappleseed.so: undefined reference to `renderer::DisneyMaterialFactory::get_model() const'
../appleseed/libappleseed.so: undefined reference to `vtable for renderer::DisneyMaterialFactory'
collect2: error: ld returned 1 exit status

From a quick investigation, the likely culprit appears to be this:
https://github.com/appleseedhq/appleseed/blob/a9c373b49117a4e61bec1c1d7499560b59dc0d2a/src/appleseed/renderer/modeling/project/projectfileupdater.cpp#L1348
The project file updater appears to need to be able to create a disney material for comparison, and I don't see any ifdef guards on it, which seems like it could cause a reference to an undefined symbol when we're not compiling DisneyMaterial.
Not sure whether this is important to us at ImageEngine - we should maybe just get the seexpr dependency set up right - but I guess if the compile option is there, and off by default, it should probably at least compile with it off.

Hey Daniel, thanks for the report, we will fix it in master and will report the fix in the 1.7.0 branch.
Thanks again!

Fixed in master and in 1.7.0-beta branch: https://github.com/appleseedhq/appleseed/tree/1.7.0-beta


[hotfix/ZF-11863] Zend_Validator_Regex

added unittests

Reviewed,merged, and pushed to master.


Fix tests

We broke the tests in the previous patches. Therefore, I did my best to fix them correctly.

Thanks for this.  Guess that's a sign I should set up github actions to validate it better.


Loop Nesting in Distributed FIO test

Currently in Distributed FIO testing the looping is:
-for each value of numjobs (fio processes per pod)
--for each block size
----for each workload type (i.e. job file)
------ for each sample
-------- run fio
Whereas we want the samples for each test type to be spaced as far apart in time as possible to be able to show that the system's performance remains stable over the duration of the entire workload and in this regard the proposed looping should be:
-for each sample
--for each value of numjobs (fio processes per pod)
----for each block size
------for each workload type (i.e. /read/write/randread/randwrite/randrw)
--------run fio
Please let me know your thoughts on this.

The problem with this is how benchmark-operator and wrapper perform this loop. currently operator breaks down the list or variables into specific permutations and the wrapper will run them for X sample times.  if the above aproach is needed you would have to send benchmark-wrapper the inclusive test config containing all possible test options, rather than the exact job file. you would then need to develop a method for breaking down the yaml test config into specific job files. This would need a significant level of effort to be done.


Track wallet provider

Dont merge before:

https://github.com/trilitech/kanvas-concordia/pull/8
the FE is ready to send this additional data (have to wait for this, as there is 1 additional field that is required; the walletProvider field)

This does not include returning sso info and wallet provider in the 2 custom concordia analytics endpoints yet, will be added in a second PR.

Closing this to instead get this in with a kanvas open source merge PR (to also include other work)


Content not subpixel antialiased

Running yakyak 1.4.0-3 (AUR package on ArchLinux), it uses electron 1.4.13-1 from official Arch package.
The content text in yakyak is not subpixel antialiased. The menus on the other hand ARE subpixel antialiased.
At the same time, atom using the same electron dependency has subpixel antialiasing everywhere.
This is from Help -> About:

A word from the Help -> About in Atom. subpixel antialiasing can be easily seen.

Seems like a problem with Electron: https://github.com/electron/electron/issues/6344

I did comment on that issue there. But at the same time it doesn't happen in Atom using the same Electron.

https://github.com/electron/electron/issues/6344#issuecomment-420371918


[SUGGESTION]: Add a way to add support for a mod manually

Basically, it would be cool if it was possible to (since based on the mod compatibility ideas post you can't have it in the actual mod) add compatibility for edible items from other mods.
Like the textures could be made manually (by anyone really) and then people (unless it's just me) can stop being annoyed that only half of their foods animate when eaten.
Basically I want a way to add support for modded foods (and non-foods that are edible) myself so I can stop having only half of my foods animated.
Though this suggestion is on the Fabric version, obviously it would be nice to have on forge, too

Support is done, you can add the necessary files for the items yourself, or send it to me, if I like it, then all people will use it

How do you add the support for the modded items? Would you just use the items namespace?
For example, if the item was Green Steak, and the namespace was green_steak, would you name the texture files as follows?:
green_steak_eating_0.png, green_steak_eating_1.png, green_steak_eating_2.png, etc...


Emit update events without w.bundle()

Currently:

Important: Watchify will not emit 'update' events until you've called w.bundle() once and completely drained the stream it returns.
https://github.com/substack/watchify#watchifyb-opts

Use case:
When using with gulp, I can't find a way around the extra bundle when making standalone and watch tasks and composing them together.
Here is a overview snippet of what I am currently doing. When calling the default gulp task: bundle gets called once in the build task and once when the watch starts up(to start the update events). Although the time when watch starts up is not critical(because it is after the entire build), I would like to try to avoid it somehow.
I could create a separate build stack the doesn't include build-scripts-browserify but that feels a bit messy.

Link to the official gulp browserify recipe: https://github.com/gulpjs/gulp/blob/master/docs/recipes/fast-browserify-builds-with-watchify.md
Reading through https://github.com/substack/watchify/issues/254 I understand that watchify grabs the dependencies to watch via the w.bundle() call. Perhaps it isn't possible to avoid at the moment but an alternative glob option could solve this.

This is kinda what I do. The idea is to realize that the browserify b instance can be applied the watchify plugin whenever. And that b.bundle() is just a stream like any other:
var _bundle;
var getBundle = function() {
  if (_bundle) return _bundle;
  var b = browserify({
    entries: [/***/],
    cache: {},
    packageCache: {}
  });
  b.transform(/****/);
  b.vinyl = function() {
    return b.bundle()
      .pipe(source(/***/))
      .pipe(sourcemaps.init()) // whatever else
      .pipe(gulp.dest(/**/));
  };
};

gulp.task('scripts', function() {
  return getBundle().vinyl();
});

gulp.task('watch', function() {
  var b = getBundle();
  b.plugin(watchify);
  // "suck" the data out w/o any extra work - don't even write to disk
  b.bundle().once('end', function(){});

  b.on('update', function() {
    b.vinyl();
  });
});

This allows you call getBundle from any number of tasks and not worry about creating multiple instances. And you've separated the b.bundle() from all the gulp stuff.
This is just an example to help you figure out what works for  you.

Here's another example: https://github.com/substack/watchify/pull/213#issuecomment-97636601

@zertosh I have this sort of thing set up already but I am trying to avoid the extra bundle when watch starts up, in your example b.bundle().once('end', function(){});.
@jskrzypek brought up a reasonable solution in the gulpjs/gulp room to just move the watchify instance outside, hook onto update event in the watch task and only bundle if it hasn't been called before on that instance(state variable).

Ohhhhh... you just don't want to call bundle again, if its been called. There are lots of ways to figure this out, here is one:
var b = browserify({/**/});
b.once('bundle', function() { b.hasRunOnce = true; });

// In your watch task

if (!b.hasRunOnce) {
  b.bundle();
}
b.on('update', /***/)

@zertosh :+1: looks like the solution I described from @jskrzypek. I think this is the way to go.


xfce.parole: add gst-libav

See https://discourse.nixos.org/t/parole-probably-missing-gst-all-1-gst-libav/6743
https://bugzilla.redhat.com/show_bug.cgi?id=1269084

Motivation for this change
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/parole-probably-missing-gst-all-1-gst-libav/6743/3

This sounds suspicious. gst-plugins-bad should support H.264 and H.265 through openh264 and x265 respectively.

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

1 package built:

xfce.parole


Move children from LinkProps to SpectrumLinkProps and remove LinkProps

Closes https://github.com/adobe/react-spectrum/issues/1762
✅ Pull Request Checklist:

[x] Included link to corresponding React Spectrum GitHub Issue.
[ ] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
[x] Filled out test instructions.
[ ] Updated documentation (if it already exists for this component).
[ ] Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

No regressions with useLink
children no longer a typescript required prop for useLink
🧢 Your Project:

Thanks @snowystinger!
Do I need to update any documentation? I took a look and it appeared to me that the AriaLinkOptions listed under the API header in useLink.mdx was auto generated - but I wanted to make sure I didn't miss something.

Nope, nothing needed, API docs are updated from code


New version: StyledStrings v1.0.3

Registering package: StyledStrings
Repository: https://github.com/JuliaLang/StyledStrings.jl
Created by: @tecosaur
Version: v1.0.3
Commit: e7e7a55662d8107587b21acfebd0a47cee15c15e
Reviewed by: @tecosaur
Reference: https://github.com/JuliaLang/StyledStrings.jl/commit/e7e7a55662d8107587b21acfebd0a47cee15c15e#commitcomment-145779777
Description: Write with ✨ style ✨ and ease

Actually, let's block this for a sec, I might want to tweak one or two more things


Link to The Yesod Book is wrong

@fstiffo I fixed the link... https://github.com/Gabriel439/post-rfc/pull/25

Thank you!


The package was npm-shrinkwrap'd and snyk'd.

Heyo! I added the npm shrinkwrap and the synk.
Not going to do a whole PR here, but if someone could check my work? @marteki or @ascott1 maybe?

Two tiny, tiny nitpicks in the diff. Otherwise, 👍  😄


Fix clickhouse driver

This is WIP.
Fixes needed to support latest version of ClickHouse. This works with latest ClickHouse, but unsure what minimum version is supported. Do we need to add a version indicator and different implementations?
Also problematic is the FORMAT JSON text fragment. It seems INSERT statements do not like this, so this almost has to be applied for specific statement types?
@dengc367 you're more familiar than myself with ClickHouse. Do you have any insight here?
Fixes #915

@dengc367 I found some examples in ClickHouse docs that show sending format via header. See the Prometheus section where template is specified https://clickhouse.tech/docs/en/interfaces/http/#predefined_http_interface.
This seems to work, but I don't know when this was added and supported.
Would you be willing to review?

OK, I will test it soon.

@rickbergfalk  please merge the PR #918 to this branch. I have tested successfully.


[WIP] implement louvain algorithm

What do these changes do?
implement a distributed louvain algorithm
Related issue number
Fixes #182

performance test
dataset:  com-friendster ( 65,608,366 nodes, 1,806,067,135 edges)
tolerance=0, min_progress=1
parallel GraphScope louvain (8 worker)
time: 40min
grape louvain( 8 worker, 128 frag)
time: 5min

Since it's will be open sourced, please revise the code style, such as function naming (Camel Style), class encapsulation, variable naming, comments, fixme, non-necessary header and so on.
Maybe you could add a python test case for louvain, mainly to demonstrate it's usage, and the format of result.
Reference: https://google.github.io/styleguide/cppguide.html

Hi, @siyuan0322, thanks for reviewing,  could you quote bad code example as a hint, that would be much help.

Codecov Report

Merging #183 (f1bc35c) into main (d709119) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #183      +/-   ##
==========================================
+ Coverage   78.86%   78.95%   +0.09%
==========================================
  Files          51       53       +2
  Lines        4669     4775     +106
==========================================
+ Hits         3682     3770      +88
- Misses        987     1005      +18

Impacted Files
Coverage Δ

python/graphscope/analytical/app/__init__.py
100.00% <100.00%> (ø)

python/graphscope/analytical/app/louvain.py
100.00% <100.00%> (ø)

python/graphscope/framework/errors.py
94.11% <0.00%> (-1.48%)
:arrow_down:

python/graphscope/client/rpc.py
83.94% <0.00%> (-1.46%)
:arrow_down:

python/graphscope/framework/graph.py
89.24% <0.00%> (-0.57%)
:arrow_down:

python/graphscope/framework/graph_utils.py
88.84% <0.00%> (-0.56%)
:arrow_down:

python/graphscope/config.py
100.00% <0.00%> (ø)

python/graphscope/client/session.py
73.64% <0.00%> (ø)

python/graphscope/framework/graph_builder.py
80.35% <0.00%> (ø)

... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5b5e09...f1bc35c. Read the comment docs.


What's the reasoning behind ColumnDefault?

https://github.com/rubocop/rubocop-sequel/blob/c15c2379444f931027ba39d8d44402fee92ef600/lib/rubocop/cop/sequel/column_default.rb#L7-L18
I'm a bit puzzled why this is a cop. I can imagine theoretical reasons, but not particularly practical ones, where the gains outweigh the costs (more nullable columns, being unable to use change blocks)

It’s a remnant of older Postgres versions behaviour, see: https://www.2ndquadrant.com/en/blog/add-new-table-column-default-value-postgresql-11/
It might be time to drop it.
Also hi 👋🏻

Oh huh, I sort of expected it to rewrite, I actually didn't expect the fancy lazy behavior. I work with small databases, as you know.
Also, hello.

Interestingly, this rule doesn't match if you add null: false, does it only match when there is exactly default: whatever and nothing else? Given the original rationale (table rewrites), that seems a bit limited?


Translated README and other markdown files into Spanish

Description

Screenshots

Related Issue

Checklist
Please review and check off the following items before submitting your PR:

[ ] I have tested my changes to ensure they work as expected
[ ] I have included documentation for any new features or changes
[ ] I have formatted my code according to the project's style guidelines
[ ] I have written tests for any new features or changes
[ ] I have run the project's test suite and verified that all tests pass
[ ] I have updated the README and any other relevant documentation
[ ] I have checked for any spelling or grammatical errors

Additional Information

The Spanish language already exists. I'm closing this PR. If you want you can add another language. https://github.com/priyankarpal/ProjectsHut/issues/95


Set up skips plugin metadata questions

Probably an issue on my end, but every time I run composer it skips the...
"You will be asked for additional plugin information which will be used in the plugin metadata"
...part of the set up process.
Creating a "yootheme/starter-plugin" project at "./test-two-plugin"
Installing yootheme/starter-plugin (1.0.2)
  - Installing yootheme/starter-plugin (1.0.2): Extracting archive
Created project in C:\Users\TstUsr\Local Sites\yooplgnlaunch\app\public\wp-content\plugins\test-two-plugin
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking yootheme/starter-utils (1.0.6)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing yootheme/starter-utils (1.0.6): Extracting archive
Generating autoload files
No security vulnerability advisories found
Plugin 'test_two_plugin' created successfully.
Enter plugin title:
C:\Users\TstUsr\Local Sites\yooplgnlaunch\app\public\wp-content\plugins>

It doesn't actually give me the chance to "Enter plugin title", it just skips down to the dir prompt.
Any advice is welcome.

I have the same issue.
I followed the steps that the documentation says but it misses all the meta data information to set

Still having this issue. I'm trying to install the plugin in a "Local WP" site (flywheel's dev server). I've used both the built in composer via the program's "Site Shell" and again with a separate composer install via VS Code terminal, and got the same result.

Still having this issue. I'm trying to install the plugin in a "Local WP" site (flywheel's dev server). I've used both the built in composer via the program's "Site Shell" and again with a separate composer install via VS Code terminal, and got the same result.

I used Ms VS Code and Microsoft Powershell terminal and the same thing happens. The only thing is that with Powershell at least it wrote the Enter plugin title: MyPluginName and stopped.

Unfortunately wee needed to remove the interactive script from the post-create-project command because it does not work on Windows.
Closing this as duplicate of https://github.com/yootheme/starter-plugin/issues/5


features in input table is not in output.srs table?

excerpt for the input otu table is

output using SRS() IS

Not sure why the features/taxa where removed in the ouput.
code used as follows

otu.table <- as.data.frame(t(otu_table(ps.prev.intes)))

# calculate Cmin
Cmin <- min(colSums(otu.table)) # min 641
# or use
summary(sample_sums(ps.prev.intes)) # min 641
  # Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
  #   641    3073    9394   49384   67956  321509

otu.table.srs <- SRS(otu.table, Cmin)

I am trying then to add it back to the phyloseq object but still trying to figure out how to do this. any comments are appreciated.
attached the phyloseq object, just in case needed.
ps.prev.intes.f.zip

did it via microtable


[ServiceBus] Migrate REST-based client to core-rest-pipeline

Resolves #15821

/azp run js - servicebus - tests

/azp run js - service-bus - tests

API changes have been detected in @azure/service-bus. You can review API changes here
API changes
- export interface ServiceBusAdministrationClientOptions extends PipelineOptions {
+ export interface ServiceBusAdministrationClientOptions extends CommonClientOptions {
-     userAgentOptions?: UserAgentOptions;
+     userAgentOptions?: UserAgentPolicyOptions;
- export declare type WithResponse<T extends object> = T & {
-     _response: HttpResponse;
- };
+ export declare type WithResponse<T extends object> = T & {};

API changes have been detected in @azure/service-bus. You can review API changes here

/azp run js - service-bus - tests

/azp run js - service-bus - tests

I am merging this to avoid conflicting pnpm lock file.  I will address any additional feedback if any in follow-up PRs.


Fuse Mv should not error out when destination file exsit

Alluxio Version:
Master
Describe the bug
In Alluxio Fuse mount point
[ec2-user@ProcessLocalRead-worker-0 alluxio-standalone-fuse-read]$ cat b.file
bbbb
[ec2-user@ProcessLocalRead-worker-0 alluxio-standalone-fuse-read]$ cat c.file
cccc
[ec2-user@ProcessLocalRead-worker-0 alluxio-standalone-fuse-read]$ mv b.file c.file
mv: cannot move ‘b.file’ to ‘c.file’: Input/output error

From Fuse.log
2021-12-27 19:57:07,232 ERROR AlluxioJniFuseFileSystem - Failed to rename /b.file to /c.file:
alluxio.exception.FileAlreadyExistsException: Cannot rename because destination already exists. src: /b.file dst: /c.file
        at alluxio.client.file.BaseFileSystem.rpc(BaseFileSystem.java:577)
        at alluxio.client.file.BaseFileSystem.rename(BaseFileSystem.java:412)
        at alluxio.client.file.MetadataCachingBaseFileSystem.rename(MetadataCachingBaseFileSystem.java:119)
        at alluxio.client.file.FileSystem.rename(FileSystem.java:567)
        at alluxio.fuse.AlluxioJniFuseFileSystem.renameInternal(AlluxioJniFuseFileSystem.java:647)
        at alluxio.fuse.AlluxioJniFuseFileSystem.lambda$rename$12(AlluxioJniFuseFileSystem.java:633)
        at alluxio.fuse.AlluxioFuseUtils.call(AlluxioFuseUtils.java:318)
        at alluxio.fuse.AlluxioJniFuseFileSystem.rename(AlluxioJniFuseFileSystem.java:633)
        at alluxio.jnifuse.AbstractFuseFileSystem.renameCallback(AbstractFuseFileSystem.java:271)
2021-12-27 19:57:07,232 DEBUG AlluxioJniFuseFileSystem - Exit (-5): Fuse.Rename(oldPath=/b.file,newPath=/c.file,) in 6 ms

In Linux
[ec2-user@ProcessLocalRead-worker-0 ~]$  echo "cccc" > c.file
[ec2-user@ProcessLocalRead-worker-0 ~]$ echo "bbbb" > b.file
[ec2-user@ProcessLocalRead-worker-0 ~]$ mv b.file c.file
[ec2-user@ProcessLocalRead-worker-0 ~]$ ls
c.file

To Reproduce
Steps to reproduce the behavior (as minimally and precisely as possible)
Expected behavior
Expect Fuse perform as the linux system
Urgency
Describe the impact and urgency of the bug.
Are you planning to fix it
Please indicate if you are already working on a PR.
Additional context
Add any other context about the problem here.

See if mac has same behavior as linux

https://libfuse.github.io/doxygen/structfuse__operations.html
Rename int(* fuse_operations::rename)(const char *, const char *, unsigned int flags)
Rename a file
flags may be RENAME_EXCHANGE or RENAME_NOREPLACE. If RENAME_NOREPLACE is specified, the filesystem must not overwrite newname if it exists and return an error instead. If RENAME_EXCHANGE is specified, the filesystem must atomically exchange the two files, i.e. both must exist and neither may be deleted.
our Alluxio JNI Fuse implementation does not have flags
RenameOperation::RenameOperation(JniFuseFileSystem *fs) {
  this->fs = fs;
  JNIEnv *env = this->fs->getEnv();
  this->obj = this->fs->getFSObj();
  this->clazz = env->GetObjectClass(this->fs->getFSObj());
  this->signature = "(Ljava/lang/String;Ljava/lang/String;)I";
  this->methodID = env->GetMethodID(this->clazz, "renameCallback", signature);
}

int RenameOperation::call(const char *oldPath, const char *newPath) {
  JNIEnv *env = this->fs->getEnv();
  jstring jspath = env->NewStringUTF(oldPath);
  jstring jspathNew = env->NewStringUTF(newPath);

   int ret = env->CallIntMethod(this->obj, this->methodID, jspath, jspathNew);

  env->DeleteLocalRef(jspath);
  env->DeleteLocalRef(jspathNew);

  return ret;
}

In libfuse/include/fuse.h master
	/** Rename a file
	 *
	 * *flags* may be `RENAME_EXCHANGE` or `RENAME_NOREPLACE`. If
	 * RENAME_NOREPLACE is specified, the filesystem must not
	 * overwrite *newname* if it exists and return an error
	 * instead. If `RENAME_EXCHANGE` is specified, the filesystem
	 * must atomically exchange the two files, i.e. both must
	 * exist and neither may be deleted.
	 */
	int (*rename) (const char *, const char *, unsigned int flags);

In libfuse/include/fuse.h 2.9.5
	/** Rename a file */
	int (*rename) (const char *, const char *);

https://github.com/Alluxio/alluxio/issues/12758 can be a reason for upgrading libfuse to 3.x


Warnings disappear when opening files from the Error and Warnings quick box

I have a task defined that uses a problem matcher to create warnings.
Assume it creates 5 warnings for file A and 2 warnings for file B. The total warning count shown in the status bar is now 7.
Now follow these steps:

Open View>Show Errors and Warnings
Navigate to file A (do not fix any warnings)
Open View>Show Errors and Warnings again
Navigate to file B

At this point the warning count in the status bar drops to 2. This is confusing since without doing  anything the 5 warnings have disappeared.
The reason is that when I open file A from Errors and Warnings it isn't put into the working files. Then when I open file B, File A is closed and its markers get cleared.
To avoid this confusion I suggest that opening a file from Errors and Warnings puts the file into the 'Working files' section, that is, the file is kept open and the warnings do not disappear.  So the effect would be the same as if I double clicked the file from the explorer.
Assigning to Jo as the owner of diagnostics and the Errors and Warnings quick box. @dbaeumer fyi.

interesting... maybe the task framework should even do it since that sort of owns the resources...

I just hit this in the smoke test:

Run the build task
View the error list: some errors are there
Ctrl click the file in which the errors occurred, in the output panel
View the error list: errors are gone!

@dbauemer Is this maybe due to marker ownership conflicts between a task and a language worker?

Not sure about @egamma case but @joaomoreno case is because of ownership. With Salsa we now validate the files with tsserver and no errors are produced. Since eslint-stylish uses the owner javascript Salsa clears all JS errors. May be for JS linters we should use a separate owner.

My example is using .ts files and tslint.

I can reproduce this problem in 0.10.14-insiders and with errors as well as warnings.
In my case, I have written a custom problem matcher. In my project folder, I have a host application and a web application and they both use TypeScript and have their own tsconfig.json and gulpfile.js. Errors are relative to whichever one I am building. For example, my problem matcher for the web sub-project looks like this:
{
                "owner": "gulp",
                "fileLocation": ["relative", "${workspaceRoot}/web"],
                "pattern": {
                    "regexp": "^(.*?\\.[dD]\\.[tT][sS]|.*?\\.[tT][sS])\\((\\d+)\\,(\\d+)\\)\\:\\s*(warning|error)\\s*(TS\\d+)\\:\\s*(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 6
                }
            }

I experimented with various values for the owner property, including undefined, typescript and gulp (something I guessed wouldn't match any built in name) and, for all of them, some sort of weird behaviour can be observed. With gulp, errors are duplicated when I am actually on the file that has errors - presumably because the editor is raising its own - but, for all of them, navigating between files in the project eventually (not always after the first change of file) causes the errors to be lost.

Moving to May. This is more complicated then I thought and requires some more investigation.

Colour me disappointed! This issue is causing me to waste hours scrolling up and down the output panel and manually eye-balling file names and line numbers - particularly when refactoring or renaming a variable or class member.
Perhaps you could implement a "band-aid" fix in the interim: simply shelve the concept of problem ownership clear all "problems" when a build starts and register them from the new build's output when it finishes. For intellisense problems, just bung them in as duplicates - naively append the intellisense problems and build problems.

@stephenmartindale sorry about that. There are several possible interim fixes for your specific problem:

if you only want to rely on the problems produce by the external gulp file keep your gulp owner in the problem matcher and add the following setting to your workspace settings

"typescript.validate.enable": false

This basically 'emulates' clearing all errors on build

assuming that your gulp task is not a watching task you can enhance the problem matcher with the following property:

 "applyTo": "closedDocuments"

This will do the following: if a document is open in the editor errors are taken from the internal TS server and external errors are dropped. However in this setup you need to set the owner of the problem matcher to 'typescript' to make this work.
If this doesn't help, could you share your project. Then I have a quick look and see what I can do.

I have written up a proposal for the new story here: https://github.com/Microsoft/vscode/issues/6973

A couple of fixes went into the June build:

linter problem matcher have now there own id. So a Salsa problem can't clear a eslint problem.
the workbench doesn't auto remove errors anymore on close. It is up to the error producer to do so.
the case described by @joaomoreno got addressed in VS Code's tasks.json by using the applyTo property.

I will close this issue. Any further discussion on how we proceed with project wide errors should be discussed here: https://github.com/Microsoft/vscode/issues/6973

Please, when is this going to be fixed?


[WB-4549] ARCHITECTURE.md -- Life of a run

https://wandb.atlassian.net/browse/WB-4549
Description
Adds the start of some architecture docs, lets iterate on it from this if we think this is a good start
Things i like:

sequence diagrams are relatively easy to read and edit, if github markdown supported diagraming markdown i would use that tho
notice that the structural lines in the sequence chart are every other line.   The lines that describe what is happening do not have to have pipes and dots and that makes it easier as the longer descriptions can overlap dividers, what matters is where the test started from (that indicates what process/thread context is involved)
the use of markdown reference links to the files.
the overall level of detail in each section, i think we should avoid going too deep,  when we reference where the object lives in the code we can have more in depth documentation in the header of that python module.   I think this should be mostly how things fit together

Things i tried:

We can add links in the sequence diagram, but the html makes the pre-formatted text harder to read as alignment gets messed up, it isnt too bad if you keep the reference short. -- i am not against adding these back but we might want to see how things evolve first.  The change is to make the markdown code block into an html <pre> block and add short <a href="#section> into the diagrams.  -- but readability in text mode suffers.

What i dont like:

most of the text in the doc, poor definitions of concepts.
the tables might not have the right columns

Testing
Not needed
Release Notes
Below, please enter user-facing release notes as one or more bullet points.
If your change is not user-visible, write NO RELEASE NOTES instead, with no bullet points.
------------- BEGIN RELEASE NOTES ------------------
NO RELEASE NOTES
------------- END RELEASE NOTES --------------------

@kptkin checking in, just so this doesn't get stale. let me know and i will revert or modify anything you might want to change.


Fixed type: LoadBalancer

Should be type:LoadBalancer not type: LoadBalancerServices

Thank you, @eamonryan !


Element pages should have an Installation section

As an alternative to adding to cart and then downloading a bower.json, I'd like to just see the dependency line that I can copy and paste into my existing bower.json. A bower install command line would be nice too.

+1

:+1:

+1

+1
On Mon, Jun 1, 2015, 6:54 PM Hayato Mizuno<EMAIL_ADDRESS>wrote:

+1
—
Reply to this email directly or view it on GitHub
https://github.com/Polymer/polymer-element-catalog/issues/58#issuecomment-107804605
.

Yeah the first box on an element's page should be
Installation
bower install --save PolymerElements/[some-element-name]

Long fixed


Adding direct KubeRay compatibility to the SDK

Issue link
#359
What changes have been made
Working on adding direct KubeRay support (generate and manage RayClusters)
Verification steps
Manual test of regular flow, as well as new mcad=False in ClusterConfiguration flow
Checks

[x] I've made sure the tests are passing.
Testing Strategy

[x] Unit tests
[x] Manual tests
[ ] Testing is not required for this change

Tested! works as expected. Thanks @Maxusmusti

Thanks @Bobbins228, just rebased on Kevin's dashboard oauth changes, if everything still works as expected then it should be good to go!


[Feature][Doc] Add the usage document for Apache Hudi

Description
[Doc] Add document of Apache hudi
Use case
No response
Are you willing to submit PR?

[X] Yes, I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

https://inlong.apache.org/docs/next/introduction


Broken link to trait BoxExt

On both docs.rs and github, the documentation for VerticalBox says "Lays out its children vertically; see BoxExt for functionality", where BoxExt is a link. The link is broken however, and I don't think BoxExt exists anymore

Yeah, absolutely right. Thanks for pointing this out.


Missing Migration

Looks like the migration 0001_initial.py was mistakenly left out. This means that it will not work unless the user runs makemigrations. This isn't typically run during CI or docker build or anything like that leaving the app broken for production. In an environment like heroku where the file system is reset whenever a dyno restart occurs, the migration will go missing.

Hi, thanks for bringing this up.
It was intentionally left out because it needs to have a ForeignKey to the implementer's own Tenant model, so we cannot include the migration. But as you noted, it's not ideal to have to run makemigrations during your build step, though this should work fine.
I think what we will do is make that model abstract, and then you can subclass it in your project, which means the generated migration can be dynamic to link to your Tenant model and also that the migration will live in your app.

Hi, thanks for bringing this up.
It was intentionally left out because it needs to have a ForeignKey to the implementer's own Tenant model, so we cannot include the migration. But as you noted, it's not ideal to have to run makemigrations during your build step, though this should work fine.
I think what we will do is make that model abstract, and then you can subclass it in your project, which means the generated migration can be dynamic to link to your Tenant model and also that the migration will live in your app.

Until a fix is released, if you add a makemigrations step to your build after you've installed the app, that should recreate the migration you need each time.


Menu Active

Hi guys, how are you?
I made my menu, but it is getting so active, has anyone gone through this? Is it possible to modify and not get this gray color?

and

It is the standard behaviour of the AdminLTE template. You may try to add the nav-legacy class on classes_sidebar_nav configuration option. See documentation of that option on Layout And Styling Config. I'm not sure if there are other alternatives.


gnomAD LD datasource with paths within class

We concluded we could benefit from datasources containing default paths for sources are there relatively static and we depend on production-ready datasets.

@d0choa @DSuveges @ireneisdoomed FYI there's likely going to be a merge conflict with this PR, as it also touches the YAML configuration: https://github.com/opentargets/genetics_etl_python/pull/226


Duplicate resource error when deploying cluster

I had a cluster setup running on the laptop and got this somewhat weird deployment error.  I haven't ever seen this before, even on the last run.  The only real difference from the last run is that this is the first we're installing with only 3 CPUs assigned to the VM.
Here's the relevant part of the logs:
*** STATUS: install registry-harbor
----------------------------------------
START-BUNDLE: ./script.sh
*** START TEXT FILE: script.sh

set -euo pipefail

cd /lib/neonkube/helm

helm install registry-harbor --namespace neon-system -f harbor/values.yaml --set priorityClassName=neon-data --set-string cluster.name="neon-desktop" --set-string cluster.domain="9e5a-36f3-9055-fb6d.neoncluster.io" --set metrics.enabled="false" --set-string metrics.interval="1m" --set serviceMesh.enabled="false" --set components.chartMuseum.enabled="false" --set components.notary.enabled="false" --set components.trivy.enabled="false" --set-string neonkube.clusterDomain.harborNotary="neon-notary" --set-string neonkube.clusterDomain.harborRegistry="neon-registry" --set-string storage.s3.accessKey="CNUCw9mDdSE1o6I3" --set-string storage.s3.secretKeyRef="registry-minio" --set-string ldap.baseDN="dc=9e5a-36f3-9055-fb6d\,dc=neoncluster\,dc=io" --set-string ldap.secret="tP2veinfGO5fQj1bFBvm" --set-string nginx.priorityClassName="neon-data" --set-string portal.priorityClassName="neon-data" --set-string core.priorityClassName="neon-data" --set-string jobservice.priorityClassName="neon-data" --set-string registry.priorityClassName="neon-data" --set-string chartmuseum.priorityClassName="neon-data" --set-string clair.priorityClassName="neon-data" --set-string notary.server.priorityClassName="neon-data" --set-string notary.signer.priorityClassName="neon-data" --set-string trivy.priorityClassName="neon-data" ./harbor

START=`date +%s`
DEPLOY_END=$((START+15))

set +e

until [ `helm status registry-harbor --namespace neon-system | grep "STATUS: deployed" | wc -l` -eq 1  ];
do
  if [ $((`date +%s`)) -gt $DEPLOY_END ]; then
    helm uninstall registry-harbor --namespace neon-system || true
    exit 1
  fi
   sleep 1
done

*** END TEXT FILE
*** START TEXT FILE: __run.sh
#!/bin/sh

chmod 700 "script.sh"
./script.sh
*** END TEXT FILE
*** Uploading: /home/sysadmin/.neon/exec/f2a4138f-703b-457e-9f3e-131d25546961/__bundle.zip
START: sudo bash -c 'if [ -f "/home/sysadmin/.neon/upload/__bundle.zip-3cc100a8-c934-4327-abc3-f12924c46ba1" ] ; then rm "/home/sysadmin/.neon/upload/__bundle.zip-3cc100a8-c934-4327-abc3-f12924c46ba1" ; fi'
END [OK]
STDERR
    Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: could not get information about the resource: Internal error occurred: error resolving resource
END [ERROR=1]
*** STATUS: ERROR[1]
# CLUSTER-END-SETUP-FAILED ####################################################

I tried this again one the same machine and it worked, so this is likely a timing thing?
@marcusbooyah says that this may be due to retries.  Perhaps the performance of the VM with only 3 cores allocated slowed things down enough that this surfaced.
Here's the thing: this needs to work.  We shouldn't be retrying if that's going to fail due to things like this.

CLOSING: I discussed this with @marcusbooyah a couple weeks ago and I believe he said that he's seen this before and probably fixed it.


EF_SEL inputs

TEF_SEL actually selects between E0 and F1 (not F0)
BEF_SEL actually selects between E1 and F0 (not F1)
I think the schematic and docs need updating to reflect this...

Fixed the schematic with 8818c13


fix(disk-offering): enable change disk offering for volume

Pull Request Test Coverage Report for Build 1304

4 of 10 (40.0%)  changed or added relevant lines in 1 file are covered.
9 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.1%) to 53.583%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/app/reducers/volumes/redux/volumes.effects.ts
4
10
40.0%

Files with Coverage Reduction
New Missed Lines
%

src/app/reducers/volumes/redux/volumes.actions.ts
2
89.09%

src/app/reducers/volumes/redux/volumes.effects.ts
7
83.89%

Totals

Change from base Build 1303:
-0.1%

Covered Lines:
8129

Relevant Lines:
13331

💛  - Coveralls


Arrow keys don't work in Chrome/Safari

...as stated here:
https://openseadragon.github.io/examples/ui-keyboard-navigation/
The thing is, arrow keys do work in other webapps, so what's special about OpenSeadragon? Is it the fact that we're using a textarea rather than a regular div? Why are we doing that? Is there some other way to get that effect without compromising the arrow keys?

Haven't looked yet, but may just be the event we're using (keypress vs keydown/keyup).
A quick Bing search tells me it should work everywhere these days.
Assigning to me...

fixed by #568


Handle errors in cart page gracefully

In the cart view the user can retrigger cart creation by triggering new price requests via model duplication or quantity changes.
The re-creation of the cart can fail because either a quote becomes unprintable (e.g. an API partner returns an error) or the backend encounters some other unexpected error.
Currently the client displays the standard error modal and the user loses their cart. We should change this behaviour to display an in-page message that something went wrong and possibly allow the user to retry their changes. Most importantly the user should NOT lose their cart but remain in the cart view.
To consider: Should we reset the cart to the previous state (models/quantity) or leave it in the current state? Maybe disable the Checkout options and only enable retry + quantity change  until the cart can be created successfully? To be discussed

New API version, merged with https://github.com/all3dp/printing-engine/pull/1876, provides "rich" cart response.
Path /v3/cart/rich

Um hier weitermachen zu können benötig ich noch das Konzept zu globalen Toasts/Notificiations im Printing Client von Vitus.


Could not obtain flags for test files

Everything was working well until I recompiled HIE with commit hash 22c69c620b2707119194bb33c4ae15427e46f0a2.  When I try editing a test file, vscode keeps complaining the following:
Fail on initialisation for "/Users/xiao/haskell/mal2/test/NumberSpec.hs".
Could not obtain flags for: "test/NumberSpec.hs".

This module was not part of any component we are aware of.

Component: ChLibName ChMainLibName with source directory: ["src"]
Component: ChExeName "mal-exe" with source directory: ["app"]

To expose a module, refer to:
https://docs.haskellstack.org/en/stable/GUIDE/
If you are using `package.yaml` then you don't have to manually expose modules.
Maybe you didn't set the source directories for your project correctly.

Previously (at least in November 2019) I never met this, but now vscode warns me that Fail on initialisation for "/Users/xiao/haskell/mal2/test/NumberSpec.hs". Could not obtain flags for: "test/NumberSpec.hs". repeatedly. (The alert flashes so quickly that I narrowly copied this line).
stack test works correctly and the test source dir is specified in the tests section of package.yaml(The same problem occurs even if I initialize a new project with stack). It seems that HIE doesn't consider test sources as a component to be aware of.

What is the content of the generated cabal file?

It looks like this:
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.31.2.
--
-- see: https://github.com/sol/hpack
--
-- hash: 0237d3eaa901762b9786046b053689250944bf6f8f5cd71ad3894e00fc5f5a72

name:           mal
version:        <IP_ADDRESS>
description:    Please see the README on GitHub at <https://github.com/githubuser/mal2#readme>
homepage:       https://github.com/githubuser/mal2#readme
bug-reports:    https://github.com/githubuser/mal2/issues
author:         Author name here
maintainer<EMAIL_ADDRESS>copyright:      2019 Author name here
license:        BSD3
license-file:   LICENSE
build-type:     Simple
extra-source-files:
    README.md
    ChangeLog.md

source-repository head
  type: git
  location: https://github.com/githubuser/mal2

library
  exposed-modules:
      Eval
      Lexer
      Mal
      Reader
      Repl
      Runtime
  other-modules:
      Paths_mal
  hs-source-dirs:
      src
  build-depends:
      base >=4.7 && <5
    , haskeline
    , hspec
    , parsec
  default-language: Haskell2010

executable mal-exe
  main-is: Main.hs
  other-modules:
      Paths_mal
  hs-source-dirs:
      app
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      base >=4.7 && <5
    , haskeline
    , hspec
    , mal
    , parsec
  default-language: Haskell2010

test-suite mal-test
  type: exitcode-stdio-1.0
  main-is: Spec.hs
  other-modules:
      Helper
      NumberSpec
      Paths_mal
  hs-source-dirs:
      test
  ghc-options: -threaded -rtsopts -with-rtsopts=-N
  build-depends:
      base >=4.7 && <5
    , haskeline
    , hspec
    , mal
    , parsec
  default-language: Haskell2010

Can you maybe share the project so I can try, too?

Sure, the repo is here. I am following this guide writing a lisp.

I had the same error today with a simple servant project. When I ran the stack test command the error seem to be disappeared

Same problem here, I'm able to reproduce this error with this project that contains test files.

Got same problem with a stack/hpack-based project, but for Setup.hs (the one for test files indeed goes away after doing stack test):

2020-02-09 18:48:25.020555898 [ThreadId 4] - Fail on cradle initialisation: (ExitFailure 2)["Could not obtain flags for: "Setup.hs".","","This module was not part        of any component we are aware of.","","Component: ChLibName ChMainLibName with source directory: ["src"]","Component: ChExeName "hwc-exe" with source directory:        ["app"]","Component: ChTestName "hwc-test" with source directory: ["test"]","","","To expose a module, refer to:","https://docs.haskellstack.org/en/stable/           GUIDE/","If you are using package.yaml then you don't have to manually expose modules.","Maybe you didn't set the source directories for your project correctly."]

The project in question is here. Is there any workaround for this one?

This error pops up like every second, it's annoying (I guess that it is the problem, not the actual error?) So maybe it is possible to just hide the error? Or to hide any errors in vscode.
Also: running stack test in terminal doesn't solve the problem for me.

@0xd34df00d We are currently not supporting diagnostics for Setup.hs. E.g. we can not load this into the IDE.
@kirillFedorov1 Unless you have the same issue as @0xd34df00d, you should not ignore this message, as it means that something can not be loaded. If you just want to ignore special files, take a look at https://github.com/haskell/haskell-ide-engine#project-configuration where you can specify that certain source files should not be loaded by hie.

@fendor I wasn't trying to load Setup.hs, this appeared when I tried to open the usual app/Main.hs. Sorry for omitting that!

@0xd34df00d Maybe you have opened it by accident before that? Requests to compile files are queued and executed in order. I can not imagine any other reason why else hie was trying to load Setup.hs if you didnt open it explicitly yourself

@fendor that's unlikely, I can reproduce this by just opening a fresh instance of vim (+ coc + hie) with that single file as an argument.

Then please post the logs for it. Alternatively, you can also try to invoke hie --debug app/Main.hs and see if this reproduces the error.

@fendor here's the log as per :CocInfo: https://gist.github.com/0xd34df00d/c34916ec411bd1a58445d3cbd09cd881
Interestingly, hie --debug app/Main.hs looks fine and does not even mention Setup.hs.

The line:
2020-02-10 15:06:26.976459722 [ThreadId 4] - args:[]

and
2020-02-10 15:06:28.48306779 [ThreadId 4] - args:[]

seem to be wrong, it should be ["--lsp"]
Without it hie is in "trace" mode and tries to load everything int the project instead start the lsp server, needed to connect the editor as a client.
So i would revise the editor config.

@jneira that explains it! Looks like I did my :CocConfig before this flag was introduced/mentioned in the README, and I missed it when I skimmed the README yesterday.
Re the version, I'm on 49c6185efdec715a4b2954efa7887520f7196cc8 — pulled a couple of days ago.

Problem is related to stack. By default test-components are not in the global project definition, and executing stack test enables test components. That is why stack test does solve that problem.
Another possible work-around is to use an explicit hie.yaml
cradle:
  stack:
    - path: ./test
      component: "project:test:test-name"
    - path: ./src
      component: "project:lib"
    ...

All available targets can be shown with stack ide targets.

Hi I tried using this as a work around. But manually specifying the yaml file can soon becomes tedious due to the fact that I have 15 components and also even when I take the pain to create the HIE file. It will complain about cannot find certain modules that I imported in my file.
For example in my test file the lines go like:
import Test.Hspec
import Control.Exception.Safe

And if I specify the hie.yaml explicitly, it will say:
Could not load module ‘Test.Hspec’
It is a member of the hidden package ‘hspec-2.7.1’.
You can run ‘:set -package hspec’ to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v to see a list of the files searched for.

@524119574 have you tried to run stack build --test --no-run-tests and reload the project?
From my own comment in #1676:
I've just tested a similar configuration (using stack with an explicit hie-yaml) and it seems once that stack has built the project with stack build --test the module is loaded succesfully even after a  stack clean.
stack needs to build the dependencies in the global cache (in the $(stack path --snapshot-install-root) directory) and the error only is reproduced for me if i delete that dir.

In fact i am not sure it would be a stack bug cause the behaviour is reproduced only using stack commands:
$ rm -rf $(stack path --snapshot-install-root)

$ rm -rf .stack-work/

$ stack repl project:test:test-name
....
Warning: Didn't find expected autogen file:
         D:\dev\ws\haskell\project\.stack-work\dist\e626a42b\build\stack-test-test\autogen\cabal_macros.h
GHCi, version 8.6.5: http://www.haskell.org/ghc/  :? for help
<command line>: cannot satisfy -package hspec-2.7.1
    (use -v for more information)

$ stack build --test --no-run-tests
....
Completed 29 action(s)
$ stack repl project:test:test-name
.....
Configuring GHCi with the following packages: stack-test
GHCi, version 8.6.5: http://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Main             ( D:\dev\ws\haskell\project\test\MyLibTest.hs, interpreted )
Ok, one module loaded.
Loaded GHCi configuration from D:\\dev\\....
*Main>

@524119574 have you tried to run stack build --test --no-run-tests and reload the project?
From my own comment in #1676:
I've just tested a similar configuration (using stack with an explicit hie-yaml) and it seems once that stack has built the project with stack build --test the module is loaded succesfully even after a stack clean.
stack needs to build the dependencies in the global cache (in the $(stack path --snapshot-install-root) directory) and the error only is reproduced for me if i delete that dir.

Ah it seems like working now. Thanks a lot!

Opened a issue upstream: https://github.com/commercialhaskell/stack/issues/5213

Can someone please explain how can I specify that tests/tests.hs should not be loaded by hie? Should I just delete - path: ./test/dispatcher/ - path: ./test/functional/ - path: ./test/unit/ sections in hie.yaml?

@kirillFedorov1 You have to specify a none  - cradle.
Given this hie.yaml
cradle:
  cabal:
    - path: "./test/dispatcher/"
      component: "test:dispatcher-test"
    - path: "./test/functional/"
      component: "test:func-test"
    - path: "./test/unit/"
      component: "test:unit-test"
    - path: "./hie-plugin-api/"
      component: "lib:hie-plugin-api"
    - path: "./app/MainHie.hs"
      component: "exe:hie"
    - path: "./app/HieWrapper.hs"
      component: "exe:hie-wrapper"
    - path: "./"
      component: "lib:haskell-ide-engine"

And now you dont want to load any test files, you can do:
cradle:
  multi:
# Usual cradle for all paths
    - path: ./
      config:
        cradle:
          cabal:
          - path: "./hie-plugin-api/"
            component: "lib:hie-plugin-api"
          - path: "./app/MainHie.hs"
            component: "exe:hie"
          - path: "./app/HieWrapper.hs"
            component: "exe:hie-wrapper"
          - path: "./"
            component: "lib:haskell-ide-engine"

# None cradle, dont load any module in that folder
    - path: ./test
      config:
        cradle:
          none:

@fendor I made a hie.yaml in my working root, now the error doesn't appear, but another message appears every time: Saving 'tests.hs': Running 'Haskell Language Server' Formatter (configure). And it seems something happened with my autosave setting.

I have never seen this error message before. Can you provide all logs please? For vscode, https://github.com/alanz/vscode-hie-server#investigating-and-reporting-problems

@fendor 2020-03-16 11:55:39.1848944 [ThreadId 8] - Command ghc --print-libdirfailed. 2020-03-16 11:55:39.1848944 [ThreadId 8] - Could not obtain the libdir. Using hie version: Version <IP_ADDRESS>, Git revision 4bec07d79cf77c8ee855957d20e315a89f799d75 (3745 commits) x86_64 ghc-8.6.5 2020-03-16 11:55:39.1868945 [ThreadId 8] - Scheduler thread exited unexpectedly: hie.exe: panic! (the 'impossible' happened)   (GHC version 8.6.5 for x86_64-unknown-mingw32): 	can't decompose ghc.exe path: "C:\\Users\\user\\AppData\\Roaming\\local\\bin\\hie.exe"

Then you have to change the component syntax and the tool at the top to stack.
For stack components, see the command stack ide targets

@fendor Sorry I tried to figure out I swear
So stack ide targets gives me exercises:lib, exercises:test:tests
How should  hie.yaml look? This is wrong:
cradle:
  multi:
# Usual cradle for all paths
    - path: ./
      config:
        cradle:
          stack:
          - path: "./hie-plugin-api/"
            component: "exercises:lib:hie-plugin-api"
          - path: "./app/MainHie.hs"
            component: "exercises:lib:hie"
          - path: "./app/HieWrapper.hs"
            component: "exercises:lib:hie-wrapper"
          - path: "./"
            component: "exercises:lib:haskell-ide-engine"

# None cradle, dont load any module in that folder
    - path: ./test
      config:
        cradle:
          none:

No need to apologize :)
I think it looks already almost correct, Ill take a stab in the dark and suggest it should look like  this:
cradle:
  multi:
# Usual cradle for all paths
    - path: ./
      config:
        cradle:
          stack:
          - path: "./src/"
            component: "exercises:lib"

# None cradle, dont load any module in that folder
    - path: ./test
      config:
        cradle:
          none:

This means that your library component is located in the directory "src" and that you do not want to load anything that is in the "./test" directory.
If this does still not work, would you mind showing the output of invoking hie --debug . in the root of your project?

@fendor it still doesn't work.
Running HIE(hie)
  Version <IP_ADDRESS>, Git revision 4bec07d79cf77c8ee855957d20e315a89f799d75 (3745 commits) x86_64 ghc-8.6.5
To run as a LSP server on stdio, provide the '--lsp' argument
Current directory:D:\ssd-data\work\exercises

args:["--debug","."]

Looking for project config cradle...

2020-03-16 16:34:08.8436322 [ThreadId 3] - Found "D:\ssd-data\work\exercises\hie.yaml" for "D:\ssd-data\work\exercises\File.hs"
2020-03-16 16:34:08.9436379 [ThreadId 3] - Module "D:\ssd-data\work\exercises\File.hs" is loaded by Cradle: Cradle {cradleRootDir
= "D:\\ssd-data\\work\\exercises", cradleOptsProg = CradleAction: Stack}
2020-03-16 16:34:08.9746397 [ThreadId 3] - Executing Stack GHC with args: --numeric-version
2020-03-16 16:34:09.9176936 [ThreadId 3] - GHC Output: "Just "8.6.5""
2020-03-16 16:34:09.9296943 [ThreadId 3] - Executing Stack GHC with args: --print-libdir
2020-03-16 16:34:10.8147449 [ThreadId 3] - GHC Output: "Just "C:\\Users\\user\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.6.5\\lib""

###################################################

Cradle: Stack project
Project Ghc version: 8.6.5
Libdir: Just "C:\\Users\\user\\AppData\\Local\\Programs\\stack\\x86_64-windows\\ghc-8.6.5\\lib"
Searching for Haskell source files...
Found 4 Haskell source files.

###################################################

Found the following files:

D:\ssd-data\work\exercises\tests\tests.hs
D:\ssd-data\work\exercises\src\Exercises.hs
D:\ssd-data\work\exercises\Setup.hs
D:\ssd-data\work\exercises\app\Main.hs

Load them all now. This may take a very long time.

2020-03-16 16:34:10.9117505 [ThreadId 3] - New cradle: D:\ssd-data\work\exercises\tests\tests.hs
2020-03-16 16:34:10.9157507 [ThreadId 3] - Found "D:\ssd-data\work\exercises\hie.yaml" for "D:\ssd-data\work\exercises\tests\tests.hs"
2020-03-16 16:34:10.9267513 [ThreadId 3] - Module "D:\ssd-data\work\exercises\tests\tests.hs" is loaded by Cradle: Cradle {cradleRootDir = "D:\\ssd-data\\work\\exercises", cradleOptsProg = CradleAction: Stack}
2020-03-16 16:34:10.9277514 [ThreadId 3] - Found cradle: Cradle {cradleRootDir = "D:\\ssd-data\\work\\exercises", cradleOptsProg = CradleAction: Stack}
2020-03-16 16:34:10.956753 [ThreadId 3] - New cradle: D:\ssd-data\work\exercises\src\Exercises.hs
2020-03-16 16:34:10.9577531 [ThreadId 3] - Found "D:\ssd-data\work\exercises\hie.yaml" for "D:\ssd-data\work\exercises\src\Exercises.hs"
2020-03-16 16:34:10.9587532 [ThreadId 3] - Module "D:\ssd-data\work\exercises\src\Exercises.hs" is loaded by Cradle: Cradle {cradleRootDir = "D:\\ssd-data\\work\\exercises", cradleOptsProg = CradleAction: Stack}
2020-03-16 16:34:10.9587532 [ThreadId 3] - Found cradle: Cradle {cradleRootDir = "D:\\ssd-data\\work\\exercises", cradleOptsProg = CradleAction: Stack}
hie: Cannot decode byte '\xad': Data.Text.Internal.Encoding.streamDecodeUtf8With: Invalid UTF-8 stream

The hie.yaml is correct, hie trips over some windows issue. @jneira I think you have encountered this issue before?

The Cannot decode byte '\xad' part seems to be some encoding issue, similar to this one in ghcide: https://github.com/digital-asset/ghcide/issues/321. So maybe hie-bios could be involved.
Maybe set the encoding in console to utf8, with chcp 65001 could help.

@jneira should I just put chcp 65001 into the terminal and then restart hie? That didn't work :(
I don't quite understand why this problem appeared only after making custom hie.yaml for my project.

No, sorry for not being precise, i wanted to mean that chcp 65001 could change the behaviour running hie --debug in the console. Do you get the same error (Cannot decode byte '\xad' ) in the hie log or only in the console?

@jneira Yes, the same error appears in the hie log and in the console. chcp 65001 helps to get rid of it, but then I get
hie: hie: panic! (the 'impossible' happened)
  (GHC version 8.6.5 for x86_64-unknown-mingw32):
        can't decompose ghc.exe path: "C:\\Users\\user\\AppData\\Roaming\\local\\bin\\hie.exe"

@kirillFedorov1 So with chcp 65001 we get ride of the encoding problem in the console, but then we are hitting the original error shown in the hie.log: https://github.com/haskell/haskell-ide-engine/issues/1564#issuecomment-599418331
I think we can concentrate in
can't decompose ghc.exe path: "C:\\Users\\user\\AppData\\Roaming\\local\\bin\\hie.exe"
I guess user is not the real machine user 😉 so at least, could you tell if the user name has non-ascii or spaces in the name (or other interesting attribute)?

@jneira "user" is the real name

The error seems tobe thrown by ghc: https://github.com/ghc/ghc/blob/92b6a0237e0195cee4773de4b237951addd659d9/compiler/main/SysTools/BaseDir.hs#L153-L157

If it helps:
I use stack, but let the .cabal file get generated automatically as I only use package.yaml and stack.yaml. So I delete the .cabal file, rebuild so that cabal is re-generated, than then my test file works.

A workaround for this issue, without an explicit hie.yaml is add:
test: true

to stack.yaml
This way stack will build the tests components and hie will be able to see them.

And what is the workaround here? I'm a bit lost on all those comments.

And what is the workaround here? I'm a bit lost on all those comments.

Yeah, you are right, the possible workarounds are:

run stack build --test --no-run-tests each time you have to build the project before opening it in the editor
add test: true in the stack.yaml: this is like append --test automatically for all stack comands and run at least one stack build before opening the project

Thans @jneira . I couldn't get this resolved by those steps though. Unfortunately I tried upgrading stack, which now left me with a completely unworkable setup. See  #1782 :(

I am also getting these errors with a cabal project:
/home/neo/Projects/haskell-editor-setup/src/OS/Linux/NixOS.hs: FAILED
        Fail on initialisation for "/home/neo/Projects/haskell-editor-setup/src/OS/Linux/NixOS.hs". Could not obtain flags for: "src/OS/Linux/NixOS.hs".
/home/neo/Projects/haskell-editor-setup/src/OS/Linux/Debian.hs: FAILED
        Fail on initialisation for "/home/neo/Projects/haskell-editor-setup/src/OS/Linux/Debian.hs". Could not obtain flags for: "src/OS/Linux/Debian.hs".
/home/neo/Projects/haskell-editor-setup/src/OS/Prerequisites.hs: FAILED
        Fail on initialisation for "/home/neo/Projects/haskell-editor-setup/src/OS/Prerequisites.hs". Could not obtain flags for: "src/OS/Prerequisites.hs".
/home/neo/Projects/haskell-editor-setup/src/Types.hs: FAILED
        Fail on initialisation for "/home/neo/Projects/haskell-editor-setup/src/Types.hs". Could not obtain flags for: "src/Types.hs".
/home/neo/Projects/haskell-editor-setup/src/Util.hs: FAILED
        Fail on initialisation for "/home/neo/Projects/haskell-editor-setup/src/Util.hs". Could not obtain flags for: "src/Util.hs".
/home/neo/Projects/haskell-editor-setup/src/Main.hs: OK

This is the project/commit for which I am getting the errors: https://github.com/fairy-tale-agi-solutions/haskell-editor-setup/tree/d6c890b33f8dd7bec4cae07e9236a923fb5bd42c