Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Entry error, can not include space in path ? #4221

Open
Dynesshely opened this issue Apr 14, 2024 · 3 comments
Open

Entry error, can not include space in path ? #4221

Dynesshely opened this issue Apr 14, 2024 · 3 comments
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@Dynesshely
Copy link

Environment

  • Dart version (run dart --version):
    • Dart SDK version: 3.3.3 (stable) (Tue Mar 26 14:21:33 2024 +0000) on "windows_x64"
  • OS kind and version (e.g. "Windows 10, version 1809" or "macOS 12.4"):
    • Windows 11 23H2 (22631.3447)
  • Are you using the Chinese community mirror or a corporate firewall?
    • Nope, I'm using proxy with default pub source

Problem

When run dart pub publish, the console output error is:

Invalid argument(s): Entry E:\Development\Projects\Crequency\KitX\KitX Standard\KitX%20Shared\KitX.Shared.Dart\kitx_shared_dart is not inside E:\Development\Projects\Crequency\KitX\KitX Standard\KitX Shared\KitX.Shared.Dart\kitx_shared_dart.
package:pub/src/io.dart 1125:9  createTarGz.<fn>
This is an unexpected error. The full log and other details are collected in:

    C:\Users\Dynesshely\AppData\Local\Pub\Cache\log\pub_log.txt

Consider creating an issue on https://github.com/dart-lang/pub/issues/new
and attaching the relevant parts of that log file.

And I'm gussing is the createTarGz function doesn't think the path with %20 is not equals to ?

My project yaml file is:

name: kitx_shared_dart
description: A port of KitX.Shared in dart
version: 3.24.10+6873
repository: https://github.com/Crequency/KitX-Standard/KitX.Shared.Dart/

environment:
    sdk: ^3.3.0

dependencies:
    built_collection: ^5.1.1
    built_value: ^8.9.1

dev_dependencies:
    lints: ^3.0.0
    test: ^1.24.0
    # Run `dart run build_runner build` to generate `.g.dart` files.
    # You can also execute `build_runner.ps1` with pwsh to run the command.
    build_runner: ^2.4.9
    built_value_generator: ^8.9.1

Expected behavior

The library will be normally publish to pub.dev

Actual behavior

Failed at compressing.

--trace output

I attached the pub_log.txt

pub_log.txt

@sigurdm sigurdm added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Apr 15, 2024
@sigurdm
Copy link
Contributor

sigurdm commented Apr 15, 2024

And I'm gussing is the createTarGz function doesn't think the path with %20 is not equals to ?

Yeah - but where does %20 come from in the first place? I don't remember doing any url-encoding of paths when publishing.

It seems the first ' ' in the path is left untouched...

Would be great if you could make a reproduction I could look at.

@Dynesshely
Copy link
Author

It's very strange when I'm tring to reproduce this.

I created a new dart package with dart create -t package <PACKAGE_NAME> in a directory which is under a path with space.

And in this package, the dart pub publish --dry-run succeed without any trouble.

But back to https://github.com/Crequency/KitX-Standard/tree/dev%3Dmain/KitX%20Shared/KitX.Shared.Dart/kitx_shared_dart , I cloned this with a new environment, but it failed again.

And I found no difference (except pure dart code logic) on two package.

@sigurdm
Copy link
Contributor

sigurdm commented Apr 16, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants