-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'ef064e1a8c2de7e8340f7080169367f539e62a8c' into support-…
…old-rust
- Loading branch information
Showing
771 changed files
with
11,652 additions
and
7,955 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,2 @@ | ||
[target.wasm32-unknown-unknown] | ||
runner = 'wasm-bindgen-test-runner' | ||
|
||
[target.'cfg(target_os = "macos")'] | ||
# Required for prql-elixir on Mac | ||
rustflags = [ | ||
"-C", "link-arg=-undefined", | ||
"-C", "link-arg=dynamic_lookup", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM mcr.microsoft.com/devcontainers/rust:0.203.8-1-bullseye | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
cmake \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin | ||
|
||
# ========= Install cargo-tools for non-root user (vscode) ========= | ||
COPY Taskfile.cargo-tools.yml /tmp/Taskfile.cargo-tools.yml | ||
WORKDIR /tmp | ||
USER vscode | ||
RUN task -t Taskfile.cargo-tools.yml install | ||
|
||
USER root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Dev Container for Rust, website, prql-js and prql-python | ||
{ | ||
"image": "ghcr.io/prql/prql-devcontainer-base:latest", | ||
"features": { | ||
"ghcr.io/devcontainers/features/hugo:1": {}, | ||
"ghcr.io/devcontainers/features/python:1": {}, | ||
"ghcr.io/devcontainers/features/node:1": {}, | ||
"ghcr.io/eitsupi/devcontainer-features/go-task:1": {} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
// Keep in sync with Taskfile.yml | ||
"prql-lang.prql-vscode", | ||
"rust-lang.rust-analyzer", | ||
"mitsuhiko.insta", | ||
"esbenp.prettier-vscode", | ||
"budparr.language-hugo-vscode" | ||
] | ||
} | ||
}, | ||
"mounts": [ | ||
{ | ||
"source": "devcontainer-cargo-cache", | ||
"target": "/usr/local/cargo", | ||
"type": "volume" | ||
} | ||
], | ||
"postCreateCommand": { | ||
"install-maturin": "task install-maturin", | ||
"install-npm-dependencies": "task install-npm-dependencies" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: 🐛 Bug report | ||
description: File a bug report to help us improve | ||
labels: [bug] | ||
body: | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: What happened? | ||
description: | | ||
Thanks for reporting a bug! Feel free to add any initial context here. | ||
- type: textarea | ||
id: prql-input | ||
attributes: | ||
label: PRQL input | ||
description: | | ||
A minimal, self-contained example that demonstrates the issue. | ||
This will be automatically formatted into code, so no need for markdown backticks. | ||
render: elm | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: output | ||
attributes: | ||
label: SQL output | ||
description: | | ||
The SQL that PRQL currently compiles to. Feel free to use the [playground](https://prql-lang.org/playground/) to generate the SQL. | ||
This will be automatically formatted into code, so no need for markdown backticks. | ||
render: SQL | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected-output | ||
attributes: | ||
label: Expected SQL output | ||
|
||
description: | ||
Optional; no need to write out if it's obvious from the context | ||
render: SQL | ||
|
||
- type: checkboxes | ||
id: mvce-checkboxes | ||
attributes: | ||
label: MVCE confirmation | ||
description: | | ||
Please confirm that the bug report is minimal and doesn't exist already: | ||
- **Minimal example** — the example is as focused as reasonably possible to demonstrate the underlying issue in PRQL. For example, it's not possible to exclude any line and still observe the bug. | ||
- **New issue** — a search of GitHub Issues suggests this is not a duplicate. | ||
options: | ||
- label: Minimal example | ||
- label: New issue | ||
|
||
- type: textarea | ||
id: extra | ||
attributes: | ||
label: Anything else? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: Something else | ||
description: Anything that's not a bug report | ||
body: | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: What's up? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: devcontainer | ||
|
||
on: | ||
# TODO: adopt our standard hierarchy for these, as per | ||
# https://github.com/PRQL/prql/pull/1893#discussion_r1125736478, possibly only | ||
# publishing on releases or on the `web` branch (which possibly should be | ||
# renamed back to `stable` if we use it more for this) | ||
push: | ||
paths: | ||
- .devcontainer/base-image/Dockerfile | ||
- Taskfile.cargo-tools.yml | ||
pull_request: | ||
paths: | ||
- .devcontainer/base-image/Dockerfile | ||
- Taskfile.cargo-tools.yml | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: docker/metadata-action@v4 | ||
id: meta | ||
with: | ||
images: ghcr.io/${{ github.repository_owner }}/prql-devcontainer-base | ||
tags: | | ||
type=raw,latest | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- id: set-options | ||
run: | | ||
if [ "${{ github.ref }}" = "refs/heads/main" ]; then | ||
echo "push=true" >>$GITHUB_OUTPUT | ||
else | ||
echo "push=false" >>$GITHUB_OUTPUT | ||
fi | ||
- name: Build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
file: "./.devcontainer/base-image/Dockerfile" | ||
tags: ${{ steps.meta.outputs.tags }} | ||
# TODO: add linux/arm64 | ||
platforms: linux/amd64 | ||
push: ${{ steps.set-options.outputs.push }} | ||
cache-from: | | ||
${{ env.IMAGE_NAME }} | ||
type=gha | ||
cache-to: | | ||
type=inline | ||
type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# This MegaLinter workflow is very experimental stage. Open to changes and updates. | ||
# https://github.com/PRQL/prql/pull/1974 | ||
|
||
# MegaLinter GitHub Action configuration file | ||
# More info at https://megalinter.io | ||
name: MegaLinter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: # Comment env block if you do not want to apply fixes | ||
# Apply linter fixes configuration | ||
# APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool) | ||
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all) | ||
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request) | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: MegaLinter | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances | ||
|
||
# MegaLinter | ||
- name: MegaLinter | ||
id: ml | ||
# You can override MegaLinter flavor used to have faster performances | ||
# More info at https://megalinter.io/flavors/ | ||
uses: oxsecurity/megalinter@v6 | ||
env: | ||
# All available variables are described in documentation | ||
# https://megalinter.io/configuration/ | ||
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref | ||
== 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Override with true if you always want to lint all sources | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY | ||
# DISABLE: COPYPASTE,SPELL # Uncomment to disable copy-paste and spell checks | ||
|
||
# Upload MegaLinter artifacts | ||
- name: Archive production artifacts | ||
if: ${{ success() }} || ${{ failure() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: MegaLinter reports | ||
path: | | ||
megalinter-reports | ||
mega-linter.log | ||
# Create pull request if applicable (for now works only on PR from same repository, not from forks) | ||
- name: Create Pull Request with applied fixes | ||
id: cpr | ||
if: | ||
steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == | ||
'all' || env.APPLY_FIXES_EVENT == github.event_name) && | ||
env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' | ||
|| github.event.pull_request.head.repo.full_name == github.repository) | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} | ||
commit-message: "[MegaLinter] Apply linters automatic fixes" | ||
title: "[MegaLinter] Apply linters automatic fixes" | ||
labels: bot | ||
- name: Create PR output | ||
if: | ||
steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == | ||
'all' || env.APPLY_FIXES_EVENT == github.event_name) && | ||
env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' | ||
|| github.event.pull_request.head.repo.full_name == github.repository) | ||
run: | | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | ||
# Push new commit if applicable (for now works only on PR from same repository, not from forks) | ||
- name: Prepare commit | ||
if: | ||
steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == | ||
'all' || env.APPLY_FIXES_EVENT == github.event_name) && | ||
env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && | ||
(github.event_name == 'push' || | ||
github.event.pull_request.head.repo.full_name == github.repository) | ||
run: sudo chown -Rc $UID .git/ | ||
- name: Commit and push applied linter fixes | ||
if: | ||
steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == | ||
'all' || env.APPLY_FIXES_EVENT == github.event_name) && | ||
env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && | ||
(github.event_name == 'push' || | ||
github.event.pull_request.head.repo.full_name == github.repository) | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
branch: | ||
${{ github.event.pull_request.head.ref || github.head_ref || | ||
github.ref }} | ||
commit_message: "[MegaLinter] Apply linters fixes" |
Oops, something went wrong.