Giter Site home page Giter Site logo

hyperpolyglot's People

Contributors

evancarroll avatar jondot avatar monkslc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hyperpolyglot's Issues

unable to detect rust without extension

tested against:

use std::collections::HashMap;
use std::fmt::{self, Debug, Formatter};
use std::path::{Path, PathBuf};
use crate::core::{Dependency, Package, PackageId, Source, SourceId, Summary};
use crate::sources::PathSource;

use crate::util::errors::CargoResult;
use crate::util::Config;
use anyhow::Context as _;
use cargo_util::{paths, Sha256};
use serde::Deserialize;

pub struct DirectorySource<'cfg> {
    source_id: SourceId,
    root: PathBuf,
    packages: HashMap<PackageId, (Package, Checksum)>,
    config: &'cfg Config,
}

#[derive(Deserialize)]
struct Checksum {
    package: Option<String>,
    files: HashMap<String, String>,
}

impl<'cfg> DirectorySource<'cfg> {
    pub fn new(path: &Path, id: SourceId, config: &'cfg Config) -> DirectorySource<'cfg> {
        DirectorySource {
            source_id: id,
            root: path.to_path_buf(),
            config,
            packages: HashMap::new(),
        }
    }
}

filename: code

Expected result: Rust
Actual result:

Fix Perl extensions

.pm and .pl are not Raku, they're Perl5 exclusive. See the commit message in #8 for more information.

Before patch on Debian's /usr/share/perl5

$ cargo run -- /usr/share/perl5 -sb | grep Raku
   Compiling hyperpolyglot v0.1.7 (/tmp/hyperpolyglot)
    Finished dev [unoptimized + debuginfo] target(s) in 4.84s
     Running `target/debug/hyply /usr/share/perl5 -sb`
0.57% Raku
Raku (10)
/usr/share/perl5/App/cpanminus.pm (Raku)
/usr/share/perl5/Data/Dump/FilterContext.pm (Raku)
/usr/share/perl5/Method/Generate/Accessor.pm (Raku)
/usr/share/perl5/Moo.pm (Raku)
/usr/share/perl5/Date/Language/Amharic.pm (Raku)
/usr/share/perl5/Date/Language/TigrinyaEritrean.pm (Raku)
/usr/share/perl5/Date/Language/TigrinyaEthiopian.pm (Raku)
/usr/share/perl5/LWP/DebugFile.pm (Raku)
/usr/share/perl5/MailTools.pm (Raku)
/usr/share/perl5/stat.pl (Raku)

After patch.

$ cargo run -- /usr/share/perl5
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/hyply /usr/share/perl5`
100.00% Perl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.