Module "..." cannot be named without a reference to "..." error when decl emitting references to nested modules

Bug Report
🔎 Search Terms
cannot be named without a reference to symlink
🕗 Version & Regression Information

This is the behavior in every version I tried

⏯ Playground Link
N/A
💻 Code
https://github.com/jcreamer898/monorepo-examples/tree/main/pnpm-example
TL;DR file layout:
// monorepo-examples\pnpm-example\packages\pkg-a\index.ts
import { FontSizes, FontWeights, ITheme, IStyle } from "@fluentui/react";

// This expression's inferred type depends on @fluentui/merge-styles
export const something = { ...

@fluentui/react is nested in /monorepo-examples/pnpm-example/node_modules/.pnpm/@fluentui+react
Adding a blank import to @fluentui/merge-styles in index.ts makes the problem go away
🙁 Actual behavior
src/index.ts:28:14 - error TS2742: The inferred type of 'personScopeListItemOverrides' cannot be named without a reference to '.pnpm/@fluentui+merge-styles@8.3.0/node_modules/@fluentui/merge-styles'. This is likely not portable. A type annotation is necessary.

🙂 Expected behavior
No error

This seems to be related to the issue I've opened earlier here: https://github.com/microsoft/TypeScript/issues/47663

Althought I don't know why , "preserveSymlinks": true  resolved my problems

I think preserveSymlinks can sometimes solve this (or at least similar problems) but that's not really solution to the underlying problem.

This error is also not suppressible through @ts-expect-error. It will just complain Unused '@ts-expect-error' directive.

Thanks for scheduling this for 4.8! I'm looking forward to tracking the fix. Would it be possible to get some insight from language designers on what this is trying to protect us from[1]? Understanding this or having some clue about the recommended mitigation while we await upstream fix would be helpful. Here's a dump of what I've found so far.
A note, the problem I'm seeing might not be representative of the full presentation of this error. To provide some context, our use case similar to pnpm's where the real path of node_modules lives outside of the project root (we create carefully sandboxed roots for each build action to ensure we have a clean build graph), and the main area I'm seeing this error is in React code like export const A = forwardRef<HTMLElement, B>(...) where B is in a third-party package whose definition relies on a transitive dep C.
For reference, the type definition of<EMAIL_ADDRESS>and<EMAIL_ADDRESS>forwardRef is:
    function forwardRef<T, P = {}>(render: ForwardRefRenderFunction<T, P>): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;

Our code looks like:
import * as DropdownMenu from `@radix-ui/react-dropdown-menu`;
export const Separator = forwardRef<HTMLDivElement, DropdownMenu.MenuSeparatorProps>(...);

And @radix-ui/react-dropdown-menu code is:
import * as MenuPrimitive from "@radix-ui/react-menu";
type MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;
export interface DropdownMenuSeparatorProps extends MenuSeparatorProps {
}
export const DropdownMenuSeparator: React.ForwardRefExoticComponent<DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
t

Using traditional node_modules linking, TS expands the generic arguments fully when generating the type declaration from our code. Turning on our pnpm-like linking method causes TS to fail to compile this file.
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
export declare const Separator: import("react").ForwardRefExoticComponent<Pick<import("@radix-ui/react-menu").MenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "className" | "children" | "..."> & import("react").RefAttributes<HTMLDivElement>>;

To begin, this seems like problematic behavior because only @radix-ui/react-dropdown-menu and not @radix-ui/react-menu is a direct dep of our code, so it's not guaranteed that import("@radix-ui/react-menu") resolves to the correct version when resolved from our code. I don't know if this is a configuration error on our part, a bug in TS, or some compromise to make the ecosystem work. Naively, I'd expect the generated type to look something like this:
import type { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
export declare const Separator: ForwardRefExoticComponent<PropsWithoutRef<DropdownMenu.MenuSeparatorProps> & RefAttributes<HTMLDivElement>>;

In fact, around 50% of exported types already look like this, but not all, for reasons I don't understand yet:
export declare const Content: import("react").ForwardRefExoticComponent<DropdownMenuProps & import("react").RefAttributes<HTMLDivElement>>;
export declare const Trigger: import("react").ForwardRefExoticComponent<DropdownMenu.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
export declare const Item: import("react").ForwardRefExoticComponent<DropdownMenu.DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
export declare const Label: import("react").ForwardRefExoticComponent<DropdownMenu.DropdownMenuLabelProps & import("react").RefAttributes<HTMLDivElement>>;
export declare const Separator: import("react").ForwardRefExoticComponent<Pick<import("@radix-ui/react-menu").MenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "className" | "children" | "slot" | "style" | "title" | "key" | "color" | "translate" | "hidden" | "id" | "dir" | "accessKey" | "draggable" | "lang" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild"> & import("react").RefAttributes<HTMLDivElement>>;
export declare const TriggerItem: import("react").ForwardRefExoticComponent<DropdownMenu.DropdownMenuTriggerItemProps & import("react").RefAttributes<HTMLDivElement>>;
export declare const CheckboxItem: import("react").ForwardRefExoticComponent<Pick<import("@radix-ui/react-menu").MenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>, "className" | "children" | "slot" | "style" | "title" | "key" | "color" | "translate" | "hidden" | "disabled" | "id" | "dir" | "accessKey" | "draggable" | "lang" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "checked" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "asChild" | "textValue" | "onCheckedChange"> & import("react").RefAttributes<HTMLDivElement>>;

I have so far found 2 workarounds that don't require us to rewire too much code:

Add an explicit type to the exported member. This isn't always possible because declaring the type correctly can sometimes require using non-exported types from the API whose type is inferred. But for our use case, this is possible, if verbose. This causes the exported declarations to match my expectation, which is to use the immediate dep @radix-ui/react-dropdown-menu and never try to import the transitive dep @radix-ui/react-menu.
Add a useless import type {} from 'module-name' for the module that TS is complaining about. This isn't always possible because the module may not be a direct dependency of the code being compiled, and if it's a transitive dep, importing it directly could fail outright or technically resolve to the wrong version. This appears to cause TS to happily generate the code we saw during traditional nm linking, transitive dep import and everything.

Between the two, the first option seems better, even if it's technically different behavior, but I'd obviously like to make sure I'm not shooting myself in the foot somehow. Thanks!
[1] - My guess looking at the behavior and some past analysis is that it's trying to avoid unnamed deps that are technically resolveable at build time but are not distributed in a proper way that would be available to downstream users e.g. from node_modules in a user's home directory.

Would it be possible to get some insight from language designers on what this is trying to protect us from

You get this error any time the declaration emitter can't synthesize a workable specifier for a module which it needs to name a type from. For example, if it appears that the only legal path is ../../other_module/foo via some file that's in <<outDir>>/whatever, then that's not likely to work because the disk layout of the produced artifacts don't really have implicit dependencies on what peer directories of the output directory have.
The logic to synthesize these specifiers starts with the easy route of "Has this already been imported?", in which case re-use is easy and fine. Immediately past that lie many dragons and it's easy to get into a novel corner case where there is a speakable name to a module but TS just can't figure it out. Adding the import yourself is the easiest way to resolve the situation.

This isn't always possible because the module may not be a direct dependency of the code being compiled, and if it's a transitive dep, importing it directly could fail outright or technically resolve to the wrong version.

Note that if this isn't possible, then the error is correct and working around it by manually adding an import you know to be invalid is, well, invalid.

Same problem

We're also running into this with https://github.com/saiichihashimoto/sanity-typed-schema-builder/issues/155. It's unclear what should happen here, considering transitive type dependencies should work.

I've made a smaller reproduction here: https://github.com/microsoft/TypeScript/issues/47663#issuecomment-1267631748
Hope its helpful

You get this error any time the declaration emitter can't synthesize a workable specifier for a module which it needs to name a type from. For example, if it appears that the only legal path is ../../other_module/foo via some file that's in <>/whatever, then that's not likely to work because the disk layout of the produced artifacts don't really have implicit dependencies on what peer directories of the output directory have.

@RyanCavanaugh does this problem occur due to TS thinking the resolved transitive dependency is being resolved "outside" of the project? Or is it just multiple module specifiers being synthesised to the same as @renke mentioned in https://github.com/microsoft/TypeScript/issues/47663?
If TS think it is the former, i.e. deps being resolved outside the project. I'm interested to know if outside just means parent or sibling directory relative to your project directory?

I got this when upgrading from 4.9.5 to 5.0.2 with no other hanges.

I started seeing this after upgrading from 4.9 to 5.0, but only for one dependency, and only when building everything at once (rather than using project references)

Same problem


Options corrected in policy settings

Coverage decreased (-0.02%) to 51.05% when pulling cddf552ded7dc90ffb9399b70975bb44cbc8e9fe on compae:bugfix/policy-options-lost into bc89bcfd34b43dcc6c92e0ede9637ff72dccaf9f on Stratio:master.


cxx::vector support of Capacity 0 and erase by index

Brief feature description

cxx::vector shall support "0" as Capacity
cxx::vector shall allow to erase an element identified by its index, i.e., new method iterator erase(uint64_t index)

Detailed information

Support for Capacity 0 makes the cxx::vector implementation more generic. Typically, the capacity is given as configurable compile-time constants. Such a constant might potentially be set to "0", which shall not break compilation.
The existing iterator erase(iterator position) method assumes that iterators are used. In case the vector is accessed via index, a new  iterator erase(uint64_t index) method is more convenient.

@sschnitzer

The cxx::vector already supports a capacity of 0 if your compiler supports zero length arrays like int a[0]. This extension is supported by clang and gcc.

You already can use erase in such a manner. Let's say you have an index you could delete an element at that index with myVector.erase(myVector.begin() + index).

@sschnitzer

The cxx::vector already supports a capacity of 0 if your compiler supports zero length arrays like int a[0]. This extension is supported by clang and gcc.

You already can use erase in such a manner. Let's say you have an index you could delete an element at that index with myVector.erase(myVector.begin() + index).

@sschnitzer is there a use case for a vector with a capacity of 0? I'm just asking because it might add dead code.

@sschnitzer is there a use case for a vector with a capacity of 0? I'm just asking because it might add dead code.

@elBoberido
template <typename T, uint64_t Capacity>
class vector

0 is a valid number here.
Think about MAX_INTERFACE_NUMBER = 0 if you don't want to allow a gateway, you would see the same issue in iceoryx.
You will get the same problem in every class with preallocated memory with a cxx::vector:
template <uint64_t MaxStreets, uint64_t MaxLights>
class City

City<5, 0> myCity;

It would also be possible to write for every class a template specialization and some proper 0 handling in e.g.  the interface ports vector, but this would be even more code.

@elBoberido
template <typename T, uint64_t Capacity>
class vector

0 is a valid number here.
Think about MAX_INTERFACE_NUMBER = 0 if you don't want to allow a gateway, you would see the same issue in iceoryx.
You will get the same problem in every class with preallocated memory with a cxx::vector:
template <uint64_t MaxStreets, uint64_t MaxLights>
class City

City<5, 0> myCity;

It would also be possible to write for every class a template specialization and some proper 0 handling in e.g.  the interface ports vector, but this would be even more code.

Whoever the capacity thing implements I would suggest the following idea to reduce code duplication to a minimum and it could then also be reused by our list implementations:
// define struct where the elements are stored
template<typename T, uint64_t NumberOfElements>
struct ContainerStorage {
    using element_t = uint8_t[sizeof(T)];
    alignas(alignof(T)) element_t m_data[NumberOfElements];
};

// overload for storage when NumberOfElements is 0
template<uint64_t ElementSize>
struct ContainerStorage<ElementSize, 0U> {
};

// inherit in a protected way from ContainerStorage to gain access to m_data
template<typename T, uint64_t Capacity>
class vector : protected ContainerStorage<T, Capacity> { ...

But be aware that you would always get a compile time error if you access a method which is using m_data when the capacity is 0. But in the end it would be exactly what you want since push_back etc. would make no sense on such a container. But often you have a construct like
if ( vector.size() < vector.capacity() ) vector.push_back(myElement); // this would also lead to a compile time error

If you do not like this approach you could also just change the line
element_t m_data[Capacity];  into element_t m_data[(Capacity == 0) ? 1 : Capacity]; then you would have for a capacity of 0 still a C++ compliant array of size 1 - but it would be wasted.
The third option to completely overload the vector for capacity == 0 is dangerous since you would introduce undefined behavior for some methods which accesses m_data. For instance what should data() return, a nullptr? What are begin() and end() returning? Before diving into this approach you have to define how every method should behave in a defined way which is as close as possible to the STL vector version.

Whoever the capacity thing implements I would suggest the following idea to reduce code duplication to a minimum and it could then also be reused by our list implementations:
// define struct where the elements are stored
template<typename T, uint64_t NumberOfElements>
struct ContainerStorage {
    using element_t = uint8_t[sizeof(T)];
    alignas(alignof(T)) element_t m_data[NumberOfElements];
};

// overload for storage when NumberOfElements is 0
template<uint64_t ElementSize>
struct ContainerStorage<ElementSize, 0U> {
};

// inherit in a protected way from ContainerStorage to gain access to m_data
template<typename T, uint64_t Capacity>
class vector : protected ContainerStorage<T, Capacity> { ...

But be aware that you would always get a compile time error if you access a method which is using m_data when the capacity is 0. But in the end it would be exactly what you want since push_back etc. would make no sense on such a container. But often you have a construct like
if ( vector.size() < vector.capacity() ) vector.push_back(myElement); // this would also lead to a compile time error

If you do not like this approach you could also just change the line
element_t m_data[Capacity];  into element_t m_data[(Capacity == 0) ? 1 : Capacity]; then you would have for a capacity of 0 still a C++ compliant array of size 1 - but it would be wasted.
The third option to completely overload the vector for capacity == 0 is dangerous since you would introduce undefined behavior for some methods which accesses m_data. For instance what should data() return, a nullptr? What are begin() and end() returning? Before diving into this approach you have to define how every method should behave in a defined way which is as close as possible to the STL vector version.

Instead specializing the cxx::vector how about specializing only the storage? You are right, the C++ Standard doesn't allow a zero sized array, at least not on the stack, but we do not use just an array as storage type, but an array of byte arrays. This is also done at several places and I once had the idea to create a building block for all of this and abstract this away. So I propose to create such a building block which can handle a capacity of 0. This one should be easier to do than specializing the cxx::vector, cxx::list and any other container we implement in the future.
How about something like this
template <typename T, uint64_t N>
class uninitialized_array
{
  public:
    using value_type = T,
    using size_type = decltype(N);
    using refernece = value_type&;
    // further aliases like described in cppreference to mimic the STL

    reference at(size_type pos) noexcept;
    reference operator[](size_type pos) noexcept;

    reference front() noexcept;
    reference back() noexcept;

    pointer data() noexcept;

    constexpr bool empty() noexcept; // true if N > 0
    constexpr size_type size() const noexcept;
    // some STL container also have max_size(); if we want this, this would be the same as size
    // maybe a size_in_bytes() method would also be quite handy if someone wants to memcopy the data

    // all methods above as const

  private:
    using element_t = uint8_t[N == 0 ? 1 : sizeof(T)];
    alignas(alignof(T)) element_t m_data[N == 0 ? 1 : N]; // if necessary, alignment could also be set to 1, but I would argue that it should be the same as T
};

The proposal has several advantages:

it doesn't need to be specialized for zero capacity
if the capacity is 0, the size of the object is 1, which is exactly the same as of an empty struct (well, it's actually the alignment of the underlying type, but if necessary that could be changed to 1 as well)
it adds the functionality of zero capacity to multiple containers without specialization
it is typesave and removes the handling of arrays of byte arrays in multiple containers -> reducing error prone code

Instead specializing the cxx::vector how about specializing only the storage? You are right, the C++ Standard doesn't allow a zero sized array, at least not on the stack, but we do not use just an array as storage type, but an array of byte arrays. This is also done at several places and I once had the idea to create a building block for all of this and abstract this away. So I propose to create such a building block which can handle a capacity of 0. This one should be easier to do than specializing the cxx::vector, cxx::list and any other container we implement in the future.
How about something like this
template <typename T, uint64_t N>
class uninitialized_array
{
  public:
    using value_type = T,
    using size_type = decltype(N);
    using refernece = value_type&;
    // further aliases like described in cppreference to mimic the STL

    reference at(size_type pos) noexcept;
    reference operator[](size_type pos) noexcept;

    reference front() noexcept;
    reference back() noexcept;

    pointer data() noexcept;

    constexpr bool empty() noexcept; // true if N > 0
    constexpr size_type size() const noexcept;
    // some STL container also have max_size(); if we want this, this would be the same as size
    // maybe a size_in_bytes() method would also be quite handy if someone wants to memcopy the data

    // all methods above as const

  private:
    using element_t = uint8_t[N == 0 ? 1 : sizeof(T)];
    alignas(alignof(T)) element_t m_data[N == 0 ? 1 : N]; // if necessary, alignment could also be set to 1, but I would argue that it should be the same as T
};

The proposal has several advantages:

it doesn't need to be specialized for zero capacity
if the capacity is 0, the size of the object is 1, which is exactly the same as of an empty struct (well, it's actually the alignment of the underlying type, but if necessary that could be changed to 1 as well)
it adds the functionality of zero capacity to multiple containers without specialization
it is typesave and removes the handling of arrays of byte arrays in multiple containers -> reducing error prone code

Oh, and if you want to get rid of m_size, you can have
template <typename T, uint64_t N>
class vector_storage : public uninitialized_array
{
  public:
    size_type current_vector_size() const noexcept;
    void set_current_vector_size(size_type size) const noexcept;

  private:
    uint64_t m_size;
};

and specialize that one for 0. Then you have the exact same result as specializing the whole vector.

Oh, and if you want to get rid of m_size, you can have
template <typename T, uint64_t N>
class vector_storage : public uninitialized_array
{
  public:
    size_type current_vector_size() const noexcept;
    void set_current_vector_size(size_type size) const noexcept;

  private:
    uint64_t m_size;
};

and specialize that one for 0. Then you have the exact same result as specializing the whole vector.

Thanks @elBoberido and @elfenpiff for your feedback, I like it!
I will update the PR accordingly, using uninitialized_array and probably also vector_storage.

Thanks @elBoberido and @elfenpiff for your feedback, I like it!
I will update the PR accordingly, using uninitialized_array and probably also vector_storage.

@sschnitzer any progress on this topic. Soon I could make use of this feature. If you are too busy with other stuff at the moment, I could implement this also myself

@elBoberido I only did some initial steps on the requested design decision document, since I was busy with other stuff. I planned to continue on this topic, but as you need it soon, it will probably be merged faster if you implement it. So you can decide which one of us will implement it, depending on how "soon" you need it. If you decide to implement it yourself, I suggest to add me as reviewer, then I will also have a look on the PRs.

@mossmaurice I took over this but did not yet have time to implement it

@mossmaurice @elBoberido I would solve this issue with the #911 . In this issue we have to create a vector overload for the static vector and with this we can create a specialization as well for size 0.


ion-searchbar cancel not visible if ion-toolbar has background color

Ionic version:  (check one with "x")
[ ] 1.x
[x] 2.x
I'm submitting a ...  (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:

ion-searchbar inside ion-toolbar is very less visible and cancel is not visible if ion-toolbar has background color
Expected behavior:

ion-searchbar should be clearly visible independent of ion-toolbar color
Steps to reproduce:

Related code:
 <ion-toolbar color='primary'>
    <ion-searchbar
      placeholder="Search here"
      [showCancelButton]="true"
      (ionInput)="onSearchInput($event)"
      (ionCancel)="onSearchCancel($event)">
    </ion-searchbar>
  </ion-toolbar>

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 0.0.48
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: macOS Sierra
Node Version: v6.7.0
Xcode version: Xcode 8.1 Build version 8T61a

I just tested this and I see it just fine, using the defaults. I only changed the primary color to match the one you're using:

You probably changed some other colors in your styles or the theme variables and that's causing this issue for you.

Hello everyone, thanks for opening an issue with us! @aggarwalankush have you added any custom css to the searchbar or toolbar? Also @jsayol , what does your template look like compared to the markup @aggarwalankush posted ?

Hey @jgw96, I just started a new blank project and then copied @aggarwalankush's markup into the Home page template's header.
Looks like this;
<ion-header>
  <ion-navbar color='primary'>
    <ion-title>
      Ionic Blank
    </ion-title>
  </ion-navbar>
  <ion-toolbar color='primary'>
    <ion-searchbar
      placeholder="Search here"
      [showCancelButton]="true"
      (ionInput)="onSearchInput($event)"
      (ionCancel)="onSearchCancel($event)">
    </ion-searchbar>
  </ion-toolbar>
</ion-header>

@jgw96 I found the problem.
<ion-toolbar color='primary'> works but I'm globally setting all toolbars color to primary using $toolbar-background: color($colors, primary); in variables.scss which causes this searchbar css issue. How can I globally change toolbar color to avoid this issue?

@aggarwalankush This could probably be easier to achieve, but the following variables will get the look you want for searchbar on iOS:
$toolbar-background:                           color($colors, primary);
$toolbar-active-color:                         #fff;

// This is a variable I made up to reuse for searchbar colors
$toolbar-contrast-color:                       color-contrast($colors, $toolbar-background);

// Override searchbar colors
$searchbar-ios-toolbar-input-background:       rgba($toolbar-contrast-color, .08);
$searchbar-ios-input-text-color:               $toolbar-contrast-color;
$searchbar-ios-input-placeholder-color:        rgba($toolbar-contrast-color, .5) !default;
$searchbar-ios-input-clear-icon-color:         rgba($toolbar-contrast-color, .5) !default;
$searchbar-ios-input-search-icon-color:        rgba($toolbar-contrast-color, .5) !default;

@brandyscarney Thanks for the info. It's easier to set <ion-toolbar color='primary'> which magically works perfectly than overriding so many variables manually. Also, I feel I shouldn't override many variables as ionic team always keep them in sync with official material or ios design specs. 👍

I'm reopening this as I'd like to add a variable to make it easier to style the Cancel button for searchbar in iOS and override the variables.


separate builds in smoke-test to fix R/Polars CI

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#829 : 3  dependent PRs (#854 , #888 , #890 )
#1515  👈
#819
#868 : 1 other dependent PR (#864 )
#797 : 1 other dependent PR (#824 )
#847
#1454
#795
#1167
#769 : 1 other dependent PR (#771 )
#767
#765
#763
#917 : 1 other dependent PR (#921 )
#916
#907
#874
#705
#754
#704
#703
#753
#702
main

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

Join @Shoeboxam and the rest of your teammates on  Graphite


Write a C# program to convert decimal to hexadecimal

Description
Write a C# program to convert decimal to hexadecimal
Hexadecimal is a base-16 number system. It uses sixteen digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. The digits are called hexits. A hexit is the smallest unit of information in a computer. A hexit can be used to represent a single value, such as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, or F, or it can be used to represent a single state, such as on or off.
To convert a decimal number to hexadecimal, we can use the following algorithm:

Divide the decimal number by 16.
Write down the remainder.
Divide the quotient by 16.
Write down the remainder.
Repeat steps 3 and 4 until the quotient is 0.
The hexadecimal number is the sequence of remainders written in reverse order.

Input  : 10
Output : A

How to contribute

Save the solution in program/ConvertDecimalToHexadecimal.cs file
Add ConvertDecimalToHexadecimal.cs file in convert-decimal-to-hexadecimal folder

Hi, I am quite new to open source and would be happy to get involved in this issue.

Hey @g-s-eire
You can comment !assign on any good first issue you want to contribute to, to be auto-assigned
!assign


update_for_non_stationnarity

Previous random forest submission was updated acknowledging the high non-stationarity in the wells, reducing bias and increasing variance. The notebook hardly changed except that we used smaller trees and more variables.

I will score it this morning, thanks guys!


Described modes list is not complete

The list of the described modes under "Job Input" is not complete. It misses explanations for the "eval_" modes.
The article here describes all modes.

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

ID: 4909720f-c444-0127-a58d-44cbf6e64b3c
Version Independent ID: 0223dd9e-80e2-4bac-3cdf-6d9d79f33874
Content: CLI (v2) command job YAML schema - Azure Machine Learning
Content Source: articles/machine-learning/reference-yaml-job-command.md
Service: machine-learning
Sub-service: core
GitHub Login: @Blackmist
Microsoft Alias: larryfr

Thanks for the feedback! We are currently investigating and will update you shortly.

Hello Larry @Blackmist , could you please check on this case to see how we should update the list? Thanks a lot.

@timoklimmer thanks for the question! I'll track down the PM owner and ask for an update to the article. I'll reply back here once I have more info.

Sorry for the late response on this. The article was updated with new modes. Closing this issue.
#please-close


docker network rm: network has active endpoints

When I want to remove a container some times I see this error:
Error response from daemon: Unable to remove filesystem for 5e32b44ce67eee61b954138f4bb4a86e72fe1ac335fcd83065902f44441b327a: remove /var/lib/docker/containers/5e32b44ce67eee61b954138f4bb4a86e72fe1ac335fcd83065902f44441b327a/shm: device or resource busy
but it seems that the container is removed as its not in "docker ps -a "
but when I want to remove the network it gave me:
Error response from daemon: network net_c36-150-0 has active endpoints
docker network inspect net_c36-150-0
[
{
"Name": "net_c36-150-0",
"Id": "5f7db9d5db60178cbfe02a2a14edae8d6062b3fbf883f5266d3589a882816e77",
"Created": "2016-12-20T17:24:38.377424861+03:30",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "<IP_ADDRESS>/16"
}
]
},
"Internal": false,
"Attachable": false,
"Containers": {
"10954a48bd4e194417f0a0e405d6a02cbee837c9d2200265845935b7f5b31e21": {
"Name": "cassandra-1_c36-150-0",
"EndpointID": "a6df2d18569c1794fc9e2727b293757375c94034ebf630394326fbd471494652",
"MacAddress": "02:42:15:01:00:0f",
"IPv4Address": "<IP_ADDRESS>/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]

docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 89
Server Version: 1.13.0-rc4
Storage Driver: overlay
Backing Filesystem: extfs
Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc version: 51371867a01c467f08af739783b8beafc154c4d7
init version: 949e6fa
Security Options:
apparmor
Kernel Version: 3.19.0-78-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 19.61 GiB
Name: s36
ID: NDW6:JIM5:QO7M:E7BH:SCJP:DSUJ:HORQ:XB6B:N7LF:U57V:HP4W:RKI3
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
<IP_ADDRESS>/8
Live Restore Enabled: false

docker version
Client:
Version:      1.13.0-rc4
API version:  1.25
Go version:   go1.7.3
Git commit:   88862e7
Built:        Fri Dec 16 22:59:15 2016
OS/Arch:      linux/amd64
Server:
Version:      1.13.0-rc4
API version:  1.25 (minimum version 1.12)
Go version:   go1.7.3
Git commit:   88862e7
Built:        Fri Dec 16 22:59:15 2016
OS/Arch:      linux/amd64
Experimental: false

Update: restarting docker service solves the problem

@dongluochen I think you looked into something similar

@hmdhasani There are multiple issues with "Unable to remove filesystem". Can you take a look if this is covered by https://docs.docker.com/engine/admin/troubleshooting_volume_errors/, #22260, or #25718?

@dongluochen I actually meant the network net_c36-150-0 has active endpoints error that is somehow related to swarm services.

@dongluochen it doesn't seem to be  https://docs.docker.com/engine/admin/troubleshooting_volume_errors/ or , #22260, or #25718 because in those cases the container could not be removed but in my case the container is removed at least from "docker ps -a" result. but I think there are still some side effects on network.
The reason why I first thought it was a 1.13.0-rc4 bug was that it only occurs on one of our test servers that has this version. but I also realized that the server has less RAM than others and now I have doubt whether it's a 1.13.0-rc4 bug or a general one. I am trying to reproduce the error, but it's a very rare one.

@mlaventure Failure to delete the shm should point to container process still being alive. Even if only mounts were alive it shouldn't cause this. So it may be a containerd sync issue.

@hmdhasani do you have daemon debug log around the time that issue occurred?

@mlaventure currently no but I will get that

I installed docker 1.12.5 on the same server that had 1.13.0-rc4 and do the same procedure for many times and I never got the error, so currently I am almost sure that this is a 1.13.0-rc4 bug.
I will set the debug option to get more info.

time="2017-01-07T10:57:03.142110491+03:30" level=debug msg="Lookup for apache-center-rajae.: IP [<IP_ADDRESS>]"
time="2017-01-07T10:57:03.141920262+03:30" level=debug msg="Name To resolve: apache-center-rajae."

I think this bug must get some priority!
It made us revert to 1.12

@mlaventure Has to be a containerd problem afaics. rpc error: code = 2 desc = containerd: container not found but for the rm it is still alive. Would ps aux help when this happens or a stack trace from containerd?
@hmdhasani Is this happening on specific containers? Could help if you could send a longer debug logs so we see what is happening with the processes before this happens. For example in the excerpt you posted there are no event logs from containerd.

@hmdhasani are you using live restore?
Do you have more logs available? It looks like the container must have "exited" already, in which case the events should have been seen by containerd.
Could you share the /run/docker/libcontainerd/containerd/events.log file if you still have that instance running?
the output of ps aux could help to check if the container process is still alive, but we'd need the expected pid from docker inspect to ascertain that.

We managed to reproduce this issue in combination with #30469 . The issue here appears from improper handling of containerd errors but the specific error that could make it a v1.13 regression could be #30469. @hmdhasani We will let you know when fix for #30469 is vendored into Docker, it would be good if you could verify if this solves this problem as well for you.

This is a complete log:
docker-log.zip

@mlaventure
Jan 25 09:34:02 jenkins2-159 dockerd[30572]: time="2017-01-25T09:34:02.461168590-05:00" level=debug msg="Loaded container f907113187893f2c60a66140fb40ae51ba8e6708324e6a47df08967032dd522c"
Jan 25 09:34:02 jenkins2-159 dockerd[30572]: time="2017-01-25T09:34:02.483225112-05:00" level=warning msg="libcontainerd: client is out of sync, restore was called on a fully synced container (f907113187893f2c60a66140fb40ae51ba8e6708324e6a47df08967032dd522c)."
Jan 25 09:34:02 jenkins2-159 dockerd[30572]: time="2017-01-25T09:34:02.484597253-05:00" level=debug msg="libcontainerd: received past event &types.Event{Type:\"start-container\", Id:\"f907113187893f2c60a66140fb40ae51ba8e6708324e6a47df08967032dd522c\", Status:0x0, Pid:\"\", Timestamp:(*timestamp.Timestamp)(0xc4203c8080)}"
Jan 25 09:34:02 jenkins2-159 dockerd[30572]: time="2017-01-25T09:34:02.484688983-05:00" level=debug msg="libcontainerd: received past event &types.Event{Type:\"start-process\", Id:\"f907113187893f2c60a66140fb40ae51ba8e6708324e6a47df08967032dd522c\", Status:0x0, Pid:\"73f6407b9680b16061f2048ee6b566060451ea79c5020769544c552200209938\", Timestamp:(*timestamp.Timestamp)(0xc4203c81e0)}"
Jan 25 09:34:02 jenkins2-159 dockerd[30572]: time="2017-01-25T09:34:02.484738260-05:00" level=debug msg="libcontainerd: received past event &types.Event{Type:\"exit\", Id:\"f907113187893f2c60a66140fb40ae51ba8e6708324e6a47df08967032dd522c\", Status:0x7, Pid:\"73f6407b9680b16061f2048ee6b566060451ea79c5020769544c552200209938\", Timestamp:(*timestamp.Timestamp)(0xc4203c83e0)}"
Jan 25 09:34:02 jenkins2-159 dockerd[30572]: time="2017-01-25T09:34:02.484779067-05:00" level=debug msg="libcontainerd: received past event &types.Event{Type:\"start-process\", Id:\"f907113187893f2c60a66140fb40ae51ba8e6708324e6a47df08967032dd522c\", Status:0x0, Pid:\"c1572a29fc5a9b63a538bfdd2ab06f3973595722e64d256c141472f86550772b\", Timestamp:(*timestamp.Timestamp)(0xc4203c85b0)}"
Jan 25 09:34:02 jenkins2-159 dockerd[30572]: time="2017-01-25T09:34:02.484823355-05:00" level=debug msg="libcontainerd: received past event &types.Event{Type:\"exit\", Id:\"f907113187893f2c60a66140fb40ae51ba8e6708324e6a47df08967032dd522c\", Status:0x0, Pid:\"c1572a29fc5a9b63a538bfdd2ab06f3973595722e64d256c141472f86550772b\", Timestamp:(*timestamp.Timestamp)(0xc4203c8810)}"
Jan 25 09:34:02 jenkins2-159 dockerd[30572]: time="2017-01-25T09:34:02.484865136-05:00" level=debug msg="libcontainerd: received past event &types.Event{Type:\"start-process\", Id:\"f907113187893f2c60a66140fb40ae51ba8e6708324e6a47df08967032dd522c\", Status:0x0, Pid:\"74298e778837f767e6a5bcb1d1393f56cda98437104b166ef0bf54e960561e45\", Timestamp:(*timestamp.Timestamp)(0xc4203c8970)}"
Jan 25 09:34:02 jenkins2-159 dockerd[30572]: time="2017-01-25T09:34:02.484905280-05:00" level=debug msg="libcontainerd: received past event &types.Event{Type:\"exit\", Id:\"f907113187893f2c60a66140fb40ae51ba8e6708324e6a47df08967032dd522c\", Status:0x0, Pid:\"74298e778837f767e6a5bcb1d1393f56cda98437104b166ef0bf54e960561e45\", Timestamp:(*timestamp.Timestamp)(0xc4203c8a80)}"
Jan 25 09:34:02 jenkins2-159 dockerd[30572]: time="2017-01-25T09:34:02.484944278-05:00" level=debug msg="libcontainerd: received past event &types.Event{Type:\"exit\", Id:\"f907113187893f2c60a66140fb40ae51ba8e6708324e6a47df08967032dd522c\", Status:0x89, Pid:\"init\", Timestamp:(*timestamp.Timestamp)(0xc4203c8c00)}"
Jan 25 09:34:02 jenkins2-159 dockerd[30572]: time="2017-01-25T09:34:02.484979539-05:00" level=warning msg="libcontainerd: failed to retrieve container f907113187893f2c60a66140fb40ae51ba8e6708324e6a47df08967032dd522c state: rpc error: code = 2 desc = containerd: container not found"

@hmdhasani The fix for #30469 is now merged in master and v1.13.x branch. It will also be included in v1.13.1-rc2

Excuse me for the delay.
I thinks it's fixed.

Perfect, thanks!

Let me lock the conversation on this issue; given that there's various reasons this error can occur; not all related to this one, I want to prevent this from collecting unrelated reports. If you have this issue on the current release, please open a new issue instead (and confirm there's no other open issue)


Bridge.Html5 container elements do not provide a bulk insert method

There's no way to directly append a list of elements/nodes inside an Html5 element when that element accepts children elements.
For example, if you make a div, you don't have a method to either:

add a Bridge.NodeList or Bridge.ElementList
assign the list after the class has been instantiated.
The only method to add items, one by one, is AppendChild(). There's also RemoveChild() to remove them and InsertBefore() to insert a child in a given position.

Example:
var buttonList = new ElementList();
var btn1 = new ButtonElement { Value = "btn1" };
var btn2 = new ButtonElement { Value = "btn2" };

buttonList.Add(btn1); // error, does not exist
buttonList.AppendChild(btn2); // similar 'add' operation to element container attempt: does not exist

This functionality is not directly part of the JavaScript api, so we will not be adding extensions to the api in Bridge.
I think everyone can agree that these helper functions would be nice, but as we're [trying to] strictly following the JavaScript api, we will not be adding in Bridge.
As discussed in #37, helpers are best implemented in a "3rd party" extension library.


MergeRequestEvent is missing object_attributes.blocking_discussions_resolved

In MergeRequestEvent, MergeRequestAttributes can contain blocking_discussions_resolved.
The key is documented here - https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#merge-request-events

Thank you for your feedback! I have added the missing attribute in version 2.1.0.
Fixed in https://github.com/lawvs/gitlab-event-types/commit/720ccc408392b597f8f85217e425985bd85d279e


Implement API for custom crafting (and possibly other) recipes

Description
Currently ru.divinecraft.customstuff.api.recipe contains an unstable API for implementing custom crafts. This one should be reworked providing simple and flexible way to implement custom recipes (not only for workbench).

This is actually implemented via #45 as latest Bukkit provides an NBT-aware API for recipes which fits the purpose of this issue.


[fix] #2667: Refactor &Option to Option<&T>

Signed-off-by: Jonathan Plasse<EMAIL_ADDRESS>

Description of the Change
Replace &Option<T> by Option<&T> as described in  #2667

Issue

Benefits

Possible Drawbacks

Usage Examples or Tests [optional]

Alternate Designs [optional]

You missed these two:
client/benches/torii.rs:36
client/benches/torii.rs:135

And you need to rename both the PR title and the commit to [fix] #2667: Refactor &Option<T> to Option<&T>
Then we can merge your contribution.

@SamHSmith, thank you for your help.
I do not understand how I missed it.
I ran cargo check, cargo build, cargo test and it did not show me an error.

@SamHSmith, thank you for your help. I do not understand how I missed it. I ran cargo check, cargo build, cargo test and it did not show me an error.

We have this tool cargo lints. This is the command the CI ran to find those errors. cargo +nightly-2022-08-15 lints clippy --workspace --benches --tests --examples --quiet --all-features


FEATURE: provide ability to define requirements against generic GetById and List queries

At the moment the only way to protect a Command or Query with an AuthorizationRequirement is applying an Attribute to the class representing that Command Or Query:
https://github.com/onebeyond/onebeyond-studio-core/blob/main/src/OneBeyond.Studio.Domain.SharedKernel/Authorization/AuthorizationPolicyAttribute.cs
However this prevents the possibility of using the generic GetById and List queries that are already available in OneBeyond Studio Core and limit the reusability of the dedicated generic handlers.
A possible implementation could be a sort of fluent configuration where a user can specify that for a MediatR IRequest there is an authorisation requirement applied (a bit like Automapper):
For(typeof(GetById<SomeEntityDto, SomeEntity, Guid>)).ApplyRequirement(typeof(MyPermissionRequirement));

FYI @andrii-kaplanovskyi


Port improved interop_string approach from clang.cindex to python 3 bindings

#164 introduces a better way of handling C/Python3 string interop. We should use it in generated bindings.

I'm working on this now.


Include the BAZEL_OPTS when runing :install for the release

On jammy, we need the additional --//bazel:use_local_flex_bison
option that was not passed to the bazel run :install failing
to produce install binaries for Ubuntu jammy.
Fixes #1369

Also question for @umarcor : How can I test the release build in the pull request CI without actually creating a release ?

Codecov Report

Merging #1370 (bf70bc8) into master (80b07f9) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1370   +/-   ##
=======================================
  Coverage   92.90%   92.90%
=======================================
  Files         340      340
  Lines       23832    23832
=======================================
  Hits        22141    22141
  Misses       1691     1691

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@hzeller, a new job/matrix needs to be added, where:

The desired artifact from a previous job is downloaded/extracted.
Optionally, additional dependencies are installed.
Testing scripts/resources are checkout (typically as part of this same repo).
The testing script is executed.

Which platform do you want to run the test on? All of them?


Cleaner update path

Hi,
Would it be an idea to implement a cleaner update path? When I'm updating to a new MultiBit release I now have to perform the following steps each time (on Linux):

Run the installer
Change the installation location to use /opt instead of /home/user
Uninstall the previous release

It would be quite helpful to have the installer recognize the previous installation, use that location (or at least the parent folder) and remove the previous version.
Because the installer specifically includes the version in the install location by default, I am a bit reluctant to install a new release over an old one, i.e. use the same install location as the previous release. Is it OK to install to the old location?
Note that I'm not taking about some auto-update feature. That would be an option as well, but less of a priority if you ask me.

The Install4j installer handles upgrades much better now. Closing.


crazydiskinfo: init at version 1.1.0

Description of changes
crazydiskinfo provides a TUI that surfaces smart data and uses Crystal Disk Info's algorithm for disk health and temperatures.
This currently builds against a PR that fixes some cmake errors. I will submit a PR to build against the main branch once that PR is merged.
Things done

Built on platform(s)

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

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

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

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.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
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

It's considered proper to add yourself to the maintainers list in a separate commit from adding the package
If you replace a phase, make sure to runHook the pre and post phase hooks in your replacement
Are all of these tweaks necessary? That configure phase is pretty suspect at a glance. Won't that build the project? The build should be in the build phase.

diff --git a/pkgs/applications/misc/crazydiskinfo/default.nix b/pkgs/applications/misc/crazydiskinfo/default.nix
index 562e79d3f4a..a94194ca6e8 100644
--- a/pkgs/applications/misc/crazydiskinfo/default.nix
+++ b/pkgs/applications/misc/crazydiskinfo/default.nix
@@ -15,14 +15,6 @@ stdenv.mkDerivation rec {

   buildInputs = [ ncurses libatasmart ];

-  configurePhase = ''
-    mkdir build
-    cd build
-    cmake ..
-  '';
-
-  installPhase = "install -D crazy $out/bin/crazy";
-
   meta = with lib; {
     description = "crazydiskinfo provides a TUI that surfaces smart data and uses Crystal Disk Info's algorithm for disk health and temperatures.";
     homepage = "https://github.com/otakuto/crazydiskinfo";

Works just fine for me.

Complete silence from upstream for almost 3 years is also somewhat concerning. I'm not sure if that matters in terms of adding it to nixpkgs so long as it builds and runs fine, but I think we should at least consider the likelihood of that PR never getting merged.

@tejing1 fair enough, I'll close the PR. If folks are curious about the package they can refer to this discussion. Thanks for the review!


[MigrationCreatorPatch-Issue-24907] Reference a variable of the insta…

The purpose of this PR is to make a minor enhancement backwards compatible.
The firePostCreateHooks() is protected and in prior version accepts no arguments. For any applications or libraries using the code, we'll see those fail.
To fix the problem, I'm suggesting we assign the $table name to a property of the instance so that later the class can use that in the firePostCreateHooks method.
I was going to write a test, but saw this method which verifies existing functionality is unaffected: testBasicCreateMethodCallsPostCreateHooks
Issue Reference: https://github.com/laravel/framework/issues/24907

For reference, the change happened in #24621. At the time, no concerns were raised, although it was technically a breaking change.
This PR essentially reverts that change and implements the same functionality in an alternate manner.
Changing this back now will fix old extensions of the class while keeping the new functionality for hooks, while breaking newer (about a month old at time of writing) extensions.

I thought extra params wouldn't actually break the code. Does this change in 7.1 ?

The break would be the same as the break you've experienced, only the other way around.
Here's an 3v4l: https://3v4l.org/rPaov
Apparently HHVM doesn't have a problem with it, but that's mostly irrelevant.

Oh, I understand what you are saying. Yes, if any one is subclassing that method, it will break their code. Good point.
How would you suggest a note be made about the new break?

Good question. A message in the update notes should suffice. Something along the lines of
** If you're overriding the firePostCreateHooks in your own extension of the MigrationCreator class, access the $path property of the class instead of declaring it as a method argument **
I'm not great at making documentation, but I sure like having it there.

I am closing this pull request because it lacks sufficient explanation, tests, or both. It is difficult for us to merge pull requests without these things because the change may introduce breaking changes to the framework.
Feel free to re-submit your change with a thorough explanation of the feature and tests - integration tests are preferred over unit tests. Please include it's benefit to end users; the reasons it does not break any existing features; how it makes building web applications easier, etc.
Thanks!


EventBasedLRUCache doesn't need to run RemoveExpiredValuesPeriodically on a different task

RemoveExpiredValuesPeriodically doesn't need to run a separate task, it can run in OnStart()

@dannybtsai take this into consideration when you are working on task issues.


PLATFORMS enum is not correct

The PLATFORMS enum is defined like this:
export type PLATFORMS = 'ethereum' | 'tron'

There are so many other platforms available.
In my opinion, this should be one of:

All returned by: /asset_platforms
All that appear in: /coins/list?include_platform=true
Doesn't exist at all, and if needed as type, string should be used as well (with additional documentation)

Since first 2 option require manual update every once in a while, this might be the most flexible approach

@morph-dev  PLATFORMS type was defined when I made this lib so at that time it only have ethereum and tron. Maybe coingecko update their support now, I will check and extends that constants

resolved?

@samuraitruong hey i have updated the platform enums https://github.com/samuraitruong/coingecko-api-v3/pull/41


[BUG] MaxTextRecallSize property of SearchOptions.HybridSearch object is not working as expected

Library name and version
Azure.Search.Documents 11.7.0-beta.1
Describe the bug
When we search the index from azure portal using json view , with MaxTextRecallSize = 100 as shown below.
{
  "search": "india",
  "answers": "extractive|count-3",
  "captions": "extractive",
  "queryLanguage": "en-us",
  "semanticConfiguration": "MySemanticConfigurations",
  "count": true,
  "queryType": "semantic",
  "vectorQueries": [
    {
      "kind": "text",
      "text": "india",
      "fields": "VectorField1,VectorField2"
    }
  ],
  "hybridSearch": {
    "maxTextRecallSize": 100,
    "countAndFacetMode": "countRetrievableResults"
  }
}

The results are reduced from ~2000 to around 200. This is expected.
But when we try this from c# search sdk (Azure.Search.Documents 11.7.0-beta.1), the results are around 2000 only.
Expected behavior
Expected behaviour is to get the same number of records (around 200) which we get from azure search explorer using below json.
Expected record count : ~200
{
  "search": "india",
  "answers": "extractive|count-3",
  "captions": "extractive",
  "queryLanguage": "en-us",
  "semanticConfiguration": "MySemanticConfigurations",
  "count": true,
  "queryType": "semantic",
  "vectorQueries": [
    {
      "kind": "text",
      "text": "india",
      "fields": "VectorField1,VectorField2"
    }
  ],
  "hybridSearch": {
    "maxTextRecallSize": 100,
    "countAndFacetMode": "countRetrievableResults"
  }
}

Actual behavior
In actual when we use azure search sdk, we get around ~2000 records as opposed to ~200 records which we get from azure search explorer.
Reproduction Steps
Working code : when we use rest api from azure search explorer.
{
  "search": "india",
  "answers": "extractive|count-3",
  "captions": "extractive",
  "queryLanguage": "en-us",
  "semanticConfiguration": "MySemanticConfigurations",
  "count": true,
  "queryType": "semantic",
  "vectorQueries": [
    {
      "kind": "text",
      "text": "india",
      "fields": "VectorField1,VectorField2"
    }
  ],
  "hybridSearch": {
    "maxTextRecallSize": 100,
    "countAndFacetMode": "countRetrievableResults"
  }
}

Not working : when we use azure sdk from c#.

Environment
Azure AppService
.Net 8

Hi @ShivangiReja , any updates on this issue?

@ayushgorya We’ve recently released Azure.Search.Documents version 11.7.0-beta.2. Could you please test with this version?
I couldn’t reproduce the behavior as we don’t have similar data to test with. Based on my review of the C# SDK, it appears that we’re sending the HybridSearch object to the service, and the results you’re seeing are being returned directly by the search service.
Have you tried testing with other SDKs, such as Java, TypeScript, or Python, or using the REST API via Postman or a similar tool? This will help us determine whether the issue lies with the SDK or the service itself.

@ayushgorya Thank you for the confirmation!


Update claim-an-idea.md

Edited spelling typo

Description
Edited a spelling typo.
Tests
Please describe any tests you've added. If you've added no tests, or left important behavior untested, please explain why not.
Additional context
Add any other context about the problem you're solving.
Metadata

Fixes #[Link to Issue]

Fixed by #172


Custom rules for warp traffic

Hi
Is it possible to define custom rules to pass traffic through warp?
I want to pass google and some other geosites through warp and still block Iran ips and sites
I know how to do this in the config file but don't know if it will cause problems in the script.
It would be great if you could add an option for this to the menu.
Thanks

Now you can apply you custom configuration if you are familiar with configuration
https://github.com/aleskxyz/reality-ezpz#custom-configuration


Content: Major Topic - API Product Management

Summary of content
Long-form writing (originally written as an internal whitepaper) on guidance for PMing an API product.
Summary of audiences

Product Managers
New to PMing an API product, looking to understand APIs generally

Level of content
Level of content as it pertains to the topic proposed

[x] 101: "Awareness / Exploration"
[ ] 201: "Prototyping / Deploying"
[ ] 301: "Scaling
[x] Content Series: To include multiple levels of content (Note: Series pieces should either be able to be consumed independently, or very explicit in the title, and with links in the body of the content that they are part of a series)

Could be broken out into a series of articles/topics. It's 12 pages in Google Docs now.
Google Doc: https://docs.google.com/document/d/1qrPSI3Bqs-TmAe4STYcJ97B8STsh2k02ji35rSZ581c/edit?usp=sharing

Added to Content Requests and Progress

@bhyde-vmware @joemoore I see this is in the to-do column, is this something I can help with?

@cassandramj thanks for the offer! This content is already written and published here. I'm not sure if we still need this story or if we want to move it forward by turning the whitepaper content into a learning path on the Tanzu Dev Center.


Groupby Rank

Similar to https://github.com/dask/dask/issues/7095 , I'd also like to be able to use rank on groupby Series and DataFrame objects to create per-group rank columns. Today, I can do this in pandas but not Dask.
import pandas as pd
import dask.dataframe as dd

pdf = pd.DataFrame(
    {"a": [0, 1, 0, 1, 1, 0], "b": range(6), "c": ["a", "b", "c", "d", "e", "f"]}
)
ddf = dd.from_pandas(pdf, 2)

print(pdf.groupby("a").b.rank())
ddf.groupby("a").b.rank()

0    1.0
1    1.0
2    2.0
3    2.0
4    3.0
5    3.0
Name: b, dtype: float64
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [1], in <module>
      7 ddf = dd.from_pandas(pdf, 2)
      9 print(pdf.groupby("a").b.rank())
---> 10 ddf.groupby("a").b.rank()

AttributeError: 'SeriesGroupBy' object has no attribute 'rank'

conda list | grep "pandas\|dask"
dask                      2022.1.0           pyhd8ed1ab_0    conda-forge
dask-core                 2022.1.0           pyhd8ed1ab_0    conda-forge
dask-cuda                 22.04.00a220201          py38_8    rapidsai-nightly
dask-cudf                 22.04.00a220201 cuda_11_py38_g2c6b0dac61_95    rapidsai-nightly
geopandas                 0.9.0              pyhd8ed1ab_1    conda-forge
geopandas-base            0.9.0              pyhd8ed1ab_1    conda-forge
pandas                    1.3.5            py38h43a58ef_0    conda-forge

Please feel free to assign this to me, as I can open a PR for this later today.

Hi, I'd like to ask if this issue is solved yet? I'm also looking to use this as well.


Add process for "training" cell type reference models

We would like to start working towards adding cell type annotations to our datasets, starting with using cell type annotations to evaluate integration. In order to pilot this, we should include two additional processes - one to "train" the model using a specified reference dataset and one to classify cell types using the trained model.
In doing this we will need to add a column to the metadata file specifying which reference or group of references to use for each library. The "training" process should then run on all references present in the metadata file, only training once per reference. The output of the process should be the model that will be used as input to a separate process for classifying cell types.
To start I think we would just add a single column to the scpca-integration-metadata that contains the single reference to use, but we probably want to be able to use multiple references. To do that we could instead add a column for the group of references to use (e.g., all blood references) and then have a separate file that contains the mapping between the group name and the list of references.

After discussion in our single-cell planning meeting, we would like to include the cell type annotation as another module within scpca-nf rather than testing it out within data integration. This process should be added to scpca-nf, so we will need to think of how we want to specify which reference to be used for each library. One thought I had was to have a separate table that includes the project ID and the associated reference(s) to use.

Some more discussion on this today led to the decision of adding this process to the build-index.nf rather than the workflow itself. That should train all reference datasets for all celldex references that we have and do it once. Those trained models will then be used as input to the classification that will be added to scpca-nf.

Closed by #284


Fix villages data

Fix '0' to 'O'
ALUE DUA MUKA 0 -> ALUE DUA MUKA O
SITIMERT0 -> SITIMERTO

This data file is created by a script extracting data from http://mfdonline.bps.go.id/ . See https://github.com/edwardsamuel/Wilayah-Administratif-Indonesia/blob/master/scripts/run.sh#L12
It is not useful to modify this generated file.  Your changes will be overwritten when the script runs next time.
Is the BPS data wrong?  If it is wrong, it needs to be fixed in the BPS source.
You can see "ALUE DUA MUKA 0" and "SITIMERT0" are used in
https://web.archive.org/web/20150207100538/http://www.bps.go.id/eng/download_file/Population_of_Indonesia_by_Village_2010.pdf
Other occasions where this data has appeared;
https://www.google.com/search?q="SITIMERT0"+"3506190010"
And a 'bot' created Wikipedia articles:
https://nl.wikipedia.org/wiki/Alue_Dua_Muka_0
https://nl.wikipedia.org/wiki/Sitimert0
And it appears in a wordlist here:
https://id.wiktionary.org/wiki/Wiktionary:ProyekWiki_bahasa_Indonesia/Daftar_kata/Nama/Tempat/Semua

If we can confirm that the BPS data is wrong, one solution is for this repository to have a 'fixes' list, which run.sh uses to fix the generated csv files.

Hi @prasastoadi,
Agree with @jayvdb. Any generated files can't be edited manually. It will be overwritten in the next run. You need to modify the script that generates the files, in this project can be run.sh or the python script. But, you need to make sure first if the source (BPS MDF Online) data is wrong.

I am very confident that the two villages name are wrong. We know that 0 (zero) is not alphabet.
Here is the Sitimerto village
https://goo.gl/maps/qMH3K7LjahB2
Alue Dua Muka O
http://lmgtfy.com/?q=alue+dua+muka+o+site%3Ago.id
I propose very simple method before write the data to csv.

IMO it's pointless to update anything in this repo while the source data from BPS still remain wrong.
Dear @prasastoadi, one thing that you should do is ask BPS to update their data instead.

Maybe fixes should be a separate data file, which a simple api so that users can easily apply all fixes on top of the existing data.


IGNITE-22696 Added libs to opensensus to expose prometheus metrics

Added opencensus-exporter-stats-prometheus and simpleclient_httpserver to opensensus module to make prometheus metrics work from the box without building any extra libs.
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist

[x] There is a single JIRA ticket related to the pull request.
[x] The web-link to the pull request is attached to the JIRA ticket.
[x] The JIRA ticket has the Patch Available state.
[x] The pull request body describes changes that have been made.
The description explains WHAT and WHY was made instead of HOW.
[x] The pull request title is treated as the final commit message.
The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
[x] A reviewer has been mentioned through the JIRA comments
(see the Maintainers list)
[ ] The pull request has been checked by the Teamcity Bot and
the green visa attached to the JIRA ticket (see TC.Bot: Check PR)

Notes

How to Contribute
Coding abbreviation rules
Coding Guidelines
Apache Ignite Teamcity Bot

If you need any help, please email<EMAIL_ADDRESS>or ask anу advice on http://asf.slack.com #ignite channel.

@makalis LGTM. Thanks for contribution!

https://mtcga.gridgain.com/pr.html?serverId=apache&suiteId=IgniteTests24Java8_RunAll&branchForTc=pull/11426/head&action=Latest


Setup codecov

https://github.com/codecov/example-rust

No, it hasn't. I have only added the .travis.yml file, the other steps haven't been done.

I'm working on this now.

https://github.com/Drops-of-Diamond/diamond_drops/pull/79


Can Enoki work with Beaker ?

Is there a way to have enoki work with Beaker Browser ?
Thanks

I don't really understand your question, but Enoki works with Beaker 😄

It can natively now!


Image: Add missing error printing to format specific functions

Plus updated docs
Note: it doesn't affect load_from_file because it uses dynamic loaders while these functions are wrappers around direct calls to functions defined inside modules without using resource loader api
Note: png functions weren't updated because png is a driver (not a module) and can't be disabled

@Calinou ready for approve?

I am not going to do anything to update this PR. But it is not bad in IMO so I am not closing it... There are people with "write access" so if you need it you can correct it. I am abandoning this PR... If you want close it

Superseded by https://github.com/godotengine/godot/pull/99758. Thanks for the contribution nonetheless!

I assume you wanted to close this one 😅


Add Spy

Add Spy.
Spy is a flexible, lightweight, multiplatform logging utility written in pure Swift. It allows to log on different levels and channels which you can define on your own depending on your needs.
Project URL
https://github.com/appunite/Spy
Category
Logging
Description
Add Spy logger
Why it should be included to awesome-ios (mandatory)
The logger is flexible (allows to define levels, channels, output destinations). It's also multiplatform and supports: iOS, macOS, watchOS, tvOS and Linux. There are no loggers that allow programmers to define both levels and channels in an organized, type-safe way.
Checklist

[ ] Has 50 GitHub stargazers or more
[x] Only one project/change is in this pull request
[x] Isn't an archived project
[ ] Has more than one contributor
[x] Has unit tests, integration tests or UI tests
[x] Addition in chronological order (bottom of category)
[x] Supports iOS 9 / tvOS 10 or later
[x] Supports Swift 4 or later
[x] Has a commit from less than 2 years ago
[x] Has a clear README in English

Hey @lewandowskit93, thanks for contributing!


Pathway map from transcriptomic selection comes up empty

I selected a group of genes from the transcriptomic heatmap

This opened a new page, and I selected all the genes and clicked on the pathway icon:

I chose nitrogen metabolism, expecting to see at least something

I was not expecting to see an empty pathway map with no genes at all

Sad.....

@ARWattam would you share your url or list of feature ids so that I can debug?

please reopen if you can reproduce this problem.


feat: density of the image of a finset under a bijection

From LeanAPAP

Please change the topic label if I guessed wrong! I'm trying to label every "feature" PR with an area label...

Why do you keep lowercasing my PR titles btw?

Why do you keep lowercasing my PR titles btw?

The PR title should not have its first letter capitalised: https://leanprover-community.github.io/contribute/commit.html
As far as I know, this has always been the convention!

bors merge


Allow acme challenge through NGINX configuration

In docker production, the SSL certificate is enabled through NGINX configuration. It would be convenient to ease the integration of let's encrypt  certificates by allowing to expise acme challenge files through HTTP (http://host:port/.well-known/acme-challenge/<challenge file>).
This merge request is a proposal to enable this through an additional docker volume for the web component (./volumes/web/acme-challenge).

Thanks @jfbrazeau for the pull request!
Per the CONTRIBUTING.md file displayed when you created this pull request, we need to add you to the list of approved contributors for the Mattermost project.
Please help complete the Mattermost contribution license agreement?
This is a standard procedure for many open source projects. Your form should be processed within 24 hours and reviewers for your pull request will be able to proceed.
Please let us know if you have any questions.
We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

Hi :)
Thanks, this is a good idea. In fact we will deprecate the Web image one day, but, as you can see, this subject is open for a while now (and it's my fault). So I'll accept this PR after few tests, but I just want you to know that we might stop support for the Web image sooner or later ^^

I didn't understand what component request Let's Encrypt for the certificate here ? Is this supposed to work if we enable Let's Encrypt on the Mattermost application ? Because I don't see how it can works since the web container and the app container are not sharing volumes together.

As far as I can see, there are 2 ways to configuring TLS on mattermost server (as we can see here : https://docs.mattermost.com/install/config-tls-mattermost.html ). The first is to setup TLS directly on Mattermost Server as you mention. The second is to configure it through NGINX proxy.
In mattermost-docker, as far as I can see the second solution has been chosen (as you can see here : https://github.com/mattermost/mattermost-docker#install-with-ssl-certificate , the SSL certificate must be registered in NGINX, not mattermost).
As a consequence, I came to the conclusion that it was more relevant to add the acme challenge capacity to the NGINX docker image. But maybe it wasn't a good conclusion ! 😊
You say that you may stop the support for the web image : may I ask you why you plan to remove it ?

This issue has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!
/cc @jasonblais @hanzei

Hey @pichouk,
What are the next steps on this PR?

We will deprecate and remove the web image so we can close this one.
If someone wants to have a TLS setup, an example based on Traefik will be add by #366


made changes to blog/views.py

#93

a bug to view profile

Fixes: #93
Proposed Changes

Made changes in blog/views.py file

Additional Info

now able to see my profile after login

Screenshots

@shraddhavp the feature is to view the profile of other users and for the logged-in user they have to click on the profile so that edit option is also visible for them.
cc. @Kajol-Kumari

Hey @Akshi149 ideally, this feature shouldn't through any error if the blog creator tries to view his/her profile via that link( whiuch was happening). Moreover, we can just show the owner's profile there like we do for other users and if owner wants to edit his/her details they can do via profile section of the site.

@harsh-9in  for this should i create another PR  as i am seeing it is containing multiple commits


Using OpenJDK gives the requires JRE 1.6 error

The licence change by Oracle took effect on April 16, 2019. I've removed all Oracle packages and will only be using OpenJDK. I happen to be using "12.0.1-ojdkbuild" 2019-04-16 but I doubt that's relevant.
I guess this is a change in Launch4J. It should be possible to launch any equivalent version without penalising either those avoiding Oracle packaging, or those that value the Oracle tax.
If there's any help required let me know.

There's an open bug on Launch4J for 11.x OpenJDK but there's a workaround within the comments https://sourceforge.net/p/launch4j/bugs/197/#d574
HTH


Explicit issue states & filters focused on funding

What
Change our issue states & filters from being implicitly guessed based on progress (commits, PRs) to explicitly defined by the maintainer and focused on funding funnel.
Why

Guesswork is never good
Unnecessarily complex and unintuitive today
Clarifies focus on funding with clear funnel and actions in-between each
Clarifies boundaries between Polar and issue management software
Better foundation for future experience

How
1. Separate issue state from funding progress
Today, we have the following issue states & filters.

Backlog: All of below is false
Triaged: Has assignee
In progress: Has commit and/or PRs connected to it
Closed: Issue marked as closed

In terms of issue statuses, we'll simplify and follow the GitHub model of having Open & Closed.
We'll CONTINUE showcasing commits and/or PRs connected to the issue in our design.
We'll CONTINUE offering sorting of issues based on popularity, funding, reactions etc.
Thereby, still offering a nice overview and a sorted backlog, but not going down the rabbit hole of issue management beyond that.
2. Introduce funding states, filters & actions
Our funnel and intended behaviour are the following (copy not being set here).

Inbound – maintainer not using Polar.

Conditions

Backer funds an issue
Maintainer IS NOT on Polar

Actions

Polar: Comments on the GitHub issue with CTA for maintainer to signup

Inbound – maintainer using Polar.

Conditions

Backer funds an issue.
Maintainer IS on Polar
Maintainer HAS NOT proactively requested funding towards the issue, i.e badged

Actions

Polar: Notification to maintainer
Maintainer: Accept/deny funding (one-click).
Maintainer: Can simultaneously badge the issue, i.e make funding public

Backlog & Planned: Collecting funding

Conditions: Maintainer IS on Polar and IS proactively seeking funding (badged issue)
Actions

Polar: Notify maintainer about each new funding event (as today)
Maintainer: Mark issue as "In progress".  We should use commits & PRs as a nudge, but not automate

In Progress. Can still collect funding throughout

Conditions: Maintainer has marked the issue as such
Actions

Maintainer: Mark the issue as completed. We nudge once the issue is closed (as today)
Polar: Email backers about the update

Completed

Conditions: Marked as completed by the maintainer
Actions (as today)

Polar: Email backers
Polar: Start the countdown until payouts

Refund (Illustrative – not needed for Day 1)
Maintainer should be able to hit "abort" midstream and initiate an early refund. We can do this manually until we see it's something that happens

Converting this into states/filters shown in the dashboard. Copy still TBD.

Inbound. Backer requests to fund an issue
Requested: Issues where the maintainer is "requesting" funding (badge)
Received: Issue with funding received
In progress: Issues marked in progress
Completed: Issues marked completed
Paid out: Issues marked completed & have been paid out

Delights

GitHub Comment Commands ("/") OR our Chrome Extension can be used to do this directly within GitHub

Design
TODO.

[ ] Showcase Open & Closed issue statuses
[ ] Showcase assignee(s)
[ ] Design for how our new funding statuses, filters & maintainer actions

Upvote & Fund

We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog :^)

POL-64

Closing this. No longer needed. Given our redesign of the issue row (https://github.com/polarsource/polar/issues/1202) we've simplified these states and our current filters are sufficient.


Investigate using Rest API for SSCWeb server

For the SSCWeb server, which I'd put aside while getting ready for the ESAC HAPI server, Bob pointed out that there's a REST API which gives XML responses which I could use to avoid all the overhead of linking in libraries.  For example:
curl -H "Content-Type: application/xml" --data-ascii @locations/requests/themis2.xml https://sscweb.gsfc.nasa.gov/WS/sscr/2/locations
posts a request for themis locations data.  This talks about the API: https://sscweb.gsfc.nasa.gov/WebServices/REST/

Bob provided the URL https://sscweb.gsfc.nasa.gov/WebServices/REST/restExamples.tar.gz which includes restExamples/sh/locations/requests/themis2.xml.  I have a copy of this on my home machine, /home/jbf/ct/hapi/study/2022/sscweb/20220610/restExamples/sh/locations/requests/themis2.xml.


Missing text "Bundled with FX" for checkbox in dialog "Download a JDK" after first open the given dialog only

This problem is ONLY in this case (my OS is Windows 10, version JDKMon is <IP_ADDRESS>):

2x click on shortcut "JDKMon" on desktop for launch JDKMon
close the window "JDK Mon" or leave it open (does not affect the issue)
on tray icon for JDKMon from context menu (right click) to select item "Download a JDK"
in opened dialog "Download a JDK" on top is missing text "Bundled with FX" for given checkbox <- issue (see screenshot bellow)

Important note:
after close dialog "Download a JDK" and next open the given dialog this issue does not exist next already
Screenshot (for typo "Operatingsystem I send PR already"):

Readme.md contains screenshot https://camo.githubusercontent.com/7fb2a9738d0ac21a70a6e9158287f648f73ff45267a80e6d9cba660bdd7562c1/68747470733a2f2f692e6962622e636f2f484635463866662f646f776e6c6f61642d77696e2e706e67 where given text is missing for checkbox also.


any way  to monitor the lost of segments?

Please answer these questions before submitting your issue.

Why do you submit this issue?
[x] Question or discussion
[ ] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question

What do you want to know?
It should be able to monitor the lost of segments.
In my application,it happends frequently,the segment lost,it also do not print error log in skywalking-api.log.

What do you mean lost? Where are they lost?

sometimes the tracing is completed,sometimes some segment has lost,exclude memory leak.
should I adjust buffer.buffer_size?

It is hard to tell, maybe buffer size, or ES and OAP cluster is not powerful enough, then agents run into protection mode. Also network could be the issue.
Anyway, your description is not clear to talk deeply.


Demystify input as a folder vs input as a file

Running through David's images of cheese example I hit a snag. Here is what I was doing.

upload an image to IPFS
use the CID of that image as an input
bacalhau docker run --input ipfs://QmYjsXqVaN6FzdGjCis6E6iqmhwME93CobCCFnEKXXJTZn ubuntu ${CMD}
My script wasn't working, I didn't find anything "inside" the inputs folder.
I read the Onboarding Your Docker Workloads docs
After more scripting I noticed that the "folder" inputs was not the right size... it must be a file 🤯
Once I treated inputs as a file and not a folder, my scripts worked.

This was confusing to me and I spent 80% of my time working through this issue and not using Bacalhau. If there was an example that helped clarify that this can be a file or a folder that would be helpful. Cheers!

Agreed, multiple people are caught out by this. We should decide on a single policy that is always true (e.g. single file input ends up in a folder) and implement that. Thanks for the push!

Another example from https://bacalhauproject.slack.com/archives/C052BAZJVEU/p1689087168410349?thread_ts=1688986814.683239&cid=C052BAZJVEU:
./bacalhau docker run \
 --wait \
 --wait-timeout-secs 100 \
 -i ipfs://qmnd9istxcsekdre7escphwthk3hw55xt1wg3wehefnp3t/:/input_images \
 dpokidov/imagemagick:7.1.0-47-ubuntu \
-- bash -c "magick mogrify -resize 100x100 -quality 100 -path /outputs /input_images/*.jpeg"

Again, the CID was to a single file but the user was expecting this to be a folder.

More context: #2364.

I'm currently looking at StorageProviders (2 :yak: deep) and it looks like in the S3 provider the PrepareStorage returns a Volume pointing to a target directory - this makes sense.  However, in the urldownload provider (used by --input-urls) PrepareStorage returns a Volume pointing to a single file.  This means that when I download https://somehost.somewhere.com/data.txt it appears as /inputs instead of /inputs/data.txt.

More context: #857. Different input engines treat things differently.

https://bacalhauproject.slack.com/archives/C052BAZJVEU/p1666983588565149
Hey! Is there a way to mount just a single file from an IPFS directory into a Bacalhau job? i.e. QmTjc3EhaN1LP3sR8wEm2kiNvBaaXjUyKhZNNncED6dPAn/3224.json instead of mounting the directory with all of the files?

So users do want to be able to mount single files in some cases.

More fun: #1374. URL downloader is not clear about the name of the final file.

So what is the user need here? The need is that:

As a user, I have an expectation/mental model of how my input data will be exposed to the executor and I write code for the executor that matches that expectation.
So I need that expectation to be met, i.e. if I'm expecting a folder, I want to receive a folder in the executor.

And:

When that expectation is not met, the error messages that I receive need to make it clear what the problem is (i.e. not that the data input "didn't work", but just the expectation about how it's presented was not met.

So what can we do about this?
1. Always present a folder
Nice and simple rule, even single files get wrapped into a folder. We teach users to always expect a folder.
Except sometimes this is not what the user expects, clearly if I want to mount src=file:///var/run/osquery.sock,dst=/osquery.sock I am not expecting to find a structure  /osquery.sock/osquery.sock or equivalent.
Similarly the naming issues with URL downloads exist because we always treat the input path as a folder and thus have to synthesise a name for the final file.
1a. Only do this when the destination mount point is implicit
This might work however if we limit this behaviour to the "simple" --input flag where we don't manually specify src=...,dst=.... In that world the dst is always mapped to /inputs and so we land the idea that in the implicit case /inputs is always a directory. So doing:

$ bacalhau ... run --input file:///var/run/osquery.sock would result in /inputs/osquery.sock (implicit)
$ bacalhau ... run --input file:///var/run/osquery.sock:/cool_beans would result in /cool_beans/stuff.txt (implicit-ish)
$ bacalhau ... run --input src=file:///var/run/osquery.sock,dst=/osquery.sock would result in /osquery.sock (explicit)

This does mean that -input ... is not equivalent to --input src=...,dst=/inputs – is this wise?
1b. Add a flag for explicitly controlling directory wrapping
So that --input can still be equivalent to an extended flag, e.g. these are equivalent:

$ bacalhau ... run --input file:///var/run/osquery.sock
$ bacalhau ... run --input src=file:///var/run/osquery.sock,dst=/inputs,wrap=auto

And would both result in /inputs/osquery.sock. The options would be something like:

auto – if the input is a file, wrap it in a directory
off – if the input it a file, mount it directly as a file

1c. Only do this for IPFS
It seems like most of the confusion seems to come from mounting CIDs and expecting them to be folders, so we could apply some of the above to only specific storage sources.
2. Try and guess the user's intent.
E.g. if they are mounting a file at a path that "looks like" a file, then mount the file, else wrap it in a directory. E.g.

$ bacalhau ... run --input file:///var/run/osquery.sock would result in /inputs/osquery.sock
$ bacalhau ... run --input src=file:///var/run/osquery.sock,dst=/inputs would result in /inputs/osquery.sock
$ bacalhau ... run --input src=file:///var/run/osquery.sock,dst=/inputs.sock would result in /inputs.sock

Feels a bit magic and prone to issues as there is not a widely recognised way of doing this, e.g. /etc/conf.d looks like a file but .d is normally a directory.
3. Add some examples early in the learning pathway that use single-file input
A non-technical solution – just make sure our users have the right expectations and are able to understand that CIDs come in both file and directory flavours.
Not super clear if our users are reading the examples though! And plenty of evidence in the above links of directly explaining "this is a file, that is a folder" and not getting very far. So this is maybe a hard content problem.

Walid's comment:

If am I understood your proposal correctly, and assuming an input -i ipfs://cid/:/my_dest

If the input was detected as folder, then it will be mounted at /my_dest
If the input was detected as file, then it will be mounted at /my_dest/cid
If the input was was a file, but wrapping is off, it will be mounted at /my_dest

I am just more in favour of explicit and more predictable behaviour, but I am okay if you believe there is value in doing what you are proposing. And yes, in my suggestion we should fail if the user says file mode but the input wasn't a file
also if  wrap=auto by default in this format --input ipfs://... , then it should also be auto in --input src=ipfs:// format and when submitting yaml jobs through bacalhau create

My 2 cents as a Bacalhau user.
The majority of the time for my use-case, I want to mount a single file (or specify multiple single files to mount at different explicit paths). Even when I need to work with multiple files, I will archive them first (i.e. zip or tar) and upload that to IPFS. I do have a use-case to mount a local directory into a directory in a bacalhau job, but I don't currently ever mount IPFS directories directly into Bacalhau. Mainly because outside of IPFS, it is much harder to work with directories (unless you are working on a local filesystem). So we tend to archive files together and pass the archive around, and when we need to run Bacalhau jobs we will run it directly on the archive file.

Thanks @phillipleblanc! I think you have prompted that we need to just look at what inputs people are running over – yours may be the common case.
Would using the src=…,dst=... format work for you?

@simonwo We aren't using the CLI to submit jobs, we use the API from Golang and specify the inputs in the job spec. But src=...,dst=... makes sense to me. Maybe if people leave it off then the CLI can emit a message that shows how it translated it into the src,dst format to make it explicit?

More context: Recently we found issues where a user was mounting both http and ipfs and  unless they were both in subdirectories of /inputs then we would get errors about docker failing to mount volumes.
The solution was for http->/inputs/notebook/, and ipfs to/inputs/data/ but this wasn't obvious to the user.

My thoughts are that the behaviour should be like the cp command
Imaging downloading to the temp directory and cp from temp the directory to the specified dst