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

0.5.4 version fail to generate #99

Closed
RahnRazamai opened this issue Apr 2, 2024 · 8 comments · Fixed by #100 or #101
Closed

0.5.4 version fail to generate #99

RahnRazamai opened this issue Apr 2, 2024 · 8 comments · Fixed by #100 or #101
Assignees
Labels
bug Something isn't working

Comments

@RahnRazamai
Copy link

I noticed latest version caused something like this to throw error API_KEY=6690043050= the '=' in the value is throwing error. Is it intended? if not can please help to fix?

Below is the error thrown
[SEVERE] envied_generator:envied on lib/keys.dart:

Bad state: Pattern matching error
package:envied_generator/src/parser.dart 42:5 Parser.parseOne
package:envied_generator/src/parser.dart 23:38 Parser.parse
package:envied_generator/src/load_envs.dart 24:17 loadEnvs
package:envied_generator/src/generator.dart 60:9 EnviedGenerator.generateForAnnotatedElement
package:source_gen/src/output_helpers.dart 10:1 normalizeGeneratorOutput
package:async/src/stream_completer.dart 76:3 StreamCompleter.setSourceStream

@knottx
Copy link

knottx commented Apr 2, 2024

facing same issue. now I'm roll back to version 0.5.3

@techouse
Copy link
Collaborator

techouse commented Apr 2, 2024

Hi,

Just to clarify, your key is

API_KEY=6690043050=

?

EDIT: I have just implemented a fix in #100. Would you mind checking it out and reporting back any findings?

@techouse techouse self-assigned this Apr 2, 2024
@techouse techouse added the bug Something isn't working label Apr 2, 2024
@knottx
Copy link

knottx commented Apr 3, 2024

Hi,

Just to clarify, your key is

API_KEY=6690043050=

?

EDIT: I have just implemented a fix in #100. Would you mind checking it out and reporting back any findings?

My key is

URL_001=https://my.example.com/path/to/my/file.mp4?param1=value1&param2=value2

@techouse
Copy link
Collaborator

techouse commented Apr 3, 2024

@knottx @RahnRazamai can you both please test PR #100 by adding these dependency overrides to your pubspec.yaml

dependency_overrides:
  envied:
    git:
      url: https://github.com/petercinibulk/envied.git
      ref: fix/issue-99-double-equal-sign
      path: packages/envied
  envied_generator:
    git:
      url: https://github.com/petercinibulk/envied.git
      ref: fix/issue-99-double-equal-sign
      path: packages/envied_generator

@techouse
Copy link
Collaborator

techouse commented Apr 3, 2024

My key is

URL_001=https://my.example.com/path/to/my/file.mp4?param1=value1&param2=value2

Which has the same problem of multiple equal signs in the same env file line. PR #100 fixes this.

@knottx
Copy link

knottx commented Apr 3, 2024

@knottx @RahnRazamai can you both please test PR #100 by adding these dependency overrides to your pubspec.yaml

dependency_overrides:
  envied:
    git:
      url: https://github.com/petercinibulk/envied.git
      ref: fix/issue-99-double-equal-sign
      path: packages/envied
  envied_generator:
    git:
      url: https://github.com/petercinibulk/envied.git
      ref: fix/issue-99-double-equal-sign
      path: packages/envied_generator

Tested. it's work fine. 😃

techouse added a commit that referenced this issue Apr 3, 2024
@RahnRazamai
Copy link
Author

dependency_overrides:
  envied:
    git:
      url: https://github.com/petercinibulk/envied.git
      ref: fix/issue-99-double-equal-sign
      path: packages/envied
  envied_generator:
    git:
      url: https://github.com/petercinibulk/envied.git
      ref: fix/issue-99-double-equal-sign
      path: packages/envied_generator

its working perfectly now. Thanks for your swift action 🥳

petercinibulk pushed a commit that referenced this issue Apr 3, 2024
* 🐛 fix #99 parsing lines with multiple equals signs

* ✅ add test for #99
@techouse techouse linked a pull request Apr 3, 2024 that will close this issue
@techouse
Copy link
Collaborator

techouse commented Apr 3, 2024

Thank you @RahnRazamai and @knottx for testing the change. It will be released in PR #101 as v0.5.4+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants