Skip to content

Backport nested native publish fix #46

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 9, 2025
Merged

Conversation

PgBiel
Copy link
Member

@PgBiel PgBiel commented Mar 9, 2025

Backports gleam-lang/gleam#4256 to Glistix 0.7.0

PgBiel added 2 commits March 9, 2025 13:19
Backports PR gleam#4256:

export nested native files on publish

deduplicate native file extension check

nested erlang files in include/

clearer gitignore in project files test

fix fs formatting

add hidden files to tests

accept .gitignored and hidden files on publish

also affects the formatter
@PgBiel PgBiel added the upstream label Mar 9, 2025
@PgBiel PgBiel added this to the v0.7.0 milestone Mar 9, 2025
@PgBiel PgBiel merged commit d7695bf into main Mar 9, 2025
17 checks passed
@PgBiel PgBiel deleted the backport-nested-native-publish branch March 9, 2025 19:29
PgBiel added a commit that referenced this pull request Mar 15, 2025
PgBiel added a commit that referenced this pull request Mar 16, 2025
PgBiel added a commit that referenced this pull request Mar 16, 2025
PgBiel added a commit that referenced this pull request Mar 28, 2025
PgBiel added a commit that referenced this pull request Mar 28, 2025
* gleam 1.8.1 rebase

* license, notice, gitignore

* custom binaries

see df53d2f
included with 555c25c (Gleam 1.4.0
update)

* meta stuff

* workflows

* potentially removable changes

fix clippy is_none_or

temporary workaround for project_path_deps test

* containers

* rename crates to 'glistix_'

* set gleam version in version.rs

* add nix externals to capnp schema

see c3fb3c3 for original commit

* rename tests from gleam(_core)__ to glistix(_core)__

Please use 'bin/glistix-fix-test-names.sh' to auto-generate this commit
instead of frustratingly attempting to resolve conflicts.

* basic nix module and syntax

* add nix target, codegen and externals

see 17225bc and others

* fix tests after nix target

* nix: create initial prelude

* write and export nix prelude

* support nix target in compiler-wasm

see 1cee913

* add nix syntax highlighting to docs

see 6afecf4

* add external nix parse on type variant parse test

* add check for conflicting .gleam and .nix modules

see 84d17b2

* backport nested native publish fix

cf d7695bf (gh:#46)

* mention glistix in cli panic string

* add glistix config with initial #[glistix.preview.hex-patch] option

replaces dependencies when exporting (temporary)

see 83a630a

* add #[glistix.preview.local-override] option

Ensure root project's local dependencies take precedence over transitive
local dependencies of same name

see cdf2857 and subsequent commits

* improved dependency patching

moved config locked changes to stale_package_remover

cf gh:#44

cf f0f0df3 (add more patch info to errors)

cf 408dfdf (additional patching fixes -
gh:#48)

* patching attempt 2 - beginnings

* rename replacements to glistix_replacements for clarity

help when merging stuff in the future

* patch manifest requirements

needed for the locked() function

* fix inconsistency between manifest and compiled package config

During compilation, dependencies' configs must be updated, not only in
the CLI side when generating the manifest or reading the root config.

Otherwise, we'd get a warning saying that the dependency is importing a
module from something that it doesn't depend on, which it can only
suppose to be a transitive dependency.

* default config read to patching

* rename replacements to patches

* test glistix patches in dependency resolving

* make patch rename optional

* glistix patch: allow not specifying name, flatten source

* send unpatched hex dependencies when publishing

Ideally docs would be unpatched as well, but then we can't build.

* add patches to manifest

needed to know if they changed

* always unlock packages affected by new patches

For example, if we patch gleam_stdlib and rename it to glistix_stdlib,
now any packages depending on gleam_stdlib OR glistix_stdlib, as well as
both packages themselves (if they appear in the manifest), should be
considered stale and removed from the manifest.

* consider removed patches when unlocking

* use patch in 'glistix new'

Back out "cli/new: automatically clone stdlib,gleeunit"

This backs out commit c7b59c2.

* clippy and update tests

* fix windows tests

* don't make patched hex dependency a root dependency unless necessary

* add glistix_project_nix test

* add error hints suggesting patches

* improve link display in error message

* revert some clippy changes

* prompt version resolving when patches differ

* further changes to default gleam.toml

- remove hex-patch suggestion

* add test/glistix_project_nix to CI

* improve renamedpkg example in gleam.toml

* add 'maybe forgot patch hint' to unsupported nix target feature

* check for 'build/packages' for maybe forgot patch error hint

* add a comment to manifest requirement renaming

* regen manifest after 'glistix add' if patched dep was added

* remove unused patching functions

* add todo for better unlocking behavior in the future

* fix glistix new giving wrong version override suggestion

* add config patch tests

* fix: also patch dev deps

* fix: check for patch conflict, deterministic patch order

* small spacing changes in config.rs

* fix patching with local deps using relative paths

* add local patching test

* add glistix_hex_patching test

* fix unnecessary clone and add todo

* discourage local-overrides setting

Additional patching fixes (#48):

* fix language server patch

* default to gleam_stdlib dep by default

I think this might make more sense, might revert it later

* add deprecation warning for glistix.preview options

cf f64f24f (gh:#51)

* add deprecation warning

* use exclamation marks

* cli/new: add flake.nix with workflow, target=nix, patching

recommend depending on glistix_stdlib by default: see 2a26306

add book links: see f0f0df3

change 1: see aeb3b9f
(gh:#44) and 408dfdf (gh:#48)

initial: see 64710af,
c7b59c2,
a308328,
1b08191 and related commits

* test/: add external(nix) to subdir_ffi

* test/: add nix language tests

see 596dd60

* test/: test dependency patching

see #44

* nix snapshots

* all nix changes

* update nix pipeline assignment

cf gleam-lang/gleam@a3b8ec3

* nix: use docvec![] instead of ()
PgBiel added a commit that referenced this pull request Mar 29, 2025
PgBiel added a commit that referenced this pull request Mar 29, 2025
PgBiel added a commit that referenced this pull request Apr 13, 2025
PgBiel added a commit that referenced this pull request Apr 21, 2025
PgBiel added a commit that referenced this pull request Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant